
// VIDEOS

$('#video p.video').hide();
$('#video p.video:nth-child(1)').show();

$('#video p#buttons a:nth-child(1)').addClass('active');

$('#video p#buttons a').click(function() {

	$('#video p.video').hide();

	$('#video p#buttons a').removeClass('active');
	$(this).addClass('active');
	
	return false;
							  
});

$('#video p#buttons a:nth-child(1)').click(function() { $('#video p.video:nth-child(1)').show(); });
$('#video p#buttons a:nth-child(2)').click(function() { $('#video p.video:nth-child(2)').show(); });
$('#video p#buttons a:nth-child(3)').click(function() { $('#video p.video:nth-child(3)').show(); });
$('#video p#buttons a:nth-child(4)').click(function() { $('#video p.video:nth-child(4)').show(); });
$('#video p#buttons a:nth-child(5)').click(function() { $('#video p.video:nth-child(5)').show(); });



// FAQS

$('#box1 ul li p').hide();

$('#box1 ul li a').click(function() {

	$(this).next().slideToggle('fast');
	
	return false;
							  
});



// ROTATE LOGOS

jQuery('#box3 #images p').hide();

var logosNum = jQuery('#box3 #images p').length;

var ii = 0;

var logosRotate = function() {
	if (ii < logosNum) {
		if ( ii > 0 ) {
			jQuery('#box3 #images p:nth-child(' + ii + ')').fadeOut('slow', function() {
				ii++;
				jQuery('#box3 #images p:nth-child(' + ii + ')').fadeIn('slow');
			});
		} else {
			ii++;
			jQuery('#box3 #images p:nth-child(' + ii + ')').fadeIn('slow');
		}
	} else {
		jQuery('#box3 #images p:nth-child(' + ii + ')').fadeOut('slow', function() {
			ii = 1;
			jQuery('#box3 #images p:nth-child(' + ii + ')').fadeIn('slow');
		});
	}
}

logosRotate();

var interv = setInterval("logosRotate()", 4000);



// EXPAND-CONTRACT SERVICES

$('#services li div.txt').hide();

$('#services li div.txt p:first-child').show();

$('#services a.expand').click(function (){
	$(this).parent().prev('div').slideToggle('fast');
	$(this).toggleClass('contract');
	$(this).text('Contract');

	if ( $(this).hasClass('contract') ) $(this).text('Contract');
	else $(this).text('Expand');
	
	$(this).blur();
	
	return false;

});