/***
 * Script: 		  Fanatic Finish Image Gallery Javascript Functions
 * Script URI:	  http://www.fanatic-finish.com
 * Author:	      Eduard Ionescu
 * Author email:  errorsmith@gmail.com
 * Last Updated:  2008/06/23
 ***/
 
/***
 * 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=100)");
			$E('a.right').setStyle("-moz-opacity","1.0");
			$E('a.right').setStyle("-khtml-opacity", "1.0");
			$E('a.right').setStyle("opacity", "1.0");	
		});
		$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=100)");
			$E('a.left').setStyle("-moz-opacity","1.0");
			$E('a.left').setStyle("-khtml-opacity", "1.0");
			$E('a.left').setStyle("opacity", "1.0");	
		});
		$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");	
		});
	}
}