var $j = jQuery.noConflict();

function slideSwitch() {
	var active = $j('#header_home div.active');
	if ( active.length == 0 )
	active = $j('#header_home div:last');
	var next = active.next().length ? active.next()
	: $j('#header_home div:first');
	active.addClass('last-active')
	.animate({opacity : 0.0}, 1000);
	next.css({opacity: 0.0})
	.addClass('active')
	.animate({opacity: 1.0}, 1000, function() {
	active.removeClass('active last-active');
	});
}

$j(document).ready(function() {
	
	$j(function() {
		setInterval( "slideSwitch()", 5000 );
	});
	
	$j("input").click(function() {
		var value = $j(this).attr("value");
		if (value == 'NAME' || value == 'PHONE NUMBER' || value == 'EMAIL' || value == 'CITY' || value == 'PROJECT INFO/QUESTIONS') {
			$j(this).attr("value","");
		}
	});
	$j("textarea").click(function() {
		var value = $j(this).attr("value");
		if (value == 'PROJECT INFO/QUESTIONS') {
			$j(this).attr("value","");
		}
	});
});
