// JQuery Document

$(document).ready( function() {
	
	$("#thumbnails img").css("border", "2px solid #22480F"); 			//off-image border 
	$("#thumbnails img:first").css("border", "2px solid #6a2bfe"); 		//on-image border
	
	var $info =  $("#thumbnails img:first").attr('id');
	
	$("#thumbnails img").click(function(){	
		var $obj = $(this);
		$info =  $obj.attr('id');
		$arr = $info.split("_");
		$("#big_image img").attr({
			src: "images/big/" + $arr[0] + "_" + $arr[1] + "_big.jpg"
								 });
		$("#thumbnails img").css("border", "2px solid #22480F");  		//off-image border 
		$obj.css("border", "2px solid #6a2bfe"); 						//on-image border
  	});
	
	$("#thumbnails img").mouseover(function(){	
		$(this).css("border", "2px solid #6a2bfe"); 					//on-image border
  	});
	
	$("#thumbnails img").mouseout(function(){	
		if(!($(this).attr("id") == $info)){
			$(this).css("border", "2px solid #22480F");  					//off-image border 
		}
  	});
	
	$('.slideshow').cycle({
		fx: 'fade' ,// choose your transition type, ex: fade, scrollUp, shuffle, etc... 
		delay:0, //additional delay (in ms) for first transition (hint: can be negative)
    	speed:  3500, //speed of the transition
    	timeout:  2500 //milliseconds between slide transitions (0 to disable auto advance)

	});	

	
})



