$(document).ready(function() {
	currentBanner = 1;
	nextBanner = 2;
	totalBanners = $('div.banner li').length;
	for (i = 1; i <= totalBanners; i++) {
		if (i != currentBanner) {
			$('li.banner' + i).fadeOut();
		}
	}
	var bannerSliderInterval = setInterval(bannerSlider, 5000);
	
	$('div.callback input.text').focus(function(){
		if ($(this).val() == $(this).attr('title')) {
			$(this).val('');
		}
	});
	$('div.callback input.text').blur(function(){
		if ($(this).val() == '') {
			$(this).val($(this).attr('title'));
		}
	});
});

function bannerSlider() {
	$('li.banner' + currentBanner).fadeOut(600, function() {
		$('li.banner' + nextBanner).fadeIn(600);
		currentBanner = nextBanner;
		nextBanner = nextBanner + 1;
		if (nextBanner > totalBanners) {
			nextBanner = 1;
		}
	});
}


