/***
 * Script: 	SmoothGallery Javascript Functions
 * Script URI:	http://www.angelguardians.org/
 * Author:	Paul Tulipana, Design Less Better
 * Author URI:	http://www.designlessbetter.com/
 * Last Updated:2008/04/30 @Pt
 ***/
 
/***
 * Because opacity doesn't validate for CSS 2.1, and since you have
 * to have javascript to get the opacity-related functions of this 
 * website anyway (aka. the browse buttons on the AJAX Image Gallery,
 * we're going to use some handy mootools selectors to apply our opacity 
 * settings. Also, because mootools doesn't allow you to set css hover states,
 * we're just adding mouseover and mouseout events to alter the opacity.
 ***/

function applyOpacity()
{
	if ($E('a.right'))
	{
		$E('a.right').setStyle("filter:","alpha(opacity=20)");
		$E('a.right').setStyle("-moz-opacity","0.2");
		$E('a.right').setStyle("-khtml-opacity", "0.2");
		$E('a.right').setStyle("opacity", "0.2");
		$E('a.left').setStyle("filter:","alpha(opacity=20)");
		$E('a.left').setStyle("-moz-opacity","0.2");
		$E('a.left').setStyle("-khtml-opacity", "0.2");
		$E('a.left').setStyle("opacity", "0.2");
		$E('a.right').addEvent('mouseover', function(e) {
			$E('a.right').setStyle("filter:","alpha(opacity=80)");
			$E('a.right').setStyle("-moz-opacity","0.8");
			$E('a.right').setStyle("-khtml-opacity", "0.8");
			$E('a.right').setStyle("opacity", "0.8");	
		});
		$E('a.right').addEvent('mouseout', function(e) {
			$E('a.right').setStyle("filter:","alpha(opacity=20)");
			$E('a.right').setStyle("-moz-opacity","0.2");
			$E('a.right').setStyle("-khtml-opacity", "0.2");
			$E('a.right').setStyle("opacity", "0.2");	
		});
		$E('a.left').addEvent('mouseover', function(e) {
			$E('a.left').setStyle("filter:","alpha(opacity=80)");
			$E('a.left').setStyle("-moz-opacity","0.8");
			$E('a.left').setStyle("-khtml-opacity", "0.8");
			$E('a.left').setStyle("opacity", "0.8");	
		});
		$E('a.left').addEvent('mouseout', function(e) {
			$E('a.left').setStyle("filter:","alpha(opacity=20)");
			$E('a.left').setStyle("-moz-opacity","0.2");
			$E('a.left').setStyle("-khtml-opacity", "0.2");
			$E('a.left').setStyle("opacity", "0.2");	
		});
	}
}
