$(document).ready(function()
{
	
	$('#bottom .column .slider li:nth-child(1)').addClass('visible');
	
	$("#header .container").jCarouselLite({
		btnGo: [".arrows .h1", ".arrows .h2", ".arrows .h3", ".arrows .h4", ".arrows .h5"],
		auto: 5000,
		speed: 1000,
		circular: true,
		visible: 1,
		afterEnd: function(elements) {
			$("#header .arrows a").removeClass("selected");
			$("#header .arrows a." + $(elements).attr("class")).addClass("selected");
		}
	});

	var leftImages = $("#bottom .column.partners .slider li");
	var rightImages = $("#bottom .column.pictures .slider li");
	var currentLeftImage = 0, currentRightImage = 0;

	setInterval(function() {
		$("#bottom .slider li.visible").css("zIndex", 1);

		currentLeftImage++;
		if(currentLeftImage >= leftImages.length)
		{
			currentLeftImage = 0;
		}
		currentRightImage++;
		if(currentRightImage >= rightImages.length)
		{
			currentRightImage = 0;
		}

		$([leftImages.get(currentLeftImage), rightImages.get(currentRightImage)]).css("zIndex", 2).fadeIn(1000, function() {
			$(this).parents("ul").find("li.visible").removeClass("visible");
			$(this).addClass("visible");
		});
	}, 5000);

	$(".dropdown").customStyle();
});
