$(document).ready(function(){

    //TOUTES LES FONCTIONS JQUERY SPECIFIQUES DU SITE
    
    //e-commerce
    $('#articles').load('selection.php');
  
    $("#recherche").click(function(){
        if ($(this).attr('value') == 'Saisissez ici votre recherche')
            $(this).attr('value', '');
            $(this).attr('style', 'width:160px; font-style:normal');
    });
    
    
    
    $("#jq_notice").hide();
    $("#jq_formule").hide();
    
    $("#btn_description").click(function(){
        $("#jq_description").show('slow');
        $("#btn_description").removeClass("ongletPetit").addClass("ongletPetitActive");

        $("#jq_notice").hide('slow');
        $("#btn_notice").removeClass("ongletGrandActive").addClass("ongletGrand");
        
        $("#jq_formule").hide('slow');
        $("#btn_formule").removeClass("ongletPetitActive").addClass("ongletPetit");
    });
    
    $("#btn_notice").click(function(){

        $("#jq_description").hide('slow');
        $("#btn_description").removeClass("ongletPetitActive").addClass("ongletPetit");

        $("#jq_notice").show('slow');
        $("#btn_notice").removeClass("ongletGrand").addClass("ongletGrandActive");
        
        $("#jq_formule").hide('slow');
        $("#btn_formule").removeClass("ongletPetitActive").addClass("ongletPetit");
    });
    
    $("#btn_formule").click(function(){
        $("#jq_description").hide('slow');
        $("#btn_description").removeClass("ongletPetitActive").addClass("ongletPetit");

        $("#jq_notice").hide('slow');
        $("#btn_notice").removeClass("ongletGrandActive").addClass("ongletGrand");

        $("#jq_formule").show('slow');
        $("#btn_formule").removeClass("ongletPetit").addClass("ongletPetitActive");
    });
    
    $('a.lightbox').lightBox();
        
    $(function() {
        $('a.lightbox').lightBox({
            imageLoading: 'jquery/images/lightbox-ico-loading.gif',
            imageBtnPrev: 'jquery/images/lightbox-btn-prev.gif',
    		imageBtnNext: 'jquery/images/lightbox-btn-next.gif',
    		imageBtnClose: 'jquery/images/lightbox-btn-close.gif',
    		imageBlank: 'jquery/images/lightbox-blank.gif',
        	txtImage: 'Image',
        	txtOf: 'sur'
        });
    });
    
    
    $('#diapo_marque').cycle({
        fx:    'fade',
        speed:  2500,
        random: 1
    });
    
    $('#autres_marques').toggle(function(){
        $('.marque_masquee').show();
        $(this).html('Masquer...')
    }, function() {
        $('.marque_masquee').hide();
        $(this).html('Autres marques...')
    });
    
});




