
$(document).ready(function()
{
	
	var t=setTimeout("(slide('#sliding-navigation', 4000, 1))",100);
});

function slide(navigation_id, time, multiplier)
{
	// creates the target paths
	var list_elements = navigation_id + " li.sliding-element";
	var link_elements = list_elements + " a";
	
	// initiates the timer used for the sliding animation
	var timer = 0;
	
	// creates the slide animation for all list elements 
	$(list_elements).each(function(i)
	{
		// margin left = - ([width of element] + [total vertical padding of element])
		$(this).css("margin-left","-500px");
		// updates timer
		timer = (timer*multiplier+time);
		$(this).animate({ marginLeft: "0" }, timer);
		$(this).animate({ marginLeft: "0" }, timer);
		$(this).animate({ marginLeft: "0" }, timer);
	});

}
