//é var initAnimsSavoir = function () { // Init Screen 1 var monScreen = jQuery('#anchor1') maH = monScreen.height(); // monScreen.height(maH).find('.ctnt').hide(); customFunctions.initiatedScreens[customFunctions.initiatedScreens.length] = 1; // Init Screen 2 monScreen = jQuery('#anchor2') maH = monScreen.height(); monScreen.height(maH); jQuery('h2', monScreen).css('opacity', 0); jQuery('.col1', monScreen) .find('figure, p') .css({ opacity: 0 ,right: '200px' }); jQuery('.col2', monScreen) .find('figure, p') .css({ opacity: 0 ,left: '200px' }); jQuery('.col3', monScreen) .find('.fig1') .css({ opacity: 0 ,left: '115px' }) .end() .find('.fig2') .css({ opacity: 0 ,left: '515px' }) .end() .find('.fig3') .css({ opacity: 0 ,top: '207px' }) .end() .find('p') .css({ opacity: 0 ,left: '-200px' }); customFunctions.initiatedScreens[customFunctions.initiatedScreens.length] = 2; // Init Screen 3 monScreen = jQuery('#anchor3') maH = monScreen.height(); monScreen.height(maH); monScreen .find('.negative').css({ opacity: 0 }) .find('h2').css({ opacity: 0 ,left: '200px' }) .end() .find('.col1 img').css({ opacity: 0 ,top: 0 }) .end() .find('.col2 p').css({ opacity: 0 ,left: '200px' }) .end() .find('.cols img').css({ opacity: 0 }) .end() .find('.cols h3, .cols p').css({ opacity: 0 ,top: '100px' }); customFunctions.initiatedScreens[customFunctions.initiatedScreens.length] = 3; // Init Screen 4 monScreen = jQuery('#anchor4') maH = monScreen.height(); monScreen.height(maH); monScreen .find('h2').css({ opacity: 0 ,left: '-200px' }) .end() .find('.col1 p').css({ opacity: 0 }) .end() .find('.col2 .img1').css({ opacity: 0 ,top: '-50px' }) .end() .find('.col2 .img2').css({ opacity: 0 ,top: '-240px' }) .end() .find('.col2 .img3').css({ opacity: 0 ,left: '575px' }) .end() .find('.col2 .img4').css({ opacity: 0 }) .end() .find('.col3 img').css({ opacity: 0 ,top: '100px' }); customFunctions.initiatedScreens[customFunctions.initiatedScreens.length] = 4; // Init Screen 5 monScreen = jQuery('#anchor5') maH = monScreen.height(); monScreen.height(maH); monScreen .find('h2').css({ opacity: 0 ,left: '680px' }) .end() .find('.col1 figure, .col1 p').css({ opacity: 0 ,right: '200px' }) .end() .find('.col2 p').css({ opacity: 0 }) .end() .find('.col2 figure').css({ opacity: 0 ,left: '200px' }); customFunctions.initiatedScreens[customFunctions.initiatedScreens.length] = 5; //console.log(initiatedScreens); } /* This function corrects the page for 640px wide screens */ ,init640 = function () { jQuery('#anchor2').find('.col1') .find('figure').remove() .end() .insertAfter('#anchor2 .col2 p:first-child') .end() .end() .find('figure') .appendTo('#anchor2 .col2') .end() .end() .find('.fig1, .fig2, .fig3').remove() .end() .find('.col3') .insertBefore('#anchor2 .col2 figure'); jQuery('#anchor4') .find('.img2, .img3, .img4').remove() .end() .find('.img1').attr('src', 'img/flacons-640.jpg'); jQuery('#anchor5') .find('figure.first').remove() .end() .find('.col2 p.first') .prependTo('#anchor5 .col1') .end() .end() .find('.col2 p') .insertBefore('#anchor5 .col1 figure') .end() .end() .find('.col2 figcaption') .appendTo('#anchor5 .col2 figure'); } /* This function animates the Savoir-faire page */ ,animScreen = function (leScreen) { if (jQuery.inArray(leScreen, customFunctions.initiatedScreens) >= 0) { /* var hBody = jQuery('body').height(); jQuery('body').css({ height: hBody - 1 ,overflow: 'hidden' }); */ if (leScreen == 1) { jQuery('#anchor1').each(function () { jQuery('.ctnt', this).fadeIn(function () {customFunctions.eraseAnimatedScreen(leScreen)}); }); } if (leScreen == 2) { jQuery('#anchor2').each(function () { jQuery('h2', this) .animate({ opacity: 1 }, 750); jQuery('.col1', this) .find('figure:first-child').animate({ opacity: 1 ,right: 0 }, 1500); jQuery('.col1', this) .find('p') .delay(750) .animate({ opacity: 1 ,right: 0 }, 1500); jQuery('.col1', this) .find('figure:last-child') .delay(1500) .animate({ opacity: 1 ,right: 0 }, 1500); jQuery('.col2', this) .find('p:first-child') .animate({ opacity: 1 ,left: 0 }, 1500); jQuery('.col2', this) .find('figure') .delay(750) .animate({ opacity: 1 ,left: 0 }, 1500); jQuery('.col2', this) .find('p:last-child') .delay(1500) .animate({ opacity: 1 ,left: 0 }, 1500, function () { jQuery('.col3', '#anchor2') .find('.fig1') .animate({ opacity: 1 ,left: '315px' }, 500); jQuery('.col3', '#anchor2') .find('.fig2') .delay(400) .animate({ opacity: 1 ,left: '315px' }, 250); jQuery('.col3', '#anchor2') .find('.fig3') .animate({ opacity: 1 ,top: '7px' }, 750); jQuery('.col3', '#anchor2') .find('p') .delay(400) .animate({ opacity: 1 ,left: 0 }, 750, function () {customFunctions.eraseAnimatedScreen(leScreen);}); }); }); } if (leScreen == 3) { jQuery('#anchor3').each(function () { jQuery('.negative', this).animate({ opacity: 1 }, 500, function () { jQuery('#anchor3') .find('h2').animate({ opacity: 1 ,left: 0 }, 750) .end() .find('.col1 img').animate({ opacity: 1 ,top: '-70px' }, 1250) .end() .find('.col2 p') .delay(1000) .animate({ opacity: 1 ,left: 0 }, 1250, function () { jQuery('#anchor3').find('.cols') .find('.col21') .find('img').animate({ opacity: 1 }, 500) .end() .find('h3, p') .delay(450) .animate({ opacity: 1 ,top: 0 }, 250) .end() .end() .find('.col22') .delay(750) .find('img').animate({ opacity: 1 }, 500) .end() .find('h3, p') .delay(450) .animate({ opacity: 1 ,top: 0 }, 250) .end() .end() .find('.col23') .delay(1500) .find('img').animate({ opacity: 1 }, 500) .end() .find('h3, p') .delay(450) .animate({ opacity: 1 ,top: 0 }, 250, function () {customFunctions.eraseAnimatedScreen(leScreen);}); }); }); }) } if (leScreen == 4) { jQuery('#anchor4').each(function () { jQuery(this) .find('h2').animate({ opacity: 1 ,left: 0 }, 750) .end() .find('p').animate({ opacity: 1 }, 500, function () { jQuery('#anchor4 .col2') .find('.img2').animate({ opacity: 1 ,top: '-90px' }, 1000) .end() .find('.img4') .delay(500) .animate({ opacity: 1 }, 2000) // .animateRotate(180, 2500) .end() .find('.img3') .delay(500) .animate({ opacity: 1 ,left: '375px' }, 1000) .end() .find('.img1') .delay(750) .animate({ opacity: 1 ,top: '-175px' }, 1000, function () { jQuery('#anchor4 .col3') .find('img').animate({ opacity: 1 ,top: 0 }, 1000, function () { // jQuery('#anchor4 .col2').find('.img4').animateRotate('0deg'); customFunctions.eraseAnimatedScreen(leScreen); }) }); }); }); } if (leScreen == 5) { jQuery('#anchor5').each(function () { jQuery(this) .find('h2').animate({ opacity: 1 ,left: '480px' }, 500) .end() .find('.col1 figure.first').animate({ opacity: 1 ,right: 0 }, 500) .end() .find('.col2 p:first-child') .delay(400) .animate({ opacity: 1 }, 250, function () { jQuery('#anchor5') .find('.col1 p.first').animate({ opacity: 1 ,right: 0 }, 500, function () { jQuery('#anchor5 .col1') .find('figure.last').animate({ opacity: 1 ,right: 0 }, 1000); }) .end() .find('.col2 figure.first').animate({ opacity: 1 ,left: 0 }, 1000) .end() .find('.col2 p.last') .delay(500) .animate({ opacity: 1 }, 250, function () { jQuery('#anchor5 .col2') .find('figure.last').animate({ opacity: 1 ,left: 0 }, 1000, function () {customFunctions.eraseAnimatedScreen(leScreen);}); }); }) }); } } }