PageSourceSearch

https://www.ladylike.gr/wp-content/themes/ladylike/assets/js/scripts.js?v=1790768440&ver=6.9.7

js ladylike.gr collected 2026-10-02 05:36:43 UTC 43,906 bytes, 615 lines download raw bytes

1/*! modernizr 3.3.1 (Custom Build) | MIT *
2 * https://modernizr.com/download/?-apng-appearance-backgroundcliptext-backgroundsize-bgpositionshorthand-bgpositionxy-bgrepeatspace_bgrepeatround-bgsizecover-borderimage-borderradius-boxshadow-boxsizing-checked-cookies-cssanimations-cssgradients-cssinvalid-csstransforms3d-cssvalid-cssvhunit-cssvmaxunit-cssvminunit-cssvwunit-displaytable-ellipsis-eventlistener-fileinput-formattribute-formvalidation-htmlimports-ie8compat-inlinesvg-input-inputtypes-lastchild-localizednumber-lowbandwidth-mediaqueries-microdata-nthchild-opacity-picture-placeholder-requestanimationframe-rgba-search-sizes-srcset-svg-svgasimg-svgfilters-target-textalignlast-video-setclasses !*/
3/*
4!function(e,t,n){function i(e,t){return typeof e===t}function r(){var e,t,n,r,o,a,s;for(var d in T)if(T.hasOwnProperty(d)){if(e=[],t=T[d],t.name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;n<t.options.aliases.length;n++)e.push(t.options.aliases[n].toLowerCase());for(r=i(t.fn,"function")?t.fn():t.fn,o=0;o<e.length;o++)a=e[o],s=a.split("."),1===s.length?Modernizr[s[0]]=r:(!Modernizr[s[0]]||Modernizr[s[0]]instanceof Boolean||(Modernizr[s[0]]=new Boolean(Modernizr[s[0]])),Modernizr[s[0]][s[1]]=r),b.push((r?"":"no-")+s.join("-"))}}function o(e){var t=x.className,n=Modernizr._config.classPrefix||"";if(C&&(t=t.baseVal),Modernizr._config.enableJSClass){var i=new RegExp("(^|\\s)"+n+"no-js(\\s|$)");t=t.replace(i,"$1"+n+"js$2")}Modernizr._config.enableClasses&&(t+=" "+n+e.join(" "+n),C?x.className.baseVal=t:x.className=t)}function a(){return"function"!=typeof t.createElement?t.createElement(arguments[0]):C?t.createElementNS.call(t,"http://www.w3.org/2000/svg",arguments[0]):t.createElement.apply(t,arguments)}function s(e,t){return e-1===t||e===t||e+1===t}function d(){var e=t.body;return e||(e=a(C?"svg":"body"),e.fake=!0),e}function l(e,t){if("object"==typeof e)for(var n in e)I(e,n)&&l(n,e[n]);else{e=e.toLowerCase();var i=e.split("."),r=Modernizr[i[0]];if(2==i.length&&(r=r[i[1]]),"undefined"!=typeof r)return Modernizr;t="function"==typeof t?t():t,1==i.length?Modernizr[i[0]]=t:(!Modernizr[i[0]]||Modernizr[i[0]]instanceof Boolean||(Modernizr[i[0]]=new Boolean(Modernizr[i[0]])),Modernizr[i[0]][i[1]]=t),o([(t&&0!=t?"":"no-")+i.join("-")]),Modernizr._trigger(e,t)}return Modernizr}function u(e){return e.replace(/([a-z])-([a-z])/g,function(e,t,n){return t+n.toUpperCase()}).replace(/^-/,"")}function c(e,n,i,r){var o,s,l,u,c="modernizr",p=a("div"),f=d();if(parseInt(i,10))for(;i--;)l=a("div"),l.id=r?r[i]:c+(i+1),p.appendChild(l);return o=a("style"),o.type="text/css",o.id="s"+c,(f.fake?f:p).appendChild(o),f.appendChild(p),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(t.createTextNode(e)),p.id=c,f.fake&&(f.style.background="",f.style.overflow="hidden",u=x.style.overflow,x.style.overflow="hidden",x.appendChild(f)),s=n(p,e),f.fake?(f.parentNode.removeChild(f),x.style.overflow=u,x.offsetHeight):p.parentNode.removeChild(p),!!s}function p(e,t){return!!~(""+e).indexOf(t)}function f(e,t){return function(){return e.apply(t,arguments)}}function m(e,t,n){var r;for(var o in e)if(e[o]in t)return n===!1?e[o]:(r=t[e[o]],i(r,"function")?f(r,n||t):r);return!1}function h(e){return e.replace(/([A-Z])/g,function(e,t){return"-"+t.toLowerCase()}).replace(/^ms-/,"-ms-")}function g(t,i){var r=t.length;if("CSS"in e&&"supports"in e.CSS){for(;r--;)if(e.CSS.supports(h(t[r]),i))return!0;return!1}if("CSSSupportsRule"in e){for(var o=[];r--;)o.push("("+h(t[r])+":"+i+")");return o=o.join(" or "),c("@supports ("+o+") { #modernizr { position: absolute; } }",function(e){return"absolute"==getComputedStyle(e,null).position})}return n}function v(e,t,r,o){function s(){l&&(delete G.style,delete G.modElem)}if(o=i(o,"undefined")?!1:o,!i(r,"undefined")){var d=g(e,r);if(!i(d,"undefined"))return d}for(var l,c,f,m,h,v=["modernizr","tspan","samp"];!G.style&&v.length;)l=!0,G.modElem=a(v.shift()),G.style=G.modElem.style;for(f=e.length,c=0;f>c;c++)if(m=e[c],h=G.style[m],p(m,"-")&&(m=u(m)),G.style[m]!==n){if(o||i(r,"undefined"))return s(),"pfx"==t?m:!0;try{G.style[m]=r}catch(A){}if(G.style[m]!=h)return s(),"pfx"==t?m:!0}return s(),!1}function A(e,t,n,r,o){var a=e.charAt(0).toUpperCase()+e.slice(1),s=(e+" "+V.join(a+" ")+a).split(" ");return i(t,"string")||i(t,"undefined")?v(s,t,r,o):(s=(e+" "+q.join(a+" ")+a).split(" "),m(s,t,n))}function y(e,t,i){return A(e,n,n,t,i)}var b=[],T=[],w={_version:"3.3.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){T.push({name:e,fn:t,options:n})},addAsyncTest:function(e){T.push({name:null,fn:e})}},Modernizr=function(){};Modernizr.prototype=w,Modernizr=new Modernizr,Modernizr.addTest("cookies",function(){try{t.cookie="cookietest=1";var e=-1!=t.cookie.indexOf("cookietest=");return t.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",e}catch(n){return!1}}),Modernizr.addTest("eventlistener","addEventListener"in e),Modernizr.addTest("ie8compat",!e.addEventListener&&!!t.documentMode&&7===t.documentMode),Modernizr.addTest("svg",!!t.createElementNS&&!!t.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect),Modernizr.addTest("target",function(){var t=e.document;if(!("querySelectorAll"in t))return!1;try{return t.querySelectorAll(":target"),!0}catch(n){return!1}}),Modernizr.addTest("microdata","getItems"in t),Modernizr.addTest("picture","HTMLPictureElement"in e),Modernizr.addTest("lowbandwidth",function(){var e=navigator.connection||{type:0};return 3==e.type||4==e.type||/^[23]g$/.test(e.type)}),Modernizr.addTest("svgfilters",function(){var t=!1;try{t="SVGFEColorMatrixElement"in e&&2==SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_SATURATE}catch(n){}return t});var x=t.documentElement,C="svg"===x.nodeName.toLowerCase();Modernizr.addTest("video",function(){var e=a("video"),t=!1;try{(t=!!e.canPlayType)&&(t=new Boolean(t),t.ogg=e.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),t.h264=e.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),t.webm=e.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,""),t.vp9=e.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,""),t.hls=e.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,""))}catch(n){}return t}),Modernizr.addTest("bgpositionshorthand",function(){var e=a("a"),t=e.style,n="right 10px bottom 10px";return t.cssText="background-position: "+n+";",t.backgroundPosition===n}),Modernizr.addTest("rgba",function(){var e=a("a").style;return e.cssText="background-color:rgba(150,255,150,.5)",(""+e.backgroundColor).indexOf("rgba")>-1}),Modernizr.addTest("fileinput",function(){if(navigator.userAgent.match(/(Android (1.0|1.1|1.5|1.6|2.0|2.1))|(Windows Phone (OS 7|8.0))|(XBLWP)|(ZuneWP)|(w(eb)?OSBrowser)|(webOS)|(Kindle\/(1.0|2.0|2.5|3.0))
4/))return!1;var e=a("input");return e.type="file",!e.disabled}),Modernizr.addTest("formattribute",function(){var e,n=a("form"),i=a("input"),r=a("div"),o="formtest"+(new Date).getTime(),s=!1;n.id=o;try{i.setAttribute("form",o)}catch(d){t.createAttribute&&(e=t.createAttribute("form"),e.nodeValue=o,i.setAttributeNode(e))}return r.appendChild(n),r.appendChild(i),x.appendChild(r),s=n.elements&&1===n.elements.length&&i.form==n,r.parentNode.removeChild(r),s}),Modernizr.addTest("placeholder","placeholder"in a("input")&&"placeholder"in a("textarea")),Modernizr.addTest("srcset","srcset"in a("img")),Modernizr.addTest("inlinesvg",function(){var e=a("div");return e.innerHTML="<svg/>","http://www.w3.org/2000/svg"==("undefined"!=typeof SVGRect&&e.firstChild&&e.firstChild.namespaceURI)});var S=a("input"),E="autocomplete autofocus list placeholder max min multiple pattern required step".split(" "),k={};Modernizr.input=function(t){for(var n=0,i=t.length;i>n;n++)k[t[n]]=!!(t[n]in S);return k.list&&(k.list=!(!a("datalist")||!e.HTMLDataListElement)),k}(E);var z="search tel url email datetime date month week time datetime-local number range color".split(" "),_={};Modernizr.inputtypes=function(e){for(var i,r,o,a=e.length,s="1)",d=0;a>d;d++)S.setAttribute("type",i=e[d]),o="text"!==S.type&&"style"in S,o&&(S.value=s,S.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(i)&&S.style.WebkitAppearance!==n?(x.appendChild(S),r=t.defaultView,o=r.getComputedStyle&&"textfield"!==r.getComputedStyle(S,null).WebkitAppearance&&0!==S.offsetHeight,x.removeChild(S)):/^(search|tel)$/.test(i)||(o=/^(url|email)$/.test(i)?S.checkValidity&&S.checkValidity()===!1:S.value!=s)),_[e[d]]=!!o;return _}(z);var P=function(){function e(e,t){var r;return e?(t&&"string"!=typeof t||(t=a(t||"div")),e="on"+e,r=e in t,!r&&i&&(t.setAttribute||(t=a("div")),t.setAttribute(e,""),r="function"==typeof t[e],t[e]!==n&&(t[e]=n),t.removeAttribute(e)),r):!1}var i=!("onblur"in t.documentElement);return e}();w.hasEvent=P,Modernizr.addTest("inputsearchevent",P("search"));var N=w._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):["",""];w._prefixes=N,Modernizr.addTest("cssgradients",function(){for(var e,t="background-image:",n="gradient(linear,left top,right bottom,from(#9f9),to(white));",i="",r=0,o=N.length-1;o>r;r++)e=0===r?"to ":"",i+=t+N[r]+"linear-gradient("+e+"left top, #9f9, white);";Modernizr._config.usePrefixes&&(i+=t+"-webkit-"+n);var s=a("a"),d=s.style;return d.cssText=i,(""+d.backgroundImage).indexOf("gradient")>-1}),Modernizr.addTest("opacity",function(){var e=a("a").style;return e.cssText=N.join("opacity:.55;"),/^0.55$/.test(e.opacity)});var B="CSS"in e&&"supports"in e.CSS,L="supportsCSS"in e;Modernizr.addTest("supports",B||L),Modernizr.addTest("canvas",function(){var e=a("canvas");return!(!e.getContext||!e.getContext("2d"))});var I;!function(){var e={}.hasOwnProperty;I=i(e,"undefined")||i(e.call,"undefined")?function(e,t){return t in e&&i(e.constructor.prototype[t],"undefined")}:function(t,n){return e.call(t,n)}}(),w._l={},w.on=function(e,t){this._l[e]||(this._l[e]=[]),this._l[e].push(t),Modernizr.hasOwnProperty(e)&&setTimeout(function(){Modernizr._trigger(e,Modernizr[e])},0)},w._trigger=function(e,t){if(this._l[e]){var n=this._l[e];setTimeout(function(){var e,i;for(e=0;e<n.length;e++)(i=n[e])(t)},0),delete this._l[e]}},Modernizr._q.push(function(){w.addTest=l}),l("htmlimports","import"in a("link")),Modernizr.addAsyncTest(function(){if(!Modernizr.canvas)return!1;var e=new Image,t=a("canvas"),n=t.getContext("2d");e.onload=function(){l("apng",function(){return"undefined"==typeof t.getContext?!1:(n.drawImage(e,0,0),0===n.getImageData(0,0,1,1).data[3])})},e.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACGFjVEwAAAABAAAAAcMq2TYAAAANSURBVAiZY2BgYPgPAAEEAQB9ssjfAAAAGmZjVEwAAAAAAAAAAQAAAAEAAAAAAAAAAAD6A+gBAbNU+2sAAAARZmRBVAAAAAEImWNgYGBgAAAABQAB6MzFdgAAAABJRU5ErkJggg=="}),Modernizr.addAsyncTest(function(){var e,t,n,i=a("img"),r="sizes"in i;!r&&"srcset"in i?(t="data:image/gif;base64,R0lGODlhAgABAPAAAP///wAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw==",e="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",n=function(){l("sizes",2==i.width)},i.onload=n,i.onerror=n,i.setAttribute("sizes","9px"),i.srcset=e+" 1w,"+t+" 8w",i.src=e):l("sizes",r)}),Modernizr.addTest("svgasimg",t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1"));var R=w.testStyles=c;Modernizr.addTest("checked",function(){return R("#modernizr {position:absolute} #modernizr input {margin-left:10px} #modernizr :checked {margin-left:20px;
4display:block}",function(e){var t=a("input");return t.setAttribute("type","checkbox"),t.setAttribute("checked","checked"),e.appendChild(t),20===t.offsetLeft})}),R("#modernizr{display: table; direction: ltr}#modernizr div{display: table-cell; padding: 10px}",function(e){var t,n=e.childNodes;t=n[0].offsetLeft<n[1].offsetLeft,Modernizr.addTest("displaytable",t,{aliases:["display-table"]})},2),Modernizr.addTest("cssinvalid",function(){return R("#modernizr input{height:0;border:0;padding:0;margin:0;width:10px} #modernizr input:invalid{width:50px}",function(e){var t=a("input");return t.required=!0,e.appendChild(t),t.clientWidth>10})}),R("#modernizr div {width:100px} #modernizr :last-child{width:200px;display:block}",function(e){Modernizr.addTest("lastchild",e.lastChild.offsetWidth>e.firstChild.offsetWidth)},2),R("#modernizr div {width:1px} #modernizr div:nth-child(2n) {width:2px;}",function(e){for(var t=e.getElementsByTagName("div"),n=!0,i=0;5>i;i++)n=n&&t[i].offsetWidth===i%2+1;Modernizr.addTest("nthchild",n)},5),Modernizr.addTest("cssvalid",function(){return R("#modernizr input{height:0;border:0;padding:0;margin:0;width:10px} #modernizr input:valid{width:50px}",function(e){var t=a("input");return e.appendChild(t),t.clientWidth>10})}),R("#modernizr { height: 50vh; }",function(t){var n=parseInt(e.innerHeight/2,10),i=parseInt((e.getComputedStyle?getComputedStyle(t,null):t.currentStyle).height,10);Modernizr.addTest("cssvhunit",i==n)}),R("#modernizr1{width: 50vmax}#modernizr2{width:50px;height:50px;overflow:scroll}#modernizr3{position:fixed;top:0;left:0;bottom:0;right:0}",function(t){var n=t.childNodes[2],i=t.childNodes[1],r=t.childNodes[0],o=parseInt((i.offsetWidth-i.clientWidth)/2,10),a=r.clientWidth/100,d=r.clientHeight/100,l=parseInt(50*Math.max(a,d),10),u=parseInt((e.getComputedStyle?getComputedStyle(n,null):n.currentStyle).width,10);Modernizr.addTest("cssvmaxunit",s(l,u)||s(l,u-o))},3),R("#modernizr1{width: 50vm;width:50vmin}#modernizr2{width:50px;height:50px;overflow:scroll}#modernizr3{position:fixed;top:0;left:0;bottom:0;right:0}",function(t){var n=t.childNodes[2],i=t.childNodes[1],r=t.childNodes[0],o=parseInt((i.offsetWidth-i.clientWidth)/2,10),a=r.clientWidth/100,d=r.clientHeight/100,l=parseInt(50*Math.min(a,d),10),u=parseInt((e.getComputedStyle?getComputedStyle(n,null):n.currentStyle).width,10);Modernizr.addTest("cssvminunit",s(l,u)||s(l,u-o))},3),R("#modernizr { width: 50vw; }",function(t){var n=parseInt(e.innerWidth/2,10),i=parseInt((e.getComputedStyle?getComputedStyle(t,null):t.currentStyle).width,10);Modernizr.addTest("cssvwunit",i==n)}),Modernizr.addTest("formvalidation",function(){var t=a("form");if(!("checkValidity"in t&&"addEventListener"in t))return!1;if("reportValidity"in t)return!0;var n,i=!1;return Modernizr.formvalidationapi=!0,t.addEventListener("submit",function(t){(!e.opera||e.operamini)&&t.preventDefault(),t.stopPropagation()},!1),t.innerHTML='<input name="modTest" required="required" /><button></button>',R("#modernizr form{position:absolute;top:-99999em}",function(e){e.appendChild(t),n=t.getElementsByTagName("input")[0],n.addEventListener("invalid",function(e){i=!0,e.preventDefault(),e.stopPropagation()},!1),Modernizr.formvalidationmessage=!!n.validationMessage,t.getElementsByTagName("button")[0].click()}),i}),Modernizr.addTest("localizednumber",function(){if(!Modernizr.inputtypes.number)return!1;if(!Modernizr.formvalidation)return!1;var e,n=a("div"),i=d(),r=function(){return x.insertBefore(i,x.firstElementChild||x.firstChild)}();n.innerHTML='<input type="number" value="1.0" step="0.1"/>';var o=n.childNodes[0];r.appendChild(n),o.focus();try{t.execCommand("InsertText",!1,"1,1")}catch(s){}return e="number"===o.type&&1.1===o.valueAsNumber&&o.checkValidity(),r.removeChild(n),i.fake&&r.parentNode.removeChild(r),e});var M=function(){var t=e.matchMedia||e.msMatchMedia;return t?function(e){var n=t(e);return n&&n.matches||!1}:function(t){var n=!1;return c("@media "+t+" { #modernizr { position: absolute; } }",function(t){n="absolute"==(e.getComputedStyle?e.getComputedStyle(t,null):t.currentStyle).position}),n}}();w.mq=M,Modernizr.addTest("mediaqueries",M("only all"));var O="Moz O ms Webkit",V=w._config.usePrefixes?O.split(" "):[];w._cssomPrefixes=V;var W=function(t){var i,r=N.length,o=e.CSSRule;if("undefined"==typeof o)return n;if(!t)return!1;if(t=t.replace(/^@/,""),i=t.replace(/-/g,"_").toUpperCase()+"_RULE",i in o)return"@"+t;for(var a=0;r>a;a++){var s=N[a],d=s.toUpperCase()+"_"+i;if(d in o)return"@-"+s.toLowerCase()+"-"+t}return!1};w.atRule=W;var q=w._config.usePrefixes?O.toLowerCase().split(" "):[];w._domPrefixes=q;var j={elem:a("modernizr")};Modernizr._q.push(function(){delete j.elem});var G={style:j.elem.style};Modernizr._q.unshift(function(){delete G.style}),w.testAllProps=A;var H=w.prefixed=function(e,t,n){return 0===e.indexOf("@")?W(e):(-1!=e.indexOf("-")&&(e=u(e)),t?A(e,t,n):A(e,"pfx"))};Modernizr.addTest("requestanimationframe",!!H("requestAnimationFrame",e),{aliases:["raf"]}),w.testAllProps=y,Modernizr.addTest("cssanimations",y("animationName","a",!0)),Modernizr.addTest("appearance",y("appearance")),Modernizr.addTest("backgroundcliptext",function(){return y("backgroundClip","text")}),Modernizr.addTest("bgpositionxy",function(){return y("backgroundPositionX","3px",!0)&&y("backgroundPositionY","5px",!0)}
4),Modernizr.addTest("bgrepeatround",y("backgroundRepeat","round")),Modernizr.addTest("bgrepeatspace",y("backgroundRepeat","space")),Modernizr.addTest("backgroundsize",y("backgroundSize","100%",!0)),Modernizr.addTest("bgsizecover",y("backgroundSize","cover")),Modernizr.addTest("borderimage",y("borderImage","url() 1",!0)),Modernizr.addTest("borderradius",y("borderRadius","0px",!0)),Modernizr.addTest("boxshadow",y("boxShadow","1px 1px",!0)),Modernizr.addTest("boxsizing",y("boxSizing","border-box",!0)&&(t.documentMode===n||t.documentMode>7)),Modernizr.addTest("ellipsis",y("textOverflow","ellipsis")),Modernizr.addTest("textalignlast",y("textAlignLast")),Modernizr.addTest("csstransforms3d",function(){var e=!!y("perspective","1px",!0),t=Modernizr._config.usePrefixes;if(e&&(!t||"webkitPerspective"in x.style)){var n,i="#modernizr{width:0;height:0}";Modernizr.supports?n="@supports (perspective: 1px)":(n="@media (transform-3d)",t&&(n+=",(-webkit-transform-3d)")),n+="{#modernizr{width:7px;height:18px;margin:0;padding:0;border:0}}",R(i+n,function(t){e=7===t.offsetWidth&&18===t.offsetHeight})}return e}),r(),o(b),delete w.addTest,delete w.addAsyncTest;for(var U=0;U<Modernizr._q.length;U++)Modernizr._q[U]();e.Modernizr=Modernizr}(window,document);
5*/
6
7/**
8 * @preserve FastClick: polyfill to remove click delays on browsers with touch UIs.
9 *
10 * @version 0.6.11
11 * @codingstandard ftlabs-jsv2
12 * @copyright The Financial Times Limited [All Rights Reserved]
13 * @license MIT License (see LICENSE.txt)
14 */
15function FastClick(a){"use strict";var b,c=this;if(this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=10,this.layer=a,!a||!a.nodeType)throw new TypeError("Layer must be a document node");this.onClick=function(){return FastClick.prototype.onClick.apply(c,arguments)},this.onMouse=function(){return FastClick.prototype.onMouse.apply(c,arguments)},this.onTouchStart=function(){return FastClick.prototype.onTouchStart.apply(c,arguments)},this.onTouchMove=function(){return FastClick.prototype.onTouchMove.apply(c,arguments)},this.onTouchEnd=function(){return FastClick.prototype.onTouchEnd.apply(c,arguments)},this.onTouchCancel=function(){return FastClick.prototype.onTouchCancel.apply(c,arguments)},FastClick.notNeeded(a)||(this.deviceIsAndroid&&(a.addEventListener("mouseover",this.onMouse,!0),a.addEventListener("mousedown",this.onMouse,!0),a.addEventListener("mouseup",this.onMouse,!0)),a.addEventListener("click",this.onClick,!0),a.addEventListener("touchstart",this.onTouchStart,!1),a.addEventListener("touchmove",this.onTouchMove,!1),a.addEventListener("touchend",this.onTouchEnd,!1),a.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(a.removeEventListener=function(b,c,d){var e=Node.prototype.removeEventListener;"click"===b?e.call(a,b,c.hijacked||c,d):e.call(a,b,c,d)},a.addEventListener=function(b,c,d){var e=Node.prototype.addEventListener;"click"===b?e.call(a,b,c.hijacked||(c.hijacked=function(a){a.prop
15agationStopped||c(a)}),d):e.call(a,b,c,d)}),"function"==typeof a.onclick&&(b=a.onclick,a.addEventListener("click",function(a){b(a)},!1),a.onclick=null))}FastClick.prototype.deviceIsAndroid=navigator.userAgent.indexOf("Android")>0,FastClick.prototype.deviceIsIOS=/iP(ad|hone|od)/.test(navigator.userAgent),FastClick.prototype.deviceIsIOS4=FastClick.prototype.deviceIsIOS&&/OS 4_\d(_\d)?/.test(navigator.userAgent),FastClick.prototype.deviceIsIOSWithBadTarget=FastClick.prototype.deviceIsIOS&&/OS ([6-9]|\d{2})_\d/.test(navigator.userAgent),FastClick.prototype.needsClick=function(a){"use strict";switch(a.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(a.disabled)return!0;break;case"input":if(this.deviceIsIOS&&"file"===a.type||a.disabled)return!0;break;case"label":case"video":return!0}return/\bneedsclick\b/.test(a.className)},FastClick.prototype.needsFocus=function(a){"use strict";switch(a.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!this.deviceIsAndroid;case"input":switch(a.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!a.disabled&&!a.readOnly;default:return/\bneedsfocus\b/.test(a.className)}},FastClick.prototype.sendClick=function(a,b){"use strict";var c,d;document.activeElement&&document.activeElement!==a&&document.activeElement.blur(),d=b.changedTouches[0],c=document.createEvent("MouseEvents"),c.initMouseEvent(this.determineEventType(a),!0,!0,window,1,d.screenX,d.screenY,d.clientX,d.clientY,!1,!1,!1,!1,0,null),c.forwardedTouchEvent=!0,a.dispatchEvent(c)},FastClick.prototype.determineEventType=function(a){"use strict";return this.deviceIsAndroid&&"select"===a.tagName.toLowerCase()?"mousedown":"click"},FastClick.prototype.focus=function(a){"use strict";var b;this.deviceIsIOS&&a.setSelectionRange&&0!==a.type.indexOf("date")&&"time"!==a.type?(b=a.value.length,a.setSelectionRange(b,b)):a.focus()},FastClick.prototype.updateScrollParent=function(a){"use strict";var b,c;if(b=a.fastClickScrollParent,!b||!b.contains(a)){c=a;do{if(c.scrollHeight>c.offsetHeight){b=c,a.fastClickScrollParent=c;break}c=c.parentElement}while(c)}b&&(b.fastClickLastScrollTop=b.scrollTop)},FastClick.prototype.getTargetElementFromEventTarget=function(a){"use strict";return a.nodeType===Node.TEXT_NODE?a.parentNode:a},FastClick.prototype.onTouchStart=function(a){"use strict";var b,c,d;if(a.targetTouches.length>1)return!0;if(b=this.getTargetElementFromEventTarget(a.target),c=a.targetTouches[0],this.deviceIsIOS){if(d=window.getSelection(),d.rangeCount&&!d.isCollapsed)return!0;if(!this.deviceIsIOS4){if(c.identifier===this.lastTouchIdentifier)return a.preventDefault(),!1;this.lastTouchIdentifier=c.identifier,this.updateScrollParent(b)}}return this.trackingClick=!0,this.trackingClickStart=a.timeStamp,this.targetElement=b,this.touchStartX=c.pageX,this.touchStartY=c.pageY,a.timeStamp-this.lastClickTime<200&&a.preventDefault(),!0},FastClick.prototype.touchHasMoved=function(a){"use strict";var b=a.changedTouches[0],c=this.touchBoundary;return Math.abs(b.pageX-this.touchStartX)>c||Math.abs(b.pageY-this.touchStartY)>c?!0:!1},FastClick.prototype.onTouchMove=function(a){"use strict";return this.trackingClick?((this.targetElement!==this.getTargetElementFromEventTarget(a.target)||this.touchHasMoved(a))&&(this.trackingClick=!1,this.targetElement=null),!0):!0},FastClick.prototype.findControl=function(a){"use strict";return void 0!==a.control?a.control:a.htmlFor?document.getElementById(a.htmlFor):a.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},FastClick.prototype.onTouchEnd=function(a){"use strict";var b,c,d,e,f,g=this.targetElement;if(!this.trackingClick)return!0;if(a.timeStamp-this.lastClickTime<200)return this.cancelNextClick=!0,!0;if(this.cancelNextClick=!1,this.lastClickTime=a.timeStamp,c=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,this.deviceIsIOSWithBadTarget&&(f=a.changedTouches[0],g=document.elementFromPoint(f.pageX-window.pageXOffset,f.pageY-window.pageYOffset)||g,g.fastClickScrollParent=this.targetElement.fastClickScrollParent),d=g.tagName.toLowerCase(),"label"===d){if(b=this.findControl(g)){if(this.focus(g),this.deviceIsAndroid)return!1;g=b}}else if(this.needsFocus(g))return a.timeStamp-c>100||this.deviceIsIOS&&window.top!==window&&"input"===d?(this.targetElement=null,!1):(this.focus(g),this.deviceIsIOS4&&"select"===d||(this.targetElement=null,a.preventDefault()),!1);return this.deviceIsIOS&&!this.deviceIsIOS4&&(e=g.fastClickScrollParent,e&&e.fastClickLastScrollTop!==e.scrollTop)?!0:(this.needsClick(g)||(a.preventDefault(),this.sendClick(g,a)),!1)},FastClick.prototype.onTouchCancel=function(){"use strict";this.trackingClick=!1,this.targetElement=null},FastClick.prototype.onMouse=function(a){"use strict";return this.targetElement?a.forwardedTouchEvent?!0:a.cancelable?!this.needsClick(this.targetElement)||this.cancelNextClick?(a.stopImmediatePropagation?a.stopImmediatePropagation():a.propagationStopped=!0,a.stopPropagation(),a.preventDefault(),!1):!0:!0:!0},FastClick.prototype.onClick=function(a){"use strict";var b;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===a.target.type&&0===a.detail?!0:(b=this.onMouse(a),b||(this.targetElement=null),b)},FastClick.prototype.destroy=function(){"use strict";var a=this.layer;this.deviceIsAndroid&&(a.removeEventListener("mouseover",this.onMouse,!0),a.removeEventListener("mousedown",this.onMouse,!0),a.removeEventListener("mouseup",this.onMouse,!0)),a.removeEventListener("click",this.onClick,!0),a.removeEventListener("touchstart",this.onTouchStart,!1),a.removeEventListener("touchmove",this.onTouchMove,!1),a.removeEventListener("touchend",this.onTouchEnd,!1),a.removeEventListener("touchcancel",this.onTouchCancel,!1)},FastClick.notNeeded=function(a){"use strict";var b,c;if("undefined"==typeof window.ontouchstart)return!0;
15if(c=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!FastClick.prototype.deviceIsAndroid)return!0;if(b=document.querySelector("meta[name=viewport]")){if(-1!==b.content.indexOf("user-scalable=no"))return!0;if(c>31&&window.innerWidth<=window.screen.width)return!0}}return"none"===a.style.msTouchAction?!0:!1},FastClick.attach=function(a){"use strict";return new FastClick(a)},"undefined"!=typeof define&&define.amd?define(function(){"use strict";return FastClick}):"undefined"!=typeof module&&module.exports?(module.exports=FastClick.attach,module.exports.FastClick=FastClick):window.FastClick=FastClick;
16
17
18
19
20// Main scripts file
21(function($) {
22
23	$(document).ready(function(){
24		/*
25        if (Modernizr.svg) {
26              // Supports SVG so do nothing
27        } else {
28            // nope fallback to png
29            $('img[src*="svg"]').attr('src', function() {
30                return $(this).attr('src').replace('.svg', '.png');
31            });
32        }
33        */
34
35
36		// MAIN NAVIGATION
37		function header_actions() {
38			var viewport_width 	= $(window).width();
39
40			if ( viewport_width > 767 ) {
41				$('.nav_toggle').on('click', function(){
42					$(this).toggleClass('active').blur();
43					$('.navigation_area').toggleClass('active');
44					$('body').toggleClass('nav_is_open');
45				});
46
47				$('.body_overlay').on('click', function(){
48					$('.navigation_area').removeClass('active');
49					$('body').removeClass('nav_is_open');
50				});
51
52				$('.close_side_navigation').on('click', function(){
53					$(this).removeClass('active').blur();
54					$('.navigation_area').removeClass('active');
55					$('.search_area').removeClass('active');
56					$('body').removeClass('nav_is_open');
57				});
58
59				$('.search_toggle').click(function(){
60					$(this).toggleClass('active').blur();
61					$('.search_area').toggleClass('active');
62					$('body').addClass('search_is_open');
63				});
64
65				$('.close_search_area').on('click', function(){
66					$(this).removeClass('active').blur();
67					$('.search_area').removeClass('active');
68					$('.navigation_area').removeClass('active');
69					$('body').removeClass('search_is_open');
70				});
71			} else {
72				$('.nav_toggle').on('click', function(){
73					$(this).toggleClass('active').blur();
74					$('.search_toggle').removeClass('active');
75
76					if ( $('body').hasClass('nav_is_open') ) {
77						$('body').removeClass('nav_is_open');
78						$('.navigation_area').removeClass('active');
79					} else if ( $('body').hasClass('search_is_open') ) {
80						$('body').removeClass('search_is_open');
81						$('.search_area').removeClass('active');
82						$('body').addClass('nav_is_open');
83						$('.navigation_area').addClass('active');
84					} else {
85						$('body').addClass('nav_is_open');
86						$('.navigation_area').addClass('active');
87					}
88				});
89
90
91				$('.search_toggle').on('click', function(){
92					$(this).toggleClass('active').blur();
93					$('.search_area').toggleClass('active');
94					$('.nav_toggle').removeClass('active');
95
96					if ( $('body').hasClass('search_is_open') ) {
97						$('body').removeClass('search_is_open');
98						$('.search_area').removeClass('active');
99					} else if ( $('body').hasClass('nav_is_open') ) {
100						$('body').removeClass('nav_is_open');
101						$('.navigation_area').removeClass('active');
102						$('body').addClass('search_is_open');
103						$('.search_area').addClass('active');
104					} else {
105						$('body').addClass('search_is_open');
106						$('.search_area').addClass('active');
107					}
108				});
109			}
110		}
111		header_actions();
112
113
114
115
116		//Live Search
117		var searchForm = $('.search-form'),
118			searchInput = $('.live-search'),
119			lastSearchQuery = '',
120			searchNonce = $('#live_search_nonce').val(),
121			xhr;
122
123		searchForm.on('submit',function(e){
124			e.preventDefault();
125			liveSearch(true);
126		});
127
128		String.prototype.removeTrailingSpaces = function(){
129			return this.replace(/\s+$/,'');
130		}
131
132
133		searchInput.on('keyup',function(e){
134			var key = e.charCode || e.keyCode;
135			if( ( lastSearchQuery == $(this).val().removeTrailingSpaces() || !$(this).val().removeTrailingSpaces() ) ){
136				return;
137			}
138
139			lastSearchQuery = $(this).val().removeTrailingSpaces();
140			liveSearch();
141		});
142
143		//live search process
144		var liveSearch = function(isSubmit){
145			isSubmit = isSubmit || false;
146			if(xhr) xhr.abort();
147
148			var query = searchInput.val().removeTrailingSpaces(),
149				resultsContainer = $('.search-results-wrap').children('.search-results'),
150				helpTextContainer = $('.help_text'),
151				viewAllResultsUrl = $('.search-results__view_all_results').attr('href');
152
153			resultsContainer.removeClass('loading').html('');
154			helpTextContainer.find('.search-notice').remove();
155
156			if(query.length < 3){
157				// if(query.length > 0 && isSubmit) helpTextContainer.append('<span class="search-notice">' + LL.searchMinChars + '</span>');
158				return false;
159			}
160
161			xhr = $.ajax({
162				method: "GET",
163				url: LL.ajaxUrl,
164				data:{
165					action: 'get_search_results',
166					nonce: searchNonce,
167					s: query
168				},
169				beforeSend:function(){
170					resultsContainer.addClass('loading');
171				},
172				error: function (request, status, error) {
173					if(request.statusText.toLowerCase() != 'abort'){
174						resultsContainer.removeClass('loading');
175						resultsContainer.append('<p class="result search-no-results">' + LL.searchNoResults + '</p>');
176					}
177				},
178				success : function( response ) {
179					resultsContainer.removeClass('loading');
180
181					if(!response.success){
182						resultsContainer.append('<p class="result search-no-results">' + LL.searchNoResults + '</p>');
183						return false;
184					}
185
186					resultsContainer.append(response.data);
187					if(response.more){
188						resultsContainer.append('<a class="btn button" href="' + LL.searchBaseUrl + query + '" >' + LL.searchViewAllResults + '</a>');
189					}
190				}
191			});
192		};
193
194
195		// Side Navigation
196		// sub menu toggles
197		$('.menu-item-has-children > .menu-item__toggle-children').click(function(e){
198			if ( $('.navigation_area.active').length ) {
199				e.preventDefault();
200			}
201
202			var parent_li 	= $(this).parent();
203			var rest_li 	= $('.menu-item-has-children').not($(this).parent());
204
205			$(rest_li).children('.sub-menu').slideUp();
206			$(rest_li).removeClass('active');
207			$(parent_li).children('.sub-menu').slideToggle();
208			$(parent_li).toggleClass('active');
209		});
210
211		if( $('.custom_scrollable_content').length > 0 ) {
212			$(".custom_scrollable_content").mCustomScrollbar();
213		}
214
215		function custom_scrollbar_in_side_navigation() {
216			if( $('.nav_scrollable_content').length > 0 ) {
217				var viewport_height = $(window).height();
218
219				if ( viewport_height > 450 ) {
220					$(".nav_scrollable_content").mCustomScrollbar();
221				} else {
222					$(".parent_nav_scrollable_content").mCustomScrollbar();
223				}
224			}
225		}
226		custom_scrollbar_in_side_navigation();
227
228
229		// FOLLOW AREA TOGGLE
230		if( $('.follow_area').length > 0 ) {
231			$('.follow_area').on('click', function(){
232				$(this).toggleClass('expanded').blur();
233				$('.global_header .fixed_header__fixed_element').toggleClass('follow_area_expanded').blur();
234			});
235		}
236
237
238		// LIGHTBOX GALLERIES
239		if ( $('.gallery__lightbox-container').length > 0 ) {
240			$('.longform__main_content').slickLightbox({
241				itemSelector: '.gallery_image__lightbox',
242				caption: 'caption',
243				captionPosition: 'dynamic',
244				imageMaxHeight: 0.98,
245				background: 'rgba(0,0,0,0.95)',
246				lazy: true
247			});
248		}
249
250		if($('.single_article__wrapper').length && !$('.single_article__wrapper').hasClass('single_longform__wrapper')){
251
252			$('.single_article__main_content .paragraph').find('img').each(function(){
253
254				if( !$(this).closest('.product_item__thumbnail').length
255					&& !$(this).closest('.read_also_item__thumbnail').length
256					&& !$( this ).closest( '.yop-poll-mc' ).length ) {
257
258					$(this).addClass('enable-slick-lightbox');
259
260				}
261			});
262
263			$('.single_article__main_content .paragraph').slickLightbox({
264				itemSelector: '.enable-slick-lightbox',
265				src:'src',
266				imageMaxHeight: 0.98,
267				background: 'rgba(0,0,0,0.95)',
268				lazy: true
269			});
270		}
271
272
273		// window focus - Active Tab
274		$(window)
275			.on('focus',function(){
276				$('body').addClass('active-tab');
277			})
278			.on('blur',function(){
279				$('body').removeClass('active-tab');
280			})
281
282		var visibilityChageEvents = ['-webkit-visibilitychange','-moz-visibilitychange','visibilitychange'];
283		visibilityChageEvents.forEach(function(e) {
284			document.addEventListener(e,function(){
285				if(document.hidden){
286					$('body').removeClass('active-tab');
287				}else{
288					$('body').addClass('active-tab');
289				}
290			});
291		});
292
293
294
295		// STICKY BANNERS
296		function fix_in_parent() {
297			if ( ($(".fixed_header__wrapper").length > 0) && ($(".fixed_header__fixed_element").length > 0) ) {
298				$(".fixed_header__fixed_element").stick_in_parent({
299					parent: '.fixed_header__wrapper',
300					// spacer: '.sticky-content-spacer',
301					offset_top: 0,
302					bottoming: true,
303				});
304			}
305
306			var viewport_width 	= $(window).width();
307			if ( viewport_width > 1100 ) {
308				// ARTICLE
309				if ( ($(".sticky_element__social_sharing").length > 0) ) {
310					$(".sticky_element__social_sharing").stick_in_parent({
311						parent: '.sticky_element__social_sharing__parent',
312						spacer: '.sticky_element__social_sharing__spacer',
313						offset_top: 90,
314						bottoming: true,
315					});
316				}
317			}
318		}
319		fix_in_parent();
320
321
322		// Scroll to top button
323		if ( $('.scrollup').length > 0 ) {
324			$('.scrollup').click(function(){
325				$("html, body").animate({ scrollTop: 0 }, 800);
326				return false;
327			});
328		}
329
330		// Truncate text
331		function truncate_highlights_text() {
332			var viewport_width 	= $(window).width();
333
334			if ( viewport_width > 767 ) {
335				if ( $('.highlight_post__title a').length > 0 ) {
336					var the_obj = $('.highlight_post__title a').ThreeDots({
337						max_rows: 1
338					});
339				}
340
341				if ( $('.zodia .post__no_thumb .post__title a').length > 0 ) {
342					var the_obj = $('.zodia .post__no_thumb .post__title a').ThreeDots({
343						max_rows: 4
344					});
345				}
346
347				if ( $('.tribute_post__title .desk_title').length > 0 ) {
348					var the_obj = $('.tribute_post__title .desk_title').ThreeDots({
349						max_rows: 4
350					});
351				}
352			} else {
353				if ( $('.highlight_post__title__mob').length > 0 ) {
354					var the_obj = $('.highlight_post__title__mob').ThreeDots({
355						max_rows: 2
356					});
357				}
358
359				if ( $('.opinion_post__title .mob_title').length > 0 ) {
360					var the_obj = $('.opinion_post__title .mob_title').ThreeDots({
361						max_rows: 6
362					});
363				}
364
365				if ( $('.zodia .post__no_thumb .post__title a').length > 0 ) {
366					var the_obj = $('.zodia .post__no_thumb .post__title a').ThreeDots({
367						max_rows: 4
368					});
369				}
370			}
371		}
372		truncate_highlights_text();
373
374
375		// Home // Opinions Carousel
376		if ( $('.opinion_posts').length > 0 ) {
377			$(".opinion_posts").slick({
378				slidesToShow: 1,
379				slidesToScroll: 1,
380				infinite: true,
381				dots: false,
382				arrows: true,
383			});
384		}
385
386		// Home // Ask Eliana Carousel
387		if ( $('.askeliana_posts').length > 0 ) {
388			$(".askeliana_posts").slick({
389				slidesToShow: 1,
390				slidesToScroll: 1,
391				infinite: true,
392				dots: true,
393				arrows: false,
394				// autoplay: true,
395				// autoplaySpeed: 2000,
396			});
397		}
398
399
400		// INFINITE SCROLL
401		$('.category_posts').infiniteScroll();
402		$('.videos_archive__posts').infiniteScroll();
403
404
405		//Stuck dfp slot
406		$('#minimize_button').click(function(){
407			$(this).parent().toggleClass('banner-open');
408		});
409
410
411
412		$(window).on('scroll',function(){
413			if( $('.event_sessions__navigation').length > 0 ) {
414				var visibleSections = $('.event_sessions__navigation ul li').removeClass('active').filter(function() {
415					return $($(this).children('a').attr('href')).visible(1);
416				});
417				visibleSections.first().addClass('active');
418			}
419		});
420
421
422		$(window).on('orientationchange', function() {
423			header_actions();
424			fix_in_parent();
425			custom_scrollbar_in_side_navigation();
426		});
427
428
429		/* DFP slot article end refresh on window resize
430         * TODO: this a temp solution
431         * files where the slot is : single-longform, single & dfp_header (232)
432         **********************************************************************/
433		if(gptAdSlots[3] && gptAdSlots[3].getAdUnitPath() === "/4834629/ladylike.gr/ros_article_end") {
434			var googletag = window.googletag || {};
435			var viewportWidthOrig = window.innerWidth;
436			var resizeTimeout;
437			var breakpoints = [1280, 1084, 1024, 768, 600, 460, 360, 320];
438
439			function getBreakPoint(breakpoint, index){
440				var param = this[0];
441				var slotToBeRefreshed = googletag.pubads().getSlots()[3];
442				// code for dom loaded
443				// bigger to smaller than breakpoint OR smaller to bigger than breakpoint
444				if ((viewportWidthOrig > breakpoint && window.innerWidth <= breakpoint) || (viewportWidthOrig < breakpoint && window.innerWidth >= breakpoint)) {
445					//console.log('changed breakpoint');
446					if( googletag.pubadsReady && param === 'resize') {
447						//console.log('breakpoint: ', breakpoint );
448						googletag.pubads().refresh([slotToBeRefreshed]);
449					}
450					return true; //break loop if we found traversed breakpoint
451				}
452			}
453
454			window.addEventListener('resize', function(event){
455				var eventType = event.type;
456				clearTimeout(resizeTimeout);
457				resizeTimeout = setTimeout(function(){
458					breakpoints.some( getBreakPoint, [eventType] );
459					viewportWidthOrig = window.innerWidth;
460				}, 100);
461			});
462		}
463		// end of DFP slot article end refresh on window resize
464
465		if(LL.isSingleVideo){
466			googletag.cmd.push(function() {
467
468				var banners = [{
469					slot: gptAdSlots['3'],
470					container: $('.single_article__aside .dfp-wrap'),
471					moveFrom: $('.single_article__aside .sticky_element__article_sidebar'),
472					moveTo: $('.single_article__aside'),
473					moveToWrap: {
474						start: '<div class="inarticle_component ads_element sticky_ads_element sticky_ads_element_mob mob_sticky_element__parent__article_first"><div class="sticky_element__spacer__article_first"><div class="sticky_element__article_first"><div class="dfp-wrap inner">',
475						end: '</div></div></div></div>',
476					},
477					viewport: 1023,
478				}];
479
480				banners.forEach(function(banner){
481					if( $(window).width() <= banner.viewport ){
482
483						var clone = banner.container.clone().html();
484						banner.moveTo.prepend( (banner.moveToWrap !== false ? banner.moveToWrap.start : '') + clone + (banner.moveToWrap !== false ? banner.moveToWrap.end : ''));
485						banner.moveFrom.find('.dfp-wrap').remove();
486
487						googletag.pubads().refresh(banner.slot, {changeCorrelator: false});
488
489						$('.sticky_element__article_first').stick_in_parent({
490							parent: '.mob_sticky_element__parent__article_first',
491							spacer: '.sticky_element__spacer__article_first',
492							offset_top: 65,
493							bottoming: true,
494							recalc_every: 1,
495						});
496
497					}
498				});
499			});
500
501		} //end isSingleVideo
502
503		if( $( 'body.page-template-homepage' ).length ){
504			window.googletag.cmd.push(function() {
505
506				var banners = [{
507					slot: gptAdSlots['4'],
508					container: $('.sticky_element__hp_sixth .dfp-wrap'),
509					moveFrom: $('.sticky_element__hp_sixth'),
510					moveTo: $('.podcasts_posts'),
511					moveToWrap: {
512						start: '<div class="sidebar_post ads_element"><div class="dfp-wrap widget">',
513						end: '</div></div>',
514					},
515					viewport: 1023,
516				}];
517
518				banners.forEach(function(banner){
519					if( $(window).width() <= banner.viewport ){
520
521						var clone = banner.container.clone().html();
522						banner.moveTo.append( (banner.moveToWrap !== false ? banner.moveToWrap.start : '') + clone + (banner.moveToWrap !== false ? banner.moveToWrap.end : ''));
523						banner.moveFrom.find('.dfp-wrap').remove();
524
525						googletag.pubads().refresh(banner.slot, {changeCorrelator: false});
526
527					}
528				});
529			});
530		} //end isFrontPage
531
532
533
534
535		// podcasts
536		if( window.btwUaParser.isMobile() ){
537
538			$( '.hp_section.podcasts .podcast__option.label' ).on( 'click', function(){
539
540				var containerSelector = '.podcast__subscription_options',
541					$ul = $( this ).closest( containerSelector ).children( 'ul' );
542
543				$( containerSelector ).children( 'ul' ).not( $ul ).removeClass( 'open' );
544				$ul.toggleClass( 'open' );
545
546			});
547
548			$( 'body' ).on( 'click', function( e ){
549
550				if( $( e.target ).closest( '.hp_section.podcasts .podcast__subscription_options' ).length ) return;
551
552				$( '.hp_section.podcasts .podcast__subscription_options' ).children( 'ul' ).removeClass( 'open' );
553
554			});
555
556		}else{
557
558			$( 'body' ).addClass( 'is_desktop' );
559
560		}
561
562		//podcast
563		$( '.hp_section.podcast .podcast__option.label' ).on( 'click', function(){
564			var containerSelector = '.podcast__subscription_options',
565				$container = $( this ).closest( containerSelector );
566
567			$container.toggleClass( 'open' );
568			$( containerSelector ).not( $container ).removeClass( 'open' );
569		});
570
571
572
573	}); // doc ready end
574
575
576
577	$(window).load(function(){
578		var viewport_width 	= $(window).width();
579
580		if ( viewport_width > 1023 ) {
581			var height = $(".latest_videos__container").data('height');
582
583			$(".latest_videos__container").mCustomScrollbar({
584				axis:"y",
585				live: "on",
586				autoHideScrollbar: false,
587				setHeight: height,
588				advanced:{
589					updateOnContentResize:true,
590				},
591				callbacks:{
592					// onUpdate:function(){
593					// },
594					onUpdate:function(){
595						new fontLoader({
596							truncateNodesParentSelectors: '.sidebar_post__title',
597							truncateNodes: [
598								document.querySelectorAll('.sidebar_post__title > a'),
599								document.querySelectorAll('.sidebar_post__title > a'),
600							],
601							maxLines:3,
602
603						});
604					}
605				}
606			});
607		}
608
609
610
611
612	}); // window load end
613
614
615})(jQuery);

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.