$(document).ready(function()
{
	

	$('#navigation > ul > li > a.not-selected').animate({opacity: 0.6},"fast");
		
	$('#navigation > ul > li > a.not-selected').hover(function() 
	{
		$(this).animate({top: -25, opacity: 1},"fast");
		
	}, function() {
	
		$(this).animate({top: 0, opacity: 0.6},"fast");
		
	
	});
	
	$('a._blank').click(function()
	{
		window.open(this.href);
		return false;
	});
		
	
	
	var vacancies; 
	var curritem=0; 
	
	vacancies = $("ul#news-ticker li a").size(); 
	
	$("ul#news-ticker li a:eq("+curritem+")").css('top', '20px');
	
	setInterval(scrollvacancy,2500); //time in milliseconds 

	function scrollvacancy() { 
	
		$("ul#news-ticker li a:eq("+curritem+")").animate({top: -30, opacity: 0.4},"slow",function(){ $(this).css("top","150px");; });
		curritem = ++curritem%vacancies; 
		$("ul#news-ticker li a:eq("+curritem+")").animate({top: 20, opacity: 1},"slow");

	} 


	$("#navigation ul li").hover(
			function(){ $("#navigation ul li ul", this).show(); }, 
			function() { } 
		);
		if (document.all) {
			$("#navigation ul li").hoverClass("sfHover");
		}
		
	
	/******************************************************************************
	* begin slider
	******************************************************************************/
	
	var photocontainer_width = 0;
	
	$("#photoslider div.photocontainer img").each(
	
		function()
		{
			photocontainer_width += $(this).width() + 1; // + 1 px border
		}
	);
	
	// wc(photocontainer_width);
	
	$("#photoslider div.photocontainer").width(photocontainer_width);
	
	function slide_images() { 
		
		// $("#photoslider div.photocontainer").css('left', '0px');
		
		$("#photoslider div.photocontainer").animate(
			
			{
				left: -1 * (photocontainer_width / 2)
								
			},
			
			//9000
			//24000,
			68000,
			
			'linear',
			
			function()
			{				
				$(this).css('left', '0px');
				
				slide_images();
			}
		);	
	}
	
	slide_images();
		
	// end slider
	
});

$.fn.hoverClass = function(c) {
	return this.each(function(){
		$(this).hover( 
			function() { $(this).addClass(c);  },
			function() { $(this).removeClass(c); }
		);
	});
};

function wc()
{
	if(window.console)
	{
		for(var i = 0; i < arguments.length; i++)
		{
			window.console.log(arguments[i]);
		}
	}
	else
	{
		//alert(msg);
	}
}
