/*! NXTHEME 1.0.0 license: NXCODE */ var OSName = ""; if (navigator.appVersion.indexOf("Win") != -1) OSName = "nx-windows"; $('html').addClass(OSName); if ($('.vogue-container').length > 0) { $.get("/infeeds/vogue/vogue.txt", function (data, status) { var vogue_items = JSON.parse(data); console.log(vogue_items); for (var index1 in vogue_items) { if ("title" in vogue_items[index1]) { var design_overlay = $('
'); design_overlay.addClass('design_overlay flip-slide'); var article_thumbnail_wrapper = $('
'); article_thumbnail_wrapper.addClass('article_thumbnail_wrapper'); article_thumbnail_wrapper.html(vogue_items[index1].img); var a_link_thumb = $(''); a_link_thumb.attr('rel', 'nofollow'); a_link_thumb.attr('target', '_blank'); a_link_thumb.attr('href', vogue_items[index1].link); a_link_thumb.html(article_thumbnail_wrapper); var parts; var h2 = $('

'); var a_link = $(''); a_link.attr('rel', 'nofollow'); a_link.attr('target', '_blank'); a_link.attr('href', vogue_items[index1].link); if (vogue_items[index1].title.includes(";")) { parts = vogue_items[index1].title.split(";"); a_link.html(parts[0] + ";"); } else { parts = vogue_items[index1].title.split(":"); a_link.html(parts[0]); } var big_link = $(''); big_link.attr('rel', 'nofollow'); big_link.attr('target', '_blank'); big_link.attr('href', vogue_items[index1].link); var design_one_title_xl = $('
'); var text_big = $('

'); if (parts.length > 1) { h2.append(a_link); design_one_title_xl.addClass('design_one_title_xl'); design_one_title_xl.append(h2); big_link.html(parts[1]); text_big.addClass('text_big'); text_big.html(big_link); } else if (parts.length > 0) { big_link.html(parts[0]); text_big.addClass('text_big'); text_big.html(big_link); } var design_overlay_meta = $('

'); design_overlay_meta.addClass('design_overlay_meta'); design_overlay_meta.append(design_one_title_xl); design_overlay_meta.append(text_big); design_overlay.append(a_link_thumb); design_overlay.append(design_overlay_meta); $('.vogue-container .flip').append(design_overlay); } } setTimeout(function () { if (document.querySelector(".vogue-container") !== null) { var flip1 = new FlipSlider({ startIndex: 0, container: document.querySelector(".vogue-container"), time: 5000 }); } }, 1500); }); } if ($('.gastronomos-content-wrap').length > 0) { $.get("/infeeds/gastronomos/gastronomos.txt", function (data, status) { var gastr_items = JSON.parse(data); console.log(gastr_items); var g_list = $('.gastronomos-content-wrap .row.bordered > div').eq(2).find('ul'); console.log(g_list); g_list.empty(); for (var nx_index in gastr_items) { if (nx_index == 0) { var design_one = $('
'); design_one.addClass('design_one'); var hr_dashed_mb_only = $('
'); hr_dashed_mb_only.addClass('dashed mobile_only mb-0'); var article_thumbnail_wrapper = $('
'); article_thumbnail_wrapper.addClass('article_thumbnail_wrapper g-portrait'); article_thumbnail_wrapper.html(gastr_items[nx_index].img); var a_link_thumb = $(''); a_link_thumb.attr('rel', 'nofollow'); a_link_thumb.attr('target', '_blank'); a_link_thumb.attr('href', gastr_items[nx_index].link); a_link_thumb.html(article_thumbnail_wrapper); var h2 = $('

'); var a_link = $(''); a_link.attr('rel', 'nofollow'); a_link.attr('target', '_blank'); a_link.attr('href', gastr_items[nx_index].link); a_link.html(gastr_items[nx_index].title); h2.append(a_link); var design_one_title_xl = $('
'); design_one_title_xl.addClass('design_one_title_medium'); design_one_title_xl.append(h2); var design_one_p = $('

'); design_one_p.html(gastr_items[nx_index].description); design_one.append(a_link_thumb); design_one.append(design_one_title_xl); design_one.append(design_one_p); design_one.append(hr_dashed_mb_only); $('.gastronomos-content-wrap .row.bordered > div').eq(0).html(design_one); } else if (nx_index == 1) { var design_one = $('

'); design_one.addClass('design_one bg-style-1'); var article_thumbnail_wrapper = $('
'); article_thumbnail_wrapper.addClass('article_thumbnail_wrapper g-landscape'); article_thumbnail_wrapper.html(gastr_items[nx_index].img); var a_link_thumb = $(''); a_link_thumb.attr('rel', 'nofollow'); a_link_thumb.attr('target', '_blank'); a_link_thumb.attr('href', gastr_items[nx_index].link); a_link_thumb.html(article_thumbnail_wrapper); var h2 = $('

'); var a_link = $(''); a_link.attr('rel', 'nofollow'); a_link.attr('target', '_blank'); a_link.attr('href', gastr_items[nx_index].link); a_link.html(gastr_items[nx_index].title); h2.append(a_link); var design_one_title_xl = $('
'); design_one_title_xl.addClass('design_one_title_big'); design_one_title_xl.append(h2); var design_one_p = $('

'); design_one_p.html(gastr_items[nx_index].description); var article_meta_wrap = $('

'); article_meta_wrap.addClass('article-meta-wrap'); article_meta_wrap.append(design_one_title_xl); article_meta_wrap.append(design_one_p); design_one.append(a_link_thumb); design_one.append(article_meta_wrap); $('.gastronomos-content-wrap .row.bordered > div').eq(1).html(design_one); } else if (nx_index == 2) { var li = $('
  • '); var design_one = $(''); design_one.addClass('list-article'); var h2 = $('

    '); var a_link = $(''); a_link.attr('rel', 'nofollow'); a_link.attr('target', '_blank'); a_link.attr('href', gastr_items[nx_index].link); a_link.html(gastr_items[nx_index].title); h2.append(a_link); var design_one_title_xl = $('
    '); design_one_title_xl.addClass('design_one_title_medium'); design_one_title_xl.append(h2); var a_link_thumb = $(''); a_link_thumb.attr('rel', 'nofollow'); a_link_thumb.attr('target', '_blank'); a_link_thumb.attr('href', gastr_items[nx_index].link); a_link_thumb.html(gastr_items[nx_index].img); design_one.append(a_link_thumb); design_one.append(design_one_title_xl); li.append(design_one); g_list.append(li); } else { if (!gastr_items[nx_index].title) { continue; } var li = $('
  • '); var design_one = $(''); design_one.addClass('list-article'); var h2 = $('

    '); var a_link = $(''); a_link.attr('rel', 'nofollow'); a_link.attr('target', '_blank'); a_link.attr('href', gastr_items[nx_index].link); a_link.html(gastr_items[nx_index].title); h2.append(a_link); var design_one_title_xl = $('
    '); design_one_title_xl.addClass('design_one_title_medium'); design_one_title_xl.append(h2); design_one.append(design_one_title_xl); li.append(design_one); g_list.append(li); } } setTimeout(function () { if (document.querySelector(".metink-container") !== null) { var flip2 = new FlipSlider({ startIndex: 0, container: document.querySelector(".metink-container"), time: 3000 }); } }, 1500); }); } function searchOnEnter(event) { checkEnterPressed(this, event); event.cancelBubble = true; if (event.stopPropagation) event.stopPropagation(); } function checkEnterPressed(obj, event) { if (event.keyCode === 13) { document.getElementById('search-submit').click(); } } $(document).ready(function () { /*if (document.getElementById('search-submit')) { var searchForm = document.getElementById('search-form') var searchSubmit = document.getElementById('search-submit'); let s_elem = searchForm.querySelector('#input-search'); let dt_from_elem = searchForm.querySelector('#input-date-from'); let dt_to_elem = searchForm.querySelector('#input-date-to'); s_elem.onkeypress = searchOnEnter; dt_from_elem.onkeypress = searchOnEnter; dt_to_elem.onkeypress = searchOnEnter; searchSubmit.addEventListener("click", function (e) { e.preventDefault(); e.stopPropagation(); let s = searchForm.querySelector('#input-search').value; let cat = searchForm.querySelector('#select-category').value; let usr = searchForm.querySelector('#select-users').value; let dt_from = searchForm.querySelector('#input-date-from').value; let dt_to = searchForm.querySelector('#input-date-to').value; let hasArgs = false; if (!s) { s = 's'; } if (cat || usr || dt_from || dt_to) { hasArgs = true; } let args = (cat ? 'cat=' + cat + '&' : '') + (usr ? 'usr=' + usr + '&' : '') + (dt_to ? 'dt_to=' + dt_to + '&' : '') + (dt_from ? 'dt_from=' + dt_from + '&' : ''); if (args) { args = args.slice(0, -1); } if (s || hasArgs) { document.location.href = "/search/" + s + "/" + (hasArgs ? "?" + args : ''); } }, false); }*/ document.querySelector(".side-primary-menu .search-holder-wrapper input").addEventListener("keyup", function (event) { event.preventDefault(); if (event.keyCode === 13) { window.location = "/search/" + this.value + '/'; } }); var mouse_is_inside = false; var favourite_list = $("
      "); favourite_list.addClass("sub-menu"); /*if (getCookie("kath-m")) { $(".user-menu-trigger span").html("ΛΟΓΑΡΙΑΣΜΟΣ"); } else { $(".user-menu-trigger span").html("SUBSCRIPTIONS"); }*/ /*$(".user-menu-trigger span").html("SUBSCRIPTIONS");*/ $(".favorite-trigger").addClass('menu-item-has-children').append(favourite_list); if (localStorage.favourites) { fav = JSON.parse(localStorage.favourites); for (let fav_item of Object.values(fav)) { console.log(fav_item); var favourite_item = $("
    • "); favourite_item.append("" + fav_item.title + ""); favourite_list.append(favourite_item); } } /*if (window.location.pathname === '/') { $.get("https://www.ekathimerini.com/infeeds/weather/weather_cache.txt", function (data, status) { var woeid = '946738'; if (localStorage.weather) { woeid = localStorage.weather; } var data = JSON.parse(data); var city = data[woeid]; /!*$(".weather-city").html(forecast.location.city);*!/ $(".head-weather a").attr('href', city.url); $(".head-weather span.weather-city").html(city.title); $(".head-weather span.temperature").html(city.temperature + " °C"); $(".head-weather span.w_code").addClass("w_code_" + city.class); }); $(document).on('click', ".add-weather", function () { updateWeatherBtn($(this)); }); }*/ var side_menu_touchmoved; $(document).on('click touchend', "nav.side-primary-menu ul li.menu-item-has-children", function (e) { if (side_menu_touchmoved != true) { e.stopPropagation(); e.preventDefault(); if ($(e.target).hasClass('menu-item-has-children')) { if ($(this).find(".sub-menu")) { $(this).find(".sub-menu").toggleClass("sub-active"); } } else if ($(e.target).is('a')) { document.location.href = $(e.target).attr('href'); } else { document.location.href = $(e.target).find('a').attr('href'); } } }).on('touchmove', function (e) { side_menu_touchmoved = true; }).on('touchstart', function () { side_menu_touchmoved = false; }); function updateWeatherBtn(elem) { $(".add-weather").removeClass('weather_added'); $(".add-weather").html("+"); $(".add-weather.add-weather-main").html("Ορισμός ώς πόλη μου"); if (elem.hasClass('weather_added')) { localStorage.removeItem("weather"); elem.removeClass('weather_added'); if (elem.hasClass('add-weather-main')) { elem.html("Ορισμός ώς πόλη μου"); } else { elem.html("+"); } } else { localStorage.setItem("weather", elem.attr("data-id")); elem.addClass('weather_added'); if (elem.hasClass('add-weather-main')) { elem.html("Αφαίρεση"); } else { elem.html("-"); } } } $(document).on('click', "body.single-post [id^=post-] img:not(.exclude-gallery)", function (e) { var img_arr = []; var nx_img = $(this).attr('data-nxsrc'); if (typeof nx_img === 'undefined' || nx_img === false) { nx_img = $(this).attr("src"); } var current_img = nx_img; img_arr.push({ "src": nx_img, "type": 'image' }); $("body.single-post [id^=post-] img:not(.exclude-gallery)").each(function (index) { var nx_img = $(this).attr('data-nxsrc'); if (typeof nx_img === 'undefined' || nx_img === false) { nx_img = $(this).attr("src"); } if (nx_img != current_img) { img_arr.push({ "src": nx_img, "type": 'image' }); } }).promise().done(function () { $.fancybox.open(img_arr, { loop: true }); }); }); $(document).on('click', "#paperfront", function (e) { nx_img = $(this).attr("data-nxsrc"); $.fancybox.open([{ "src": nx_img, "type": 'image' }], { loop: true }); }); $("body.home .sticky-logo").click(function (e) { e.preventDefault(); $("html, body").animate({scrollTop: 0}, 800); return true; }); $(document).on('click', ".bookmark-add", function () { var fav_ids; var fav = {}; var fav_data = {title: $(this).attr("data-title"), permalink: $(this).attr("data-permalink")}; var fav_id = $(this).attr("data-id"); if (localStorage.favourites) { fav = JSON.parse(localStorage.favourites); } fav[fav_id] = fav_data; console.log(fav); localStorage.setItem("favourites", JSON.stringify(fav)); }); if (window.matchMedia("(max-width: 768px)").matches) { $("#main-user-nav, #main-sections-nav").css("top", $(".top-nav").offset().top + $(".top-nav").height()); } $(window).scroll(function () { if (window.matchMedia("(max-width: 768px)").matches) { if ($("header").hasClass("sticky")) { $("#main-user-nav, #main-sections-nav").css("top", $(".top-nav").height()); } else { $("#main-user-nav, #main-sections-nav").css("top", $(".top-nav").offset().top + $(".top-nav").height()); } } else { $("#main-user-nav, #main-sections-nav").css("top", 0); } }); $(window).resize(function () { if (window.matchMedia("(max-width: 768px)").matches) { if ($("header").hasClass("sticky")) { $("#main-user-nav, #main-sections-nav").css("top", $(".top-nav").height()); } else { $("#main-user-nav, #main-sections-nav").css("top", $(".top-nav").offset().top + $(".top-nav").height()); } if (!$("#main-user-nav").hasClass("menu-active")) { $("#main-user-nav").css("right", -$("#main-sections-nav").width()); } if (!$("#main-sections-nav").hasClass("menu-active")) { $("#main-sections-nav").css("left", -$("#main-sections-nav").width()); } if ($("#main-sections-nav").hasClass("menu-active") || $("#main-user-nav").hasClass("menu-active")) { $("#content-wrap").css({"right": 0, "left": 0}); $("body").addClass("menu-active"); } } else { $("#main-user-nav, #main-sections-nav").css("top", 0); $("body").removeClass("menu-active"); } }); /* $('.gnomes-posts').slimScroll({ height: '366px' });*/ /*if (window.innerWidth > 768) { $('.latest_news_widget').slimScroll({ height: 'auto', size: '10px', railVisible: true, alwaysVisible: true }); }*/ /*$('.atzenta_widget').slimScroll({ height: 'auto', size: '10px', railVisible: true, alwaysVisible: true });*/ /*$('.gastronomos_widget').slimScroll({ height: 'auto', size: '10px', railVisible: true, alwaysVisible: true });*/ /* $('#main-sections-nav').hover(function () { mouse_is_inside = true; }, function () { mouse_is_inside = false; }); $("html").mouseup(function (e) { if (!mouse_is_inside) { if (window.matchMedia("(min-width: 769px)").matches) { $("#main-sections-nav").animate({ left: -$("#main-sections-nav").width(), opacity: 0 }, {duration: 300, queue: false}); $("#main-sections-nav").removeClass("menu-active"); $("#main-sections-nav").css("opacity", 0).removeClass('nav-shadow'); $(".hamburger--spin").removeClass("is-active"); } else { } } }); */ $(document).mouseup(function (e) { var container = $("#main-sections-nav"); if (!$(e.target).is('[class^="hamburger"]') && !container.is(e.target) && container.has(e.target).length === 0) { if (window.matchMedia("(min-width: 769px)").matches) { $("#main-sections-nav").animate({ left: -$("#main-sections-nav").width(), opacity: 0 }, {duration: 300, queue: false}); $("#main-sections-nav").removeClass("menu-active"); $("#main-sections-nav").css("opacity", 0).removeClass('nav-shadow'); $(".hamburger--spin").removeClass("is-active"); } } }); $(".hamburger").click(function () { if (!$("#main-sections-nav").hasClass("menu-active")) { $("#main-sections-nav").css("opacity", 0).removeClass('nav-shadow'); if (window.matchMedia("(min-width: 769px)").matches) { /*$("#content-wrap").animate({ left: $("#main-sections-nav").width() }, {duration: 300, queue: false});*/ } else { $("body").addClass("menu-active"); } $("#main-sections-nav").animate({ left: 0, opacity: 1 }, {duration: 300, queue: false}); $("#main-sections-nav").addClass("menu-active").addClass('nav-shadow'); } else { if (window.matchMedia("(min-width: 769px)").matches) { /* $("#content-wrap").animate({ left: 0, right: "auto" }, {duration: 300, queue: false});*/ } else { $("body").removeClass("menu-active"); } $("#main-sections-nav").animate({ left: -$("#main-sections-nav").width(), opacity: 0 }, {duration: 300, queue: false}); $("#main-sections-nav").removeClass("menu-active"); } if ($("#main-user-nav").hasClass("menu-active")) { $("#main-user-nav").animate({ right: -$("#main-user-nav").width(), opacity: 0 }, {duration: 350, queue: false}); $("#main-user-nav").removeClass("menu-active"); } }); /* $(".user-menu-trigger").click(function () { if (!$("#main-user-nav").hasClass("menu-active")) { $("#main-user-nav").css("opacity", 0); if (window.matchMedia("(min-width: 769px)").matches) { $("#content-wrap").animate({ left: -$("#main-user-nav").width() }, {duration: 300, queue: false}); } else { $("body").addClass("menu-active"); } $("#main-user-nav").css("opacity", 0); $("#main-user-nav").animate({ right: 0, opacity: 1 }, {duration: 300, queue: false}); $("#main-user-nav").addClass("menu-active"); } else { if (window.matchMedia("(min-width: 769px)").matches) { $("#content-wrap").animate({ left: 0 }, {duration: 300, queue: false}); } else { $("body").removeClass("menu-active"); } $("#main-user-nav").animate({ right: -$("#main-user-nav").width(), opacity: 0 }, {duration: 300, queue: false}); $("#main-user-nav").removeClass("menu-active"); } if ($("#main-sections-nav").hasClass("menu-active")) { $("#main-sections-nav").animate({ left: -$("#main-sections-nav").width(), opacity: 0 }, {duration: 350, queue: false}); $("#main-sections-nav").removeClass("menu-active"); $(".hamburger").removeClass("is-active"); } }); */ $(".search-trigger").click(function () { if ($(".header-search").hasClass("header-search-active")) { $(".header-search").removeClass("header-search-active"); } else { $(".header-search").addClass("header-search-active"); $(".search-input").focus(); } }); var forEach = function (t, o, r) { if ("[object Object]" === Object.prototype.toString.call(t)) for (var c in t) Object.prototype.hasOwnProperty.call(t, c) && o.call(r, t[c], c, t); else for (var e = 0, l = t.length; l > e; e++) o.call(r, t[e], e, t) }; var hamburgers = document.querySelectorAll(".hamburger"); if (hamburgers.length > 0) { forEach(hamburgers, function (hamburger) { hamburger.addEventListener("click", function () { this.classList.toggle("is-active"); }, false); }); } if ($('.datepicker_from').length > 0) { $('.datepicker_from, .datepicker_to').datepicker({ dateFormat: 'dd-mm-yy', startDate: '-3d' }); } if (!document.querySelector('#no-slick-mp')) { if ($('.article-slider').length) { var sl_article_slider = function () { document.removeEventListener("scroll", sl_article_slider); setTimeout(function () { $('.article-slider').slick({ infinite: true, dots: false, slidesToShow: 1, slidesToScroll: 1, prevArrow: '', nextArrow: '' }).on('click, afterChange', function (event, slick, direction) { setTimeout(function () { window.QuantBlockScroll = true; document.dispatchEvent(new CustomEvent('scroll')); //// TRIGGER SCROLL }, 0); }); }, 0) }; document.addEventListener("scroll", sl_article_slider); } if ($('.header-articles .slick-slider').length) { var sl_ha_slider = function () { document.removeEventListener("scroll", sl_ha_slider); setTimeout(function () { $('.header-articles .slick-slider').slick({ infinite: false, dots: false, slidesToShow: 4, slidesToScroll: 1, prevArrow: '', nextArrow: '', responsive: [ { breakpoint: 1024, settings: { slidesToShow: 2, slidesToScroll: 1, infinite: true, dots: false, autoplay: true, autoplaySpeed: 3000 } }, { breakpoint: 600, settings: { slidesToShow: 1, slidesToScroll: 1, infinite: true, autoplay: true, autoplaySpeed: 3000 } } ] }); }, 0) }; document.addEventListener("scroll", sl_ha_slider); } if ($('.mini-slider').length) { var sl_ms_slider = function () { document.removeEventListener("scroll", sl_ms_slider); setTimeout(function () { $('.mini-slider').slick({ infinite: false, dots: false, slidesToShow: 4, slidesToScroll: 1, prevArrow: '', nextArrow: '', responsive: [ { breakpoint: 1024, settings: { slidesToShow: 2, slidesToScroll: 1, infinite: true, dots: false, autoplay: true, autoplaySpeed: 3000 } }, { breakpoint: 600, settings: { slidesToShow: 1, slidesToScroll: 1, infinite: true, autoplay: true, autoplaySpeed: 3000 } } ] }); }, 0) }; document.addEventListener("scroll", sl_ms_slider); } // slick_video if ($('.media-wrapper').length) { var sl_mw_slider = function () { document.removeEventListener("scroll", sl_mw_slider); setTimeout(function () { $('.media-wrapper').slick({ slidesToShow: 1, slidesToScroll: 1, autoplay: false, dots: false, infinite: true, adaptiveHeight: false, arrows: true, prevArrow: '', nextArrow: '', }).on('click, afterChange', function (event, slick, direction) { setTimeout(function () { window.QuantBlockScroll = true; document.dispatchEvent(new CustomEvent('scroll')); //// TRIGGER SCROLL }, 0); }); }, 0) }; document.addEventListener("scroll", sl_mw_slider); } // Gnomes anagnoston if ($('.opinions').length) { var sl_op_slider = function () { document.removeEventListener("scroll", sl_op_slider); setTimeout(function () { $('.opinions').slick({ infinite: true, dots: false, slidesToShow: 4, slidesToScroll: 1, variableWidth: true, prevArrow: '', nextArrow: '', responsive: [ { breakpoint: 1024, settings: { slidesToShow: 3, slidesToScroll: 1, infinite: true, dots: false } }, { breakpoint: 768, settings: { slidesToShow: 2, slidesToScroll: 1 } }, { breakpoint: 481, settings: { arrows: false, slidesToShow: 1, slidesToScroll: 1 } } ] }).on('click, afterChange', function (event, slick, direction) { setTimeout(function () { window.QuantBlockScroll = true; document.dispatchEvent(new CustomEvent('scroll')); //// TRIGGER SCROLL }, 0); }); }, 0) }; document.addEventListener("scroll", sl_op_slider); } // Gnomes Apopseis if ($('.gnomes-apopseis .container').length) { var sl_apo_slider = function () { document.removeEventListener("scroll", sl_apo_slider); setTimeout(function () { $('.gnomes-apopseis .container').slick({ infinite: true, dots: false, slidesToShow: 5, slidesToScroll: 1, prevArrow: '', nextArrow: '', responsive: [ { breakpoint: 1024, settings: { slidesToShow: 3, slidesToScroll: 1, } }, { breakpoint: 600, settings: { slidesToShow: 2, slidesToScroll: 1 } }, { breakpoint: 481, settings: { width: 173, arrows: false, centerMode: true, slidesToShow: 1, slidesToScroll: 1, variableWidth: true, variableHeight: false, } } ] }).on('click, afterChange', function (event, slick, direction) { setTimeout(function () { window.QuantBlockScroll = true; document.dispatchEvent(new CustomEvent('scroll')); //// TRIGGER SCROLL }, 0); }); }, 0) }; document.addEventListener("scroll", sl_apo_slider); } // cartoon if ($('.cartoon-inner').length) { var sl_foto_slider = function () { document.removeEventListener("scroll", sl_foto_slider); setTimeout(function () { $('.cartoon-inner').slick({ centerMode: true, infinite: true, slidesToShow: 1, slidesToScroll: 1, centerPadding: '80px', dots: true, prevArrow: '', nextArrow: '', responsive: [ { breakpoint: 1024, settings: { slidesToShow: 1, slidesToScroll: 1, infinite: true, dots: false } }, { breakpoint: 481, settings: { centerPadding: '0px', variableWidth: false, variableHeight: false, slidesToShow: 1, slidesToScroll: 1 } } ] }).on('click, afterChange', function (event, slick, direction) { setTimeout(function () { window.QuantBlockScroll = true; document.dispatchEvent(new CustomEvent('scroll')); //// TRIGGER SCROLL }, 0); }); }, 0) }; document.addEventListener("scroll", sl_foto_slider); } // skitsa if ($('.sketch-container').length) { var sl_ske_slider = function () { document.removeEventListener("scroll", sl_ske_slider); setTimeout(function () { $('.sketch-container').slick({ infinite: true, dots: false, slidesToShow: 1, slidesToScroll: 1, autoplay: true, autoplaySpeed: 4000, prevArrow: '', nextArrow: '', responsive: [ { breakpoint: 1024, settings: { slidesToShow: 1, slidesToScroll: 1, infinite: true, dots: false } }, { breakpoint: 600, settings: { slidesToShow: 1, slidesToScroll: 1 } } ] }).on('click, afterChange', function (event, slick, direction) { setTimeout(function () { window.QuantBlockScroll = true; document.dispatchEvent(new CustomEvent('scroll')); //// TRIGGER SCROLL }, 0); }); }, 0) }; document.addEventListener("scroll", sl_ske_slider); } } $('.category-cartoon .media-wrapper').on('beforeChange', function (event, slick, currentSlide, nextSlide) { var imgs = $('.category-cartoon .media-wrapper .image-item:not(.slick-cloned)'); if (imgs.length > 0) { var title = imgs.eq(nextSlide).find('img').attr("title"); $("h1.entry-title").html(title); } }); if (window.matchMedia('(max-width: 991px)').matches) { $('div.header-articles.home-3').insertBefore(".horizontal-ad"); $('div.header-articles.home-3').show(); } /*$(function () { $('.user-signin-mob').magnificPopup({ type: 'inline', preloader: false, modal: true }); $(document).on('click', '.popup-modal-dismiss', function (e) { e.preventDefault(); $.magnificPopup.close(); }); });*/ /* $(function () { $('.newsletter-trigger, .newsletter-modal-trigger a').magnificPopup({ type: 'inline', preloader: false, modal: true }); $(document).on('click', '.popup-modal-dismiss', function (e) { e.preventDefault(); $.magnificPopup.close(); }); });*/ $(document).on('click', '.scroll-top-trigger', function (e) { e.preventDefault(); currentYOffset = self.pageYOffset; initYOffset = currentYOffset; var intervalId = setInterval(function () { currentYOffset -= initYOffset * 0.05; document.body.scrollTop = currentYOffset; document.documentElement.scrollTop = currentYOffset; if (self.pageYOffset == 0) { clearInterval(intervalId); } }, 20); }); $(document).on('click', '.feed-latest', function (e) { e.preventDefault(); $(".feed-latest").addClass('feed-active'); $(".feed-popular").removeClass('feed-active'); $(".news_popular").hide(); $(".news_latest").show(); if (window.innerWidth > 768) { $(".latest_news_widget").scrollTop(0).slimScroll({scroll: '0'}); } }); $(document).on('click', '.feed-popular', function (e) { e.preventDefault(); $(".feed-popular").addClass('feed-active'); $(".feed-latest").removeClass('feed-active'); $(".news_latest").hide(); $(".news_popular").show(); if (window.innerWidth > 768) { $(".latest_news_widget").scrollTop(0).slimScroll({scroll: '0'}); } }); $("#loginform").submit(function (e) { if ($("#user_pass").length > 0) { return true; } else { e.preventDefault(); var fieldset_pwd = $('
      '); var label_pwd = $('