// JavaScript Document var corners = '
'+ '
'+ '
'+ '
'; var sendingStarted = false; function isset (variable) { return (typeof variable != 'undefined'); } $(document).ready(function(){ _typeface_js.initialize() QueryLoader.selectorPreload = "body"; QueryLoader.init(); $('.vertical-center').show(); $(window).resize(function(){ $('.header').css({ width:Math.min(($(window).width()-($(window).width() - 1219)/2), 1219)+'px' }); $('.vertical-center').css({ left: ($(window).width() - 1219)/2+'px', top: ($(window).height() - 621)/2+'px' }); }); // To initially run the function: $(window).resize(); $('#parallax').append(corners); $('#parallax .parallax-layer').parallax({ mouseport: $('#content'),'mouseActiveOutside':true,'yparallax':false,'frameDuration':35 }); $('.menu a').each(function () { var $hover = $(this).find('.hover').css({opacity:0}).hide(); $(this).hover(function () { $hover.stop().show().animate({opacity:1},200); }, function () { $hover.stop().show().animate({opacity:0},200, function(){ $hover.hide() }); }); }); $('.trigger').hover(function () { delegates.jparallax.suspend();}, function () { delegates.jparallax.resume();}); $('.popup').hover(function () { delegates.jparallax.suspend();}, function () { delegates.jparallax.resume();}); $('.plus').hover(function () { $(this).css('backgroundPosition','right center') }, function () {$(this).css('backgroundPosition','left center')}); $('.menu a, .close a, .parallax-layer a').click(function(event) { if($(this).attr('target')!='_blank'){ event.preventDefault(); navigate(this); } }); }); $(window).load(function () { setTimeout("$('#loading .loader').animate({opacity: 0})",500); setTimeout("$('#loading').fadeOut(1000)",700); if ( $.browser.msie && $.browser.version < 8.0 ) setTimeout("$('#content .text').fadeIn(500)",2500); else setTimeout("$('#content .text').slideDown(500)",2500); }); function animateTexte(){ $('#creer').css({'opacity':0}).show().animate({'opacity':1, 'right':'50px'},1000); $('#mobiliser').css({'opacity':0}).show().delay(1000).animate({'opacity':1, 'left':'75px'},1000); $('#anticiper').css({'opacity':0}).show().delay(2000).animate({'opacity':1, 'right':'350px'},1000); $('#respecter').css({'opacity':0}).show().delay(3000).animate({'opacity':1, 'right':'630px'},1000); $('#developper').css({'opacity':0}).show().delay(4000).animate({'opacity':1, 'left':'60px'},1000); $('#digitaliser').css({'opacity':0}).show().delay(5000).animate({'opacity':1, 'right':'360px'},1000); } function direction( position) { $('.texte').animate({top:position+'px'},500); if(position<0){ $('.top').css({opacity:1, cursor:'pointer'}); $('.bottom').css({opacity:0.5, cursor:'default'}); } else{ $('.bottom').css({opacity:1, cursor:'pointer'}); $('.top').css({opacity:0.5, cursor:'default'}); } } function navigate(elemnt) { if($(elemnt).attr('target')=='_blank') setTimeout("window.open('"+$(elemnt).attr('href')+"')",500); else { $('.QOverlay').css({'width':$(window).width(), 'height':$(window).height()}).fadeIn(500); setTimeout("document.location.href='"+$(elemnt).attr('href')+"'",500); } } function navigateTo(href) { $('.QOverlay').css({'width':$(window).width(), 'height':$(window).height()}).fadeIn(500); setTimeout("document.location.href='"+href+"'",500); } function showCaptcha() { $('#captcha').width($('body').width()); $('#captcha').height($('body').height()); $('#captcha_container').fadeIn(500); } function show_alert(message) { $('#sexy_alert .content').html(message); $('#sexy_alert').fadeIn(); } function close_alert() { $('#sexy_alert').fadeOut(); } function emailSent() { if(sw_lang=="fr") show_alert('Email enregistré!'); else show_alert('Email registered!'); $('#email_newsletter').val(''); } function startSending() { if(!sendingStarted) { sendingStarted = true; if($('#file_attachedfile').val()!="") { var ext = $('#file_attachedfile').val().split('.').pop().toLowerCase(); if($.inArray(ext, ['gif','png','jpg','jpeg','zip']) == -1) { if(sw_lang=="fr") alert("L'extension du fichier n'est pas valide, doit etre 'gif','png','jpg','jpeg','zip'"); else alert("File has an invalid extension, it should be one of 'gif','png','jpg','jpeg','zip'"); return false; } } if(sw_lang=="fr")$('#contact_form .submit').val('Patientez...'); else $('#contact_form .submit').val('Sending...'); return true; } return false; } function stopSending(sent) { sendingStarted = false; if( sent ) { if(sw_lang=="fr") show_alert('Message envoyé!'); else show_alert('Message sent!'); $('#contact_form')[0].reset(); } if(sw_lang=="fr") $('#contact_form .submit').val('Envoyer'); else $('#contact_form .submit').val('Send'); } function hideCaptcha() { $('#captcha_container').fadeOut(500); } function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;} function twt_click() {u=location.href;t=document.title;window.open('http://www.twitter.com/share?url='+encodeURIComponent(u)+'&text='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}