var btRotate = true;
var btCounter = 1;
var btTimeout;
var btMouseOver = false;
function featureBtItem(t) {
	if(!btMouseOver && !$(t).parent('h2').hasClass('selected')) {
		btMouseOver = true;
		$('#big-top ul li h2.selected').removeClass('selected');
		$(t).parent('h2').addClass('selected');
		$('#big-top > p > span').html($(t).parent('h2').html());
		var thisImage = $(t).parent('h2').prev('a').children('img');
		$('#big-top ul li img:visible').fadeOut(50, function(){
			$(thisImage).fadeIn(50, function() {
				btMouseOver = false;
			});
		});
	}
}
function rotateBt() {
	if( btCounter == $('#big-top ul li').size() ) {
		btCounter = 0;
		btRotate = false;
	}
	featureBtItem($('#big-top ul li:eq(' + btCounter + ') h2 a'));
	btCounter++;
	startTimeout(5000);
}
function startTimeout(t) {
	clearTimeout(btTimeout);
	if(btRotate) {
		btTimeout = setTimeout("rotateBt()",t);
	}
}
$('#big-top').mouseenter(function(){ clearTimeout(btTimeout); });
$('#big-top ul li img:eq(0)').fadeIn(100);
$('#big-top > p > span').html($('h2.selected').html());
if( jQuery.browser.msie ) {
	$('#big-top ul li h2 a span').each(function() {
		$(this).css('display','block').css('padding-top',($(this).parent('a').height() - $(this).height()) / 2);
	});
	try { document.execCommand("BackgroundImageCache", false, true); } catch(err) {}
}
$('#big-top ul li h2 a').mouseover(function(){
		featureBtItem(this);
});
startTimeout(7000);

