$(document).ready(function() {
	$counterInterval = setInterval("vhqRotator('')", 10000);
	$('#boardBar > a').click(function(e) {
		clearInterval($counterInterval);
		vhqRotator($(this));
		e.preventDefault();
	});
	vhqRotator('');
});
function vhqRotator(e) {
	if (!e) {
		if ($('.counterActive').length > 0) {
			e = $('.counterActive');
			if (e.next('a').length > 0) {
				e = e.next('a');
			} else {
				e = $('#boardBar').children('a:first');
			}
		} else {
			e = $('#boardBar').children('a:first');
		}
	}
	$('.counterActive').removeClass('counterActive');
	u = e.attr('href');
	e.addClass('counterActive');
	$('#board').animate({opacity: 'toggle'}, function() {$(this).css("background-image", "url(\"" + u + "\")").animate({opacity: 'toggle'})});
}
