$(function() {
	
	var active_color = '#879ce2'; // Colour of user provided text
	var inactive_color = '#879ce2'; // Colour of default text
	
	//display default text in input fields
	$(".default-text").css("color", inactive_color);
	var default_values = new Array();
	$(".default-text").focus(function() {
		if (!default_values[this.name]) {
			default_values[this.name] = this.value;
		}
		if (this.value == default_values[this.name]) {
			this.value = '';
			this.style.color = active_color;
		}
		$(this).blur(function() {
			if (this.value == '') {
				this.style.color = inactive_color;
				this.value = default_values[this.name];
			}
		});
	});
	
	//trigger the lightboxes
	$("a.lightbox").fancybox({
		'titleShow'		: false,
		'transitionIn'	: 'elastic',
		'transitionOut'	: 'elastic'
	});
	
	//tabbed content
	$('a.tab2').click(function() {
		$('a.tab1').parent().removeClass('current');
		$(this).parent().addClass('current');
		//hide the current content
		$('div#textLH').css({'display':'none'});
		//replace it with the new content
		$('div#textAS').css({'display':'block'});
		return false;
	});
	$('a.tab1').click(function() {
		$('a.tab2').parent().removeClass('current');
		$(this).parent().addClass('current');
		//hide the current content
		$('div#textAS').css({'display':'none'});
		//replace it with the new content
		$('div#textLH').css({'display':'block'});
		return false;
	});

	//hide off the last hyphen in the sub nav in all browsers 
	$("#nav ul#subMenu li:last").css({backgroundImage:"none"});
});
