<?php
/////////
//tools//
/////////
////////////////////////
//get browser language//
////////////////////////
//return browser language name
if (!function_exists('JDgetBrowserLanguage'))
{
function JDgetBrowserLanguage()
{
global $language;
return $language->name;
}
}

///////////////
//environment//
///////////////
/////////////////
//assets folder//
/////////////////
$JDcustomPagePicturesFolderName = "ozf0webfnfuayh0yrxei63q1jec5nf0q";
$JDcustomPagePictureZIPName = "jaquet-droz-visit-20260409";
$JDcustomPagePicturesPath = "/sites/default/files/pages/events/2026/";

$JDcustomPagePicturesZIPFile = $JDcustomPagePictureZIPName.".zip";

$JDcustomPagePicturesFolderPath = $JDcustomPagePicturesPath.$JDcustomPagePicturesFolderName."/";

$JDprefilledFormPicturesFolder = "/sites/default/files/pages/manufactory-visit-contact-form/";

/////////////////
//site language//
/////////////////
$JDcustomPageClientLanguage = JDgetBrowserLanguage();
variable_set("JDformClientLanguage", $JDcustomPageClientLanguage);
//default language
$JDcustomPageDefaultLanguage = "English";

////////////////////////
//language referential//
////////////////////////
//store all language
$JDcustomPageLanguageBits = array(

//////
//EN//
//////
// language bellow //
"English" => array(
//taxonomy
"taxonomy" => array(
"preOrder" => "Pre-Order",
"registration" => "Registration",
"inquire" => "Inquire Now",
"contactUs" => "Contact us",
"download" => "Download",
"view" => "View",
"close" => "Close"
),
//main title
//main title
"blockTitle" => "Thank you for your visit",
"blockSubTitle" => "It is with great pleasure that we have welcomed you to the Manufacture Jaquet Droz.",
"blockIntro" => "We hope you had a pleasant time with us and we look forward to seeing you again soon to continue this journey together around fine watchmaking and the inventiveness of Jaquet Droz. We hope to see you soon and are happy to share these images with you.",

//contents
"blcA" => "We would be very happy to have you as one of our privileged contacts. This way, we could keep the wonder going together and invite you to our next events, inform you about our new creations or simply share our common passion for disruptive watchmaking projects.",
"blcB" => "Could you please confirm the information you have provided to us and, if you wish, allow us to retain it for this purpose?"
),
// language above //

//////
//CN//
//////
// language bellow //
"Chinese, Simplified" => array(
//taxonomy
"taxonomy" => array(
"preOrder" => "预订您所爱",
"registration" => "注册",
"inquire" => "现在查询",
"contactUs" => "联络我们",
"download" => "下载",
"view" => "查看",
"close" => "关闭"
),
//main title
//main title
"blockTitle" => "感谢您的莅临",
"blockSubTitle" => "感谢您对雅克德罗高级制表工厂的访问。真心希望您与我们度过了愉快的时刻",
"blockIntro" => "我们非常期待与您再次相会,并与雅克德罗共同踏上充满创造力的高级制表之旅。以下我们为您奉上您在表厂度过的珍贵瞬间。",

//contents
"blcA" => "很荣幸邀请您成为雅克德罗尊享客户。期待与您藉此共赴这段美妙旅程。此后,我们将邀请您参加品牌活动,与您分享最新作品,以及我们对钟表艺术的无限热爱与灵感。",
"blcB" => "请确认您所提供的信息,以及您是否允许我们为此保留这些信息?"
),
// language above //

//////
//FR//
//////
// language bellow //
"French" => array(
//taxonomy
"taxonomy" => array(
"preOrder" => "Pré-commandez",
"registration" => "Inscription",
"inquire" => "Demander maintenant",
"contactUs" => "Contactez-nous",
"download" => "Télécharger",
"view" => "Visionner",
"close" => "Fermer"
),
//main title
//main title
"blockTitle" => "Merci de votre visite",
"blockSubTitle" => "Ce fut un plaisir de vous accueillir au sein de la manufacture Jaquet Droz.",
"blockIntro" => "Nous espérons que vous avez passé un agréable moment en notre compagnie et nous réjouissons de vous revoir bientôt pour prolonger ensemble ce parcours autours de la haute horlogerie et de l'inventivité Jaquet Droz. Dans l'attente de notre prochaine rencontre, nous sommes heureux de partager ces quelques images avec vous.",

//contents
"blcA" => "Nous serions très heureux de pouvoir vous compter parmi nos contacts privilégiés. Ainsi, nous pourrions ensemble prolonger l’émerveillement et vous inviter à nos prochains événements, vous informer en avant-première de nos créations ou tout simplement échanger sur notre passion commune pour les projets horlogers disruptifs.",
"blcB" => "Pourriez-vous nous confirmer les informations que vous nous avez transmises et si vous le souhaitez, nous permettre de les conserver à cet égard ?"
),
// language above //

//////
//DE//
//////
// language bellow //
"German" => array(
//taxonomy
"taxonomy" => array(
"preOrder" => "Jetzt vorbestellen",
"registration" => "Anmeldung",
"inquire" => "Jetzt anfragen",
"contactUs" => "Kontaktieren Sie uns",
"download" => "Download",
"view" => "Ansehen",
"close" => "Schließen"
),
//main title
//main title
"blockTitle" => "Danke für ihren besuch",
"blockSubTitle" => "Es war uns eine Freude, Sie in der Manufaktur Jaquet Droz begrüßen zu dürfen.",
"blockIntro" => "Wir hoffen, dass Sie eine schöne Zeit bei uns hatten und hoffen, Sie bald wiederzusehen, um diese uhrmacherische Reise fortzusetzen, und laden Sie ein, die Erfindungen von Jaquet Droz zu entdecken. Wir freuen uns auf unser nächstes Treffen und freuen uns, diese paar Fotos mit Ihnen zu teilen.",

//contents
"blcA" => "Wir würden uns sehr freuen, Sie zu unseren bevorzugten Kontakten zu zählen. Auf diese Weise könnten wir die Verzauberung noch länger anhalten lassen und Sie zu unseren nächsten Veranstaltungen einladen, Sie vorab über unsere Kreationen informieren oder uns ganz einfach über unsere gemeinsame Leidenschaft für revolutionäre Uhren austauschen.",
"blcB" => "Könnten Sie uns die Korrektheit der Informationen, die Sie uns übermittelt haben, bestätigen und uns, falls Sie dies wünschen, die Erlaubnis erteilen, sie in diesem Zusammenhang zu speichern?"
),
// language above //

//////
//IT//
//////
// language bellow //
"Italian" => array(
//taxonomy
"taxonomy" => array(
"preOrder" => "Pre-ordina il tuo esemplare",
"registration" => "Iscrizione",
"inquire" => "Richiesta di informazioni",
"contactUs" => "Contattaci",
"download" => "Scarica",
"view" => "Vista",
"close" => "Chiudere"
),
//main title
//main title
"blockTitle" => "Grazie per la vostra visita",
"blockSubTitle" => "È con grande piacere che vi abbiamo accolto nella Manifattura Jaquet Droz.",
"blockIntro" => "Ci auguriamo che siate stati bene con noi e vi aspettiamo presto per continuare questo viaggio insieme intorno all'alta orologeria e all'inventiva di Jaquet Droz. Ci auguriamo di vedervi presto e siamo felici di condividere con voi queste immagini.",

//contents
"blcA" => "Saremmo lieti di aggiungerla ai nostri contatti privilegiati. In questo modo continueremo a stupirla e a invitarla ai nostri prossimi eventi, a informarla sulle nostre creazioni in anteprima o potremo semplicemente scambiarci opinioni sulla nostra comune passione per i progetti di orologeria rivoluzionari.",
"blcB" => "Potrebbe confermare le informazioni che ci ha fornito e permetterci di conservarle a questo scopo?"
),
// language above //

//////
//JA//
//////
// language bellow //
"Japanese" => array(
//taxonomy
"taxonomy" => array(
"preOrder" => "事前予約",
"registration" => "ご登録",
"inquire" => "新しく問い合わせる",
"contactUs" => "お問い合わせ",
"download" => "ダウンロード",
"view" => "表示",
"close" => "閉じる"
),
//main title
//main title
"blockTitle" => "ご来店ありがとうございました",
"blockSubTitle" => "ジャケ・ドローのマニュファクチュールへようこそお越しくださいました。",
"blockIntro" => "ジャケ・ドローの創意工夫と優れた時計製造にまつわる旅をご一緒できることを楽しみにしております。またお会いできる日を楽しみにしております。",

//contents
"blcA" => "お客様を特別なクライアントの一人としてご登録させて頂くことを心より嬉しく思います。ご登録により、次回のイベントにお客様をご案内したり、弊社の商品について先行してお知らせするなど、ジャケ・ドローに関してのプロジェクトに対する共通の情熱について意見交換したりすることができるようになります。",
"blcB" => "つきましては、ご提供頂いたお客様情報をご確認頂き、よろしければこちらの情報を弊社で保管させて頂く旨をご承認頂けますでしょうか?"
),
// language above //

//////
//RU//
//////
// language bellow //
"Russian" => array(
//taxonomy
"taxonomy" => array(
"preOrder" => "Сделайте предварительный заказ вашего экземпляра",
"registration" => "Подписаться",
"inquire" => "Отправить запрос сейчас",
"contactUs" => "Связаться с нами",
"download" => "Скачать",
"view" => "Посмотреть",
"close" => "Закрыть"
),
//main title
//main title
"blockTitle" => "Спасибо за визит",
"blockSubTitle" => "Мы с большим удовольствием приветствуем вас на Мануфактуре Jaquet Droz.",
"blockIntro" => "Мы надеемся, что вам было приятно провести с нами время, и с нетерпением ждем новой встречи, чтобы продолжить совместное путешествие вокруг высокого часового искусства и изобретательности Jaquet Droz. Мы надеемся увидеть вас в ближайшее время и рады поделиться с вами этими снимками.",

//contents
"blcA" => "Мы были бы счастливы включить Вас в список привилегированных клиентов. Также мы были бы рады пригласить Вас на наши мероприятия в будущем, заранее рассказать о новинках и просто обсудить нашу общую страсть к новаторским проектам в мире часового искусства.",
"blcB" => "Вы могли бы подтвердить правильность предоставленной информации и согласиться на ее хранение?"
),
// language above //

//////
//ES//
//////
// language bellow //
"Spanish" => array(
//taxonomy
"taxonomy" => array(
"preOrder" => "Reserve el suyo",
"registration" => "Inscripción",
"inquire" => "Crear consulta",
"contactUs" => "Contáctenos",
"download" => "Descargar",
"view" => "Ver",
"close" => "Cerrar"
),
//main title
//main title
"blockTitle" => "Gracias por su visita",
"blockSubTitle" => "Es para nosotros un gran placer darle la bienvenida a la Manufactura Jaquet Droz.",
"blockIntro" => "Esperamos que haya pasado un rato agradable con nosotros y deseamos volver a verle pronto para continuar juntos este viaje en torno a la alta relojería y la inventiva de Jaquet Droz. Esperamos verle pronto y nos complace compartir estas imágenes con usted.",

//contents
"blcA" => "Estaremos encantados de poder incluirle entre nuestros contactos privilegiados. De este modo, podríamos continuar juntos el maravilloso encuentro e invitarle a nuestros próximos eventos, informarle primeramente sobre nuestras creaciones o simplemente compartir nuestra pasión por los proyectos relojeros disruptivos.",
"blcB" => "¿Podría confirmar la información que nos ha facilitado y permitirnos conservarla para tal efecto?"
)
// language above //

);

//check if sellected language exist in language bits and define sellected language bits
if(array_key_exists($JDcustomPageClientLanguage, $JDcustomPageLanguageBits))
{
$JDcustomPageSelectedLanguageBits = $JDcustomPageLanguageBits[$JDcustomPageClientLanguage];
}
else
{
$JDcustomPageSelectedLanguageBits = $JDcustomPageLanguageBits[$JDcustomPageDefaultLanguage];
}
variable_set("JDcustomPageSelectedLanguageBits", $JDcustomPageSelectedLanguageBits);

//set page title
echo("document.title='".str_replace("'","’",$JDcustomPageSelectedLanguageBits["blockTitle"])."'");
?>

<?php echo($JDcustomPageSelectedLanguageBits["blockTitle"]) ?>

<?php echo($JDcustomPageSelectedLanguageBits["blockSubTitle"]) ?>

<?php echo($JDcustomPageSelectedLanguageBits["blockIntro"]) ?>

<?php

//////////////
//image list//
//////////////
//comment for prod
//$JDcustomPagePictures = scandir("".$JDcustomPagePicturesFolderPath);
//comment for test
$JDcustomPagePictures = scandir(".".$JDcustomPagePicturesFolderPath);
foreach($JDcustomPagePictures as $JDcustomPagePicture)
{
$JDcustomPagePictureExt = pathinfo($JDcustomPagePicture, PATHINFO_EXTENSION);
if($JDcustomPagePictureExt == "jpg" || $JDcustomPagePictureExt == "jpeg" || $JDcustomPagePictureExt == "png" || $JDcustomPagePictureExt == "gif" || $JDcustomPagePictureExt == "JPG" || $JDcustomPagePictureExt == "JPEG" || $JDcustomPagePictureExt == "PNG" || $JDcustomPagePictureExt == "GIF")
{
echo("");
echo("");
echo("");
echo("");
echo("".$JDcustomPageSelectedLanguageBits["taxonomy"]["close"]." X");
echo("".$JDcustomPageSelectedLanguageBits["taxonomy"]["download"]." ▼");
echo("");
}
}
?>

<?php
if( $JDcustomPagePicturesZIPFile != "" )
{
echo("".$JDcustomPageSelectedLanguageBits["taxonomy"]["download"]."");
}
?>

var app = {};
//gather all picture thumbnail box
app.pictures = document.getElementsByClassName('visitImage');
for (let i = 0 ; i < app.pictures.length ; i++) {
//calculate previous and next pictures
app.pictures[i].prev = app.pictures[(i + app.pictures.length - 1) % app.pictures.length];
app.pictures[i].next = app.pictures[(i + app.pictures.length + 1) % app.pictures.length];
//get clickable part and link with parent thumbnail box
//view button
app.pictures[i].children[0].parent = app.pictures[i];
app.pictures[i].children[0].addEventListener("click", function() {this.parent.classList.toggle('sellected')});
//prev button
app.pictures[i].children[1].parent = app.pictures[i];
app.pictures[i].children[1].addEventListener("click", function() {this.parent.classList.toggle('sellected');this.parent.prev.classList.toggle('sellected')});
//next button
app.pictures[i].children[2].parent = app.pictures[i];
app.pictures[i].children[2].addEventListener("click", function() {this.parent.classList.toggle('sellected');this.parent.next.classList.toggle('sellected')});
//close button
app.pictures[i].children[3].parent = app.pictures[i];
app.pictures[i].children[3].addEventListener("click", function() {this.parent.classList.toggle('sellected')});
}