$(document).ready(function(){
var allclicks=new Array("eventinfo","presenters","schedule","sponsors"); 
$(".topnavbutton").click(function() {

var sc=this.id;
var scn=sc.replace("top","");
for (var i=0; i<4; i++) {
if (allclicks[i]==scn) {
document.getElementById(allclicks[i]).style.display="block";
document.getElementById("top"+allclicks[i]).style.borderBottom="0px";
//document.getElementById("top"+allclicks[i]).style.position="relative";
//document.getElementById("top"+allclicks[i]).style.top="5px";
document.getElementById("top"+allclicks[i]).style.fontWeight="bold";
}
else {
document.getElementById(allclicks[i]).style.display="none";
document.getElementById("top"+allclicks[i]).style.border="1px solid";
document.getElementById("top"+allclicks[i]).style.fontWeight="normal";
}
}
})

$(".chefname").click(function() {
var color = "personalprofile-"+this.id;
var color2=this.id;
//var colorproperty=$("."+color).html();
var content=document.getElementById(color).innerHTML;
$(".presenterimages").hide();
$(".showwindow").html(content);
//$(".showwindow").html(colorproperty);
$(".chefnodetop").focus();
})

$(".Allchefname").click(function() {
$(".showwindow").html("");
$(".presenterimages").show();
})

/*$(".headshot").click(function() {
var vhead=this.id;
alert(vhead);
})*/



$(".chefhead").click(function() {
//document.getElementById("left-sidebar").focus();
var eheadid=this.id;
var sche=eheadid.replace("head-","");
var head = "personalprofile-"+sche;
//var colorproperty=color.html();
var content=document.getElementById(head).innerHTML;
$(".presenterimages").hide();
$(".showwindow").html(content);
$(".chefnodetop").focus();

})

$(".toppart").click(function() {
var eid="ev-"+this.id;
$(".toppart").css({'background-image':'url(http://www.starchefs.com/acquia/sites/default/files/images/button-tabs-png.png)'});
//document.getElementById(this.id).style.background="#666666";
//$(this).css({'font-weight':'bold'});
$(this).css({'background-image':'url(http://www.starchefs.com/acquia/sites/default/files/images/light.gif)'});
var econtent=document.getElementById(eid).innerHTML;
$(".showschedulewindow").html(econtent);
})


var newsitems; 
var curritem=0; 

 newsitems = $(".up .uto").hide().size(); 
	$(".up .uto:eq("+curritem+")").show(); 
    setInterval(ticknews,3800); //time in milliseconds 

function ticknews() { 
    $(".up .uto:eq("+curritem+")").hide(); 
    curritem = ++curritem%newsitems; 
    $(".up .uto:eq("+curritem+")").show(); 


} 


})







