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

	// The same as before: adding events
	if( $('footer_list') )
	{
		$('footer_list').addEvents({
			'click': function(){
				// Always sets the duration of the tween to 1000 ms and a bouncing transition
				// And then tweens the height of the element
				this.set('tween', {
					duration: 250,
					transition: Fx.Transitions.linear // This could have been also 'bounce:out'
				}).tween('height', '130px');
			},
			'mouseleave': function(){
				// Resets the tween and changes the element back to its original size
				this.set('tween', {}).tween('height', '20px');
			}
		});
	}

	if( $('drapeaux') )
	{
		$('drapeaux').setStyle('height', 'auto');
		var height = '17px';
		var oFlagSize = $('drapeaux').getSize();
		height = oFlagSize.y;
		$('drapeaux').setStyle('height', '17px');
		// The same as before: adding events
		$('drapeaux').addEvents({
			'click': function(){
				// Always sets the duration of the tween to 1000 ms and a bouncing transition
				// And then tweens the height of the element
				this.set('tween', {
					duration: 250,
					transition: Fx.Transitions.linear // This could have been also 'bounce:out'
				}).tween('height', height+'px');
			},
			'mouseleave': function(){
				// Resets the tween and changes the element back to its original size
				this.set('tween', {}).tween('height', '17px');
			}
		});
	}

	// The same as before: adding events
	if( $('myOtherElement') )
	{
		$('myOtherElement').addEvents({
			'mouseenter': function(){
				// Always sets the duration of the tween to 1000 ms and a bouncing transition
				// And then tweens the height of the element
				this.set('tween', {
					duration: 250,
					transition: Fx.Transitions.linear // This could have been also 'bounce:out'
				}).tween('height', '262px');
			},
			'mouseleave': function(){
				// Resets the tween and changes the element back to its original size
				this.set('tween', {}).tween('height', '20px');
			}
		});
	}

	// slide show languages
	if( $('slideshow') )
	{
		var oSlideshow = new HorizontalSlideshow('slideshow', 'content', 'block', 'navigation');
		oSlideshow.jumpToElement(1);
	}

	// slide show magazine
	if( $('slideshow2') )
		var oSlideshow2 = new HorizontalSlideshow('slideshow2', 'content2', 'block2', 'navigation2');

	// newsletter
	if( $('valid_newsletter') )
	{
		var email_default = $('email_newsletter').value;

		$('email_newsletter').addEvent('focus', function(e){
			if( this.value == email_default )
				this.value = '';
		});

		$('email_newsletter').addEvent('blur', function(e){
			if( this.value == '' )
				this.value = email_default;
		});

		$('newsletter_form').addEvent('submit', function(e){

			// stop submit on form
			e.stop();

			// get url to display in smoothbox
			var url = $('url_newsletter_pop').value;

			// get email in newsletter form
			var email = $('email_newsletter').value;

			// test if email is not email default
			if( email != email_default && email != '' )
			{
				//replace email value in template url
				url_smoothbox = url.replace('#email_value#', email);

				// display smoothbox
				TB_show( 'Newsletter', url_smoothbox );
			} else {
				$('email_newsletter').value = '';
			}
		});
	}

	// search engine
	if( $('fulltext_search_form') )
	{
		var fulltext_keyword = $('fulltext_keyword').value;

		$('fulltext_keyword').addEvent('focus', function(e){
			if( this.value == fulltext_keyword )
				this.value = '';
		});

		$('fulltext_keyword').addEvent('blur', function(e){
			if( this.value == '' )
				this.value = fulltext_keyword;
		});
	}

});
