var apparitionTwitter = function() {
	$('twtr-widget-1').setStyle('display','inline');
}
var retourPresentation = function() {
	var myFx = new Fx.Scroll('crea', {
		duration: 800,
		link: 'cancel'
	});
	$$('.retourPres').each(function(el, i){
		el.addEvent('click', function(e){
		e.stop();
		if(Browser.Engine.trident) {
			apparitionTwitter.delay(900);
		}
		myFx.toElement('container_quatre_boites');
		$('bandup-img').set('html','<a href="#" class="versCrea"><img src="_ressources/_elements/4-dernieres.gif" alt="Les 4 dernières créations en date" width="130" height="10"/></a><a href="marketing-et-supports-de-communication.php"><img src="_ressources/_elements/prestations.gif" alt="prestations" width="156" height="10"/></a>');
		$('vers_gauche').setStyle('display', 'none');
		$('vers_droite').set('html', '<a href="#" class="versCrea"></a>');
		versCrea();
		});
	});
}
var versCrea = function() {
	$('vers_gauche').setStyle('display', 'none');
	var myFx = new Fx.Scroll('crea', {
		duration: 800,
		link: 'cancel'
	});
	$$('.versCrea').each(function(el, i){
		el.addEvent('click', function(e){
		e.stop();
		if(Browser.Engine.trident) {
			$('twtr-widget-1').setStyle('display','none');
		}
		myFx.toElement('colun');
		$('bandup-img').set('html','<a href="#" class="retourPres"><img src="_ressources/_elements/retour.gif" alt="Retour à la présentation" width="46" height="10"/></a><a href="./4-suivantes.php"><img src="_ressources/_elements/4-suivantes.gif" alt="Les 4 créations suivantes" width="71" height="10"/></a><a href="marketing-et-supports-de-communication.php"><img src="_ressources/_elements/prestations.gif" alt="prestations" width="156" height="10"/></a>');
		$('vers_gauche').setStyle('display', 'inline');
		$('vers_droite').set('html', '<a href="./4-suivantes.php"></a>');
		retourPresentation();
		});
	});
	var myImages = new Asset.images(['_ressources/_elements/retour.gif', '_ressources/_elements/4-suivantes.gif']);
}
var noteApparenceUn = function() {
	if(Browser.Platform.mac || Browser.Platform.win || Browser.Platform.linux) {
		$('note-un').setStyle('margin-top', '-28px');
	}
	var noteEffectUn = new Fx.Morph($('note-un'), {duration: '200', link: 'cancel', transition: Fx.Transitions.Sine.easeOut});
	$('colun').addEvent('mouseover', function(e){
		e.stop();
		noteEffectUn.start({ 'margin-top' : ['-83px'] });
	});
	$('colun').addEvent('mouseout', function(e){
		e.stop();
		noteEffectUn.start({ 'margin-top' : ['-28px'] });
	});
	$('note-un').setStyle('opacity', '0.9');
}

var noteApparenceDeux = function() {
	if(Browser.Platform.mac || Browser.Platform.win || Browser.Platform.linux) {
		$('note-deux').setStyle('margin-top', '-28px');
	}
	var noteEffectDeux = new Fx.Morph($('note-deux'), {duration: '200', link: 'cancel', transition: Fx.Transitions.Sine.easeOut});
	$('coldeux').addEvent('mouseover', function(e){
		e.stop();
		noteEffectDeux.start({ 'margin-top' : ['-83px'] });
	});
	$('coldeux').addEvent('mouseout', function(e){
		e.stop();
		noteEffectDeux.start({ 'margin-top' : ['-28px'] });
	});
	$('note-deux').setStyle('opacity', '0.9');
}

var noteApparenceTrois = function() {
	if(Browser.Platform.mac || Browser.Platform.win || Browser.Platform.linux) {
		$('note-trois').setStyle('margin-top', '-28px');
	}
	var noteEffectTrois = new Fx.Morph($('note-trois'), {duration: '200', link: 'cancel', transition: Fx.Transitions.Sine.easeOut});
	$('coltrois').addEvent('mouseover', function(e){
		e.stop();
		noteEffectTrois.start({ 'margin-top' : ['-83px'] });
	});
	$('coltrois').addEvent('mouseout', function(e){
		e.stop();
		noteEffectTrois.start({ 'margin-top' : ['-28px'] });
	});
	$('note-trois').setStyle('opacity', '0.9');
}

var noteApparenceQuatre = function() {
	if(Browser.Platform.mac || Browser.Platform.win || Browser.Platform.linux) {
		$('note-quatre').setStyle('margin-top', '-28px');
	}
	var noteEffectQuatre = new Fx.Morph($('note-quatre'), {duration: '200', link: 'cancel', transition: Fx.Transitions.Sine.easeOut});
	$('colquatre').addEvent('mouseover', function(e){
		e.stop();
		noteEffectQuatre.start({ 'margin-top' : ['-83px'] });
	});
	$('colquatre').addEvent('mouseout', function(e){
		e.stop();
		noteEffectQuatre.start({ 'margin-top' : ['-28px'] });
	});
	$('note-quatre').setStyle('opacity', '0.9');
}

window.addEvent('domready', function() {
	if($('note-un')){ noteApparenceUn(); }
	if($('note-deux')){ noteApparenceDeux(); }
	if($('note-trois')){ noteApparenceTrois(); }
	if($('note-quatre')){ noteApparenceQuatre(); }
	if($('conteneur-crea')){ versCrea(); }
	if($('texte')){ if(Browser.Engine.gecko) { $('texte').setStyle('font-size', '99%'); } }
	var myTips = new Tips('.tiptop', {
        className: 'tip-menu',
        fixed: true,
        offset: {'x': -111, 'y': 20}
    });
    /*
$$('.twtr-hd').setStyle('display', 'none');
    $$('.twtr-ft').setStyle('display', 'none');
*/
});
