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_3');
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: 500, transition: Fx.Transitions.Quart.easeOut});
var boxI2 = $('photos_images');
var fxI2 = boxI2.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxI3 = $('webdesign_images');
var fxI3 = boxI3.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxI4 = $('creations_images');
var fxI4 = boxI4.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxI5 = $('projets_images');
var fxI5 = boxI5.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxI6 = $('competences_images');
var fxI6 = boxI6.effects({duration: 500, 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 boxWEBDESIGN2 = $('webdesign_2');
var fxWEBDESIGN2 = boxWEBDESIGN2.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxWEBDESIGN3 = $('webdesign_3');
var fxWEBDESIGN3 = boxWEBDESIGN3.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 boxCONTENU3 = $('contenu_3');
var fxCONTENU3 = boxCONTENU3.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxCONTENU3A = $('contenu_3A');
var fxCONTENU3A = boxCONTENU3A.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxC1 = $('contenu_vroum3');
var fxC1 = boxC1.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxC2 = $('contenu_pilou');
var fxC2 = boxC2.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxC3 = $('contenu_kiwi');
var fxC3 = boxC3.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxC4 = $('contenu_runlesite');
var fxC4 = boxC4.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxC5 = $('contenu_coworking');
var fxC5 = boxC5.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});


// VIDEOS
var boxV1 = $('webdesign_p1');
var fxV1 = boxV1.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxV2 = $('webdesign_p2');
var fxV2 = boxV2.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxV3 = $('webdesign_p3');
var fxV3 = boxV3.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxV4 = $('webdesign_p4');
var fxV4 = boxV4.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});
var boxV5 = $('webdesign_p5');
var fxV5 = boxV5.effects({duration: 500, transition: Fx.Transitions.Quart.easeOut});

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

///// SI VROUM
$('petit_cadre_titre_3').addEvent('click', function(){							
if(boxV1.getStyle('margin-top').toInt() == 0 && boxWEBDESIGN1.getStyle('height').toInt() == 0){
boxWEBDESIGN1.setStyle('background', 'url("images/webdesign_.jpg")');
fxC1.start({'margin-top': 0});
fxB1.start({'opacity': 0});
fxGB.start({'margin-top': 0});
fxVIDE.start({'height': 20});
fxWEBDESIGN.start({'margin-bottom': 5});
fxWEBDESIGN1.start({'margin-bottom': 5});
fxWEBDESIGN2.start({'height': 50, 'margin-bottom': 5});
fxWEBDESIGN3.start({'height': 400, 'margin-bottom': 50});
fxWEBDESIGN1.start.delay(1000, fxWEBDESIGN1, {'height': 200});
fxCONTENU3A.start.delay(1000, fxCONTENU3A, {'opacity': 1});
fxCONTENU3.start.delay(1000, fxCONTENU3, {'opacity': 1});
boxPLUS.setStyle('background-position', 'bottom');
//
fxVIDEOS.start({'opacity': 0, 'height': 0});
fxPHOTOS.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 PILOU
$('petit_cadre_titre_3').addEvent('click', function(){							
if(boxV1.getStyle('margin-top').toInt() == -200 && boxWEBDESIGN1.getStyle('height').toInt() == 0){
boxWEBDESIGN1.setStyle('background', 'url("images/webdesign_.jpg")');
fxC1.start({'margin-top': -400});
fxB1.start({'opacity': 0});
fxGB.start({'margin-top': 0});
fxVIDE.start({'height': 20});
fxWEBDESIGN.start({'margin-bottom': 5});
fxWEBDESIGN1.start({'margin-bottom': 5});
fxWEBDESIGN2.start({'height': 50, 'margin-bottom': 5});
fxWEBDESIGN3.start({'height': 400, 'margin-bottom': 50});
fxWEBDESIGN1.start.delay(1000, fxWEBDESIGN1, {'height': 200});
fxCONTENU3A.start.delay(1000, fxCONTENU3A, {'opacity': 1});
fxCONTENU3.start.delay(1000, fxCONTENU3, {'opacity': 1});
boxPLUS.setStyle('background-position', 'bottom');
//
fxVIDEOS.start({'opacity': 0, 'height': 0});
fxPHOTOS.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 KIWI
$('petit_cadre_titre_3').addEvent('click', function(){							
if(boxV1.getStyle('margin-top').toInt() == -400 && boxWEBDESIGN1.getStyle('height').toInt() == 0){
boxWEBDESIGN1.setStyle('background', 'url("images/webdesign_.jpg")');
fxC1.start({'margin-top': -800});
fxB1.start({'opacity': 0});
fxGB.start({'margin-top': 0});
fxVIDE.start({'height': 20});
fxWEBDESIGN.start({'margin-bottom': 5});
fxWEBDESIGN1.start({'margin-bottom': 5});
fxWEBDESIGN2.start({'height': 50, 'margin-bottom': 5});
fxWEBDESIGN3.start({'height': 400, 'margin-bottom': 50});
fxWEBDESIGN1.start.delay(1000, fxWEBDESIGN1, {'height': 200});
fxCONTENU3A.start.delay(1000, fxCONTENU3A, {'opacity': 1});
fxCONTENU3.start.delay(1000, fxCONTENU3, {'opacity': 1});
boxPLUS.setStyle('background-position', 'bottom');
//
fxVIDEOS.start({'opacity': 0, 'height': 0});
fxPHOTOS.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_3').addEvent('click', function(){							
if(boxV1.getStyle('margin-top').toInt() == -600 && boxWEBDESIGN1.getStyle('height').toInt() == 0){
boxWEBDESIGN1.setStyle('background', 'url("images/webdesign_.jpg")');
fxC1.start({'margin-top': -1200});
fxB1.start({'opacity': 0});
fxGB.start({'margin-top': 0});
fxVIDE.start({'height': 20});
fxWEBDESIGN.start({'margin-bottom': 5});
fxWEBDESIGN1.start({'margin-bottom': 5});
fxWEBDESIGN2.start({'height': 50, 'margin-bottom': 5});
fxWEBDESIGN3.start({'height': 400, 'margin-bottom': 50});
fxWEBDESIGN1.start.delay(1000, fxWEBDESIGN1, {'height': 200});
fxCONTENU3A.start.delay(1000, fxCONTENU3A, {'opacity': 1});
fxCONTENU3.start.delay(1000, fxCONTENU3, {'opacity': 1});
boxPLUS.setStyle('background-position', 'bottom');
//
fxVIDEOS.start({'opacity': 0, 'height': 0});
fxPHOTOS.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 COWORKING
$('petit_cadre_titre_3').addEvent('click', function(){							
if(boxV1.getStyle('margin-top').toInt() == -800 && boxWEBDESIGN1.getStyle('height').toInt() == 0){
boxWEBDESIGN1.setStyle('background', 'url("images/webdesign_.jpg")');
fxC1.start({'margin-top': -1600});
fxB1.start({'opacity': 0});
fxGB.start({'margin-top': 0});
fxVIDE.start({'height': 20});
fxWEBDESIGN.start({'margin-bottom': 5});
fxWEBDESIGN1.start({'margin-bottom': 5});
fxWEBDESIGN2.start({'height': 50, 'margin-bottom': 5});
fxWEBDESIGN3.start({'height': 400, 'margin-bottom': 50});
fxWEBDESIGN1.start.delay(1000, fxWEBDESIGN1, {'height': 200});
fxCONTENU3A.start.delay(1000, fxCONTENU3A, {'opacity': 1});
fxCONTENU3.start.delay(1000, fxCONTENU3, {'opacity': 1});
boxPLUS.setStyle('background-position', 'bottom');
//
fxVIDEOS.start({'opacity': 0, 'height': 0});
fxPHOTOS.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_3').addEvent('click', function(){		
if(boxVIDE.getStyle('height').toInt() == 20 && boxWEBDESIGN1.getStyle('height').toInt() == 200){
fxVIDE.start({'height': 0});
fxB1.start({'opacity': 1});
fxGB.start({'margin-top': -501});
fxCONTENU3.start({'opacity': 0});
fxCONTENU3A.start({'opacity': 0});
fxWEBDESIGN.start({'margin-bottom': -1});
fxWEBDESIGN1.start({'margin-bottom': -1});
fxWEBDESIGN2.start({'height': 0, 'margin-bottom': 0});
fxWEBDESIGN3.start({'height': 0, 'margin-bottom': 0});
fxWEBDESIGN1.start.delay(1000, fxWEBDESIGN1, {'height': 0});
boxPLUS.setStyle('background-position', 'top');
//
fxVIDEOS.start.delay(500, fxVIDEOS, {'opacity': 1, 'height': 200});
fxPHOTOS.start.delay(500, fxPHOTOS, {'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': 1, 'height': 200});
fxI2.start({'opacity': 1, 'height': 200});
fxI3.start({'opacity': 0, 'height': 200});
fxI4.start({'opacity': 1, 'height': 200});
fxI5.start({'opacity': 1, 'height': 200});
fxI6.start({'opacity': 1, 'height': 200});
} else {
}});


});

