// window load function
Cufon.replace('h2', { fontFamily:'Museo Slab' });
Cufon.replace('h3', { fontFamily:'Museo Slab' });

var url = window.location.pathname;  
  
var myPageName = url.substring(url.lastIndexOf('/') + 1);      
var iSliderImg = 0;
//alert(myPageName);

var  queryString = window.location.search.substring(1); 
//alert(queryString);  //output test=value 

switch(myPageName)
{
case "menu.asp":
  iSliderImg = 3;
  break;
case "events.asp":
  iSliderImg = 2;
  break;
 case "sponsors.asp":
  iSliderImg = 4;
  break;
default:
  
  if(queryString=="pg=2") // deck functions
  {
	iSliderImg = 1;
  }
  else
  {
	iSliderImg = 0;
  }
  
}



$(window).load(function() {
	$('#slider1').nivoSlider({ pauseTime:5000, pauseOnHover:false,startSlide:iSliderImg });
	setTimeout(function(){
		$('#slider2').nivoSlider({ pauseTime:5000, pauseOnHover:false });
	}, 1000);
	setTimeout(function(){
		$('#slider3').nivoSlider({
			pauseTime:5000,
			pauseOnHover:false,
			controlNavThumbs:true
		});
	}, 2000);
	setTimeout(function(){
		$('#slider4').nivoSlider({
			effect:'random',
			animSpeed:1500,
			pauseTime:5000,
			startSlide:2,
			directionNav:false,
			controlNav:true,
			keyboardNav:false,
			pauseOnHover:false
		});
	}, 3000);
});
