/*
 *  AJUSTAR EL TAMAÑO DEL DIV DE CONTENIDO AL ESPACIO LIBRE
 *  EN FUNCION DE LOS PARÁMETROS DEFINIDOS EN LA CSS
 *
 *  MODIFICA: div#contenido {height}
 */

function ajustarContenido(){
	var altura = window.getSize().y;
	var anchura= window.getSize().x;
	$('fondo_sombra').setStyle('height',altura+'px');
	$('fondo_sombra').setStyle('width',anchura+'px');
	
}

// EVENTOS DE VENTANA

window.addEvent('load', function(){
	ajustarContenido();
});

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

$$('#menu a').set('morph', {duration: 150, transition: 'linear'});
$$('#menu a').addEvent('mouseenter', function(){this.morph({'margin-left': 0})});
$$('#menu a').addEvent('mouseleave', function(){this.morph({'margin-left': -7})}); 


$$('#social a').set('morph', {duration: 600, transition: 'elastic:out'});
$$('#social a').addEvent('mouseenter', function(){this.morph({'margin-top': 5})});
$$('#social a').addEvent('mouseleave', function(){this.morph({'margin-top': 0})});

ReMooz.assign('a.zoom', {
		'origin': 'div',
		'shadow': 'onOpenEnd', // fx is faster because shadow appears after resize animation
		'resizeFactor': 0.85, // resize to maximum 80% of screen size
		'cutOut': false, // don't hide the original
		'opacityResize': 0.4, // opaque resize
		'dragging': true, // disable dragging
		'centered': true // resize to center of the screen, not relative to the source element
	});

});

window.addEvent('resize', function(){
	ajustarContenido();
});

