// Set handlers for gallery mouse events
function initGallery(){
	if (document.getElementById){
		
		// Get Gallery module
		galleryObj							= document.getElementById("gallery");
		
		// Get thumbnails
		liObj								= galleryObj.getElementsByTagName("ul")[0].getElementsByTagName("li");
		
		// Loop through thumbnails
		for (l=0; l<liObj.length; l++){
			
			// Get image
			imgObj							= liObj[l].getElementsByTagName("a")[0].getElementsByTagName("img")[0];
			
			// Set initial style
			imgObj.style.opacity			= "1";
			imgObj.style["-moz-opacity"]	= "1";
			imgObj.style.filter				= "alpha(opacity=100)";
			
			// Set mouseover event handler
			imgObj.onmouseover	= function(){
				this.style.opacity			= "0.65";
				this.style["-moz-opacity"]	= "0.65";
				this.style.filter			= "alpha(opacity=65)";
			};
			
			// Set mouseout event handler
			imgObj.onmouseout	= function(){
				this.style.opacity			= "1";
				this.style["-moz-opacity"]	= "1";
				this.style.filter			= "alpha(opacity=100)";
			};
		}
		
	// Legacy Browsers	
	} else {
		return false;
	}
}
