1(function() { 2 var c, consentCatalogueIsSet, consentCatalogueString, consentDomaIsSet, consentDomaString, consentFilmingIsSet, consentFilmingString, consentIsSet, consentString, cookies, havc, hiResBreakpoint, i, initMap, isMobile, isResponsive, mobileBreakpoint, numEnd, numFilms, numNow, numStart, responsiveBreakpoint, runOnce, setCookie, setCookie2, setCookie3, setCookie4, setMobileVars, validateEmail; 3 4 havc = { 5 scroller: { 6 locked: true, 7 depth: 4, 8 resetOnMouseout: false, 9 trigSpaceActive: false, 10 trigSpace: 0.1, 11 currentFocus: null, 12 desiredFocus: null, 13 idle: true, 14 contWidth: null, 15 $cont: null, 16 $move: null, 17 contOffset: null, 18 init: function(selector) { 19 var initFn, width, 20 _this = this; 21 this.$cont = $(selector); 22 this.$move = this.$cont.find('.cont'); 23 width = 0; 24 this.$move.find('.itemGroup').each(function() { 25 return width += $(this).outerWidth(true); 26 }); 27 this.$move.width(width); 28 if (width < this.$cont.width()) { 29 this.$move.css({ 30 margin: '0 ' + ((this.$cont.width() - width) / 2) + 'px' 31 }); 32 } 33 initFn = function() { 34 _this.depth = _this.$move.width() / _this.$cont.width(); 35 _this.contOffset = _this.$cont.offset(); 36 _this.contWidth = _this.$cont.width(); 37 _this.innerWidth = _this.$move.width(); 38 _this.currentFocus = _this.innerWidth / 2; 39 return _this.desiredFocus = _this.currentFocus; 40 }; 41 initFn(); 42 this.resetMove(); 43 $(window).resize(function() { 44 initFn(); 45 return _this.resetMove(); 46 }); 47 this.$cont.hoverIntent({ 48 sensitivity: 5, 49 interval: 100, 50 timeout: 200, 51 over: function(e) { 52 havc.scroller.locked = false; 53 return havc.scroller.mouseMoved(e); 54 }, 55 out: function() { 56 return havc.scroller.locked = true; 57 } 58 }); 59 this.$cont.mousemove(this.mouseMoved); 60 if (this.resetOnMouseout) { 61 return this.$cont.mouseout(function() { 62 return _this.mouseMoved({ 63 pageX: $(window).width() / 2 64 }); 65 }); 66 } 67 }, 68 resetMove: function() { 69 return this.$move.css({ 70 transform: "translate(" + -(this.innerWidth / 2 - (this.innerWidth / 2 / this.depth)) + "px, 0px)" 71 }); 72 }, 73 mouseMoved: function(event) { 74 var m, _s, _this; 75 _s = havc.scroller; 76 m = event.pageX - _s.contOffset.left; 77 if (_s.locked) { 78 return false; 79 }
80 if (_s.trigSpaceActive && m < _s.contWidth / 2 + _s.contWidth * _s.trigSpace / 2 && m > _s.contWidth / 2 - _s.contWidth * _s.trigSpace / 2) { 81 _s.desiredFocus = _s.innerWidth / 2; 82 } else { 83 _s.desiredFocus = Math.round((m - _s.contWidth / 2 / _s.depth) * _s.depth + _s.contWidth / 2); 84 } 85 _s.intervalId = _s.intervalId != null ? _s.intervalId : null; 86 if (_s.idle) { 87 _this = _s; 88 if (!_this.intervalId) { 89 return _this.intervalId = setInterval((function(_this) { 90 return function() { 91 _this.idle = Math.abs(_this.desiredFocus - _this.currentFocus) < .5; 92 if (_this.idle) { 93 _this.currentFocus = _this.desiredFocus; 94 } else { 95 _this.currentFocus += (_this.desiredFocus - _this.currentFocus) * .14; 96 } 97 _this.$move.css({ 98 transform: "translate(" + -(_this.currentFocus - (_this.currentFocus / _this.depth)) + "px, 0px)" 99 }); 100 if (_this.idle) { 101 clearInterval(_this.intervalId); 102 return _this.intervalId = null; 103 } 104 }; 105 })(_this), 20); 106 } 107 } 108 } 109 }, 110 cinema: { 111 container: $('#cinema'), 112 mediaContainer: $('#media'), 113 filmTitle: $('#filmTitle'), 114 filmLink: $('#filmLink'), 115 previewContainerSelector: '#films, #filmMedia', 116 openElementSelectors: { 117 "default": '#openCinema', 118 media: 'a.openCinemaMode' 119 }, 120 closeElementSelector: '#closeCinema', 121 initialized: false, 122 slider: null, 123 displayMedia: function(title, imageUrl, embedUrl, caption, link) { 124 var $img, loadImage, mediaContHeight; 125 this.filmTitle.text(title); 126 if (link) { 127 this.filmLink.css({ 128 visibility: 'visible' 129 }); 130 this.filmLink.attr('href', link); 131 } else { 132 this.filmLink.css({ 133 visibility: 'hidden' 134 }); 135 this.filmLink.attr('href', ''); 136 } 137 if ((embedUrl != null) && embedUrl.length) { 138 this.mediaContainer.css({ 139 background: "url('/img/cinemaLoader.gif') center center no-repeat transparent" 140 }); 141 return this.mediaContainer.html("<iframe src=" + embedUrl + " width=100% height=100% frameborder=0 webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>"); 142 } else if ((imageUrl != null) && imageUrl.length) { 143 this.mediaContainer.css({ 144 background: "none" 145 }); 146 this.mediaContainer.html("<img src=" + imageUrl + " style='opacity:0;' />"); 147 mediaContHeight = this.mediaContainer.height(); 148 $img = this.mediaContainer.find('img'); 149 loadImage = function() { 150 console.log($img.height(), ';', mediaContHeight); 151 if ($img.height() < mediaContHeight) { 152 $img.css({ 153 marginTop: (mediaContHeight - $img.height()) / 2 154 }); 155 } 156 $img.css({ 157 opacity: 1 158 }); 159 return true; 160 }; 161 if ($img[0].complete) { 162 loadImage(); 163 } 164 $img.load(function() { 165 return loadImage(); 166 }); 167 if (caption != null) { 168 return this.mediaContainer.append("<div><span class=\"caption\"><span>" + caption + " </span></span></div>"); 169 } 170 } 171 }, 172 openCinema: function(id) { 173 var $body, $film, $innerWrapper, cinema, diff, index, mediaContHeight, mediaContWidth, ratio, slide, windowHeight; 174 if (id == null) { 175 id = null; 176 } 177 $body = $('body'); 178 $innerWrapper = this.container.find('.wrapper'); 179 windowHeight = $(window).height(); 180 this.container.fadeIn(200, function() { 181 if ($innerWrapper.outerHeight() <= windowHeight) { 182 return $innerWrapper.css({ 183 opacity: 1, 184 marginTop: (windowHeight - $innerWrapper.outerHeight()) / 2 185 }); 186 } else { 187 return $innerWrapper.css({ 188 opacity: 1, 189 marginTop: 0 190 }); 191 } 192 }); 193 if (!($innerWrapper.outerHeight() <= windowHeight)) { 194 mediaContHeight = this.mediaContainer.height(); 195 mediaContWidth = this.mediaContainer.width(); 196 ratio = mediaContWidth / mediaContHeight; 197 diff = $innerWrapper.outerHeight() - windowHeight; 198 this.mediaContainer.height(mediaContHeight - diff); 199 diff = mediaContWidth - this.mediaContainer.height() * ratio; 200 this.mediaContainer.css({ 201 width: this.mediaContainer.width(mediaContWidth - diff), 202 marginLeft: diff / 2 203 }); 204 } 205 $body.css({ 206 overflow: 'hidden' 207 }); 208 if (!this.initialized) { 209 this.initialized = true; 210 this.slider = $('#slides').bxSlider({ 211 pager: false, 212 minSlides: 1, 213 maxSlides: 6, 214 slideWidth: 140, 215 slideMargin: 20, 216 infiniteLoop: false 217 }); 218 havc.overflowHandler('li', '#slides img'); 219 cinema = this; 220 $('#slides').on('click', 'a', function(e) { 221 var $film; 222 e.preventDefault(); 223 $film = $(this); 224 return cinema.displayMedia($film.attr('data-title'), $film.attr('data-image'), $film.attr('data-embed'), $film.attr('data-caption'), $film.attr('data-link')); 225 }); 226 $('a#toggleSlides').click(function(e) { 227 var $this, text; 228 e.preventDefault(); 229 $this = $(this); 230 $this.toggleClass('closed'); 231 text = $this.text(); 232 $this.text($this.attr('data-closed-text')); 233 $this.attr('data-closed-text', text); 234 return $this.siblings('.bx-wrapper').stop().fadeToggle(200, 'linear'); 235 }); 236 } 237 if (id != null) { 238 $film = $("a#" + id); 239 index = $film.parents('li').index(); 240 slide = Math.floor(index / 6); 241 this.slider.goToSlide(slide); 242 } else { 243 $film = $('#slides li:first-child a'); 244 } 245 return this.displayMedia($film.attr('data-title'), $film.attr('data-image'), $film.attr('data-embed'), $film.attr('data-caption'), $film.attr('data-link')); 246 }, 247 closeCinema: function() { 248 var $body; 249 $body = $('body'); 250 this.container.fadeOut(200); 251 this.mediaContainer.html(''); 252 return $body.css({ 253 overflow: 'visible' 254 }); 255 }, 256 setup: function() { 257 var cinema; 258 cinema = this; 259 $(cinema.closeElementSelector).click(function(e) { 260 e.preventDefault(); 261 return cinema.closeCinema(); 262 }); 263 $(cinema.openElementSelectors["default"]).click(function(e) { 264 e.preventDefault(); 265 if ($(window).width() > 767) { 266 return cinema.openCinema(); 267 } else { 268 return null; 269 } 270 }); 271 return $(cinema.previewContainerSelector).on('click', cinema.openElementSelectors.media, function(e) { 272 e.preventDefault(); 273 if ($(window).width() > 767) { 274 return cinema.openCinema($(this).attr('data-id')); 275 } else { 276 return null; 277 } 278 }); 279 } 280 }, 281 overflowHandler: function(parentSelector, imageSelector) { 282 var handleMargin; 283 handleMargin = function($img) { 284 var $div; 285 $div = $img.parents(parentSelector); 286 if ($img.height() !== $div.height()) { 287 return $img.css({ 288 marginTop: -(($img.height() - $div.height()) / 2) 289 }); 290 } 291 }; 292 return $(imageSelector).each(function() { 293 var $img; 294 $img = $(this); 295 $img.load(function() { 296 return handleMargin($img); 297 }); 298 if ($img[0].complete) { 299 return handleMargin($img); 300 } 301 }); 302 }, 303 setup: function() { 304 var $film, $toggler; 305 $('.mainNavigation').hoverIntent({ 306 over: function() { 307 return $(this).addClass('hover'); 308 }, 309 out: function() { 310 return $(this).removeClass('hover'); 311 } 312 }); 313 $('.nivoSlider').each(function() { 314 var $slider; 315 $slider = $(this); 316 if ($slider.find('img').length > 1) { 317 return $slider.nivoSlider({ 318 effect: 'fade', 319 animSpeed: 500, 320 pauseTime: 3000, 321 startSlide: 0, 322 directionNav: true, 323 controlNav: false, 324 controlNavThumbs: false, 325 pauseOnHover: true, 326 manualAdvance: true, 327 prevText: '', 328 nextText: '' 329 }); 330 } else { 331 return $slider.removeClass('nivoSlider'); 332 } 333 });
334 $('.logoSlider').each(function() { 335 var $slider; 336 $slider = $(this); 337 if ($slider.find('img').length > 1) { 338 return $slider.nivoSlider({ 339 effect: 'fold', 340 slices: 10, 341 animSpeed: 1000, 342 pauseTime: 6000, 343 startSlide: 0, 344 directionNav: false, 345 controlNav: false, 346 controlNavThumbs: false, 347 pauseOnHover: false, 348 manualAdvance: false, 349 prevText: '', 350 nextText: '' 351 }); 352 } else { 353 return $slider.removeClass('logoSlider'); 354 } 355 }); 356 $('.tabs').tabs(); 357 /*$("nav.mainNavigation").sticky({ 358 topSpacing: 0, 359 className: 'sticky', 360 getWidthFrom: 'header.mainHeader' 361 });*/ 362 this.scroller.init('div#films'); 363 $('select').chosen(); 364 $('.bxslider').bxSlider({ 365 pager: false, 366 onSliderLoad: function() { 367 $('.bxslider').css('visibility', 'visible'); 368 } 369 }); 370 $('input[type="checkbox"]').iCheck({ 371 cursor: true 372 }); 373 this.cinema.setup(); 374 this.overflowHandler('a', '.mainClip img, .altClip img'); 375 this.overflowHandler('div[class*="item"]', 'div[class*="item"] img'); 376 $('section.listing div.wrap').each(function() { 377 var $button, $div, $this; 378 $this = $(this); 379 $div = $this.find('div'); 380 $button = $this.siblings('a.showMore'); 381 if ($this.height() < $div.height()) { 382 $button.removeClass('hidden'); 383 return $button.click(function(e) { 384 var text; 385 e.preventDefault(); 386 text = $button.text(); 387 $button.text($button.attr('data-text')); 388 $button.attr('data-text', text); 389 if (this.open === true) { 390 this.open = false; 391 $(window).scrollTop(0); 392 $this.height(200); 393 return $this.addClass('closed'); 394 } else { 395 this.open = true; 396 $this.height($div.outerHeight() + $button.outerHeight()); 397 return $this.removeClass('closed'); 398 } 399 }); 400 } else { 401 $this.removeClass('closed'); 402 return $this.css("height", "auto"); 403 } 404 }); 405 $film = $("a.defaultOpen"); 406 if ($film.length) { 407 $film.trigger("click"); 408 $toggler = $("a.toggleSlides"); 409 return $toggler.trigger("click"); 410 } 411 } 412 }; 413 414 $(document).ready(function() { 415 return havc.setup(); 416 }); 417 418 $(window).load(function() { 419 $('.introContent').dotdotdot({ 420 wrap: 'word', 421 lastCharacter: { 422 remove: [' ', ',', ';', '.', '!', '?', '|'] 423 } 424 }); 425 $('.introContent a p').css('visibility', 'visible'); 426 $('.groupedResults li').dotdotdot({ 427 wrap: 'word', 428 lastCharacter: { 429 remove: [' ', ',', ';', '.', '!', '?', '|'] 430 } 431 }); 432 $('div.wrapper section.info article p').dotdotdot({ 433 wrap: 'word', 434 lastCharacter: { 435 remove: [' ', ',', ';', '.', '!', '?', '|'] 436 } 437 }); 438 439 440 if($eventScroller.length) { 441 $("div.event-box div.inner article").each(function(){ 442 $eventScrollerWidth+=$(this).outerWidth(); 443 }); 444 $eventScrollerWidth+=$screenViewWidth; 445 if($screenViewWidth<1380) { 446 $eventScrollerIntervalTime = 10000; 447 } 448 $eventScrollerInterval = parseInt($eventScrollerWidth/$screenViewWidth)*$eventScrollerIntervalTime; 449 eventScrollerScroll(); 450 } 451 452 return setInterval(numFilms, 1000); 453 }); 454 455 var $eventScroller = $("div.event-box div.inner"); 456 var $screenViewWidth = $("div.event-box").outerWidth(); 457 var $eventScrollerWidth = 0; 458 var $eventScrollerInterval = 10000; 459 var $eventScrollerIntervalTime = 14000; 460 if($eventScroller.length) { 461 $eventScroller.css({'marginLeft':$screenViewWidth+'px'}); 462 } 463 464 function eventScrollerScroll() { 465 $eventScroller.animate({marginLeft: "-"+$eventScrollerWidth+"px"}, $eventScrollerInterval, "linear", eventScrollerReset); 466 } 467 function eventScrollerReset() { 468 $eventScroller.css({'marginLeft':$screenViewWidth+'px'}); 469 eventScrollerScroll(); 470 } 471 472 473 numStart = numNow = '1430'; 474 475 numEnd = '1450'; 476 477 numFilms = function() { 478 $('#numFilms').html('> ' + numNow + ' '); 479 numNow++; 480 if (numNow > numEnd) { 481 numNow = numStart; 482 } 483 }; 484 485 $("div.newsletter button.submit").each(function(index) { 486 return $(this).on("click", function(e) { 487 var alreadySubscribed, email, emailField, errorMsg, invalidEmail, langId, msgContainer, successMsg; 488 email = void 0; 489 e.preventDefault(); 490 emailField = $(this).parent(".input").siblings("div.input").find("input"); 491 email = emailField.val(); 492 langId = emailField.attr('data-langid'); 493 msgContainer = $(this).parent(".input").siblings("div.newsletterMessage"); 494 if (langId === 'hrv') { 495 successMsg = "Hvala na prijavi! Provjerite email!"; 496 errorMsg = "Došlo je do greške."; 497 invalidEmail = "Email adresa je neispravna!"; 498 alreadySubscribed = "Hvala na prijavi!"; 499 } else if (langId === 'eng') { 500 successMsg = "Thank you! Check your email!"; 501 errorMsg = "An error has occured.";
502 invalidEmail = "Email address is invalid!"; 503 alreadySubscribed = "Thank you!"; 504 } 505 return $.ajax({ 506 url: "/ajax/subscribe", 507 type: "POST", 508 data: { 509 email: email, 510 langId: langId 511 }, 512 success: function(data) { 513 console.log(data.message); 514 if (data && data.success) { 515 emailField.val(""); 516 msgContainer.html(successMsg); 517 return msgContainer.fadeIn(300, function() { 518 return msgContainer.delay(1500).fadeOut(300, function() { 519 return msgContainer.html(""); 520 }); 521 }); 522 } else { 523 if (!data.validEmail) { 524 msgContainer.html(invalidEmail); 525 } else if (data.alreadySubscribed) { 526 msgContainer.html(alreadySubscribed); 527 } else { 528 msgContainer.html(errorMsg); 529 } 530 return msgContainer.fadeIn(300, function() { 531 return msgContainer.delay(1500).fadeOut(300, function() { 532 return msgContainer.html(""); 533 }); 534 }); 535 } 536 }, 537 error: function() { 538 msgContainer.html(errorMsg); 539 return msgContainer.fadeIn(300, function() { 540 return msgContainer.delay(1500).fadeOut(300, function() { 541 return msgContainer.html(""); 542 }); 543 }); 544 }, 545 complete: function() {} 546 }); 547 }); 548 }); 549 550 $("select.changeList").on("change", function(e) { 551 var langId, listId, typeContainer; 552 console.error("list changed"); 553 listId = $(this).val(); 554 langId = $(".newsletterWrapper").attr("data-langid"); 555 typeContainer = $(".newsletterTypeContainer"); 556 typeContainer.html(""); 557 return $.ajax({ 558 url: "/ajax/changeList", 559 type: "POST", 560 data: { 561 listId: listId, 562 langId: langId 563 }, 564 success: function(data) { 565 console.log(data.message); 566 if (data && data.selectView) { 567 typeContainer.append(data.selectView); 568 return typeContainer.find("select").chosen(); 569 } 570 }, 571 error: function() {}, 572 complete: function() {} 573 }); 574 }); 575 576 validateEmail = function(email) { 577 var filter; 578 filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; 579 if (!filter.test(email)) { 580 return false; 581 } 582 return true; 583 }; 584 585 $("button.loadMoreNews").on("click", function(e) { 586 var button, categoryId, iteration, languageId; 587 button = $(this); 588 if (button.hasClass('active')) { 589 return false; 590 } 591 button.addClass('active'); 592 iteration = $(this).attr('data-iteration'); 593 languageId = $(this).attr('data-language-id'); 594 categoryId = $(this).attr('data-category-id'); 595 return $.ajax({ 596 url: "/ajax/loadNews", 597 type: "POST", 598 data: { 599 iteration: iteration, 600 categoryId: categoryId, 601 languageId: languageId 602 }, 603 success: function(data) { 604 var $content, i, _i, _ref, _results; 605 if (data && data.success && data.newsItems.length) { 606 _results = []; 607 for (i = _i = 0, _ref = data.newsItems.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) { 608 $content = '<article'; 609 if (data.newsItems[i]['image'] === '') { 610 $content += ' class=\'no-img\''; 611 } 612 $content += '><a href=\'' + data.newsItems[i]['url'] + '\'>'; 613 if (data.newsItems[i]['image'] !== '') { 614 $content += '<img src=\'' + data.newsItems[i]['image'] + '\' alt=\'' + data.newsItems[i]['alttitle'] + '\'>'; 615 } 616 $content += '<h3>' + data.newsItems[i]['title'] + '</h3>'; 617 if (data.newsItems[i]['image'] === '') { 618 $content += '<p>' + data.newsItems[i]['lead'] + '</p>'; 619 } 620 $content += '</article>'; 621 _results.push(_results.push($('div.third-home2 div.articles').append($content))); 622 } 623 return _results; 624 } else { 625 626 } 627 }, 628 error: function() {}, 629 complete: function() { 630 button.removeClass('active'); 631 return button.attr('data-iteration', parseInt(iteration) + 1); 632 } 633 }); 634 }); 635 636 $('header.mobileHeader div button').on('click', function(e) { 637 $('nav.mobileNavigation').addClass('on'); 638 }); 639 640 $('nav.mobileNavigation div button').on('click', function(e) { 641 $('nav.mobileNavigation').removeClass('on'); 642 }); 643 644 $(window).scroll(function(e) { 645 if ($('nav.mobileNavigation').hasClass('on')) { 646 if ($(window).scrollTop() >= $('nav.mobileNavigation').innerHeight() - $(window).height() + 1) { 647 $(window).scrollTop($('nav.mobileNavigation').innerHeight() - $(window).height()); 648 } 649 } 650 }); 651 652 hiResBreakpoint = 1440; 653 654 responsiveBreakpoint = 965; 655 656 mobileBreakpoint = 767; 657 658 isResponsive = false;
659 660 isMobile = false; 661 662 runOnce = true; 663 664 setMobileVars = function() { 665 var coverImage, filmImage, isHiRes; 666 coverImage = void 0; 667 filmImage = void 0; 668 if ($(window).outerWidth() >= hiResBreakpoint) { 669 isHiRes = true; 670 } 671 if ($(window).outerWidth() <= responsiveBreakpoint) { 672 isResponsive = true; 673 if ($(window).outerWidth() <= mobileBreakpoint) { 674 isMobile = true; 675 } 676 } 677 if (isResponsive || isHiRes) { 678 if ($('div.wrapper section.info article.featured img').length !== 0) { 679 if (coverImage = $('div.wrapper section.info article.featured img').attr('src').replace('medium', 'large')) { 680 $('div.wrapper section.info article.featured').css({ 681 'height': '300px', 682 'background-image': 'url(' + coverImage + ')', 683 'background-repeat': 'no-repeat' 684 }); 685 } 686 } 687 } 688 if (isMobile && runOnce) { 689 if (filmImage = $('div.item22 a img').attr('src')) { 690 $('div#films').append('<img src="' + filmImage + '" alt=""/ style="margin-left:5%; width:90%;">'); 691 runOnce = false; 692 } 693 } 694 }; 695 696 $(window).bind('resize', function() { 697 setMobileVars(); 698 }); 699 700 $('.mainNavigation').on('touchstart', function(e) { 701 'use strict'; 702 var link; 703 link = $(this); 704 if (link.hasClass('hover')) { 705 return true; 706 } else { 707 link.addClass('hover'); 708 e.preventDefault(); 709 return false; 710 } 711 }); 712 713 $('div.calendar > div').on('touchstart', function(e) { 714 'use strict'; 715 var link; 716 link = $(this); 717 if (link.hasClass('hover')) { 718 return true; 719 } else { 720 link.addClass('hover'); 721 $('div.calendar > div').not(this).removeClass('hover'); 722 e.preventDefault(); 723 return false; 724 } 725 }); 726 727 consentIsSet = 'unknown'; 728 729 consentString = 'cookieConsent='; 730 731 setCookie = function(console_log, banner_text, consent) { 732 var d, exdays, expires; 733 d = new Date; 734 exdays = 30 * 12; 735 d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000); 736 expires = 'expires=' + d.toGMTString(); 737 document.cookie = consentString + consent + '; ' + expires + ';path=/'; 738 consentIsSet = consent; 739 }; 740 741 $('#cookieBannerClose').on('click', function(e) { 742 setCookie('', 'Thank you for accepting cookies.', 'true'); 743 $('#cookieBanner').hide(); 744 }); 745 746 consentCatalogueIsSet = 'unknown'; 747 748 consentCatalogueString = 'cookieConsentCatalogue='; 749 750 setCookie2 = function(console_log, banner_text, consent) { 751 var d, exdays, expires; 752 d = new Date; 753 exdays = 30 * 12; 754 d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000); 755 expires = 'expires=' + d.toGMTString(); 756 document.cookie = consentCatalogueString + consent + '; ' + expires + ';path=/'; 757 consentCatalogueIsSet = consent; 758 }; 759 760 $('#catalogueBannerClose').on('click', function(e) { 761 setCookie2('', 'Thank you.', 'true'); 762 $('#catalogueBanner').hide(); 763 }); 764 765 cookies = document.cookie.split(';'); 766 767 i = 0; 768 769 while (i < cookies.length) { 770 c = cookies[i].trim(); 771 if (c.indexOf(consentCatalogueString) === 0) { 772 consentCatalogueIsSet = c.substring(consentCatalogueString.length, c.length); 773 } 774 if (c.indexOf(consentString) === 0) { 775 consentIsSet = c.substring(consentString.length, c.length); 776 } 777 i++; 778 } 779 780 if (consentCatalogueIsSet === 'unknown') { 781 $('#catalogueBanner').show(); 782 } 783 784 if (consentIsSet === 'unknown') { 785 $('#cookieBanner').show(); 786 } 787 788 consentFilmingIsSet = 'unknown'; 789 790 consentFilmingString = 'cookieConsentFilming='; 791 792 setCookie3 = function(console_log, banner_text, consent) { 793 var d, exdays, expires; 794 d = new Date; 795 exdays = 30 * 12; 796 d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000); 797 expires = 'expires=' + d.toGMTString(); 798 document.cookie = consentFilmingString + consent + '; ' + expires + ';path=/'; 799 consentFilmingIsSet = consent; 800 }; 801 802 $('#filming-banner-close').on('click', function(e) { 803 setCookie3('', 'Thank you.', 'true'); 804 $('#filming-banner').hide(); 805 }); 806 807 cookies = document.cookie.split(';'); 808 809 i = 0; 810 811 while (i < cookies.length) { 812 c = cookies[i].trim(); 813 if (c.indexOf(consentFilmingString) === 0) { 814 consentFilmingIsSet = c.substring(consentFilmingString.length, c.length); 815 } 816 if (c.indexOf(consentString) === 0) { 817 consentIsSet = c.substring(consentString.length, c.length); 818 } 819 i++; 820 } 821 822 if (consentFilmingIsSet === 'unknown') { 823 $('#filming-banner').show(); 824 } 825 826 if (consentIsSet === 'unknown') { 827 $('#filming-banner').show(); 828 } 829 830 consentDomaIsSet = 'unknown'; 831 832 consentDomaString = 'cookieConsentDoma='; 833 834 setCookie4 = function(console_log, banner_text, consent) { 835 var d, exdays, expires; 836 d = new Date; 837 exdays = 10; 838 d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000); 839 expires = 'expires=' + d.toGMTString(); 840 document.cookie = consentDomaString + consent + '; ' + expires + ';path=/'; 841 consentDomaIsSet = consent; 842 }; 843 844 $('#doma-banner-close').on('click', function(e) {
845 setCookie4('', 'Thank you.', 'true'); 846 $('#doma-banner').hide(); 847 }); 848 849 cookies = document.cookie.split(';'); 850 851 i = 0; 852 853 while (i < cookies.length) { 854 c = cookies[i].trim(); 855 if (c.indexOf(consentDomaString) === 0) { 856 consentDomaIsSet = c.substring(consentDomaString.length, c.length); 857 } 858 if (c.indexOf(consentString) === 0) { 859 consentIsSet = c.substring(consentString.length, c.length); 860 } 861 i++; 862 } 863 864 if (consentDomaIsSet === 'unknown') { 865 $('#doma-banner').show(); 866 } 867 868 if (consentIsSet === 'unknown') { 869 $('#doma-banner').show(); 870 } 871 872 initMap = function() { 873 var map, mapElement, mapOptions, marker; 874 mapOptions = { 875 zoom: 12, 876 center: new google.maps.LatLng(45.808331116226675, 15.97948118483255), 877 mapTypeControl: false, 878 streetViewControl: false, 879 fullscreenControl: false, 880 zoomControl: false, 881 styles: [ 882 { 883 'featureType': 'administrative', 884 'elementType': 'labels.text.fill', 885 'stylers': [ 886 { 887 'color': '#444444' 888 } 889 ] 890 }, { 891 'featureType': 'landscape', 892 'elementType': 'all', 893 'stylers': [ 894 { 895 'color': '#f2f2f2' 896 } 897 ] 898 }, { 899 'featureType': 'poi', 900 'elementType': 'all', 901 'stylers': [ 902 { 903 'visibility': 'off' 904 } 905 ] 906 }, { 907 'featureType': 'road', 908 'elementType': 'all', 909 'stylers': [ 910 { 911 'saturation': -100 912 }, { 913 'lightness': 45 914 } 915 ] 916 }, { 917 'featureType': 'road.highway', 918 'elementType': 'all', 919 'stylers': [ 920 { 921 'visibility': 'simplified' 922 } 923 ] 924 }, { 925 'featureType': 'road.arterial', 926 'elementType': 'labels.icon', 927 'stylers': [ 928 { 929 'visibility': 'off' 930 } 931 ] 932 }, { 933 'featureType': 'transit', 934 'elementType': 'all', 935 'stylers': [ 936 { 937 'visibility': 'off' 938 } 939 ] 940 }, { 941 'featureType': 'water', 942 'elementType': 'all', 943 'stylers': [ 944 { 945 'color': '#25a6e4' 946 }, { 947 'visibility': 'on' 948 } 949 ] 950 } 951 ] 952 }; 953 mapElement = document.getElementById('map'); 954 if (mapElement) { 955 map = new google.maps.Map(mapElement, mapOptions); 956 marker = new google.maps.Marker({ 957 position: new google.maps.LatLng(45.808331116226675, 15.97948118483255), 958 map: map, 959 title: 'HAVC' 960 }); 961 } 962 }; 963 964 $('.accesibilityMenu span').on('click', function(e) { 965 $('.accesibilityMenu').toggleClass('open'); 966 }); 967 968 969 $(document).ready(function() { 970 setMobileVars(); 971 google.maps.event.addDomListener(window, 'load', initMap); 972 }); 973 974}).call(this);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.