function doEnter()
{
    this.set('morph', {
        duration:150
    });
    this.morph({
        'opacity': 1
    });
}

function doLeave()
{
    this.set('morph', {
        duration:500
    });
    this.morph({
        'opacity': 0.6
    });
}

window.addEvent('domready', function() {
    $$('#images_container li').each(function(el){        
        el.setStyle('opacity', '0.6');        
        el.addEvent('mouseenter', doEnter);        
        el.addEvent('mouseleave', doLeave);        
    });        
    
    var size = document.getSize();
    
    window.addEvent('resize', function(){
        checkSize();
        var size = document.getSize();
        $('images_container').setStyle('height', size.y);
    });
    
    $('images_container').setStyle('height', size.y);
});
 
function checkSize() {
    
   
    var size = document.getSize();
    
    $('contacts').setStyle('height', size.y);
    $('contacts').getElement('table').setStyle('height', size.y);
        
        
}

function hideContacts() {
    $('contacts').morph({
        'opacity': 0
    });
}

 
function showContacts() {
    
    $('contacts').setStyles({
        opacity:'0', 
        display:'block'
    });
    
    checkSize();
   
    $('contacts').morph({
        'opacity': 1
    });
    
}
