window.addEvent('domready', function(){

	var el = $$('.portfolioLink');
	var beforeColorBG = el.getStyles('border', 'color');

	el.addEvents({
        mouseenter: function(){ 
            // Change background color on mouseover
            
		this.getElement('.opaque').set('morph', {duration: 'short', transition: 'Quart:out'});
		this.getElement('.portfolioItem').set('morph', {duration: 'short', transition: 'Quart:out'});
		this.set('morph', {duration: 4000, transition: 'Quart:out'});
		
         
            this.getElement('.opaque').morph({
            	'left': 215,
            	'opacity': .7
            });
            this.getElement('.portfolioItem').morph({
            	'left':230
            });
		},
        mouseleave: function(){
            // Morphes back to the original style
            
            this.getElement('.opaque').morph({
            	'left': 442,
            	'opacity': 1
            });
            this.getElement('.portfolioItem').morph({
            	'left':442
            });
        }
    });
});