var DecorateEffectButton = {
	init: function() {
		
		$$('.btn-add-to-cart').each( function(elmt) {
			Event.observe(elmt, 'mouseover', DecorateEffectButton.activeIt);
			Event.observe(elmt, 'mouseout', DecorateEffectButton.disableIt);
		});
		
	},
	
	activeIt: function(event) {
		$(this).addClassName('btn-add-to-cart-over');
	},
	
	disableIt: function(event) {
		$(this).removeClassName('btn-add-to-cart-over');
	}
}

var DecorateProductList = {
	init: function() {
		
		/*var currentTallest = 0;
		
		$$('.products-grid li').each( function(elmt) {
			
			var height = $(elmt).getHeight();
			
			if (height > currentTallest) { currentTallest = height; }

		});
		
		$$('.products-grid li').each( 
			function(elmt){
				$(elmt).setStyle({'height': currentTallest+'px'});
			}
		); */
		
		$$('.products-grid li').each( function(elmt) {
			Event.observe(elmt, 'mouseover', DecorateProductList.colorIt);
			Event.observe(elmt, 'mouseout', DecorateProductList.uncolorIt);
		});
		
	},
	
	colorIt: function(event) {
		$(this).addClassName('over');
	},
	
	uncolorIt: function(event) {
		$(this).removeClassName('over');
	}
}

Event.observe(window, "load", function() {
	DecorateEffectButton.init();
	DecorateProductList.init();
});
