window.addEvent('domready', function(){ 
	//product upgrade feature
	var upgradeProducts = $$('.rowUpgrade');
	
	upgradeProducts.each(function(thisUpgrade) {
		var btnUpgrade = thisUpgrade.getElementsByClassName('buttonUpgradeNow');
		var productUpgrade = thisUpgrade.id.split('upgrade_')[1]; 
		btnUpgrade.addEvent('click', function() {
			$(thisUpgrade).setStyles({
				display: 'none',
				opacity: 100
			});
			var fadeOutUpgrade = new Fx.Style(thisUpgrade, 'opacity', {duration: 800,wait:false} );
			fadeOutUpgrade.start(1,0);		
		
			$(productUpgrade).setStyles({
				display: 'block',
				opacity: 0
			});
			var fadeInUgrade = new Fx.Style(productUpgrade, 'opacity', {duration: 800,wait:false} );
			fadeInUgrade.start(0,1);			
			

		});
	});
	
});