$().ready(function() {

	// on rattrape la langue ici pour afficher des textes
	var langue = $("body").attr("class");
	
	$('.bouton2 a').lightBox();

	$('#description_produit').jScrollPane({
		scrollbarWidth:10, 
		scrollbarMargin:10, 
		showArrows:true
	});
	
	$('#loop_produits').jScrollPane({
		scrollbarWidth:10, 
		scrollbarMargin:10, 
		showArrows:true
	});
	
	$('#textes_pages').jScrollPane({
		scrollbarWidth:10, 
		scrollbarMargin:10, 
		showArrows:true
	});
	
	$('#retour_catalogue').click(function(){
		window.history.back();
	});
	
    $('#contact_form_trigger').click(function() {
        $.blockUI({
			message: $('#contact_form_container')
		});
		$(".blockUI.blockMsg").center();
        $('#close').click($.unblockUI); 
        $('.blockOverlay').click($.unblockUI);
        $(".contact_inputs").val("");
    });
    
    // les boutons compare et view pictures
    $("div.bouton1 a").click(function(){
    	if(langue == 'en'){
    		window.location.href = 'view_compare_acmeprod.html';
    	}
    	if(langue == 'fr'){
    		window.location.href = 'view_comparer_acmeprod.html';
    	}
    	if(langue == 'es'){
    		window.location.href = 'view_comparar_acmeprod.html';
    	}
    });
	
	
	if(langue == "fr"){
		$('.title_products_list strong').html('- catalogue de produits');
		$('#tableau_section_2').prepend('<div class="archive_dl">Sp&eacute;cifications<br /><em>Archives t&eacute;l&eacute;chargeables</em></div>');
		$('.document_link_pdf').html('Document PDF');
		$('.document_link_word').html('Document WORD');
	}
	if(langue == "en"){
		$('.title_products_list strong').html('- products catalog');
		$('#tableau_section_2').prepend('<div class="archive_dl">Specifications<br /><em>Downloadable archives</em></div>');
		$('.document_link_pdf').html('PDF document');
		$('.document_link_word').html('WORD document');
	}
	if(langue == "es"){
		$('.title_products_list strong').html('- cat&aacute;logo de productos');
		$('#tableau_section_2').prepend('<div class="archive_dl">Especificaciones<br /><em>Archivo descargable</em></div>');
		$('.document_link_pdf').html('Documento PDF');
		$('.document_link_word').html('Documento WORD');
	}
	
	
	
});

