//initiate dropdown menu
$(function() { 
	
	$('#content > div').corner("15px");
	$('.image_gallery').fancybox();
	
	
	$('ul.nav').superfish();
	//show / hide default input values on select 
	var active_color = '#000000'; // Colour of user provided text
	var inactive_color = '#1b1b1b'; // Colour of default text
	$("input.default").css("color", inactive_color);
	var default_values = new Array();
	$("input.default").focus(function() {
		if (!default_values[this.id]) {
			default_values[this.id] = this.value;
		}
		if (this.value == default_values[this.id]) {
			this.value = '';
			this.style.color = active_color;
		}
		$(this).blur(function() {
			if (this.value == '') {
				this.style.color = inactive_color;
				this.value = default_values[this.id];
			}
		});
	});
	//hover over news blocks
	$('#content .block a.news').hover( function() {
		$(this).parent().find('h3').addClass('highlight').removeClass('lowlight');
		$(this).parent().find('p.author').addClass('highlight').removeClass('lowlight');
		$(this).parent().find('p.date').addClass('highlight').removeClass('lowlight');
	}, 
	function (){
		$(this).parent().find('h3').addClass('lowlight').removeClass('highlight');
		$(this).parent().find('p.author').addClass('lowlight').removeClass('highlight');
		$(this).parent().find('p.date').addClass('lowlight').removeClass('highlight');
	});
	
	//apply a hover for the titles of news blocks
	$('#content .lowlight').hover( function() {
		$(this).parent().find('h3').addClass('highlight').removeClass('lowlight');
		$(this).parent().find('p.author').addClass('highlight').removeClass('lowlight');
		$(this).parent().find('p.date').addClass('highlight').removeClass('lowlight');
	}, 
	function (){
		$(this).parent().find('h3').addClass('lowlight').removeClass('highlight');
		$(this).parent().find('p.author').addClass('lowlight').removeClass('highlight');
		$(this).parent().find('p.date').addClass('lowlight').removeClass('highlight');
	});	

	//initiate the fancybox lightbox
	//$("a.fancy").fancybox(); 
	 
});
