jQuery(document).ready(function(){
	setTimeout(slideShow,5000);
	
	jQuery(".navItem").hover(
	    function(){
	        jQuery(this).children("a").css("background-position","0px -28px");
	        jQuery(this).children("div.navSubmenu").show();
	    },
	    function(){
	        jQuery(this).children("a").css("background-position","0px 0px");
	        jQuery(this).children("div.navSubmenu").hide();
	    });

	jQuery("#theatreMenuLink, #musicMenuLink, #presentationsMenuLink").hover(
	    function(){
	        jQuery(this).css("background-position","0px -11px");
	    },
	    function(){
	        jQuery(this).css("background-position","0px 0px");
	    });
	    
	jQuery(".rolloverImageHolder").hover(
	    function(){ $(this).children("img, a").css("top","-" + $(this).height() + "px"); },
	    function(){ $(this).children("img, a").css("top","0px"); }
	);

});

function slideShow(){
    startSlideShow(0);
    setTimeout("startSlideShow(1)",3000);

}

function startSlideShow(index){
    var holder = jQuery(jQuery(".singleCell")[index]);
    if (holder.children("img").size()<2) return;
    if (holder.children("img:visible").length==3)
        holder.children("img").not(":last").hide();

    holder.children("img:visible").fadeOut(3500);
    
    if (holder.children("img:visible").next().size()==0) 
        holder.children("img:first").fadeIn(3500);
    else holder.children("img:visible").next().fadeIn(3500);
    setTimeout("startSlideShow("+index+")",10000)
}
