
$('.slider .element').hide();
$('.slider .element:first').show();
$('.slider .toggler').click(function() {
	if ($(this).attr('href') == '#') {
		$('.slider .element:visible').slideUp({ duration: 1000, easing: 'easeInOutExpo'});
		var element = $('.element', $(this).parent().parent().parent());
		if ((element.is('div')) && (!element.is(':visible'))) {
			element.slideDown({ duration: 1000, easing: 'easeInOutExpo'});
			//$(document.body).scrollTo(element, 800 );
		}
	}
});


$('#banner img:first-child').show();

var bt = setInterval(banner_next, 5000);

function banner_next() {
	var current = $('#banner img:visible');
	current.fadeOut('slow');
	if (current.is(':last-child')) {
		$('#banner img:first-child').fadeIn('slow');
	} else {
		current.next().fadeIn('slow');
	}
}

$('#testimonials p:first').show();

var tt = setInterval(testimonials_next, 10000);

function testimonials_next() {
	var current = $('#testimonials p:visible');
	current.fadeOut('slow');
	if (current.is(':last-child')) {
		$('#testimonials p:first-child').fadeIn('slow');
	} else {
		current.next().fadeIn('slow');
	}
}

$('#highlighted p:first-child').show();

var tt = setInterval(highlighted_next, 5000);

function highlighted_next() {
	var current = $('#highlighted p:visible');
	current.fadeOut('slow');
	if (current.is(':last-child')) {
		$('#highlighted p:first-child').fadeIn('slow');
	} else {
		current.next().fadeIn('slow');
	}
}
