function viewMore() {
	// simple fix for flash to bounce to anchor
	window.location = window.location.href + ((window.location.href.indexOf('#r') > -1) ? '' : '#r');
}

$(document).ready(function(){
    $("#celebrities > ul").tabs(Math.floor(Math.random() * 3) + 1, {
    	fxFade: true,
    	fxSpeed: 'fast',
    	click: function() {
    		clearInterval(frontRotate);
    		frontRotate = setInterval(randomTab, 5000);
    		}
    	});
    var frontRotate = setInterval(randomTab, 5000);
});

function randomTab() {
    /*var ran = Math.floor(Math.random() * 3) + 1;
    if (ran == $("#celebrities > ul").tabsSelected()) {
    	return randomTab();
    } else {
    	$("#celebrities > ul").tabsClick(ran);
    }*/
    var next = $("#celebrities > ul").tabsSelected() + 1;
    if (next > 4) next = 1;
    $("#celebrities > ul").tabsClick(next)
}