//Function used as a global for showing and hiding with a site shade.
function defaultShowHideShade(type, id, width, height,scroll){
	var shade   = document.getElementById('site_shade');
	
	if(shade.style.display == 'none'){
		//If True, browser will scroll to the top of the page.
		if(scroll=='1'){
			$('html').animate({scrollTop:0}, 'slow');
		}
		shade.style.display="block";
	     	
	}else{
		shade.style.display="none";	
	}
};
//Function used for the actions of the Gallery
function viewGallery(){
	var shade_gallery   = document.getElementById('shade_gallery');
	if(shade_gallery.style.display == 'none'){
		shade_gallery.style.display = "block";
	}else{
		shade_gallery.style.display = "none";
	}
	$('#slider').nivoSlider({
		effect:'fade', //Specify sets like: 'fold,fade,sliceDown'
		slices:1,
		animSpeed:800,
		pauseTime:3000,
		startSlide:0, //Set starting Slide (0 index)
		directionNav:true, //Next & Prev
		directionNavHide:false, //Only show on hover
		controlNav:false, //1,2,3...
		controlNavThumbs:false, //Use thumbnails for Control Nav
      controlNavThumbsFromRel:false, //Use image rel for thumbs
		controlNavThumbsSearch: '.jpg', //Replace this with...
		controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
		keyboardNav:false, //Use left & right arrows
		pauseOnHover:true, //Stop animation while hovering
		manualAdvance:false, //Force manual transitions
		captionOpacity:0.8, //Universal caption opacity
		beforeChange: function(){},
		afterChange: function(){},
		slideshowEnd: function(){} //Triggers after all slides have been shown
	});
};
