$(document).ready(function()
{

	/* 
		$('#page').pngFix();
		
		
	*/
	
	$("a.fancybox").fancybox();
	
	$('#sidebar').height($("#pagecontent").height() + 40);

	$('#vesselimage').height($("#pagecontent").height() + 40);
	
	$('#navigation ul ul li a.not-selected').animate({opacity: 0.5},"fast");
		
	$('#navigation ul ul li a.not-selected').hover(function() 
	{
		$(this).animate({left: 15, opacity: 1},"normal");
		
	}, function() {
	
		$(this).animate({left: 0, opacity: 0.5},"normal");
		
	
	});
	
	var vacancies; 
	var curritem=0; 
	
	vacancies = $("#vacancies div.folder").size(); 
	
	$("#vacancies div.folder:eq("+curritem+")").css('top', '0px');
	
	setInterval(scrollvacancy,4000); //time in milliseconds 

	function scrollvacancy() { 
	
		$("#vacancies div.folder:eq("+curritem+")").animate({top: -50, opacity: 0.4},"slow",function(){ $(this).css("top","150px");; });
		curritem = ++curritem%vacancies; 
		$("#vacancies div.folder:eq("+curritem+")").animate({top: 0, opacity: 1},"slow");

	} 
		
	var active_color = '#000'; // Colour of user provided text
	var inactive_color = '#ccc'; // Colour of default text

	$("input.default-value").css("color", inactive_color);
  		var default_values = new Array();
		$("input.default-value").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];
			}
			});
  	});

});

