/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

function showslide(){
    document.getElementById("moreinfobackload").style.display = 'none';
    document.getElementById("header-slider").style.display = 'none';
    document.getElementById("footer-slider").style.display = 'none';
    document.getElementById("image2").style.display = 'none';
    document.getElementById("arrowUpBlack").style.display = 'none';
    setTimeout(function(){
        $("#loadingslide").fadeOut(2000);
    }, 50);
    setTimeout(function(){
        $("#footer-slider").fadeIn(800);
    }, 1000);
    setTimeout(function(){
        $("#header-slider").slideDown(800);
        document.getElementById("left").style.display = 'block';
        document.getElementById("right").style.display = 'block';
    }, 1300);
    setTimeout(function(){
        $("#arrowUpBlack").fadeIn(1000);
        $("#left").animate({
            marginLeft: "-33px"
        }, 1000);
        $("#right").animate({
            marginLeft: "940px"
        }, 1000);
    },1800);
    setTimeout(function(){
        $("#image3").fadeOut(2000);
    }, 4050);
    setTimeout(function(){
        $("#image2").fadeIn(2000);
    },8050);
};
function loadFoi(){
    //Animage 40px
    if ($("#foi").css("height")!="0px") return;
    $("#loadingfoi").fadeIn("slow",function() {
        $("#foi").load("foi.php", "", function(){
            $("#foi").animate({
                height: "473px"
            }, 500, function() {
                $("#foi").css("height","");
                $("#foi").css("overflow-x","visible");
                $("#foi").css("overflow-y","visible");
            }
            );
            $("#loadingfoi").fadeOut("slow");
            $("#form-content").animate({
                height: "490px"
            }, 200,function(){
                $(".btn").show("slow");
                var flashvars = {
                    config_file: "countdown_flip_config2.xml?v=<?php echo rand(0,9999); ?>"
                };

                var params = {
                    bgcolor: "feb506",
                    menu: "false",
                    quality: "high",
                    scale: "scale",
                    wmode:"transparent"
                };

                var attributes = {
                    id: "swf_content2",
                    name: "swf_content2"
                };

                swfobject.embedSWF("countdown_flip_2days.swf", "countdownContentFLASH2", "254", "47", "8.0.0", false, flashvars, params, attributes);
            });
        });
    });
    setTimeout('analytics(100,100)',100);
}

// Countdown
var flashvars = {
    config_file: "../countdown_flip_config.xml?v=<?php echo rand(0,9999); ?>"
};

var params = {
    bgcolor: "feb506",
    menu: "false",
    quality: "high",
    scale: "scale",
    wmode:"transparent"
};

var attributes = {
    id: "swf_content",
    name: "swf_content"
};

swfobject.embedSWF("../countdown_flip_2days.swf", "countdownContentFLASH", "254", "47", "8.0.0", false, flashvars, params, attributes);

// Show me more, en dessous du countdown
var statut = "FERME";
function showmemore(){
    if (statut == "FERME") {
        $("#moreinfo").slideDown("fast");
        statut = "OUVERT";
        document.getElementById("discount-showmorebutton").innerHTML = "HIDE";
    }
    else
    if (statut == "OUVERT") {
        $("#moreinfo").slideUp("fast");
        statut = "FERME";
        document.getElementById("discount-showmorebutton").innerHTML = "SHOW";
    }
};

