window.addEvent('domready', function(){
	
	var el = $$('#posts'),
    color = el.getStyle('backgroundColor');

    $$('#posts li').addEvents({
        mouseenter: function(){
            // We set the cursor to pointer so users know they can click this region
            this.setStyle('cursor','pointer');

            // Change background color on mouseover
            this.morph({
    	        'background-color': '#f0f0f0'
                /* 'background-image': 'url(images/navihg.gif)', //Background image
                'background-position': [0, 300], //image will move from left to right - Values are in pixels.
                'border': '0px' */
            });
		},
        mouseleave: function(){
            // Morphes back to the original style
            this.morph({
             //   'margin': '0px',
			//	'padding' : '0px',
			//	'list-style-type' : 'none',
			//	'line-height' : '140%;',
            //  'background-image': 'none',
                'background-color' : '#fff'
            });
        }
    });


    //We retrieve the link location (href) and assign it to LI to make the whole region clickable
    /* var link = $$('#posts li a');
    link.each(function(element) {
        element.getParent().addEvent('click', function(){
            window.location = element.get('href');
            // on click, background color and border will turn to a different color
            this.morph({
                // 'border': '1px solid #eee',
                // 'background-image': 'none',
                'background-color': '#fff'
            });
        });
    });*/

});

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

	var status = {
		'true': 'open',
		'false': 'clóse'
	};
	
	if(document.getElementById("horizontal_slide") && document.getElementById("h_slidein")){
		var myHorizontalSlide = new Fx.Slide('horizontal_slide').hide();
	
		$('h_slidein').addEvent('click', function(e){
			e.stop();
			myHorizontalSlide.slideIn();
			document.getElementById("h_slidein").style.display = 'none';
		});
		
		$('h_slidein2').addEvent('click', function(e){
			e.stop();
			myHorizontalSlide.slideIn();
			document.getElementById("h_slidein").style.display = 'none';
			imageForward();
		});
		
		if(document.getElementById("slidein_team")){
		
			$('h_slidein_team').addEvent('click', function(e){
				e.stop();
				myHorizontalSlide.slideIn();
				document.getElementById("text_team").style.display = 'none';
				imageForward();
			});
		
		}
	
	}
	
	if(document.getElementById("text_info_2") && document.getElementById("tx_info_slidein") && document.getElementById("tx_info_slideout")){
		
		var txInfoSlide = new Fx.Slide('text_info_2').hide();
	
		$('tx_info_slidein').addEvent('click', function(e){
			document.getElementById("text_info").style.display = 'block';
			e.stop();
			txInfoSlide.slideIn();
		});
	
		$('tx_info_slideout').addEvent('click', function(e){
			e.stop();
			txInfoSlide.slideOut();
			// document.getElementById("text_info").style.display = 'none';
		});
	
	}

	
});

	
window.addEvent('domready', function(){
	
	var navi2Slide = new Fx.Slide('navi_2');
	navi2Slide.hide();

	window.addEvent('domready', function(){
		navi2Slide.slideIn();
		navi2Slide.show();
	});
});

