$(document).ready(function(){
	hoverNavAni();
	hoverThumbs();
 });


function hoverThumbs() {	
	$(".thumbnail").hover(function(){
		$(this).addClass("over");
	}, function(){
		$(this).removeClass("over");
	});

}


function hoverNavAni() {
	$("#global_nav ul > li").hover(function(){
		$(this).children("img").fadeIn(300);
	}, function(){
		$(this).children("img").fadeOut(300);
	});
}


//slide show
// function slideShow() {
// 	
// 	var images = $('#images img');
// 	var next = $('#next');
// 	var previous = $('#previous');
// 	var currentImage = 0;
// 	var nextImage = currentImage + 1;
// 	var previousImage = null;
// 	var num_images = images.length -1;
// 
// 	images.each(function(i){
// 		if (i > 0) {
// 			$(this).hide();
// 			$('#count').html("Picture " + (currentImage + 1) + " of " + (num_images + 1));
// 		}
// 	});
// 	
// 		
// 	next.click(function(){
// 		if (currentImage < num_images) {
// 			$(images[currentImage]).hide();
// 			nextImage = currentImage + 1;
// 			$(images[nextImage]).show();
// 			currentImage ++;
// 			$('#count').html("Picture " + (currentImage + 1) + " of " + (num_images + 1));
// 
// 		}
// 	 });
// 	
// 	previous.click(function(){
// 	
// 		if (currentImage != 0) {
// 			$(images[currentImage]).hide();	
// 			previousImage = currentImage - 1;
// 			$(images[previousImage]).show();
// 			currentImage --;
// 			$('#count').html("Picture " + (currentImage + 1) + " of " + (num_images + 1));
// 			
// 			// //TODO Move this to its own dealio
// 			// if (currentImage >= num_images) {
// 			// 						next.addClass('off');
// 			// 					} else {
// 			// 						next.removeClass('off');
// 			// 					}
// 			// if (currentImage == 0){
// 			// 	previous.addClass('off');
// 			// 	console.log('previous off');
// 			// } else {
// 			// 	console.log('previous on');
// 			// } 		
// 		} 
// 		
// 	 });
// 
// 	function checkControls() {
// 		if (currentImage >= num_images) {
// 			next.css({display:"none"});;
// 			console.log('next off');
// 		} else if (currentImage < num_images){
// 			next.css({display:"block"});;
// 			
// 			// console.log('next on');
// 		}
// 	}
// 
// }
// 

