-
Notifications
You must be signed in to change notification settings - Fork 0
/
homp.min.js
2 lines (2 loc) · 12.3 KB
/
homp.min.js
1
2
function openNav(){document.getElementById("myTopnav").style.left="0"}function closeNav(){document.getElementById("myTopnav").style.left="-250px"}function menuoverlayOn(){document.getElementById("menuoverlay").style.display="block"}function menuoverlayOff(){document.getElementById("menuoverlay").style.display="none"}function addClassBody(){var a,e,f;a=document.body,e="flow",f=a.className.split(" "),-1==f.indexOf(e)&&(a.className+=" "+e)}function removeClassBody(){var b=document.body;b.className=b.className.replace(/\bflow\b/g,"")}function scrollFunction(){document.getElementById("backToTop").style.display=200<document.body.scrollTop||200<document.documentElement.scrollTop?"block":"none"}function topFunction(){document.body.scrollTop=0,document.documentElement.scrollTop=0}for(var btns=document.getElementsByClassName("dropbtn"),i=0;i<btns.length;i++)btns[i].addEventListener("click",function(){var b=document.getElementsByClassName("active");0<b.length&&(b[0].className=b[0].className.replace(" active","")),this.className+=" active"});window.onclick=function(e){if(!e.target.matches(".dropbtn")){var b,f=document.getElementsByClassName("dropbtn");for(b=0;b<f.length;b++){var d=f[b];d.classList.contains("active")&&d.classList.remove("active")}}},!function(a,b){var c=b(a,a.document);a.lazySizes=c,"object"==typeof module&&module.exports&&(module.exports=c)}("undefined"==typeof window?{}:window,function(L,l){"use strict";var j,M;if(function(){var a,d={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};for(a in M=L.lazySizesConfig||L.lazysizesConfig||{},d)a in M||(M[a]=d[a])}(),!l||!l.getElementsByClassName)return{init:function(){},cfg:M,noSupport:!0};var J=l.documentElement,n=L.Date,t=L.HTMLPictureElement,a=L.addEventListener,B=L.setTimeout,i=L.requestAnimationFrame||B,D=L.requestIdleCallback,E=/^picture$/i,q=["load","error","lazyincluded","_lazyloaded"],c={},m=Array.prototype.forEach,f=function(d,a){return c[a]||(c[a]=new RegExp("(\\s|^)"+a+"(\\s|$)")),c[a].test(d.getAttribute("class")||"")&&c[a]},G=function(c,a){f(c,a)||c.setAttribute("class",(c.getAttribute("class")||"").trim()+" "+a)},y=function(a,b){var c;(c=f(a,b))&&a.setAttribute("class",(a.getAttribute("class")||"").replace(c," "))},v=function(a,c,b){var d=b?"addEventListener":"removeEventListener";b&&v(a,c),q.forEach(function(e){a[d](e,c)})},H=function(g,a,b,h,d){var e=l.createEvent("Event");return b||(b={}),b.instance=j,e.initEvent(a,!h,!d),e.detail=b,g.dispatchEvent(e),e},z=function(d,b){var c;!t&&(c=L.picturefill||M.pf)?(b&&b.src&&!d.getAttribute("srcset")&&d.setAttribute("srcset",b.src),c({reevaluate:!0,elements:[d]})):b&&b.src&&(d.src=b.src)},b=function(c,a){return(getComputedStyle(c,null)||{})[a]},g=function(a,b,e){for(e=e||a.offsetWidth;e<M.minSize&&b&&!a._lazysizesWidth;)e=b.offsetWidth,b=b.parentNode;return e},h=function(){var c,j,e=[],f=[],g=e,m=function(){var b=g;for(g=e.length?f:e,c=!0,j=!1;b.length;)b.shift()();c=!1},a=function(b,a){c&&!a?b.apply(this,arguments):(g.push(b),j||(j=!0,(l.hidden?B:i)(m)))};return a._lsFlush=m,a}(),p=function(e,b){return b?function(){h(e)}:function(){var a=this,b=arguments;h(function(){e.apply(a,b)})}},k=function(a){var d,j=0,k=M.throttleDelay,g=M.ricTimeout,b=function(){d=!1,j=n.now(),a()},e=D&&49<g?function(){D(b,{timeout:g}),g!==M.ricTimeout&&(g=M.ricTimeout)}:p(function(){B(b)},!0);return function(c){var f;(c=!0===c)&&(g=33),d||(d=!0,f=k-(n.now()-j),0>f&&(f=0),c||9>f?e():B(e,f))}},o=function(a){var b,d,e=function(){b=null,a()},g=function(){var b=n.now()-d;99>b?B(g,99-b):(D||e)(e)};return function(){d=n.now(),b||(b=B(g,99))}},d=function(){var g,r,q,t,i,u,F,O,P,S,_,ia,ja="onscroll"in L&&!/(gle|ing)bot/.test(navigator.userAgent),ba=0,ka=0,la=-1,w=function(b){ka--,b&&!(0>ka)&&b.target||(ka=0)},ma=function(c){return null==ia&&(ia="hidden"==b(l.body,"visibility")),ia||"hidden"!=b(c.parentNode,"visibility")&&"hidden"!=b(c,"visibility")},ea=function(f,g){var c,h=f,i=ma(f);for(O-=g,_+=g,P-=g,S+=g;i&&(h=h.offsetParent)&&h!=l.body&&h!=J;)(i=0<(b(h,"opacity")||1))&&"visible"!=b(h,"overflow")&&(c=h.getBoundingClientRect(),i=S>c.left&&P<c.right&&_>c.top-1&&O<c.bottom+1);return i},A=function(){var a,b,c,d,e,f,h,n,o,v,x,y,z=j.elements;if((t=M.loadMode)&&8>ka&&(a=z.length)){for(b=0,la++;a>b;b++)if(z[b]&&!z[b]._lazyRace)if(!ja||j.prematureUnveil&&j.prematureUnveil(z[b]))V(z[b]);else if((n=z[b].getAttribute("data-expand"))&&(f=1*n)||(f=ba),v||(v=!M.expand||1>M.expand?500<J.clientHeight&&500<J.clientWidth?500:370:M.expand,j._defEx=v,x=v*M.expFactor,y=M.hFac,ia=null,x>ba&&1>ka&&2<la&&2<t&&!l.hidden?(ba=x,la=0):ba=1<t&&1<la&&6>ka?v:0),o!==f&&(u=innerWidth+f*y,F=innerHeight+f,h=-1*f,o=f),c=z[b].getBoundingClientRect(),!((_=c.bottom)>=h&&(O=c.top)<=F&&(S=c.right)>=h*y&&(P=c.left)<=u&&(_||S||P||O)&&(M.loadHidden||ma(z[b]))&&(r&&3>ka&&!n&&(3>t||4>la)||ea(z[b],f))))!e&&r&&!d&&4>ka&&4>la&&2<t&&(g[0]||M.preloadAfterLoad)&&(g[0]||!n&&(_||S||P||O||"auto"!=z[b].getAttribute(M.sizesAttr)))&&(d=g[0]||z[b]);else if(V(z[b]),e=!0,9<ka)break;d&&!e&&V(d)}},e=k(A),C=function(b){var a=b.target;return a._lazyCache?void delete a._lazyCache:(w(b),G(a,M.loadedClass),y(a,M.loadingClass),v(a,I),H(a,"lazyloaded"),void 0)},D=p(C),I=function(b){D({target:b.target})},K=function(a,b){try{a.contentWindow.location.replace(b)}catch(c){a.src=b}},Q=function(a){var b,e=a.getAttribute(M.srcsetAttr);(b=M.customMedia[a.getAttribute("data-media")||a.getAttribute("media")])&&a.setAttribute("media",b),e&&a.setAttribute("srcset",e)},U=p(function(b,c,d,e,a){var f,g,i,j,l,p;(l=H(b,"lazybeforeunveil",c)).defaultPrevented||(e&&(d?G(b,M.autosizesClass):b.setAttribute("sizes",e)),g=b.getAttribute(M.srcsetAttr),f=b.getAttribute(M.srcAttr).replace(/.*?:\/\//g,"https://cdn.statically.io/img/"),a&&(i=b.parentNode,j=i&&E.test(i.nodeName||"")),p=c.firesLoad||"src"in b&&(g||f||j),l={target:b},G(b,M.loadingClass),p&&(clearTimeout(q),q=B(w,2500),v(b,I,!0)),j&&m.call(i.getElementsByTagName("source"),Q),g?b.setAttribute("srcset",g):f&&!j&&(/^iframe$/i.test(b.nodeName)?K(b,f):b.src=f),a&&(g||j)&&z(b,{src:f})),b._lazyRace&&delete b._lazyRace,y(b,M.lazyClass),h(function(){var c=b.complete&&1<b.naturalWidth;p&&!c||(c&&G(b,"ls-is-cached"),C(l),b._lazyCache=!0,B(function(){"_lazyCache"in b&&delete b._lazyCache},9)),"lazy"==b.loading&&ka--},!0)}),V=function(g){if(!g._lazyRace){var b,h=/^img$/i.test(g.nodeName),d=h&&(g.getAttribute(M.sizesAttr)||g.getAttribute("sizes")),a="auto"==d;(a||!r)&&h&&(g.getAttribute("src")||g.srcset)&&!g.complete&&!f(g,M.errorClass)&&f(g,M.lazyClass)||(b=H(g,"lazyunveilread").detail,a&&s.updateElem(g,!0,g.offsetWidth),g._lazyRace=!0,ka++,U(g,b,a,d,h))}},X=o(function(){M.loadMode=3,e()}),Y=function(){3==M.loadMode&&(M.loadMode=2),X()},Z=function(){if(!r){if(999>n.now()-i)return void B(Z,999);r=!0,M.loadMode=3,e(),a("scroll",Y,!0)}};return{_:function(){i=n.now(),j.elements=l.getElementsByClassName(M.lazyClass),g=l.getElementsByClassName(M.lazyClass+" "+M.preloadClass),a("scroll",e,!0),a("resize",e,!0),L.MutationObserver?new MutationObserver(e).observe(J,{childList:!0,subtree:!0,attributes:!0}):(J.addEventListener("DOMNodeInserted",e,!0),J.addEventListener("DOMAttrModified",e,!0),setInterval(e,999)),a("hashchange",e,!0),["focus","mouseover","click","load","transitionend","animationend"].forEach(function(b){l.addEventListener(b,e,!0)}),/d$|^c/.test(l.readyState)?Z():(a("load",Z),l.addEventListener("DOMContentLoaded",e),B(Z,2e4)),j.elements.length?(A(),h._lsFlush()):e()},checkElems:e,unveil:V,_aLSL:Y}}(),s=function(){var h,i=p(function(h,b,c,d){var i,j,k;if(h._lazysizesWidth=d,d+="px",h.setAttribute("sizes",d),E.test(b.nodeName||""))for(i=b.getElementsByTagName("source"),j=0,k=i.length;k>j;j++)i[j].setAttribute("sizes",d);c.detail.dataAttr||z(h,c.detail)}),j=function(c,a,b){var h,j=c.parentNode;j&&(b=g(c,j,b),h=H(c,"lazybeforesizes",{width:b,dataAttr:!!a}),h.defaultPrevented||(b=h.detail.width)&&b!==c._lazysizesWidth&&i(c,j,h,b))},c=function(){var a,b=h.length;if(b)for(a=0;b>a;a++)j(h[a])},d=o(c);return{_:function(){h=l.getElementsByClassName(M.autosizesClass),a("resize",d)},checkElems:d,updateElem:j}}(),e=function(){!e.i&&l.getElementsByClassName&&(e.i=!0,s._(),d._())};return B(function(){M.init&&e()}),j={cfg:M,autoSizer:s,loader:d,init:e,uP:z,aC:G,rC:y,hC:f,fire:H,gW:g,rAF:h}});var i,x=document.querySelectorAll(".lazyloadimg");for(i=0;i<x.length;i++)x[i].innerHTML=x[i].innerHTML.replace("<!--","").replace("-->","");
function labelthumbs(t){for(var e=0;e<numposts;e++){var n,r=t.feed.entry[e],m=r.title.$t;if(e==t.feed.entry.length)break;for(var i=0;i<r.link.length;i++){if("replies"==r.link[i].rel&&"text/html"==r.link[i].type)var l=r.link[i].title,o=r.link[i].href;if("alternate"==r.link[i].rel){n=r.link[i].href;break}}var u;try{u=r.media$thumbnail.url,u=u.replace("/s72-c/","/w"+thumb_width+"-h"+thumb_height+"-c/")}catch(h){s=r.content.$t,a=s.indexOf("<img"),b=s.indexOf('src="',a),c=s.indexOf('"',b+5),d=s.substr(b+5,c-b-5),u=-1!=a&&-1!=b&&-1!=c&&""!=d?d:no_thumb}var p=r.published.$t,w=p.substring(0,4),_=p.substring(5,7),f=p.substring(8,10),g=new Array;g[1]="January",g[2]="February",g[3]="March",g[4]="April",g[5]="May",g[6]="June",g[7]="July",g[8]="August",g[9]="September",g[10]="October",g[11]="November",g[12]="December",document.write('<span class="postcat_left">'),document.write('<ul class="postcat_thumbs lazyloaded">'),document.write("<li>"),1==showpostthumbnails&&document.write('<a href="'+n+'"><div class="cat_thumb lazyloaded"><span class="rollover"></span><img class="lazyloaded" width="'+thumb_width+'" height="'+thumb_height+'" alt="'+m+'" src="'+u+'"/></div></a>'),document.write('<span class="postcat_title"><a href="'+n+'" target ="_top">'+m+"</a></span>");var v="";if(document.write('<span class="postcat_meta">'),1==showpostdate&&(v=v+'<span class="postcat_meta_date">'+g[parseInt(_)]+" "+f+", "+w+"</span>"),1==showcommentnum&&("1 Comments"==l&&(l="1 Comments"),"0 Comments"==l&&(l="0 Comments"),showcomment='<span class="postcat_meta_comment"><a href="'+o+'">'+l+"</a></span>",v+=showcomment),1==displaymore&&(v=v+'<span class="postcat_meta_more"><a href="'+n+'" class="url" target ="_top">Read More...</a></span>'),document.write(v),document.write("</span>"),document.write('<span class="postcat_summary">'),"content"in r)var y=r.content.$t;else if("summary"in r)var y=r.summary.$t;else var y="";var k=/<\S[^>]*>/g;if(y=y.replace(k,""),1==showpostsummary)if(y.length<numchars)document.write(""),document.write(y),document.write("");else{document.write(""),y=y.substring(0,numchars);var $=y.lastIndexOf(" ");y=y.substring(0,$),document.write(y+"..."),document.write("")}document.write("</span>"),document.write("</li>"),document.write("</ul>"),document.write("</span>")}document.write('<span class="postcat_right">'),document.write('<ul class="postcat_thumbs2">');for(var e=1;e<numposts2;e++){var n,r=t.feed.entry[e],m=r.title.$t;if(e==t.feed.entry.length)break;for(var i=1;i<r.link.length;i++){if("replies"==r.link[i].rel&&"text/html"==r.link[i].type)var l=r.link[i].title,o=r.link[i].href;if("alternate"==r.link[i].rel){n=r.link[i].href;break}}var x;try{x=r.media$thumbnail.url.replace("/s72-c/","/w"+thumb_width2+"-h"+thumb_height2+"-c/")}catch(h){s=r.content.$t,a=s.indexOf("<img"),b=s.indexOf('src="',a),c=s.indexOf('"',b+5),d=s.substr(b+5,c-b-5),x=-1!=a&&-1!=b&&-1!=c&&""!=d?d:no_thumb2}var p=r.published.$t,w=p.substring(0,4),_=p.substring(5,7),f=p.substring(8,10);1==showpostthumbnails2&&document.write('<a href="'+n+'"><div class="cat_thumb2 lazyloaded"><img width="'+thumb_width2+'" height="'+thumb_height2+'" alt="'+m+'" src="'+x+'"/></div></a>'),document.write("<li>"),document.write('<span class="postcat_title postcat_title2"><a href="'+n+'" target ="_top">'+m+"</a></span>");var v="";document.write('<span class="postcat_meta postcat_meta2">'),1==showpostdate2&&(v=v+'<span class="postcat_meta_date">'+g[parseInt(_)]+" "+f+", "+w+"</span>"),1==showcommentnum2&&("1 Comment"==l&&(l="1 Comments"),"0 Comment"==l&&(l="0 Comments"),showcomment='<span class="postcat_meta_comment postcat_meta_comment2"><a href="'+o+'">'+l+"</a></span>",v+=showcomment),1==displaymore2&&(v=v+'<span class="postcat_meta_more postcat_meta_more2"><a href="'+n+'" class="url" target ="_top">Read More...</a></span>'),document.write(v),document.write("</span>"),document.write("</li>")}document.write("</ul>"),document.write("</span>")}