function rotateTab(industry, clicked) {
	var $nextindustry;
	var $next;
	var $active;
	var $color;
	
	if (clicked == true) { 
		window.TabClicked = true;
	} else {
		if (window.TabClicked == true) {
			return false;
		}
	}
	
	if (industry == 'start') {
		$nextindustry = 'manufacturing';
		//$("#banner_area h1").css("display", "block");
	}
	
	if (industry == 'hitech') {
		$next = $('#banner_messaging_hitech');
		$active = $('#banner_switch div.active');
		$color = '#2B67AF';
		numberSlide('nwone');
		$nextindustry = 'manufacturing';			
	}
	
	if (industry == 'manufacturing') {
		$next = $('#banner_messaging_manufacturing');
		$active = $('#banner_switch div.active');
		$color = '#08967E';
		numberSlide('nwtwo');
		$nextindustry = 'nonprofit';			
	}
	
	if (industry == 'nonprofit') {
		$next = $('#banner_messaging_nonprofit');
		$active = $('#banner_switch div.active');
		$color = '#AD4D61';
		numberSlide('nwthree');
		$nextindustry = 'services';			
	}
	
	if (industry == 'services') {
		$next = $('#banner_messaging_services');
		$active = $('#banner_switch div.active');
		$color = '#A3600F';
		numberSlide('nwfour');
		$nextindustry = 'retail';			
	}
	
	if (industry == 'retail') {
		$next = $('#banner_messaging_retail');
		$active = $('#banner_switch div.active');
		$color = '#595FEB';
		numberSlide('nwfive');
		$nextindustry = 'hitech';			
	}

	if (industry != 'start') {
	$active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
	}
		
	//$('#quote_area').css("background-color", $color).fadeIn();
	
	if (window.TabClicked != true) {
	//alert($nextindustry);
		setTimeout("rotateTab('" + $nextindustry + "',false)", 4000);
	}
}

function numberSlide (number) {
	document.getElementById('nwone').className = "number number_one";
	document.getElementById('nwtwo').className = "number";
	document.getElementById('nwthree').className = "number";
	document.getElementById('nwfour').className = "number";
	document.getElementById('nwfive').className = "number";
	
	document.getElementById(number).className = "number on";
}

/* Initialize everything */
$(document).ready(function() {
rotateTab('start',false);
});

