YAHOO.namespace('YAHOO.fotoloupe.FlashThumbnail') ;

YAHOO.fotoloupe.FlashThumbnail = function() {
	this.init('com-photo');
}

YAHOO.fotoloupe.FlashThumbnail.prototype = {
	targetClassName:null,
	init:function(className) {
		this.targetClassName = className ;
		var thumbs = YAHOO.util.Dom.getElementsByClassName(className);
		YAHOO.util.Event.addListener(thumbs, 'mouseover', this.onMouseOverHandler, this, true);
		YAHOO.util.Event.addListener(thumbs, 'mouseout', this.onMouseOutHandler, this, true);
	},
	onMouseOverHandler:function(e) {
		var target = YAHOO.util.Event.getTarget(e) ;
		while ( target.className != this.targetClassName ) target = target.parentNode ;
		target.style.opacity = .7 ;
	},
	onMouseOutHandler:function(e) {
		var target = YAHOO.util.Event.getTarget(e) ;
		while ( target.className != this.targetClassName ) target = target.parentNode ;
		target.style.opacity = 1 ;
	}
}

var flash_thumbs = new YAHOO.fotoloupe.FlashThumbnail();
