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

// BANDEAU LIENS
var boxB1 = $('bandeau_1');
var fxB1 = boxB1.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});

// PLUS
var boxPLUS = $('plus_1');
var fxPLUS = boxPLUS.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});

// QUESTION MARK
var boxQ = $('question_mark');
var fxQ = boxQ.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});

// IMAGES
var boxI1 = $('videos_images');
var fxI1 = boxI1.effects({duration: 1, transition: Fx.Transitions.Quart.easeOut});
var boxI2 = $('photos_images');
var fxI2 = boxI2.effects({duration: 1, transition: Fx.Transitions.Quart.easeOut});
var boxI3 = $('webdesign_images');
var fxI3 = boxI3.effects({duration: 1, transition: Fx.Transitions.Quart.easeOut});
var boxI4 = $('creations_images');
var fxI4 = boxI4.effects({duration: 1, transition: Fx.Transitions.Quart.easeOut});
var boxI5 = $('projets_images');
var fxI5 = boxI5.effects({duration: 1, transition: Fx.Transitions.Quart.easeOut});
var boxI6 = $('competences_images');
var fxI6 = boxI6.effects({duration: 1, transition: Fx.Transitions.Quart.easeOut});

// BANDEAUX VIDE
var boxVIDE = $('bandeau_vide');
var fxVIDE = boxVIDE.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});

// BANDEAUX GRAND
var boxGB = $('grand_bandeau');
var fxGB = boxGB.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});

// BANDEAUX 1
var boxVIDEOS1 = $('videos_1');
var fxVIDEOS1 = boxVIDEOS1.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxVIDEOS2 = $('videos_2');
var fxVIDEOS2 = boxVIDEOS2.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxVIDEOS3 = $('videos_3');
var fxVIDEOS3 = boxVIDEOS3.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxPHOTOS1 = $('photos_1');
var fxPHOTOS1 = boxPHOTOS1.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxWEBDESIGN1 = $('webdesign_1');
var fxWEBDESIGN1 = boxWEBDESIGN1.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxCREATIONS1 = $('creations_1');
var fxCREATIONS1 = boxCREATIONS1.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxPROJETS1 = $('projets_1');
var fxPROJETS1 = boxPROJETS1.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxCOMPETENCES1 = $('competences_1');
var fxCOMPETENCES1 = boxCOMPETENCES1.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});

// BANDEAUX
var boxVIDEOS = $('videos');
var fxVIDEOS = boxVIDEOS.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxPHOTOS = $('photos');
var fxPHOTOS = boxPHOTOS.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxWEBDESIGN = $('webdesign');
var fxWEBDESIGN = boxWEBDESIGN.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxCREATIONS = $('creations');
var fxCREATIONS = boxCREATIONS.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxPROJETS = $('projets');
var fxPROJETS = boxPROJETS.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxCOMPETENCES = $('competences');
var fxCOMPETENCES = boxCOMPETENCES.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});

// NAVIGATIONS
var boxNAV1 = $('cadre_1');
var fxNAV1 = boxNAV1.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxNAV2 = $('cadre_2');
var fxNAV2 = boxNAV2.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxNAV3 = $('cadre_3');
var fxNAV3 = boxNAV3.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxNAV4 = $('cadre_4');
var fxNAV4 = boxNAV4.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxNAV5 = $('cadre_5');
var fxNAV5 = boxNAV5.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxNAV6 = $('cadre_6');
var fxNAV6 = boxNAV6.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});

// BOUTONS NAVIGATIONS
var boxBT_VIDEOS = $('bt_nav_videos');
var fxBT_VIDEOS = boxBT_VIDEOS.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxBT_PHOTOS = $('bt_nav_photos');
var fxBT_PHOTOS = boxBT_PHOTOS.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxBT_WEBDESIGN = $('bt_nav_webdesign');
var fxBT_WEBDESIGN = boxBT_WEBDESIGN.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxBT_CREATIONS = $('bt_nav_creations');
var fxBT_CREATIONS = boxBT_CREATIONS.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxBT_PROJETS = $('bt_nav_projets');
var fxBT_PROJETS = boxBT_PROJETS.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxBT_COMPETENCES = $('bt_nav_competences');
var fxBT_COMPETENCES = boxBT_COMPETENCES.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});

// CONTENU
var boxCONTENU1 = $('contenu_1');
var fxCONTENU1 = boxCONTENU1.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxCONTENU1A = $('contenu_1A');
var fxCONTENU1A = boxCONTENU1A.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxC1 = $('contenu_decision');
var fxC1 = boxC1.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxC2 = $('contenu_runteaser');
var fxC2 = boxC2.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxC3 = $('contenu_smile');
var fxC3 = boxC3.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxC4 = $('contenu_cosmetique');
var fxC4 = boxC4.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});

// VIDEOS
var boxV1 = $('videos_p1');
var fxV1 = boxV1.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxV2 = $('videos_p2');
var fxV2 = boxV2.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxV3 = $('videos_p3');
var fxV3 = boxV3.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxV4 = $('videos_p4');
var fxV4 = boxV4.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});

//////////////////////////////

///// SI DECISION
$('petit_cadre_titre_1').addEvent('click', function(){							
if(boxV1.getStyle('margin-top').toInt() == 0 && boxVIDEOS1.getStyle('height').toInt() == 0){
boxVIDEOS1.setStyle('background', 'url("images/videos_.jpg")');
fxC1.start({'margin-top': 0});
fxB1.start({'opacity': 0});
fxGB.start({'margin-top': 0});
fxVIDE.start({'height': 20});
fxVIDEOS.start({'margin-bottom': 5});
fxVIDEOS1.start({'margin-bottom': 5});
fxVIDEOS2.start({'height': 50, 'margin-bottom': 5});
fxVIDEOS3.start({'height': 400, 'margin-bottom': 50});
fxVIDEOS1.start.delay(1000, fxVIDEOS1, {'height': 200});
fxCONTENU1A.start.delay(1000, fxCONTENU1A, {'opacity': 1});
fxCONTENU1.start.delay(1000, fxCONTENU1, {'opacity': 1});
boxPLUS.setStyle('background-position', 'bottom');
//
fxPHOTOS.start({'opacity': 0, 'height': 0});
fxWEBDESIGN.start({'opacity': 0, 'height': 0});
fxCREATIONS.start({'opacity': 0, 'height': 0});
fxPROJETS.start({'opacity': 0, 'height': 0});
fxCOMPETENCES.start({'opacity': 0, 'height': 0});
//
fxI1.start({'opacity': 0});
fxI2.start({'opacity': 0});
fxI3.start({'opacity': 0});
fxI4.start({'opacity': 0});
fxI5.start({'opacity': 0});
fxI6.start({'opacity': 0});
fxQ.start({'opacity': 0});
} else {
}});

///// SI RUN
$('petit_cadre_titre_1').addEvent('click', function(){							
if(boxV1.getStyle('margin-top').toInt() == -200 && boxVIDEOS1.getStyle('height').toInt() == 0){
boxVIDEOS1.setStyle('background', 'url("images/videos_.jpg")');
fxC1.start({'margin-top': -400});
fxB1.start({'opacity': 0});
fxGB.start({'margin-top': 0});
fxVIDE.start({'height': 20});
fxVIDEOS.start({'margin-bottom': 5});
fxVIDEOS1.start({'margin-bottom': 5});
fxVIDEOS2.start({'height': 50, 'margin-bottom': 5});
fxVIDEOS3.start({'height': 400, 'margin-bottom': 50});
fxVIDEOS1.start.delay(1000, fxVIDEOS1, {'height': 200});
fxCONTENU1A.start.delay(1000, fxCONTENU1A, {'opacity': 1});
fxCONTENU1.start.delay(1000, fxCONTENU1, {'opacity': 1});
boxPLUS.setStyle('background-position', 'bottom');
//
fxPHOTOS.start({'opacity': 0, 'height': 0});
fxWEBDESIGN.start({'opacity': 0, 'height': 0});
fxCREATIONS.start({'opacity': 0, 'height': 0});
fxPROJETS.start({'opacity': 0, 'height': 0});
fxCOMPETENCES.start({'opacity': 0, 'height': 0});
//
fxI1.start({'opacity': 0});
fxI2.start({'opacity': 0});
fxI3.start({'opacity': 0});
fxI4.start({'opacity': 0});
fxI5.start({'opacity': 0});
fxI6.start({'opacity': 0});
fxQ.start({'opacity': 0});
} else {
}});

///// SI SMILE
$('petit_cadre_titre_1').addEvent('click', function(){							
if(boxV1.getStyle('margin-top').toInt() == -400 && boxVIDEOS1.getStyle('height').toInt() == 0){
boxVIDEOS1.setStyle('background', 'url("images/videos_.jpg")');
fxC1.start({'margin-top': -800});
fxB1.start({'opacity': 0});
fxGB.start({'margin-top': 0});
fxVIDE.start({'height': 20});
fxVIDEOS.start({'margin-bottom': 5});
fxVIDEOS1.start({'margin-bottom': 5});
fxVIDEOS2.start({'height': 50, 'margin-bottom': 5});
fxVIDEOS3.start({'height': 400, 'margin-bottom': 50});
fxVIDEOS1.start.delay(1000, fxVIDEOS1, {'height': 200});
fxCONTENU1A.start.delay(1000, fxCONTENU1A, {'opacity': 1});
fxCONTENU1.start.delay(1000, fxCONTENU1, {'opacity': 1});
boxPLUS.setStyle('background-position', 'bottom');
//
fxPHOTOS.start({'opacity': 0, 'height': 0});
fxWEBDESIGN.start({'opacity': 0, 'height': 0});
fxCREATIONS.start({'opacity': 0, 'height': 0, 'height': 0});
fxPROJETS.start({'opacity': 0});
fxCOMPETENCES.start({'opacity': 0, 'height': 0});
//
fxI1.start({'opacity': 0});
fxI2.start({'opacity': 0});
fxI3.start({'opacity': 0});
fxI4.start({'opacity': 0});
fxI5.start({'opacity': 0});
fxI6.start({'opacity': 0});
fxQ.start({'opacity': 0});
} else {
}});

///// SI COSMETIQUE
$('petit_cadre_titre_1').addEvent('click', function(){							
if(boxV1.getStyle('margin-top').toInt() == -600 && boxVIDEOS1.getStyle('height').toInt() == 0){
boxVIDEOS1.setStyle('background', 'url("images/videos_.jpg")');
fxC1.start({'margin-top': -1200});
fxB1.start({'opacity': 0});
fxGB.start({'margin-top': 0});
fxVIDE.start({'height': 20});
fxVIDEOS.start({'margin-bottom': 5});
fxVIDEOS1.start({'margin-bottom': 5});
fxVIDEOS2.start({'height': 0, 'margin-bottom': 5});
fxVIDEOS3.start({'height': 400, 'margin-bottom': 50});
fxVIDEOS1.start.delay(1000, fxVIDEOS1, {'height': 200});
fxCONTENU1A.start.delay(1000, fxCONTENU1A, {'opacity': 1});
fxCONTENU1.start.delay(1000, fxCONTENU1, {'opacity': 1});
boxPLUS.setStyle('background-position', 'bottom');
//
fxPHOTOS.start({'opacity': 0, 'height': 0});
fxWEBDESIGN.start({'opacity': 0, 'height': 0});
fxCREATIONS.start({'opacity': 0, 'height': 0});
fxPROJETS.start({'opacity': 0, 'height': 0});
fxCOMPETENCES.start({'opacity': 0, 'height': 0});
//
fxI1.start({'opacity': 0});
fxI2.start({'opacity': 0});
fxI3.start({'opacity': 0});
fxI4.start({'opacity': 0});
fxI5.start({'opacity': 0});
fxI6.start({'opacity': 0});
fxQ.start({'opacity': 0});
} else {
}});

///// SI EFFETS
$('petit_cadre_titre_1').addEvent('click', function(){							
if(boxV1.getStyle('margin-top').toInt() == -800 && boxVIDEOS1.getStyle('height').toInt() == 0){
boxVIDEOS1.setStyle('background', 'url("images/videos_.jpg")');
fxC1.start({'margin-top': -1600});
fxB1.start({'opacity': 0});
fxGB.start({'margin-top': 0});
fxVIDE.start({'height': 20});
fxVIDEOS.start({'margin-bottom': 5});
fxVIDEOS1.start({'margin-bottom': 5});
fxVIDEOS2.start({'height': 50, 'margin-bottom': 5});
fxVIDEOS3.start({'height': 400, 'margin-bottom': 50});
fxVIDEOS1.start.delay(1000, fxVIDEOS1, {'height': 200});
fxCONTENU1A.start.delay(1000, fxCONTENU1A, {'opacity': 1});
fxCONTENU1.start.delay(1000, fxCONTENU1, {'opacity': 1});
boxPLUS.setStyle('background-position', 'bottom');
//
fxPHOTOS.start({'opacity': 0, 'height': 0});
fxWEBDESIGN.start({'opacity': 0, 'height': 0});
fxCREATIONS.start({'opacity': 0, 'height': 0});
fxPROJETS.start({'opacity': 0, 'height': 0});
fxCOMPETENCES.start({'opacity': 0, 'height': 0});
//
fxI1.start({'opacity': 0});
fxI2.start({'opacity': 0});
fxI3.start({'opacity': 0});
fxI4.start({'opacity': 0});
fxI5.start({'opacity': 0});
fxI6.start({'opacity': 0});
fxQ.start({'opacity': 0});
} else {
}});

///// SI BETISIER
$('petit_cadre_titre_1').addEvent('click', function(){							
if(boxV1.getStyle('margin-top').toInt() == -1000 && boxVIDEOS1.getStyle('height').toInt() == 0){
boxVIDEOS1.setStyle('background', 'url("images/videos_.jpg")');
fxC1.start({'margin-top': -2000});
fxB1.start({'opacity': 0});
fxGB.start({'margin-top': 0});
fxVIDE.start({'height': 20});
fxVIDEOS.start({'margin-bottom': 5});
fxVIDEOS1.start({'margin-bottom': 5});
fxVIDEOS2.start({'height': 50, 'margin-bottom': 5});
fxVIDEOS3.start({'height': 400, 'margin-bottom': 50});
fxVIDEOS1.start.delay(1000, fxVIDEOS1, {'height': 200});
fxCONTENU1A.start.delay(1000, fxCONTENU1A, {'opacity': 1});
fxCONTENU1.start.delay(1000, fxCONTENU1, {'opacity': 1});
boxPLUS.setStyle('background-position', 'bottom');
//
fxPHOTOS.start({'opacity': 0, 'height': 0});
fxWEBDESIGN.start({'opacity': 0, 'height': 0});
fxCREATIONS.start({'opacity': 0, 'height': 0});
fxPROJETS.start({'opacity': 0, 'height': 0});
fxCOMPETENCES.start({'opacity': 0, 'height': 0});
//
fxI1.start({'opacity': 0});
fxI2.start({'opacity': 0});
fxI3.start({'opacity': 0});
fxI4.start({'opacity': 0});
fxI5.start({'opacity': 0});
fxI6.start({'opacity': 0});
fxQ.start({'opacity': 0});
} else {
}});

///// FERMETURE
$('petit_cadre_titre_1').addEvent('click', function(){		
if(boxVIDE.getStyle('height').toInt() == 20 && boxVIDEOS1.getStyle('height').toInt() == 200){
fxVIDE.start({'height': 0});
fxB1.start({'opacity': 1});
fxGB.start({'margin-top': -501});
fxCONTENU1.start({'opacity': 0});
fxCONTENU1A.start({'opacity': 0});
fxVIDEOS.start({'margin-bottom': -1});
fxVIDEOS1.start({'margin-bottom': -1});
fxVIDEOS2.start({'height': 0, 'margin-bottom': 0});
fxVIDEOS3.start({'height': 0, 'margin-bottom': 0});
fxVIDEOS1.start.delay(1000, fxVIDEOS1, {'height': 0});
boxPLUS.setStyle('background-position', 'top');
//
fxPHOTOS.start.delay(500, fxPHOTOS, {'opacity': 1, 'height': 200});
fxWEBDESIGN.start.delay(500, fxWEBDESIGN, {'opacity': 1, 'height': 200});
fxCREATIONS.start.delay(500, fxCREATIONS, {'opacity': 1, 'height': 200});
fxPROJETS.start.delay(500, fxPROJETS, {'opacity': 1, 'height': 200});
fxCOMPETENCES.start.delay(500, fxCOMPETENCES, {'opacity': 1, 'height': 200});
//
fxI1.start({'opacity': 0, 'height': 200});
fxI2.start({'opacity': 1, 'height': 200});
fxI3.start({'opacity': 1, 'height': 200});
fxI4.start({'opacity': 1, 'height': 200});
fxI5.start({'opacity': 1, 'height': 200});
fxI6.start({'opacity': 1, 'height': 200});
} else {
}});


});

