// Author:  Mark Pettit of {z}indexProductions


	// banner fade-in
var duration = 1500;
var steps = 20;


function opacityFilter(value) {
	var object=document.getElementById("banner");
	object.style.opacity=value;
	object.style.filter="alpha(opacity=" + (value * 100) + ");";
}

function changeOpacity() {
	for (i = 0; i <= 1; i += (1 / steps)) {
		setTimeout ("opacityFilter(" + i + ")", i * duration);
	}
}






	// Gallery Rollovers -- jQuery

$(document).ready(function() {
		
		// Preload all rollovers -- trick courtesy of Atlanta Jones
		$("#thumbs img").each(function() {
			// Set the original src
			rollsrc = $(this).attr("src");
			rollOVR = rollsrc.replace('1', '_alt');
			newImg = new Image(); // create new image obj
			$(newImg).attr("src", rollOVR); // set new obj's src
		});

		
		// Navigation rollovers
		$("#thumbs a").mouseover(function(){
			imgsrc = $(this).children("img").attr("src");
			
			if (typeof(imgsrc) != 'undefined') {
			imgsrcOVR = imgsrc.replace('1', '_alt');
			$(this).children("img").attr("src", imgsrcOVR);
			}
			
		});
		
		// on mouseout
		$("#thumbs a").mouseout(function(){
			if (typeof(imgsrc) != 'undefined') {
			$(this).children("img").attr("src", imgsrc);
			}
		});
		
});(jQuery);
