$(function() {
//$.fn.media.mapFormat('avi','quicktime');
        // this one liner handles all the examples on this page
        $('a.media').media();
    });


$(document).ready(function(){
    
    $(".menu_max").mouseover(function(){
    $(this).children().children(".menu_item").animate({
        width:parseInt($(this).css("width")),
        height:parseInt($(this).css("height")) },
        { queue:false, duration:100 } );
    }).mouseout(function(){
    $(this).children().children(".menu_item").animate({
        width:parseInt($(this).children(".menu_min").css("width")),
        height:parseInt($(this).children(".menu_min").css("height")) },
        { queue:false, duration:100 } );
    });

    
    $(".suivant_max").hover(function(){
    $(this).children().children(".suivant_item").animate({
        width:parseInt($(this).css("width")),
        height:parseInt($(this).css("height")) },
        { queue:false, duration:100 } );
    } , function(){
    $(this).children().children(".suivant_item").animate({
        width:parseInt($(this).children(".suivant_min").css("width")),
        height:parseInt($(this).children(".suivant_min").css("height")) },
        { queue:false, duration:100 } );
    });
    
    $(".retour_max").hover(function(){
    $(this).children().children(".retour_item").animate({
        width:parseInt($(this).css("width")),
        height:parseInt($(this).css("height")) },
        { queue:false, duration:100 } );
    } , function(){
    $(this).children().children(".retour_item").animate({
        width:parseInt($(this).children(".retour_min").css("width")),
        height:parseInt($(this).children(".retour_min").css("height")) },
        { queue:false, duration:100 } );
    });
    
    $(".menu_projet_image").hover(function(){
    $(this).parent().parent().animate({
        width:140,
        height:140 },
         { queue:false, duration: 200} );
         
    $(this).parent().parent().parent().children(".menu_projet_titre").fadeIn({
    opacity: 'show'},  { queue:false, duration: 100}).stop(true,true);
   
    } , function(){
    $(this).parent().parent().animate({
        width:120,
        height:120 },
         { queue:false, duration: 200} );
    $(this).parent().parent().parent().children(".menu_projet_titre").fadeOut({
   opacity: 'hide'},  { queue:false, duration: 100});
    
    });


    $('#s1')  
        .cycle({ 
        fx:     'fade', 
        speed:  'slow', 
        timeout: 0, 
        pager:  '#nav', 
        next:   '#next', 
        prev:   '#prev' 
    });
    
    $('#video').click(function(){
    $('#s1').children("img").fadeOut(100);});
   
  });
  

  
function showImg(num){
    if($(".projet_image").eq(num-1).css("display") == "none")
    {
        $(".projet_image").filter("$(this).css('display') == 'block'").fadeOut(600);
        $(".projet_video").filter("$(this).css('display') == 'block'").fadeOut(600);
        $(".projet_image").eq(num-1).fadeIn(800);
    }
}

function showVideo(num){
    if($(".projet_video").eq(num-1).css("display") == "none")
    {
         $(".projet_image").filter("$(this).css('display') == 'block'").fadeOut(0);
         $(".projet_video").filter("$(this).css('display') == 'block'").fadeOut(0);
         $(".projet_video").fadeIn(0);
    }
}

function contact(){
var add = "<a href=\"mailto:contact@soixantecircuits.fr\">"
var onepeople = "contact";
var mon = "soixantecircuits.fr</a>";
var valeur = "@";
document.write(add + onepeople + valeur + mon);};

