$(document).ready(function() {

	/* Wszystkie wartości są podane w milisekundach */
	
	var $speed = 200; /* czas trwania przejścia między slajdami */
	var $interval = 3500; /* czas pokazywania jednego slajdu */
	
	var $delay = 150; /* opóźnienie między "Opis" i "Rozwiązanie" w wyświetlaniu i chowaniu */
	var $duration = 150; /* czas trwania animacji "Opis" i "Rozwiązanie" */
	
	var $fadeTime = 150; /* czas trwania pokazywania i ukrywania "Technology" */
	
	
	$("div.slider").scrollable({
		keyboard: false,
		circular: true,
		speed: $speed
	}).autoscroll({
		interval: $interval
	}).navigator({
		indexed: true, 
		navi:'div.navi-numbers',
		activeClass: 'current'
	});

	
	$(".feat").hover(
		function() {
			$(this).children(".goal").animate({opacity: 'toggle', height: 'toggle'}, {duration: $duration});
			$(this).children(".solution").delay($delay).animate({opacity: 'toggle', height: 'toggle'}, {duration: $duration});
			var idx = $(this).attr("id");
			idx = idx.substring(7);
			$("div#techinfo" + idx).fadeIn($fadeTime);
		},
		function() {
			$(this).children(".goal").delay($delay).animate({opacity: 'toggle', height: 'toggle'}, {duration: $duration});
			$(this).children(".solution").animate({opacity: 'toggle', height: 'toggle'}, {duration: $duration});
			var idx = $(this).attr("id");
			idx = idx.substring(7);
			$("div#techinfo" + idx).fadeOut($fadeTime);
		}
	);
	
});
