$(function(){
   
   $(window).load(function(){
        if(scripts_isIE6)
            $(document).pngFix();
   });
   
   
   if($("#events-showhide").length > 0)
   {
   	$("#events-showhide a").click(function(){
   		var span = $(this).children("span");
   		$(".calendar-hide").toggle();
		if(span.html().toUpperCase() == "HIDE")
   			$(this).html("<span>Show</span> all shows this month");
   		else
   			$(this).html("<span>Hide</span> old shows this month");
   		
   	});
   }
});

var numEvents = 0;
var currEvent = 1;      //Current event

function initHomeEvents(numTrays){
   
   numEvents = numTrays;
    
    $("a.arrowPrev").click(function(){
        
        if(currEvent != 1){
            $("div.tray").animate({ left: '+=744' }, 1000, function(){
                currEvent--;
            });
        }
        
    });
    
    $("a.arrowNext").click(function(){
                
        if(currEvent != numEvents){
            $("div.tray").animate({ left: '-=744' }, 1000, function(){
                currEvent++;
            });
        }
    });
}
