Error parsing template "Designs/SSTemplate/_parsed/subpage.parsed.cshtml"
Line 462: (461:9) - Encountered end tag "div" with no matching start tag. Are your start/end tags properly balanced?
1 @using System.Web.Mvc;
2 @using System.Text.RegularExpressions;
3 @using System.Web;
4 @using System.IO;
5 @using System.Linq;
6 @using Dynamicweb;
7 @{
8 string basecss = "/Files/Templates/Designs/SSTemplate/css/base.css";
9 string ifolder = basecss.Substring(0, basecss.LastIndexOf("/")).ToString();
10 string ifolderOnDisk = System.Web.HttpContext.Current.Server.MapPath(ifolder);
11 DirectoryInfo idirectoryInfo = new System.IO.DirectoryInfo(ifolderOnDisk);
12 string idatefetch=@idirectoryInfo+"\\base.css";
13 DateTime ilastmodified = File.GetLastWriteTime(@idatefetch);
14 basecss=@basecss+"?modified="+@ilastmodified.ToString("yyyy-MM-ddTHH:mm:ss");
15 string stylecss = "/Files/Templates/Designs/SSTemplate/css/styles.css";
16 string ufolder = stylecss.Substring(0, stylecss.LastIndexOf("/")).ToString();
17 string ufolderOnDisk = System.Web.HttpContext.Current.Server.MapPath(ufolder);
18 DirectoryInfo udirectoryInfo = new System.IO.DirectoryInfo(ufolderOnDisk);
19 string udatefetch=@udirectoryInfo+"\\styles.css";
20 DateTime ulastmodified = File.GetLastWriteTime(@udatefetch);
21 stylecss=@stylecss+"?modified="+@ulastmodified.ToString("yyyy-MM-ddTHH:mm:ss");
22 string breadactive="";
23 }@if(GetBoolean("Item.ShowBradcrumbs") == true) {
24 breadactive="breadactive";
25 }@{
26 string logo=@GetString("Item.Area.Design.Logo");
27 }<!DOCTYPE html>
28 <html lang="fo">@{
29 string pageid=@GetString("DwPageID");
30 string readspeak=@GetString("Item.Area.Funktionalitetir.BaseUr")+"?id="+pageid;
31 string pagenametit=@GetString("DwPageName");
32 string pagearea=@GetString("DwPageID_1");
33 pagearea="top"+pagearea;
34 ViewBag.BaseUrl = @GetString("Item.Area.Funktionalitetir.BaseUr");
35 ViewBag.StoddStarvs = @GetString("Item.Page.StoddStarv");
36 }<head>
37 <meta http-equiv="X-UA-Compatible" content="IE=edge">
38 <meta charset="utf-8">
39
40 <meta name="viewport" content="width=device-width, initial-scale=1">
41
42 <meta name="author" content="">
43 <meta property="og:url" content="@readspeak">
44 <meta property="og:locale" content="fo_FO">
45 <meta property="og:description" content="@GetString(" meta.description")"="">
46 <meta property="og:type" content="website">
47 <meta property="og:locale" content="fo_FO">
48 <meta property="og:title" content="@pagenametit">
49 <meta name="google-site-verification" content="_8UkOXR321xXc60VV1folaRbl3pukMQpv1ifNUwjZXU">
50 @RenderSnippet("FBimg")
51 <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600" rel="stylesheet">
52 <link href="https://fonts.googleapis.com/css?family=Muli:400,400i,700,700i" rel="stylesheet">
53 <!-- <link rel="stylesheet" href="https://d1azc1qln24ryf.cloudfront.net/136306/Apoteksverkid/style-cf.css?319v5o"> -->
54 <link rel="stylesheet" href="https://cdn.icomoon.io/136306/Apoteksverkid/style-cf.css?fcds4f">
55 <link rel="shortcut icon" type="image/ico" href="/Files/Templates/Designs/SSTemplate/img/favicon.ico">
56 <link rel="stylesheet" href="/Files/Templates/Designs/SSTemplate/css/bootstrap.min.css">
57 <link rel="stylesheet" href="/Files/Templates/Designs/SSTemplate/css/meanmenu.css?build=25">
58 <link type="text/css" rel="stylesheet" href="/Files/Templates/Designs/SSTemplate/lightgallery/css/lightgallery.css">
59 <link rel="stylesheet" href="/Files/Templates/Designs/SSTemplate/css/tablesaw.css">
60 <link rel="stylesheet" href="@basecss">
61 <link rel="stylesheet" href="@stylecss">
62 <link type="text/css" rel="stylesheet" href="/Files/Templates/Designs/SSTemplate/css/base-mobil.css">
63 <link type="text/css" rel="stylesheet" href="/Files/Templates/Designs/SSTemplate/css/styles-mobil.css">
64 <script type="text/javascript" src="/Files/Templates/Designs/SSTemplate/Fontur/Javascript-2/Apotek.fo.js"></script>
65
66 @RenderParagraphContent(441)
67 @GetString("Item.CustomCode")
68 <meta name="google-site-verification" content="yk970pDKLw2g6gpmOki6lHB2xFurox3LU0O1L3uExJ0">
69 <style>
70 #menu{
71 position:relative;}
72 #searchform-desktop{
73 position:absolute;
74 left:0px;
75 width:100%;
76 display:none;
77 }
78
79 #searchform-desktop{
80 z-index:100;
81
82 }
83 #searchform-desktop input{
84
85 border-radius: 3px;
86 background: #FFF;
87 border:none !important;
88
89 /* shadow */
90 box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.05);
91
92 left:0px;
93 width:100%;
94 height:56px;
95 line-height:56px;
96 top:-2px;
97 position:relative;
98 padding:0px 50px 0px 15px;
99 }
100 .lup{
101 position:absolute;
102 right:12px;
103 top:50%;
104 margin-top:-17px;}
105 .lup:hover{cursor:pointer;}
106 </style>
107 @GetValue("CopyRightNotice")
108 @GetValue("MetaTags")
109 @GetValue("Stylesheets")
110 @GetValue("Javascripts")
111 </head>
112 @{
113 string bodyclass="sida"+@GetInteger("DwPageID").ToString();
114 }
115 <script src="https://consent.cookiefirst.com/sites/apotek.fo-80fbdf87-db0c-4a95-a933-cbf276ddc4fb/consent.js"></script>
116 <body class="@breadactive @bodyclass relative">
117
118
119
120
121
122
123
124
125
126 <div class="megamenitem megaheiluvagur Heilivágur">
127 <div class="container">
128 <div class="row">
129 <div class="col-3">
130 @RenderPageContent(251)
131 </div>
132 <div class="col-3">
133 @RenderPageContent(252)
134 </div>
135 <div class="col-3">
136 @RenderPageContent(253)
137 </div>
138 <div class="col-3">
139 @RenderPageContent(254)
140 </div>
141 </div>
142 </div>
143 </div>
144
145 <div class="megamenitem megamedisinskutgerd Medisinsk útgerð" style="display:none;">
146 <div class="container">
147 <div class="row">
148 <div class="col-3">
149 @RenderPageContent(677)
150 </div>
151 <div class="col-3">
152 @RenderPageContent(678)
153 </div>
154 <div class="col-3">
155 @RenderPageContent(679)
156 </div>
157 <div class="col-3">
158 @RenderPageContent(680)
159 </div>
160 </div>
161 </div>
162 </div>
163
164 <div class="megamenitem megagodrad Heilsa">
165 <div class="container">
166 <div class="row">
167 <div class="col-3">
168 @RenderPageContent(259)
169 </div>
170 <div class="col-3">
171 @RenderPageContent(261)
172 </div>
173 <div class="col-3">
174 @RenderPageContent(260)
175 </div>
176 <div class="col-3">
177 @RenderPageContent(263)
178 @RenderPageContent(264)
179 </div>
180 </div>
181 </div>
182 </div>
183
184 <div class="megamenitem megaheilsutaenastur Heilsutænastur">
185 <div class="container">
186 <div class="row">
187 <div class="col-3">
188
189 </div>
190 <div class="col-3">
191
192 </div>
193 <div class="col-3">
194 @RenderPageContent(265)
195 </div>
196 <div class="col-3">
197 @RenderPageContent(266)
198 </div>
199 </div>
200 </div>
201 </div>
202
203 <div class="megamenitem megaheilsutaenastur Umokkum">
204 <div class="container">
205 <div class="row">
206 <div class="col-3">
207 @RenderPageContent(255)
208 </div>
209 <div class="col-3">
210 @RenderPageContent(256)
211 </div>
212 <div class="col-3">
213 @RenderPageContent(257)
214 </div>
215 <div class="col-3">
216 @RenderPageContent(258)
217 </div>
218 </div>
219 </div>
220 </div>
221
222
223
224 <div class="mynav d-md-none d-lg-none d-xl-none">
225 @GetValue("DwNavigation(mobmen)")
226
227 </div><!-- #dl-menu end -->
228
229
230 @GetString("Item.Area.FacebookJaascriptSDK")
231 <div class="toptopmenu container d-none d-sm-none d-md-block">
232 <div class="row">
233
234
235
236 <div class="col-2"><a class="toplanglink" href="/default.aspx?id=299">EN</a> / <a class="toplanglink" href="/default.aspx?id=192"> DK</a></div>
237
238 <div class="col-10 textright">
239
240 @{
241 bool vorurikurv=false;
242 bool solustadikurv=false;
243 int amountikurv=0;
244 string kurvid="354";
245 }
246
247 @foreach(LoopItem i in GetLoop("OrderContextCarts")){
248 <text>
249 @if(@i.GetString("Ecom:OrderContext.ID")=="Solustod"){
250 <text>
251 @if(@i.GetInteger("Ecom:Order.OrderLines.TotalQuantity")!=0){
252 amountikurv=@i.GetInteger("Ecom:Order.OrderLines.TotalQuantity");
253 vorurikurv=true;
254 solustadikurv=true;
255 kurvid="288";
256 }
257 </text>
258 }
259 </text>
260 }
261
262 @if(@solustadikurv!=true){
263 <text>
264 @foreach(LoopItem i in GetLoop("OrderContextCarts")){
265 <text>
266 @if(@i.GetInteger("Ecom:Order.OrderLines.TotalQuantity")!=0){
267 amountikurv=@i.GetInteger("Ecom:Order.OrderLines.TotalQuantity");
268 vorurikurv=true;
269 }
270 </text>
271 }
272 </text>
273
274 }
275
276
277
278 @if(@amountikurv!=0){
279 <a class="minicart" href="/default.aspx?id=@kurvid">
280 <span class="counter">@amountikurv</span>
281 <span class="icon-cart"></span>
282 <span class="minkurv">Mín kurv</span>
283 </a>
284 }
285
286 @GetValue("DwNavigation(leftnavigation)")
287
288 </div>
289 </div>
290 </div>
291
292 <nav class="navbar navbar-expand-md mt-2 mb-2 d-none d-sm-none d-md-block">
293 <div class="container">
294 <a class="navbar-brand" href="#"><img class="img-fluid mainlogo" src="@logo"></a>
295 <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExample04" aria-controls="navbarsExample04" aria-expanded="false" aria-label="Toggle navigation">
296 <span class="navbar-toggler-icon"></span>
297 </button>
298
299 <div class="collapse navbar-collapse hide" id="menu">
300 @GetValue("DwNavigation(topmen1)")
301 <div class="search-trigger">
302
303 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewbox="0 0 24 24" fill="none">
304 <path fill-rule="evenodd" clip-rule="evenodd" d="M15.5587 5.11321C14.1162 3.67069 12.3695 2.94547 10.336 2.94547C8.30239 2.94547 6.55569 3.67069 5.11318 5.11321C3.67066 6.55572 2.94543 8.30242 2.94543 10.336C2.94543 12.3695 3.67066 14.1162 5.11318 15.5588C6.55569 17.0013 8.30239 17.7265 10.336 17.7265C11.9667 17.7265 13.4426 17.2404 14.7553 16.2715L19.2049 20.7211C19.3876 20.9343 19.6538 21.0546 19.9637 21.0546C20.2634 21.0546 20.5275 20.9473 20.7373 20.7396C20.9473 20.5276 21.0545 20.2634 21.0545 19.9637C21.0545 19.6539 20.9343 19.3877 20.7034 19.1885L16.2714 14.7553C17.2404 13.4426 17.7265 11.9668 17.7265 10.336C17.7265 8.30242 17.0012 6.55572 15.5587 5.11321ZM14.3323 14.3324C13.2275 15.4372 11.9025 15.9853 10.336 15.9853C8.76945 15.9853 7.44443 15.4372 6.33956 14.3324C5.23469 13.2275 4.68663 11.9025 4.68663 10.336C4.68663 8.76948 5.23469 7.44446 6.33956 6.33959C7.44443 5.23472 8.76945 4.68666 10.336 4.68666C11.9025 4.68666 13.2275 5.23472 14.3323 6.33959C15.4372 7.44446 15.9853 8.76948 15.9853 10.336C15.9853 11.9025 15.4372 13.2275 14.3323 14.3324Z" fill="white"></path>
305 </svg>
306 </div>
307 <div id="searchform-desktop" style="display:none;">
308 <input class="desktopSearchInput" type="text" alt="">
309 <div class="lup">
310 <svg xmlns="http://www.w3.org/2000/svg" width="23" height="23" viewbox="0 0 23 23" fill="none">
311 <path fill-rule="evenodd" clip-rule="evenodd" d="M14.9105 4.90014C13.5281 3.51773 11.8541 2.82272 9.9053 2.82272C7.95647 2.82272 6.28255 3.51773 4.90014 4.90014C3.51773 6.28255 2.82272 7.95647 2.82272 9.9053C2.82272 11.8541 3.51773 13.5281 4.90014 14.9105C6.28255 16.2929 7.95647 16.9879 9.9053 16.9879C11.4681 16.9879 12.8825 16.5221 14.1405 15.5935L18.4047 19.8577C18.5798 20.0621 18.8349 20.1773 19.1319 20.1773C19.4191 20.1773 19.6722 20.0745 19.8733 19.8754C20.0745 19.6722 20.1773 19.4191 20.1773 19.1319C20.1773 18.8349 20.0621 18.5798 19.8407 18.389L15.5934 14.1405C16.5221 12.8825 16.9879 11.4681 16.9879 9.9053C16.9879 7.95647 16.2929 6.28255 14.9105 4.90014ZM13.7352 13.7352C12.6763 14.794 11.4065 15.3192 9.9053 15.3192C8.40408 15.3192 7.13426 14.794 6.07543 13.7352C5.0166 12.6763 4.49137 11.4065 4.49137 9.9053C4.49137 8.40408 5.0166 7.13426 6.07543 6.07543C7.13426 5.0166 8.40408 4.49137 9.9053 4.49137C11.4065 4.49137 12.6763 5.0166 13.7352 6.07543C14.794 7.13426 15.3192 8.40408 15.3192 9.9053C15.3192 11.4065 14.794 12.6763 13.7352 13.7352Z" fill="#333333"></path>
312 </svg>
313 </div>
314 </div>
315
316
317 </div>
318 </div>
319 </nav> <!--- NAVIGATION --->
320
321
322 @if(GetBoolean("Item.ShowBradcrumbs") == true || GetBoolean("Item.ApotekSida")==true)
323 {<text>
324 <div class="container-fluid mb-0 bread bread-parent">
325 <div class="container">
326 <div class="row">
327 <div class="bread col my-2">
328 @GetValue("DwNavigation(bread)")
329 </div>
330 </div>
331 </div>
332 </div>
333 </text>
334 }
335 <!--- BREADCRUMB --->
336
337 @using System.Text.RegularExpressions;
338 @using System.Web;
339
340
341 @{
342 string mynd=@GetString("Item.Area.Design.FacebookDeilFallback");
343 }
344 @if(!String.IsNullOrEmpty(@GetString("Item.FacebookDeilMynd"))){
345 mynd = @GetString("Item.FacebookDeilMynd");
346 }
347
348
349 @SnippetStart("FBimg")
350 <meta property="og:image" content="@ViewBag.BaseUrl@mynd">
351 @SnippetEnd("FBimg")
352
353
354 <div class="container">
355 <div class="row">
356 <div class="col-sm-3 d-none d-sm-none d-md-block">
357 @if(GetString("Item.Area.Design.Vinstramenu")=="Leftmen1"){
358 <text>
359 <nav class="nav flex-column">
360 @GetValue("DwNavigation(leftmen1)")
361 </nav>
362 </text>
363 }
364
365 @if(GetString("Item.Area.Design.Vinstramenu")=="Leftmen2"){
366 <text>
367 <nav class="nav flex-column">
368 @GetValue("DwNavigation(leftmen2)")
369 </nav>
370 </text>
371 }
372 </div> <!--- SIDEBAR MENU --->
373
374 <div class="col-sm-9 col-12" id="subpage-hogra">@GetValue("DwContent(subpagehogra)")</div>
375 <div class="container">
376 <div class="col-12 text-center">
377 <a class="scrolltop"> <span class="icon-backtotop"><span class="path1"></span><span class="path2"></span></span></a>
378 </div>
379 </div>
380
381
382
383
384
385
386 <style>
387 .footerAniversary{
388 background-color: #04163F;
389 display:flex;
390 width:100%;
391 align-items:center;
392 justify-content:center;
393 padding:50px 0px;
394 margin-top:150px;
395 }
396 .search-trigger:hover{
397 cursor:pointer;
398 }
399 .search-trigger{
400
401 position: absolute;
402
403 right: 10px;
404
405 top: 28px;
406 }
407 </style>
408 @if(GetBoolean("Item.ApotekAniversary")){
409 <style>
410 .scrolltop{
411 display:none !important;}
412 </style>
413 <div class="container-fluid footerAniversary">
414 <img src="/Files/Templates/Designs/SSTemplate/img/footer-logo.svg" alt="">
415 </div>
416 }
417 else{
418 <text>
419
420
421 <div class="container-fluid footer">
422 <div class="container relative">
423 @if(!String.IsNullOrEmpty(@GetString("Item.SeinastDagfort"))){
424 <text>
425
426 <div class="seinastdagfort">Dagført @GetDate("Item.SeinastDagfort").ToString("dd'/'MM'/'yyyy")</div>
427 </text>
428 }
429
430 <div class="row ">
431
432 <div class="col-xl-3 col-md-12 col-sm-12 col-12 mt-5">
433 @RenderParagraphContent(27)
434 </div>
435 <div class="col-xl-3 col-md-6 col-sm-6 col-12 mt-5">
436 @RenderParagraphContent(28)
437 </div>
438 <div class="col-xl-3 col-md-6 col-sm-6 col-12 mt-5">
439 @RenderParagraphContent(1055)
440 </div>
441 <div class="col-xl-3 col-md-12 col-sm-12 col-12 mt-5">
442 @RenderParagraphContent(30)
443
444 </div>
445 <div class="col-md-3 col-sm-3 col-12 mt-5 text-right hide">
446 <a href="https://www.facebook.com/Tjaldursapotek/" target="_blank"><span class="icon-facebook-footer"><span class="path1"></span><span class="path2"></span><span class="path3"></span></span></a>
447 </div>
448 </div>
449 </div>
450 </div>
451
452 </text>
453 <div class="container-fluid footerbottom">
454 <div class="container">
455 <div class="row">
456 <div class="col-12 text-center">
457 <a class="kolofon" target="_blank" href="//www.sendistovan.fo"><img src="/Files/Templates/Designs/SSTemplate/img/kolofon.svg" alt="Sendistovan">Ein loysn frá Sendistovuni</a>
458 </div>
459 </div>
460 </div>
461 </div>
462 </div>
463 </div>
464 }
465 <div class="mob-search">
466 <form method="post" action="?id=47" id="mob-searchform">
467 <input type="submit" class="hide">
468 <input class="mobinput" name="q" type="text" placeholder="Leita á apotek.fo"><span class="icon-search mob-searchicon mob-submit"></span>
469 <span class="icon-menu-close mob-search-close"></span>
470
471 </form>
472 </div>
473
474 @{
475 string prodtransl="vørur";
476 string logdtrans="lagdar";
477 }
478 @if(@amountikurv==1) {
479 prodtransl="vøra";
480 logdtrans="løgd";
481 }
482 @if(@amountikurv!=0){
483 <text>
484
485 <a class="mobuppl d-md-none d-lg-none d-xl-none" href="/default.aspx?id=@kurvid">
486 <span class="icon-cart"></span> @amountikurv @prodtransl @logdtrans í keypskurv
487 </a>
488
489 </text>
490 }
491 else{
492
493 <a href="/?id=399" class="mobuppl d-md-none d-lg-none d-xl-none">
494 <span class="icon-location"></span> Upplatingartíðir
495 </a>
496 }
497
498
499
500 <div class="mobilmenpush hide">
501
502 @GetValue("DwNavigation(mobtoptopnav)")
503
504
505 </div>
506
507
508 <script src="/Files/Templates/Designs/SSTemplate/js/tablesaw.js"></script>
509 <script src="/Files/Templates/Designs/SSTemplate/js/tablesaw-init.js"></script>
510 <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
511
512
513 <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
514 <script src="/Files/Templates/Designs/SSTemplate/lightgallery/js/lightgallery.min.js"></script>
515
516 <script src="/Files/Templates/Designs/SSTemplate/lightgallery/js/lg-thumbnail.js"></script>
517 <script src="/Files/Templates/Designs/SSTemplate/lightgallery/js/lg-zoom.js"></script>
518 <script src="/Files/Templates/Designs/SSTemplate/lightgallery/js/lg-video.js"></script>
519 <script src="/Files/Templates/Designs/SSTemplate/js/meanmenu.js?build=24"></script>
520 <script src="/Files/Templates/Designs/SSTemplate/js/ssscript.js?v=4"></script>
521 <script>
522 // Find all elements with the classname "megalink"
523 var elements = document.getElementsByClassName("mega-link");
524
525 // Iterate through each element
526 for (var i = 0; i < elements.length; i++) {
527 var element = elements[i];
528
529 // Get the current value of the "rel" parameter
530 var rel = element.getAttribute("rel");
531
532 // Remove whitespace from the "rel" parameter
533 var updatedRel = rel.replace(/\s/g, "");
534
535 // Update the "rel" parameter with the whitespace removed
536 element.setAttribute("rel", updatedRel);
537 }
538 </script>
539
540 @GetString("Item.Area.Funktionalitetir.FacebookTrackingPixul")
541
542
543 <script>
544 // JavaScript
545 document.addEventListener('DOMContentLoaded', function() {
546 // Get the input field and the "lup" div
547 const searchInput = document.querySelector('.desktopSearchInput');
548 const lupDiv = document.querySelector('.lup');
549
550 // Function to redirect with the query parameter
551 function searchRedirect() {
552 const query = searchInput.value.trim(); // Get the value and trim any whitespace
553 if (query) {
554 // Redirect to the new URL with the 'q' parameter
555 window.location.href = `/default.aspx?id=47&q=${encodeURIComponent(query)}`;
556 }
557 }
558
559 // Add 'keydown' event listener for the 'Enter' key
560 searchInput.addEventListener('keydown', function(event) {
561 if (event.key === 'Enter') {
562 searchRedirect();
563 }
564 });
565
566 // Add 'click' event listener to the "lup" div
567 lupDiv.addEventListener('click', function() {
568 searchRedirect();
569 });
570 });
571 </script>
572
573 <script>
574 // Wait until the DOM is fully loaded
575 document.addEventListener("DOMContentLoaded", function() {
576 // Select the element with the class "search-trigger"
577 const searchTrigger = document.querySelector('.search-trigger');
578 // Select the element with the ID "searchform-desktop"
579 const searchFormDesktop = document.getElementById('searchform-desktop');
580 // Select the input field with the class "desktopSearchInput"
581 const desktopSearchInput = document.querySelector('.desktopSearchInput');
582
583 // Add a click event listener to the search-trigger element
584 if (searchTrigger && searchFormDesktop && desktopSearchInput) {
585 searchTrigger.addEventListener('click', function() {
586 // Set the display of #searchform-desktop to block
587 searchFormDesktop.style.display = 'block';
588 // Focus the input field with class "desktopSearchInput"
589 desktopSearchInput.focus();
590 });
591
592 // Add a click event listener to the document to hide searchFormDesktop when clicking outside
593 document.addEventListener('click', function(event) {
594 // Check if the click is outside the #searchform-desktop and the .search-trigger
595 if (searchFormDesktop.style.display === 'block' && !searchFormDesktop.contains(event.target) && !searchTrigger.contains(event.target)) {
596 // Set the display of #searchform-desktop to none (hide it)
597 searchFormDesktop.style.display = 'none';
598 }
599 });
600 }
601 });
602
603 </script>
604
605
606 <script>
607 document.addEventListener('DOMContentLoaded', function () {
608 // Function to handle hover and click events
609 function handleLinkEvents(relValue, pageId) {
610 const $link = $('a[rel="' + relValue + '"]');
611 const $megamenItems = $('.megamenitem');
612
613 // Click event handler
614 $link.on('click', function (event) {
615 event.preventDefault(); // Prevent default anchor behavior
616 window.location.href = '/default.aspx?id=' + pageId; // Redirect to the given page id
617 });
618
619 // Hover event handler (mouseenter and mouseleave)
620 $link.hover(
621 function () { // On mouse enter
622 $megamenItems.stop(true, true).fadeOut(100); // Hide with a slow fade effect
623 },
624 /*function () { // On mouse leave
625 $megamenItems.stop(true, true).show(); // Show with a slow fade effect
626 }*/
627 );
628 }
629
630 // Initialize events for Talgildaapotekið and Okkaravørur
631 handleLinkEvents('Talgildaapotekið', 710);
632 handleLinkEvents('Okkaravørur', 664);
633
634
635 // Select the <a> tag inside the <ul> with the class "meanmenu"
636 $('ul.meanmenu>li>a[data-toggle]').on('click', function(event) {
637 if ($(this).text().trim() === 'Talgilda apotekið') { // Check if the inner text matches
638 event.preventDefault(); // Prevent default anchor behavior
639 window.location.href = '/default.aspx?id=710'; // Redirect to the desired page
640 }
641 else if ($(this).text().trim() === 'Okkara vørur') { // Check if the inner text matches
642 event.preventDefault(); // Prevent default anchor behavior
643 window.location.href = '/default.aspx?id=664'; // Redirect to the desired page
644 }
645 else {
646 // Click the next sibling with class "mean-expand" if text does not match
647 $(this).next('.mean-expand').trigger('click');
648 }
649 });
650 });
651 </script>
652 </body>
653 </html>
654
655
656