function isInt(input){
	return typeof(input)=='number'&&parseInt(input)==input;
}

function maxRandom(max){
	var num = Math.round(Math.random()*10);
	if(num <= max && num != 0){
		return num;
	}else{
		return maxRandom(max);
	}
}

var timeout = 7000; // timeout holder (global)
var fadespeed = 500;
$(function(){	
	$('a').click(function(){
		this.blur();
	});

	var count = 0
	var current = 1;
	$('#signpost a').each(function(){
		count++;
		$(this).addClass('img_'+count);
		current = maxRandom(count)
	}).not('.img_'+current).hide();

	function switchImg(){
		$('#signpost a.img_'+current).delay(timeout).fadeOut(fadespeed,function(){
			current++;
			if(current > count){
				current = 1;
			}
			$('#signpost a.img_'+current).fadeIn(fadespeed, function(){
				switchImg();
			});
		})
	};
	if(count > 1){
		switchImg();
	}
});





