//ShareThis
stLight.options({publisher:'6cdf8b3d-947c-489e-a79b-08eef9107374'});

//Form Clear
function clearText(field){
	if (field.defaultValue == field.value) field.value = '';
	else if (field.value == '') field.value = field.defaultValue;
};

//Team Page Bio Open/Close
$(document).ready(function(){
	//Hide (Collapse) the toggle containers on load
	$(".biography").hide(); 
	//Switch the "Open" and "Close" state per click then slide up/down (depending on open/close state)
	$(".toggle").click(function(){
		$(this).toggleClass("active").prev().toggle();
		return false; //Prevent the browser jump to the link anchor
	});
});

//Customers Page Gallery Navigation - Hotel Groups
$(document).ready(function(){
	$("#hotelgroups2").hide(); 
	$('#hg1').click(function() {
		$('#hotelgroups1').show();
		$("#hotelgroups2").hide();
		return false;
	});
	$('#hg2').click(function() {
		$('#hotelgroups2').show();
		$("#hotelgroups1").hide();
		return false;
	});
});

//Customers Page Gallery Navigation - Individual Hotels
$(document).ready(function(){
	$("#indivhotels2").hide(); 
	$('#ih1').click(function() {
		$('#indivhotels1').show();
		$("#indivhotels2").hide();
		return false;
	});
	$('#ih2').click(function() {
		$('#indivhotels2').show();
		$("#indivhotels1").hide();
		return false;
	});
});

//Customers Page Gallery Popups
$(document).ready(function() {
	$("a.popup").fancybox({
		'padding'       :   15,
		'transitionIn'	:	'none',
		'transitionOut'	:	'none',
		'overlayColor'  :   '#0abaff',
		'titlePosition' :   'inside',
		'cyclic'        :   'true',
		'centerOnScroll':   'true'
	});
});

//Hotelier Form - Current Rep Company Other
$(document).ready(function() {
	$('#repcompany-other').hide();
	$('#repcompany').change(function() {
		if ($("#repcompany").val() === 'Other'){
			$('#repcompany-other').show();
		}
		else{
			$('#repcompany-other').hide();
		}
	});
}); 

//Hotelier Form - How Hear About Other
$(document).ready(function() {
	$('#hearabout-other').hide();
	$('#hearabout').change(function() {
		if ($("#hearabout").val() === 'Other'){
			$('#hearabout-other').show();
		}
		else{
			$('#hearabout-other').hide();
		}
	});
}); 
