Monday, February 26, 2024

Ubuntu function

Items 1-12 out of 329 displayed

83 Score
18.5k Views
Asked rocky 15 Years ago, Thursday, February 26, 2009 / rated 0 times / (+88) (-5)
-7 Score
40.7k Views
Asked brendan 15 Years ago, Tuesday, March 10, 2009 / rated 0 times / (+0) (-7)
5 Score
71.8k Views
Asked luzv 15 Years ago, Friday, May 22, 2009 / rated 0 times / (+12) (-7)
14 Score
17.2k Views
Asked alekgermanb 15 Years ago, Friday, June 5, 2009 / rated 0 times / (+21) (-7)
170 Score
28.4k Views
Asked eanskylerg 15 Years ago, Wednesday, June 17, 2009 / rated 0 times / (+173) (-3)
68 Score
31.3k Views
Asked alexandreah 15 Years ago, Friday, July 17, 2009 / rated 0 times / (+75) (-7)
27 Score
18.9k Views
Asked brendan 15 Years ago, Thursday, September 3, 2009 / rated 0 times / (+31) (-4)
161 Score
24.8k Views
Asked berenices 15 Years ago, Thursday, October 8, 2009 / rated 0 times / (+163) (-2)
71 Score
190.6k Views
Asked erick 15 Years ago, Wednesday, October 21, 2009 / rated 0 times / (+77) (-6)
102 Score
32.2k Views
Asked cayden 15 Years ago, Friday, November 13, 2009 / rated 0 times / (+103) (-1)
91 Score
133.6k Views
Asked zoiel 15 Years ago, Wednesday, December 2, 2009 / rated 0 times / (+92) (-1)
127 Score
15.5k Views
Asked leifw 15 Years ago, Sunday, December 20, 2009 / rated 0 times / (+129) (-2)
Items 1-12 out of 329 displayed

It is not very clear what problem you're experiencing. If you have three layers (layer1, layer2, layer3) where the top layer is layer1 and you only want to respond to click events for it, you...

Thursday, May 10, 2018, 12:00:00

You don't need moment. I have included a solution that is quite verbose, but is understandable. This could be shorted if needed.

Since you are using S3, you might also consider using...

Thursday, June 20, 2019, 12:00:00

Use plain old `for` loop, like this

``````var N = 3;
for (var i = 0; i < array.length; i += N) {
// Do your work with array, array...array
}
``````
Thursday, December 25, 2014, 12:00:00

I was just digging around random parts of the internet looking for answers to this error, accidentally `npm install`'ed `styled-components` as part of

Thursday, May 23, 2019, 12:00:00

Basically you need to append new post just added.

Create a view with Single Post Block which seems inside your foreach:

``````//single-post-block.php

<div class=panel...
``````
``` Saturday, December 26, 2015, 12:00:00 ```
``` ```
``` ```
``` ```
``` ```
``` ```
``` function ucfirst(e){return(e+="").charAt(0).toUpperCase()+e.substr(1)}jQuery(function(l,r){var e=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}}(navigator.userAgent),n={};e.browser&&(n[e.browser]=!0,n.version=e.version),n.chrome?n.webkit=!0:n.webkit&&(n.safari=!0);var i=l(window),s=l(document),o=l("body"),a=l("base").attr("href"),h={filters:[],callbacks:{},anims:{},loadFilter:r,modal:!1,closeOnEscape:!0,closeOnClick:!0,useKeyHandler:!1,showCloseButton:!0,closeButton:'<a href="#" class="nyroModalClose nyroModalCloseButton nmReposition" title="close"><i class="mdi mdi-close" style="visibility: visible;"></i></a>',stack:!1,nonStackable:"form",header:r,footer:r,galleryLoop:!0,galleryCounts:!0,ltr:!0,domCopy:!1,ajax:{},imageRegex:"[^.].(jpg|jpeg|png|tiff|gif|bmp)s*\$",selIndicator:"nyroModalSel",swfObjectId:r,swf:{allowFullScreen:"true",allowscriptaccess:"always",wmode:"transparent"},store:{},errorMsg:"An error occured",elts:{all:r,bg:r,load:r,cont:r,hidden:r},sizes:{initW:r,initH:r,w:r,h:r,minW:r,minH:r,wMargin:r,hMargin:r},anim:{def:r,showBg:r,hideBg:r,showLoad:r,hideLoad:r,showCont:r,hideCont:r,showTrans:r,hideTrans:r,resize:r},_open:!1,_bgReady:!1,_opened:!1,_loading:!1,_animated:!1,_transition:!1,_nmOpener:r,_nbContentLoading:0,_scripts:"",_scriptsShown:"",saveObj:function(){this.opener.data("nmObj",this)},open:function(){this._nmOpener&&this._nmOpener._close(),this.getInternal()._pushStack(this.opener),this._opened=!1,this._bgReady=!1,this._open=!0,this._initElts(),this._load(),this._nbContentLoading=0,this._callAnim("showBg",l.proxy(function(){this._bgReady=!0,this._nmOpener&&(this._nmOpener._bgReady=!1,this._nmOpener._loading=!1,this._nmOpener._animated=!1,this._nmOpener._opened=!1,this._nmOpener._open=!1,this._nmOpener.elts.cont=this._nmOpener.elts.hidden=this._nmOpener.elts.load=this._nmOpener.elts.bg=this._nmOpener.elts.all=r,this._nmOpener.saveObj(),this._nmOpener=r),this._contentLoading()},this))},resize:function(e){e?(this.elts.hidden.append(this.elts.cont.children().first().clone()),this.sizes.initW=this.sizes.w=this.elts.hidden.width(),this.sizes.initH=this.sizes.h=this.elts.hidden.height(),this.elts.hidden.empty()):(this.sizes.w=this.sizes.initW,this.sizes.h=this.sizes.initH),this._unreposition(),this.size(),this._callAnim("resize",l.proxy(function(){this._reposition()},this))},size:function(){var e=this.getInternal().fullSize.viewH-this.sizes.hMargin,t=this.getInternal().fullSize.viewW-this.sizes.wMargin;this.sizes.minW&&this.sizes.minW>this.sizes.w&&(this.sizes.w=this.sizes.minW),this.sizes.minH&&this.sizes.minH>this.sizes.h&&(this.sizes.h=this.sizes.minH),(this.sizes.h>e||this.sizes.w>t)&&(this.sizes.h=Math.min(this.sizes.h,e),this.sizes.w=Math.min(this.sizes.w,t)),this._callFilters("size")},getForNewLinks:function(e){var t;return!this.stack||e&&!this.isStackable(e)?(t=l.extend({},this))._nmOpener=this:((t=l.extend(!0,{},this))._nmOpener=r,t.elts.all=r),t.filters=[],t.opener=r,t._open=!1,t},isStackable:function(e){return!e.is(this.nonStackable)},keyHandle:function(e){this.keyEvent=e,this._callFilters("keyHandle"),this.keyEvent=r,delete this.keyEvent},getInternal:function(){return d},_close:function(){this.getInternal()._removeStack(this.opener),this._opened=!1,this._open=!1,this._callFilters("close")},close:function(){this._close(),this._callFilters("beforeClose");var e=this;this._unreposition(),e._callAnim("hideCont",function(){e._callAnim("hideLoad",function(){e._callAnim("hideBg",function(){e._callFilters("afterClose"),e.elts.cont.remove(),e.elts.hidden.remove(),e.elts.load.remove(),e.elts.bg.remove(),e.elts.all.remove(),e.elts.cont=e.elts.hidden=e.elts.load=e.elts.bg=e.elts.all=r})})})},destroy:function(){return!this._open&&(this._callFilters("destroy"),this.elts.all&&this.elts.all.remove(),!0)},_initElts:function(){!this.stack&&1<this.getInternal().stack.length&&(this.elts=this.getInternal().stack[this.getInternal().stack.length-2].nmObj.elts),this.elts.all&&0!=this.elts.all.closest("body").length||(this.elts.all=this.elts.bg=this.elts.cont=this.elts.hidden=this.elts.load=r),this.elts.all||(this.elts.all=l("<div />").appendTo(this.getInternal()._container)),this.elts.bg||(this.elts.bg=l("<div />").hide().appendTo(this.elts.all)),this.elts.cont||(this.elts.cont=l("<div />").hide().appendTo(this.elts.all)),this.elts.hidden||(this.elts.hidden=l("<div />").hide().appendTo(this.elts.all)),this.elts.hidden.empty(),this.elts.load||(this.elts.load=l("<div />").hide().appendTo(this.elts.all)),this._callFilters("initElts")},_error:function(e){this._callFilters("error",e)},_setCont:function(e,t){if(t){var i=[],n=0;e=e.replace(/\r\n/gi,"nyroModalLN").replace(/<script(.|\s)*?\/script>/gi,function(e){return i[n]=e,'<pre class=nyroModalScript rel="'+n+++'"></pre>'});var s=l("<div>"+e+"</div>").find(t);if(!s.length)return void this._error();e=s.html().replace(/<pre class="?nyroModalScript"? rel="?([0-9]*)"?><\/pre>/gi,function(e,t,n){return i[t]}).replace(/nyroModalLN/gi,"\r\n")}this.elts.hidden.append(this._filterScripts(e)).prepend(this.header).append(this.footer).wrapInner(l("<div />",{class:"nyroModal"+ucfirst(this.loadFilter)})),this.sizes.initW=this.sizes.w=this.elts.hidden.width(),this.sizes.initH=this.sizes.h=this.elts.hidden.height();var o=this.getInternal()._getOuter(this.elts.cont);this.sizes.hMargin=o.h.total,this.sizes.wMargin=o.w.total,this.size(),this.loading=!1,this._callFilters("filledContent"),this._contentLoading()},_filterScripts:function(e){if("string"!=typeof e)return e;this._scripts=[],this._scriptsShown=[];for(var t,n,i,s=0,o="<\/script>",r=o.length;-1<(t=e.indexOf("<script",s));)n=e.indexOf(o)+r,(i=l(e.substring(t,n))).attr("src")&&"forceLoad"!=i.attr("rel")||("shown"==i.attr("rev")?this._scriptsShown.push(i.get(0)):this._scripts.push(i.get(0))),e=e.substring(0,t)+e.substr(n),s=t;return e},_hasFilter:function(n){var i=!1;return l.each(this.filters,function(e,t){i=i||t==n}),i},_delFilter:function(t){this.filters=l.map(this.filters,function(e){if(e!=t)return e})},_callFilters:function(n,i){this.getInternal()._debug(n);var s=[],o=this;return l.each(this.filters,function(e,t){s[t]=o._callFilter(t,n,i)}),this.callbacks[n]&&l.isFunction(this.callbacks[n])&&this.callbacks[n](this,i),s},_callFilter:function(e,t,n){return f[e]&&f[e][t]&&l.isFunction(f[e][t])?f[e][t](this,n):r},_callAnim:function(e,t){if(this.getInternal()._debug(e),this._callFilters("before"+ucfirst(e)),!this._animated){if(this._animated=!0,l.isFunction(t)||(t=l.noop),this.anims[e]&&l.isFunction(this.anims[e]))curFct=this.anims[e];else{var n=this.anim[e]||this.anim.def||"basic";c[n]&&c[n][e]&&l.isFunction(c[n][e])||(n="basic"),curFct=c[n][e]}curFct(this,l.proxy(function(){this._animated=!1,this._callFilters("after"+ucfirst(e)),t()},this))}},_load:function(){this.getInternal()._debug("_load"),!this.loading&&this.loadFilter&&(this.loading=!0,this._callFilter(this.loadFilter,"load"))},_contentLoading:function(){if(!this._animated&&this._bgReady)if(!this._transition&&0<this.elts.cont.html().length&&(this._transition=!0),this._nbContentLoading++,this.loading){if(1==this._nbContentLoading){var e=this.getInternal()._getOuter(this.elts.load);this.elts.load.css({position:"fixed",top:(this.getInternal().fullSize.viewH-this.elts.load.height()-e.h.margin)/2,left:(this.getInternal().fullSize.viewW-this.elts.load.width()-e.w.margin)/2}),this._transition?(this._unreposition(),this._callAnim("showTrans",l.proxy(function(){this._contentLoading()},this))):this._callAnim("showLoad",l.proxy(function(){this._contentLoading()},this))}}else if(!this._opened)if(this._opened=!0,this._transition){var t=l.proxy(function(){this._writeContent(),this._callFilters("beforeShowCont"),this._callAnim("hideTrans",l.proxy(function(){this._transition=!1,this._callFilters("afterShowCont"),this.elts.cont.append(this._scriptsShown),this._reposition(),this.elts.cont.scrollTop(0)},this))},this);1==this._nbContentLoading?(this._unreposition(),this._callAnim("showTrans",t)):t()}else this._callAnim("hideLoad",l.proxy(function(){this._writeContent(),this._callAnim("showCont",l.proxy(function(){this.elts.cont.append(this._scriptsShown),this._reposition(),this.elts.cont.scrollTop(0)},this))},this))},_writeContent:function(){this.elts.cont.empty().append(this.elts.hidden.contents()).append(this._scripts).append(this.showCloseButton?this.closeButton:"").css({position:"fixed",width:this.sizes.w,height:this.sizes.h,top:(this.getInternal().fullSize.viewH-this.sizes.h-this.sizes.hMargin)/2,left:(this.getInternal().fullSize.viewW-this.sizes.w-this.sizes.wMargin)/2})},_reposition:function(){var e=this.elts.cont.find(".nmReposition");if(e.length){var n=this.getInternal()._getSpaceReposition();e.each(function(){var e=l(this),t=e.offset();e.css({position:"fixed",top:t.top-n.top,left:t.left-n.left})}),this.elts.cont.after(e)}this.elts.cont.css("overflow","auto"),this._callFilters("afterReposition")},_unreposition:function(){this.elts.cont.css("overflow","");var e=this.elts.all.find(".nmReposition");e.length&&this.elts.cont.append(e.removeAttr("style")),this._callFilters("afterUnreposition")}},d={firstInit:!0,debug:!1,stack:[],fullSize:{w:0,h:0,wW:0,wH:0,viewW:0,viewH:0},nyroModal:function(e,t){return d.firstInit&&(d._container=l("<div />").appendTo(o),i.smartresize(l.proxy(d._resize,d)),s.on("keydown.nyroModal",l.proxy(d._keyHandler,d)),d._calculateFullSize(),d.firstInit=!1),this.nmInit(e,t).each(function(){d._init(l(this).data("nmObj"))})},nmInit:function(t,n){return this.each(function(){var e=l(this);n?e.data("nmObj",l.extend(!0,{opener:e},t)):e.data("nmObj",e.data("nmObj")?l.extend(!0,e.data("nmObj"),t):l.extend(!0,{opener:e},h,t))})},nmDestroy:function(){return this.each(function(){var e=l(this);e.data("nmObj")&&e.data("nmObj").destroy()&&e.removeData("nmObj")})},nmCall:function(){return this.trigger("nyroModal")},nmManual:function(e,t){l("<a />",{href:e}).nyroModal(t).trigger("nyroModal")},nmData:function(e,t){this.nmManual("#",l.extend({data:e},t))},nmObj:function(e){l.extend(!0,h,e)},nmInternal:function(e){l.extend(!0,d,e)},nmAnims:function(e){l.extend(!0,c,e)},nmFilters:function(e){l.extend(!0,f,e)},nmTop:function(){return d.stack.length?d.stack[d.stack.length-1].nmObj:r},_debug:function(e){this.debug&&window.console&&window.console.log&&window.console.log(e)},_container:r,_init:function(n){n.filters=[],l.each(f,function(e,t){t.is&&l.isFunction(t.is)&&t.is(n)&&n.filters.push(e)}),n._callFilters("initFilters"),n._callFilters("init"),n.opener.off("nyroModal.nyroModal nmClose.nyroModal nmResize.nyroModal").on({"nyroModal.nyroModal":function(){return n.open(),!1},"nmClose.nyroModal":function(){return n.close(),!1},"nmResize.nyroModal":function(){return n.resize(),!1}})},_selNyroModal:function(e){return!!l(e).data("nmObj")},_selNyroModalOpen:function(e){var t=l(e);return!!t.data("nmObj")&&t.data("nmObj")._open},_keyHandler:function(e){var t=l.nmTop();if(t&&t.useKeyHandler)return t.keyHandle(e)},_pushStack:function(t){this.stack=l.map(this.stack,function(e){if(e.nmOpener!=t.get(0))return e}),this.stack.push({nmOpener:t.get(0),nmObj:l(t).data("nmObj")})},_removeStack:function(t){this.stack=l.map(this.stack,function(e){if(e.nmOpener!=t.get(0))return e})},_resize:function(){var e=l(":nmOpen").each(function(){l(this).data("nmObj")._unreposition()});this._calculateFullSize(),e.trigger("nmResize")},_calculateFullSize:function(){this.fullSize={w:s.width(),h:s.height(),wW:i.width(),wH:i.height()},this.fullSize.viewW=Math.min(this.fullSize.w,this.fullSize.wW),this.fullSize.viewH=Math.min(this.fullSize.h,this.fullSize.wH)},_getCurCSS:function(e,t){var n=parseInt(l.css(e,t,!0));return isNaN(n)?0:n},_getOuter:function(e){e=e.get(0);var t={h:{margin:this._getCurCSS(e,"marginTop")+this._getCurCSS(e,"marginBottom"),border:this._getCurCSS(e,"borderTopWidth")+this._getCurCSS(e,"borderBottomWidth"),padding:this._getCurCSS(e,"paddingTop")+this._getCurCSS(e,"paddingBottom")},w:{margin:this._getCurCSS(e,"marginLeft")+this._getCurCSS(e,"marginRight"),border:this._getCurCSS(e,"borderLeftWidth")+this._getCurCSS(e,"borderRightWidth"),padding:this._getCurCSS(e,"paddingLeft")+this._getCurCSS(e,"paddingRight")}};return t.h.outer=t.h.margin+t.h.border,t.w.outer=t.w.margin+t.w.border,t.h.inner=t.h.padding+t.h.border,t.w.inner=t.w.padding+t.w.border,t.h.total=t.h.outer+t.h.padding,t.w.total=t.w.outer+t.w.padding,t},_getSpaceReposition:function(){var e=this._getOuter(o),t=n.msie&&n.version<8&&!(screen.height<=i.height()+23);return{top:i.scrollTop()-(t?0:e.h.border/2),left:i.scrollLeft()-(t?0:e.w.border/2)}},_getHash:function(e){if("string"==typeof e){var t=e.indexOf("#");if(-1<t)return e.substring(t)}return""},_extractUrl:function(e){var t={url:r,sel:r};if(e){var n=this._getHash(e),i=this._getHash(window.location.href),s=window.location.href.substring(0,window.location.href.length-i.length),o=e.substring(0,e.length-n.length);t.sel=n,o!=s&&o!=a&&(t.url=o)}return t}},c={basic:{showBg:function(e,t){e.elts.bg.css({opacity:.7}).show(),t()},hideBg:function(e,t){e.elts.bg.hide(),t()},showLoad:function(e,t){e.elts.load.show(),t()},hideLoad:function(e,t){e.elts.load.hide(),t()},showCont:function(e,t){e.elts.cont.show(),t()},hideCont:function(e,t){e.elts.cont.hide(),t()},showTrans:function(e,t){e.elts.cont.hide(),e.elts.load.show(),t()},hideTrans:function(e,t){e.elts.cont.show(),e.elts.load.hide(),t()},resize:function(e,t){e.elts.cont.css({width:e.sizes.w,height:e.sizes.h,top:(e.getInternal().fullSize.viewH-e.sizes.h-e.sizes.hMargin)/2,left:(e.getInternal().fullSize.viewW-e.sizes.w-e.sizes.wMargin)/2}),t()}}},f={basic:{is:function(e){return!0},init:function(e){"modal"==e.opener.attr("rev")&&(e.modal=!0),e.modal&&(e.closeOnEscape=e.closeOnClick=e.showCloseButton=!1),e.closeOnEscape&&(e.useKeyHandler=!0)},initElts:function(t){t.elts.bg.addClass("nyroModalBg"),t.closeOnClick&&t.elts.bg.off("click.nyroModal").on("click.nyroModal",function(e){e.preventDefault(),t.close()}),t.elts.cont.addClass("nyroModalCont"),t.elts.hidden.addClass("nyroModalCont nyroModalHidden"),t.elts.load.addClass("nyroModalCont nyroModalLoad")},error:function(e){e.elts.hidden.addClass("nyroModalError"),e.elts.cont.addClass("nyroModalError"),e._setCont(e.errorMsg)},beforeShowCont:function(t){t.elts.cont.find(".nyroModal").each(function(){var e=l(this);e.nyroModal(t.getForNewLinks(e),!0)}).end().find(".nyroModalClose").on("click.nyroModal",function(e){e.preventDefault(),t.close()})},keyHandle:function(e){27==e.keyEvent.keyCode&&e.closeOnEscape&&(e.keyEvent.preventDefault(),e.close())}},custom:{is:function(e){return!0}}};l.fn.extend({nm:d.nyroModal,nyroModal:d.nyroModal,nmInit:d.nmInit,nmDestroy:d.nmDestroy,nmCall:d.nmCall}),l.extend({nmManual:d.nmManual,nmData:d.nmData,nmObj:d.nmObj,nmInternal:d.nmInternal,nmAnims:d.nmAnims,nmFilters:d.nmFilters,nmTop:d.nmTop}),l.expr[":"].nyroModal=l.expr[":"].nm=d._selNyroModal,l.expr[":"].nmOpen=d._selNyroModalOpen}),function(e,t){jQuery.fn[t]=function(e){return e?this.on("resize",(n=e,function(){var e=this,t=arguments;o?clearTimeout(o):s&&n.apply(e,t),o=setTimeout(function(){s||n.apply(e,t),o=null},i||100)})):this.trigger(t);var n,i,s,o}}(jQuery,"smartresize"),jQuery(function(e,t){e.nmAnims({fade:{showBg:function(e,t){e.elts.bg.fadeTo(250,.7,t)},hideBg:function(e,t){e.elts.bg.fadeOut(t)},showLoad:function(e,t){e.elts.load.fadeIn(t)},hideLoad:function(e,t){e.elts.load.fadeOut(t)},showCont:function(e,t){e.elts.cont.fadeIn(t)},hideCont:function(e,t){e.elts.cont.css("overflow","hidden").fadeOut(t)},showTrans:function(e,t){e.elts.load.css({position:e.elts.cont.css("position"),top:e.elts.cont.css("top"),left:e.elts.cont.css("left"),width:e.elts.cont.css("width"),height:e.elts.cont.css("height"),marginTop:e.elts.cont.css("marginTop"),marginLeft:e.elts.cont.css("marginLeft")}).fadeIn(function(){e.elts.cont.hide(),t()})},hideTrans:function(e,t){e.elts.cont.css("visibility","hidden").show(),e.elts.load.css("position",e.elts.cont.css("position")).animate({top:e.elts.cont.css("top"),left:e.elts.cont.css("left"),width:e.elts.cont.css("width"),height:e.elts.cont.css("height"),marginTop:e.elts.cont.css("marginTop"),marginLeft:e.elts.cont.css("marginLeft")},function(){e.elts.cont.css("visibility",""),e.elts.load.fadeOut(t)})},resize:function(e,t){e.elts.cont.animate({width:e.sizes.w,height:e.sizes.h,top:(e.getInternal().fullSize.viewH-e.sizes.h-e.sizes.hMargin)/2,left:(e.getInternal().fullSize.viewW-e.sizes.w-e.sizes.wMargin)/2},t)}}}),e.nmObj({anim:{def:"fade"}})}),jQuery(function(t,n){t.nmFilters({title:{is:function(e){return e.opener.is("[title]")},beforeShowCont:function(e){e.elts.cont.offset();e.store.title=t("<h1 />",{text:e.opener.attr("title")}).addClass("nyroModalTitle nmReposition"),e.elts.cont.prepend(e.store.title)},close:function(e){e.store.title&&(e.store.title.remove(),e.store.title=n,delete e.store.title)}}})}),jQuery(function(o,i){o.nmFilters({gallery:{is:function(e){var t=e.opener.is("[rel]:not([rel=external], [rel=nofollow])");if(t){var n=e.opener.attr("rel"),i=n.indexOf(" "),s=0<i?n.substr(0,i):n;o('[href][rel="'+s+'"], [href][rel^="'+s+' "]').length<2&&(t=!1),t&&e.galleryCounts&&!e._hasFilter("title")&&e.filters.push("title")}return t},init:function(e){e.useKeyHandler=!0},keyHandle:function(e){!e._animated&&e._opened&&(39==e.keyEvent.keyCode||40==e.keyEvent.keyCode?(e.keyEvent.preventDefault(),e._callFilters("galleryNext")):37!=e.keyEvent.keyCode&&38!=e.keyEvent.keyCode||(e.keyEvent.preventDefault(),e._callFilters("galleryPrev")))},initElts:function(e){var t=e.opener.attr("rel"),n=t.indexOf(" ");e.store.gallery=0<n?t.substr(0,n):t,e.store.galleryLinks=o('[href][rel="'+e.store.gallery+'"], [href][rel^="'+e.store.gallery+' "]'),e.store.galleryIndex=e.store.galleryLinks.index(e.opener)},beforeShowCont:function(e){if(e.galleryCounts&&e.store.title&&e.store.galleryLinks&&1<e.store.galleryLinks.length){var t=e.store.title.html();e.store.title.html((t.length?t+" - ":"")+(e.store.galleryIndex+1)+"/"+e.store.galleryLinks.length)}},filledContent:function(t){var e=this._getGalleryLink(t,-1),n=t.elts.hidden.find(" > div");e&&o("<a />",{text:"previous",href:"#"}).addClass("nyroModalPrev").on("click",function(e){e.preventDefault(),t._callFilters("galleryPrev")}).appendTo(n),(e=this._getGalleryLink(t,1))&&o("<a />",{text:"next",href:"#"}).addClass("nyroModalNext").on("click",function(e){e.preventDefault(),t._callFilters("galleryNext")}).appendTo(n)},close:function(e){e.store.gallery=i,e.store.galleryLinks=i,e.store.galleryIndex=i,delete e.store.gallery,delete e.store.galleryLinks,delete e.store.galleryIndex,e.elts.cont&&e.elts.cont.find(".nyroModalNext, .nyroModalPrev").remove()},galleryNext:function(e){this._getGalleryLink(e,1).nyroModal(e.getForNewLinks(),!0).click()},galleryPrev:function(e){this._getGalleryLink(e,-1).nyroModal(e.getForNewLinks(),!0).click()},_getGalleryLink:function(e,t){if(e.store.gallery){e.ltr||(t*=-1);var n=e.store.galleryIndex+t;if(e.store.galleryLinks&&0<=n&&n<e.store.galleryLinks.length)return e.store.galleryLinks.eq(n);if(e.galleryLoop&&e.store.galleryLinks)return e.store.galleryLinks.eq(n<0?e.store.galleryLinks.length-1:0)}return i}}})}),jQuery(function(e,n){e.nmFilters({link:{is:function(e){var t=e.opener.is("[href]");return t&&(e.store.link=e.getInternal()._extractUrl(e.opener.attr("href"))),t},init:function(t){t.loadFilter="link",t.opener.off("click.nyroModal").on("click.nyroModal",function(e){e.preventDefault(),t.opener.trigger("nyroModal")})},load:function(t){e.ajax(e.extend(!0,{},t.ajax||{},{url:t.store.link.url,data:t.store.link.sel?[{name:t.selIndicator,value:t.store.link.sel.substring(1)}]:n,success:function(e){t._setCont(e,t.store.link.sel)},error:function(e){t._error(e)}}))},destroy:function(e){e.opener.off("click.nyroModal")}}})}),jQuery(function(t,e){t.nmFilters({dom:{is:function(e){return e._hasFilter("link")&&!e.store.link.url&&e.store.link.sel},init:function(e){e.loadFilter="dom"},load:function(e){e.store.domEl=t(e.store.link.sel),e.store.domEl.length?e._setCont(e.domCopy?e.store.domEl.html():e.store.domEl.contents()):e._error()},close:function(e){!e.domCopy&&e.store.domEl&&e.elts.cont&&e.store.domEl.append(e.elts.cont.find(".nyroModalDom").contents())}}})}),jQuery(function(e,t){e.nmFilters({data:{is:function(e){var t=!!e.data;return t&&e._delFilter("dom"),t},init:function(e){e.loadFilter="data"},load:function(e){e._setCont(e.data)}}})}),jQuery(function(n,e){n.nmFilters({image:{is:function(e){return new RegExp(e.imageRegex,"i").test(e.opener.attr("href"))},init:function(e){e.loadFilter="image"},load:function(e){var t=e.opener.attr("href");n("<img />").load(function(){e.elts.cont.addClass("nyroModalImg"),e.elts.hidden.addClass("nyroModalImg"),e._setCont(this)}).error(function(){e._error()}).attr("src",t)},size:function(e){if(e.sizes.w!=e.sizes.initW||e.sizes.h!=e.sizes.initH){var t=Math.min(e.sizes.w/e.sizes.initW,e.sizes.h/e.sizes.initH);e.sizes.w=e.sizes.initW*t,e.sizes.h=e.sizes.initH*t}(e.loading?e.elts.hidden.find("img"):e.elts.cont.find("img")).attr({width:e.sizes.w,height:e.sizes.h})},close:function(e){e.elts.cont&&(e.elts.cont.removeClass("nyroModalImg"),e.elts.hidden.removeClass("nyroModalImg"))}}})}),jQuery(function(s,e){s.nmFilters({swf:{idCounter:1,is:function(e){return e._hasFilter("link")&&e.opener.is('[href\$=".swf"]')},init:function(e){e.loadFilter="swf"},load:function(e){e.swfObjectId||(e.swfObjectId="nyroModalSwf-"+this.idCounter++);var t=e.store.link.url,n='<div><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="'+e.swfObjectId+'" width="'+e.sizes.w+'" height="'+e.sizes.h+'"><param name="movie" value="'+t+'"></param>',i="";s.each(e.swf,function(e,t){n+='<param name="'+e+'" value="'+t+'"></param>',i+=" "+e+'="'+t+'"'}),n+='<embed src="'+t+'" type="application/x-shockwave-flash" width="'+e.sizes.w+'" height="'+e.sizes.h+'"'+i+"></embed></object></div>",e._setCont(n)}}})}),jQuery(function(e,i){e.nmFilters({form:{is:function(e){var t=e.opener.is("form");return t&&(e.store.form=e.getInternal()._extractUrl(e.opener.attr("action"))),t},init:function(t){t.loadFilter="form",t.opener.off("submit.nyroModal").on("submit.nyroModal",function(e){e.preventDefault(),t.opener.trigger("nyroModal")})},load:function(t){var n={};e.map(t.opener.serializeArray(),function(e){n[e.name]=e.value}),t.store.form.sel&&(n[t.selIndicator]=t.store.form.sel.substring(1)),e.ajax(e.extend(!0,{type:"get",dataType:"text"},t.ajax||{},{url:t.store.form.url,data:n,type:t.opener.attr("method")?t.opener.attr("method"):i,success:function(e){t._setCont(e,t.store.form.sel)},error:function(e){t._error(e)}}))},destroy:function(e){e.opener.off("submit.nyroModal")}}})}),jQuery(function(t,n){t.nmFilters({formFile:{is:function(e){var t=e.opener.is('form[enctype="multipart/form-data"]');return t&&(e._delFilter("form"),e.store.form||(e.store.form=e.getInternal()._extractUrl(e.opener.attr("action")))),t},init:function(t){t.loadFilter="formFile",t.store.formFileLoading=!1,t.opener.off("submit.nyroModal").on("submit.nyroModal",function(e){t.store.formFileIframe?t.store.formFileLoading=!0:(e.preventDefault(),t.opener.trigger("nyroModal"))})},initElts:function(i){var e;function s(){e&&(e.remove(),e=n,delete e),i.store.formFileIframe.attr("src","about:blank").remove(),i.store.formFileIframe=n,delete i.store.formFileIframe}i.store.form.sel&&(e=t('<input type="hidden" />',{name:i.selIndicator,value:i.store.form.sel.substring(1)}).appendTo(i.opener)),i.store.formFileIframe=t("<iframe />").attr({name:"nyroModalFormFile",src:"javascript:'';",id:"nyromodal-iframe-"+(new Date).getTime(),frameborder:"0"}).hide().load(function(){if(i.store.formFileLoading){i.store.formFileLoading=!1;var e=i.store.formFileIframe.off("load error").contents().find("body").not("script[src]");if(e&&e.html()&&e.html().length)s(),i._setCont(e.html(),i.store.form.sel);else{var t=0,n=function(){t++;var e=i.store.formFileIframe.off("load error").contents().find("body").not("script[src]");e&&e.html()&&e.html().length?(i._setCont(e.html(),i.store.form.sel),s()):t<5?setTimeout(n,25):(s(),i._error())};setTimeout(n,25)}}}).on("error",function(){s(),i._error()}),i.elts.all.append(i.store.formFileIframe),i.opener.attr("target","nyroModalFormFile").submit()},close:function(e){e.store.formFileLoading=!1,e.store.formFileIframe&&(e.store.formFileIframe.remove(),e.store.formFileIframe=n,delete e.store.formFileIframe)},destroy:function(e){e.opener.off("submit.nyroModal")}}})}),jQuery(function(t,n){t.nmFilters({iframe:{is:function(e){var t=e.opener.attr("target")||"",n=e.opener.attr("rel")||"",i=e.opener.get(0);return!e._hasFilter("image")&&("_blank"==t.toLowerCase()||-1<n.toLowerCase().indexOf("external")||i.hostname&&i.hostname.replace(/:\d*\$/,"")!=window.location.hostname.replace(/:\d*\$/,""))},init:function(e){e.loadFilter="iframe"},load:function(e){e.store.iframe=t("<iframe />").attr({src:"javascript:'';",id:"nyromodal-iframe-"+(new Date).getTime(),frameborder:"0"}),e._setCont(e.store.iframe)},afterShowCont:function(e){e.store.iframe.attr("src",e.opener.attr("href"))},close:function(e){e.store.iframe&&(e.store.iframe.remove(),e.store.iframe=n,delete e.store.iframe)}}})}),jQuery(function(t,n){t.nmFilters({iframeForm:{is:function(e){var t=e._hasFilter("iframe")&&e.opener.is("form");return t&&(e._delFilter("iframe"),e._delFilter("form")),t},init:function(t){t.loadFilter="iframeForm",t.store.iframeFormLoading=!1,t.store.iframeFormOrgTarget=t.opener.attr("target"),t.opener.off("submit.nyroModal").on("submit.nyroModal",function(e){t.store.iframeFormIframe?t.store.iframeFormLoading=!0:(e.preventDefault(),t.opener.trigger("nyroModal"))})},load:function(e){e.store.iframeFormIframe=t("<iframe />").attr({name:"nyroModalIframeForm",src:"javascript:'';",id:"nyromodal-iframe-"+(new Date).getTime(),frameborder:"0"}),e._setCont(e.store.iframeFormIframe)},afterShowCont:function(e){e.opener.attr("target","nyroModalIframeForm").submit()},close:function(e){e.store.iframeFormOrgTarget?e.opener.attr("target",e.store.iframeFormOrgTarget):e.opener.removeAttr("target"),delete e.store.formFileLoading,delete e.store.iframeFormOrgTarget,e.store.iframeFormIframe&&(e.store.iframeFormIframe.remove(),e.store.iframeFormIframe=n,delete e.store.iframeFormIframe)},destroy:function(e){e.opener.off("submit.nyroModal")}}})}),jQuery(function(n,e){n.nmObj({embedlyUrl:"http://api.embed.ly/1/oembed",embedly:{key:e,wmode:"transparent",allowscripts:!0,format:"json"}});var i=[];n.nmFilters({embedly:{is:function(t){if(t._hasFilter("link")&&t._hasFilter("iframe")&&t.opener.attr("href")&&t.embedly.key){if(i[t.opener.attr("href")])return t.store.embedly=i[t.opener.attr("href")],t._delFilter("iframe"),!0;t.store.embedly=!1;var e=t.embedly;e.url=t.opener.attr("href"),n.ajax({url:t.embedlyUrl,dataType:"jsonp",data:e,success:function(e){"error"!=e.type&&e.html&&(t.store.embedly=e,i[t.opener.attr("href")]=e,t._delFilter("iframe"),t.filters.push("embedly"),t._callFilters("initFilters"),t._callFilters("init"))}})}return!1},init:function(e){e.loadFilter="embedly"},load:function(e){"photo"==e.store.embedly.type?(e.filters.push("image"),n("<img />").load(function(){e.elts.cont.addClass("nyroModalImg"),e.elts.hidden.addClass("nyroModalImg"),e._setCont(this)}).on("error",function(){e._error()}).attr("src",e.store.embedly.url)):e._setCont("<div>"+e.store.embedly.html+"</div>")},size:function(e){e.store.embedly.width&&!e.sizes.height&&(e.sizes.w=e.store.embedly.width,e.sizes.h=e.store.embedly.height)}}})}); \$(function() { \$('.nyroModal').nyroModal( ); }); !function(e){e.fn.niceSelect=function(t){function s(t){t.after(e("<div></div>").addClass("nice-select").addClass(t.attr("class")||"").addClass(t.attr("disabled")?"disabled":"").attr("tabindex",t.attr("disabled")?null:"0").html('<span class="current"></span><ul class="list"></ul>'));var s=t.next(),n=t.find("option"),i=t.find("option:selected");s.find(".current").html(i.data("display")||i.text()),n.each(function(t){var n=e(this),i=n.data("display");s.find("ul").append(e("<li></li>").attr("data-value",n.val()).attr("data-display",i||null).addClass("option"+(n.is(":selected")?" selected":"")+(n.is(":disabled")?" disabled":"")).html(n.text()))})}if("string"==typeof t)return"update"==t?this.each(function(){var t=e(this),n=e(this).next(".nice-select"),i=n.hasClass("open");n.length&&(n.remove(),s(t),i&&t.next().trigger("click"))}):"destroy"==t?(this.each(function(){var t=e(this),s=e(this).next(".nice-select");s.length&&(s.remove(),t.css("display",""))}),0==e(".nice-select").length&&e(document).off(".nice_select")):console.log('Method "'+t+'" does not exist.'),this;this.hide(),this.each(function(){var t=e(this);t.next().hasClass("nice-select")||s(t)}),e(document).off(".nice_select"),e(document).on("click.nice_select",".nice-select",function(t){var s=e(this);e(".nice-select").not(s).removeClass("open"),s.toggleClass("open"),s.hasClass("open")?(s.find(".option"),s.find(".focus").removeClass("focus"),s.find(".selected").addClass("focus")):s.focus()}),e(document).on("click.nice_select",function(t){0===e(t.target).closest(".nice-select").length&&e(".nice-select").removeClass("open").find(".option")}),e(document).on("click.nice_select",".nice-select .option:not(.disabled)",function(t){var s=e(this),n=s.closest(".nice-select");n.find(".selected").removeClass("selected"),s.addClass("selected");var i=s.data("display")||s.text();n.find(".current").text(i),n.prev("select").val(s.data("value")).trigger("change")}),e(document).on("keydown.nice_select",".nice-select",function(t){var s=e(this),n=e(s.find(".focus")||s.find(".list .option.selected"));if(32==t.keyCode||13==t.keyCode)return s.hasClass("open")?n.trigger("click"):s.trigger("click"),!1;if(40==t.keyCode){if(s.hasClass("open")){var i=n.nextAll(".option:not(.disabled)").first();i.length>0&&(s.find(".focus").removeClass("focus"),i.addClass("focus"))}else s.trigger("click");return!1}if(38==t.keyCode){if(s.hasClass("open")){var l=n.prevAll(".option:not(.disabled)").first();l.length>0&&(s.find(".focus").removeClass("focus"),l.addClass("focus"))}else s.trigger("click");return!1}if(27==t.keyCode)s.hasClass("open")&&s.trigger("click");else if(9==t.keyCode&&s.hasClass("open"))return!1});var n=document.createElement("a").style;return n.cssText="pointer-events:auto","auto"!==n.pointerEvents&&e("html").addClass("no-csspointerevents"),this}}(jQuery); !function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():t.SimpleLightbox=e()}(this,function(){function e(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];if(n)for(var i in n)n.hasOwnProperty(i)&&(t[i]=n[i])}return t}function i(t,e){t&&e&&(t.className+=" "+e)}function s(t,e){t&&e&&(t.className=t.className.replace(new RegExp("(\\s|^)"+e+"(\\s|\$)")," ").trim())}function o(t){var e=document.createElement("div");return e.innerHTML=t.trim(),e.childNodes[0]}function l(t,e){return(t.matches||t.matchesSelector||t.msMatchesSelector).call(t,e)}function r(t){this.init.apply(this,arguments)}return r.defaults={elementClass:"",elementLoadingClass:"slbLoading",htmlClass:"slbActive",closeBtnClass:"",nextBtnClass:"",prevBtnClass:"",loadingTextClass:"",closeBtnCaption:"Close",nextBtnCaption:"Next",prevBtnCaption:"Previous",loadingCaption:"Loading...",bindToItems:!0,closeOnOverlayClick:!0,closeOnEscapeKey:!0,nextOnImageClick:!0,showCaptions:!0,captionAttribute:"title",urlAttribute:"href",startAt:0,loadingTimeout:100,appendTarget:"body",beforeSetContent:null,beforeClose:null,afterClose:null,beforeDestroy:null,afterDestroy:null,videoRegex:new RegExp(/youtube.com|vimeo.com/)},e(r.prototype,{init:function(n){n=this.options=e({},r.defaults,n);var t,i=this;n.\$items&&(t=n.\$items.get()),n.elements&&(t=[].slice.call("string"==typeof n.elements?document.querySelectorAll(n.elements):n.elements)),this.eventRegistry={lightbox:[],thumbnails:[]},this.items=[],this.captions=[],t&&t.forEach(function(t,e){i.items.push(t.getAttribute(n.urlAttribute)),i.captions.push(t.getAttribute(n.captionAttribute)),n.bindToItems&&i.addEvent(t,"click",function(t){t.preventDefault(),i.showPosition(e)},"thumbnails")}),n.items&&(this.items=n.items),n.captions&&(this.captions=n.captions)},addEvent:function(t,e,n,i){return this.eventRegistry[i||"lightbox"].push({element:t,eventName:e,callback:n}),t.addEventListener(e,n),this},removeEvents:function(t){return this.eventRegistry[t].forEach(function(t){t.element.removeEventListener(t.eventName,t.callback)}),this.eventRegistry[t]=[],this},next:function(){return this.showPosition(this.currentPosition+1)},prev:function(){return this.showPosition(this.currentPosition-1)},normalizePosition:function(t){return t>=this.items.length?t=0:t<0&&(t=this.items.length-1),t},showPosition:function(t){var e=this.normalizePosition(t);return void 0!==this.currentPosition&&(this.direction=e>this.currentPosition?"next":"prev"),this.currentPosition=e,this.setupLightboxHtml().prepareItem(this.currentPosition,this.setContent).show()},loading:function(t){var e=this,n=this.options;t?this.loadingTimeout=setTimeout(function(){i(e.\$el,n.elementLoadingClass),e.\$content.innerHTML='<p class="slbLoadingText '+n.loadingTextClass+'">'+n.loadingCaption+"</p>",e.show()},n.loadingTimeout):(s(this.\$el,n.elementLoadingClass),clearTimeout(this.loadingTimeout))},prepareItem:function(t,e){var n=this,i=this.items[t];if(this.loading(!0),this.options.videoRegex.test(i))e.call(n,o('<div class="slbIframeCont"><iframe class="slbIframe" frameborder="0" allowfullscreen src="'+i+'"></iframe></div>'));else{var s=o('<div class="slbImageWrap"><img class="slbImage" src="'+i+'" /></div>');this.\$currentImage=s.querySelector(".slbImage"),this.options.showCaptions&&this.captions[t]&&s.appendChild(o('<div class="slbCaption">'+this.captions[t]+"</div>")),this.loadImage(i,function(){n.setImageDimensions(),e.call(n,s),n.loadImage(n.items[n.normalizePosition(n.currentPosition+1)])})}return this},loadImage:function(t,e){if(!this.options.videoRegex.test(t)){var n=new Image;e&&(n.onload=e),n.src=t}},setupLightboxHtml:function(){var t=this.options;return this.\$el||(this.\$el=o('<div class="slbElement '+t.elementClass+'"><div class="slbOverlay"></div><div class="slbWrapOuter"><div class="slbWrap"><div class="slbContentOuter"><div class="slbContent"></div><button type="button" title="'+t.closeBtnCaption+'" class="slbCloseBtn '+t.closeBtnClass+'">×</button>'+(1<this.items.length?'<div class="slbArrows"><button type="button" title="'+t.prevBtnCaption+'" class="prev slbArrow'+t.prevBtnClass+'">'+t.prevBtnCaption+'</button><button type="button" title="'+t.nextBtnCaption+'" class="next slbArrow'+t.nextBtnClass+'">'+t.nextBtnCaption+"</button></div>":"")+"</div></div></div></div>"),this.\$content=this.\$el.querySelector(".slbContent")),this.\$content.innerHTML="",this},show:function(){return this.modalInDom||(document.querySelector(this.options.appendTarget).appendChild(this.\$el),i(document.documentElement,this.options.htmlClass),this.setupLightboxEvents(),this.modalInDom=!0),this},setContent:function(t){var e="string"==typeof t?o(t):t;return this.loading(!1),this.setupLightboxHtml(),s(this.\$content,"slbDirectionNext"),s(this.\$content,"slbDirectionPrev"),this.direction&&i(this.\$content,"next"===this.direction?"slbDirectionNext":"slbDirectionPrev"),this.options.beforeSetContent&&this.options.beforeSetContent(e,this),this.\$content.appendChild(e),this},setImageDimensions:function(){this.\$currentImage&&(this.\$currentImage.style.maxHeight=("innerHeight"in window?window.innerHeight:document.documentElement.offsetHeight)+"px")},setupLightboxEvents:function(){var n=this;return this.eventRegistry.lightbox.length||this.addEvent(this.\$el,"click",function(t){var e=t.target;l(e,".slbCloseBtn")||n.options.closeOnOverlayClick&&l(e,".slbWrap")?n.close():l(e,".slbArrow")?l(e,".next")?n.next():n.prev():n.options.nextOnImageClick&&1<n.items.length&&l(e,".slbImage")&&n.next()}).addEvent(document,"keyup",function(t){n.options.closeOnEscapeKey&&27===t.keyCode&&n.close(),1<n.items.length&&((39===t.keyCode||68===t.keyCode)&&n.next(),(37===t.keyCode||65===t.keyCode)&&n.prev())}).addEvent(window,"resize",function(){n.setImageDimensions()}),this},close:function(){this.modalInDom&&(this.runHook("beforeClose"),this.removeEvents("lightbox"),this.\$el&&this.\$el.parentNode.removeChild(this.\$el),s(document.documentElement,this.options.htmlClass),this.modalInDom=!1,this.runHook("afterClose")),this.direction=void 0,this.currentPosition=this.options.startAt},destroy:function(){this.close(),this.runHook("beforeDestroy"),this.removeEvents("thumbnails"),this.runHook("afterDestroy")},runHook:function(t){this.options[t]&&this.options[t](this)}}),r.open=function(t){var e=new r(t);return t.content?e.setContent(t.content).show():e.showPosition(e.options.startAt)},r.registerAsJqueryPlugin=function(i){i.fn.simpleLightbox=function(t){var e,n=this;return this.each(function(){i.data(this,"simpleLightbox")||(e=e||new r(i.extend({},t,{\$items:n})),i.data(this,"simpleLightbox",e))})},i.SimpleLightbox=r},"undefined"!=typeof window&&window.jQuery&&r.registerAsJqueryPlugin(window.jQuery),r}); \$(document).ready(function () { var gallery = \$('.gallery a').simpleLightbox(); }); \$(function(){ \$('.form-select1').on('change', function () { var url = \$(this).val(); if (url) { window.location = url; } return false; }); }); \$(document).ready(function() { \$('.form-select1').niceSelect(); }); \$(window).load(function() { \$('.startdisplay').css('visibility', 'visible'); }); \$(document).ready(function(){ \$(".menumobile").hide(); \$(".topmenu").show(); \$('.topmenu').click(function(){ \$(".menumobile").slideToggle(0); }); \$(document).on('click', function (event) { if (!\$(event.target).closest('.navbar-nav').length) { \$(".menumobile").hide(); } }); }); JavaScript Q&A: Expert Answers to Common Questions Get expert answers to common JavaScript questions. Enhance your coding skills, troubleshoot errors, and level up your JavaScript knowledge effortlessly. Privacy Terms of Use Homepage Contact us RSS © 2023 Copyright JavaScript Q&A: Expert Answers to Common Questions !function(){function o(t,e){return function(){return t.apply(e,arguments)}}var u,c,i,s,n,y,t,l,v,r,a,p,e,h,w,b,f,g,d,m,k,S,q,L,x,P,T,R,j,O,E,M,A,C,N,_,F,U,W,X,D,H,I,z,G,B,J=[].slice,K={}.hasOwnProperty,Q=function(t,e){for(var n in e)K.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},V=[].indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return-1};function Y(){}for(g={className:"",catchupTime:100,initialRate:.03,minTime:250,ghostTime:100,maxProgressPerFrame:20,easeFactor:1.25,startOnPageLoad:!0,restartOnPushState:!0,restartOnRequestAfter:500,target:"body",elements:{checkInterval:100,selectors:["body"]},eventLag:{minSamples:10,sampleCount:3,lagThreshold:3},ajax:{trackMethods:["GET"],trackWebSockets:!0,ignoreURLs:[]}},P=function(){var t;return null!=(t="undefined"!=typeof performance&&null!==performance&&"function"==typeof performance.now?performance.now():void 0)?t:+new Date},R=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,f=window.cancelAnimationFrame||window.mozCancelAnimationFrame,p=function(t,e,n){if("function"==typeof t.addEventListener)return t.addEventListener(e,n,!1);var r;"function"!=typeof t["on"+e]||"object"!=typeof t["on"+e].eventListeners?(r=new s,"function"==typeof t["on"+e]&&r.on(e,t["on"+e]),t["on"+e]=function(t){return r.trigger(e,t)},t["on"+e].eventListeners=r):r=t["on"+e].eventListeners,r.on(e,n)},null==R&&(R=function(t){return setTimeout(t,50)},f=function(t){return clearTimeout(t)}),O=function(e){var n=P(),r=function(){var t=P()-n;return 33<=t?(n=P(),e(t,function(){return R(r)})):setTimeout(r,33-t)};return r()},j=function(){var t=arguments[0],e=arguments[1],n=3<=arguments.length?J.call(arguments,2):[];return"function"==typeof t[e]?t[e].apply(t,n):t[e]},d=function(){for(var t,e,n,r=arguments[0],s=2<=arguments.length?J.call(arguments,1):[],o=0,i=s.length;o<i;o++)if(e=s[o])for(t in e)K.call(e,t)&&(n=e[t],null!=r[t]&&"object"==typeof r[t]&&null!=n&&"object"==typeof n?d(r[t],n):r[t]=n);return r},h=function(t){for(var e,n,r=e=0,s=0,o=t.length;s<o;s++)n=t[s],r+=Math.abs(n),e++;return r/e},k=function(t,e){var n,r;if(null==t&&(t="options"),null==e&&(e=!0),r=document.querySelector("[data-pace-"+t+"]")){if(n=r.getAttribute("data-pace-"+t),!e)return n;try{return JSON.parse(n)}catch(t){return"undefined"!=typeof console&&null!==console?console.error("Error parsing inline pace options",t):void 0}}},Y.prototype.on=function(t,e,n,r){var s;return null==r&&(r=!1),null==this.bindings&&(this.bindings={}),null==(s=this.bindings)[t]&&(s[t]=[]),this.bindings[t].push({handler:e,ctx:n,once:r})},Y.prototype.once=function(t,e,n){return this.on(t,e,n,!0)},Y.prototype.off=function(t,e){var n,r,s;if(null!=(null!=(r=this.bindings)?r[t]:void 0)){if(null==e)return delete this.bindings[t];for(n=0,s=[];n<this.bindings[t].length;)this.bindings[t][n].handler===e?s.push(this.bindings[t].splice(n,1)):s.push(n++);return s}},Y.prototype.trigger=function(){var t,e,n,r,s,o,i=arguments[0],a=2<=arguments.length?J.call(arguments,1):[];if(null!=(r=this.bindings)&&r[i]){for(n=0,o=[];n<this.bindings[i].length;)e=(s=this.bindings[i][n]).handler,t=s.ctx,s=s.once,e.apply(null!=t?t:this,a),s?o.push(this.bindings[i].splice(n,1)):o.push(n++);return o}},B=Y,y=window.Pace||{},window.Pace=y,d(y,B.prototype),T=y.options=d({},g,window.paceOptions,k()),X=0,H=(z=["ajax","document","eventLag","elements"]).length;X<H;X++)!0===T[C=z[X]]&&(T[C]=g[C]);function Z(){return Z.__super__.constructor.apply(this,arguments)}function \$(){this.progress=0}function tt(){this.bindings={}}function et(){var e,o=this;et.__super__.constructor.apply(this,arguments),e=function(r){var s=r.open;return r.open=function(t,e,n){return A(t)&&o.trigger("request",{type:t,url:e,request:r}),s.apply(r,arguments)}},window.XMLHttpRequest=function(t){t=new W(t);return e(t),t};try{m(window.XMLHttpRequest,W)}catch(t){}if(null!=U){window.XDomainRequest=function(){var t=new U;return e(t),t};try{m(window.XDomainRequest,U)}catch(t){}}if(null!=F&&T.ajax.trackWebSockets){window.WebSocket=function(t,e){var n=null!=e?new F(t,e):new F(t);return A("socket")&&o.trigger("request",{type:"socket",url:t,protocols:e,request:n}),n};try{m(window.WebSocket,F)}catch(t){}}}function nt(){this.complete=o(this.complete,this);var t=this;this.elements=[],S().on("request",function(){return t.watch.apply(t,arguments)})}function rt(t){var e,n,r,s;for(null==t&&(t={}),this.complete=o(this.complete,this),this.elements=[],null==t.selectors&&(t.selectors=[]),n=0,r=(s=t.selectors).length;n<r;n++)e=s[n],this.elements.push(new i(e,this.complete))}function st(t,e){this.selector=t,this.completeCallback=e,this.progress=0,this.check()}function ot(){var t,e,n=this;this.progress=null!=(e=this.states[document.readyState])?e:100,t=document.onreadystatechange,document.onreadystatechange=function(){return null!=n.states[document.readyState]&&(n.progress=n.states[document.readyState]),"function"==typeof t?t.apply(null,arguments):void 0}}function it(t){this.source=t,this.last=this.sinceLastUpdate=0,this.rate=T.initialRate,this.catchup=0,this.progress=this.lastProgress=0,null!=this.source&&(this.progress=j(this.source,"progress"))}B=Error,Q(Z,B),n=Z,\$.prototype.getElement=function(){var t;if(null==this.el){if(!(t=document.querySelector(T.target)))throw new n;this.el=document.createElement("div"),this.el.className="pace pace-active",document.body.className=document.body.className.replace(/(pace-done )|/,"pace-running ");var e=""!==T.className?" "+T.className:"";this.el.innerHTML='<div class="pace-progress'+e+'">\n <div class="pace-progress-inner"></div>\n</div>\n<div class="pace-activity"></div>',null!=t.firstChild?t.insertBefore(this.el,t.firstChild):t.appendChild(this.el)}return this.el},\$.prototype.finish=function(){var t=this.getElement();return t.className=t.className.replace("pace-active","pace-inactive"),document.body.className=document.body.className.replace("pace-running ","pace-done ")},\$.prototype.update=function(t){return this.progress=t,y.trigger("progress",t),this.render()},\$.prototype.destroy=function(){try{this.getElement().parentNode.removeChild(this.getElement())}catch(t){n=t}return this.el=void 0},\$.prototype.render=function(){var t,e,n,r,s,o,i;if(null==document.querySelector(T.target))return!1;for(t=this.getElement(),r="translate3d("+this.progress+"%, 0, 0)",s=0,o=(i=["webkitTransform","msTransform","transform"]).length;s<o;s++)e=i[s],t.children[0].style[e]=r;return(!this.lastRenderedProgress||this.lastRenderedProgress|0!==this.progress|0)&&(t.children[0].setAttribute("data-progress-text",(0|this.progress)+"%"),100<=this.progress?n="99":(n=this.progress<10?"0":"",n+=0|this.progress),t.children[0].setAttribute("data-progress",""+n)),y.trigger("change",this.progress),this.lastRenderedProgress=this.progress},\$.prototype.done=function(){return 100<=this.progress},c=\$,tt.prototype.trigger=function(t,e){var n,r,s,o,i;if(null!=this.bindings[t]){for(i=[],r=0,s=(o=this.bindings[t]).length;r<s;r++)n=o[r],i.push(n.call(this,e));return i}},tt.prototype.on=function(t,e){var n;return null==(n=this.bindings)[t]&&(n[t]=[]),this.bindings[t].push(e)},s=tt,W=window.XMLHttpRequest,U=window.XDomainRequest,F=window.WebSocket,m=function(t,e){var n,r=[];for(n in e.prototype)try{null==t[n]&&"function"!=typeof e[n]?"function"==typeof Object.defineProperty?r.push(Object.defineProperty(t,n,{get:function(t){return function(){return e.prototype[t]}}(n),configurable:!0,enumerable:!0})):r.push(t[n]=e.prototype[n]):r.push(void 0)}catch(t){0}return r},L=[],y.ignore=function(){var t=arguments[0],e=2<=arguments.length?J.call(arguments,1):[];return L.unshift("ignore"),e=t.apply(null,e),L.shift(),e},y.track=function(){var t=arguments[0],e=2<=arguments.length?J.call(arguments,1):[];return L.unshift("track"),e=t.apply(null,e),L.shift(),e},A=function(t){if(null==t&&(t="GET"),"track"===L[0])return"force";if(!L.length&&T.ajax){if("socket"===t&&T.ajax.trackWebSockets)return!0;if(t=t.toUpperCase(),0<=V.call(T.ajax.trackMethods,t))return!0}return!1},Q(et,s),t=et,D=null,M=function(t){for(var e,n=T.ajax.ignoreURLs,r=0,s=n.length;r<s;r++)if("string"==typeof(e=n[r])){if(-1!==t.indexOf(e))return!0}else if(e.test(t))return!0;return!1},(S=function(){return D=null==D?new t:D})().on("request",function(t){var o,i=t.type,a=t.request,e=t.url;if(!M(e))return y.running||!1===T.restartOnRequestAfter&&"force"!==A(i)?void 0:(o=arguments,"boolean"==typeof(e=T.restartOnRequestAfter||0)&&(e=0),setTimeout(function(){var t,e,n,r,s="socket"===i?a.readyState<1:0<(s=a.readyState)&&s<4;if(s){for(y.restart(),r=[],t=0,e=(n=y.sources).length;t<e;t++){if((C=n[t])instanceof u){C.watch.apply(C,o);break}r.push(void 0)}return r}},e))}),nt.prototype.watch=function(t){var e=t.type,n=t.request,t=t.url;if(!M(t))return n=new("socket"===e?r:a)(n,this.complete),this.elements.push(n)},nt.prototype.complete=function(e){return this.elements=this.elements.filter(function(t){return t!==e})},u=nt,a=function(e,n){var t,r,s,o,i=this;if(this.progress=0,null!=window.ProgressEvent)for(p(e,"progress",function(t){return t.lengthComputable?i.progress=100*t.loaded/t.total:i.progress=i.progress+(100-i.progress)/2}),t=0,r=(o=["load","abort","timeout","error"]).length;t<r;t++)p(e,o[t],function(){return n(i),i.progress=100});else s=e.onreadystatechange,e.onreadystatechange=function(){var t;return 0===(t=e.readyState)||4===t?(n(i),i.progress=100):3===e.readyState&&(i.progress=50),"function"==typeof s?s.apply(null,arguments):void 0}},r=function(t,e){for(var n,r=this,s=this.progress=0,o=(n=["error","open"]).length;s<o;s++)p(t,n[s],function(){return e(r),r.progress=100})},rt.prototype.complete=function(e){return this.elements=this.elements.filter(function(t){return t!==e})},k=rt,st.prototype.check=function(){var t=this;return document.querySelector(this.selector)?this.done():setTimeout(function(){return t.check()},T.elements.checkInterval)},st.prototype.done=function(){return this.completeCallback(this),this.completeCallback=null,this.progress=100},i=st,ot.prototype.states={loading:0,interactive:50,complete:100},B=ot,Q=function(){var e,n,r,s,o,i=this;this.progress=0,o=[],s=0,r=P(),n=setInterval(function(){var t=P()-r-50;return r=P(),o.push(t),o.length>T.eventLag.sampleCount&&o.shift(),e=h(o),++s>=T.eventLag.minSamples&&e<T.eventLag.lagThreshold?(i.progress=100,clearInterval(n)):i.progress=3/(e+3)*100},50)},it.prototype.tick=function(t,e){return 100<=(e=null==e?j(this.source,"progress"):e)&&(this.done=!0),e===this.last?this.sinceLastUpdate+=t:(this.sinceLastUpdate&&(this.rate=(e-this.last)/this.sinceLastUpdate),this.catchup=(e-this.progress)/T.catchupTime,this.sinceLastUpdate=0,this.last=e),e>this.progress&&(this.progress+=this.catchup*t),e=1-Math.pow(this.progress/100,T.easeFactor),this.progress+=e*this.rate*t,this.progress=Math.min(this.lastProgress+T.maxProgressPerFrame,this.progress),this.progress=Math.max(0,this.progress),this.progress=Math.min(100,this.progress),this.lastProgress=this.progress,this.progress},v=it,b=e=_=w=E=N=null,y.running=!1,q=function(){if(T.restartOnPushState)return y.restart()},null!=window.history.pushState&&(I=window.history.pushState,window.history.pushState=function(){return q(),I.apply(window.history,arguments)}),null!=window.history.replaceState&&(G=window.history.replaceState,window.history.replaceState=function(){return q(),G.apply(window.history,arguments)}),l={ajax:u,elements:k,document:B,eventLag:Q},(x=function(){var t,e,n,r,s,o,i,a;for(y.sources=N=[],e=0,r=(o=["ajax","elements","document","eventLag"]).length;e<r;e++)!1!==T[t=o[e]]&&N.push(new l[t](T[t]));for(n=0,s=(a=null!=(i=T.extraSources)?i:[]).length;n<s;n++)C=a[n],N.push(new C(T));return y.bar=w=new c,E=[],_=new v})(),y.stop=function(){return y.trigger("stop"),y.running=!1,w.destroy(),b=!0,null!=e&&("function"==typeof f&&f(e),e=null),x()},y.restart=function(){return y.trigger("restart"),y.stop(),y.start()},y.go=function(){var m;return y.running=!0,w.render(),m=P(),b=!1,e=O(function(t,e){w.progress;for(var n,r,s,o,i,a,u,c,l,p,h=a=0,f=!0,g=u=0,d=N.length;u<d;g=++u)for(C=N[g],i=null!=E[g]?E[g]:E[g]=[],s=c=0,l=(r=null!=(p=C.elements)?p:[C]).length;c<l;s=++c)o=r[s],f&=(o=null!=i[s]?i[s]:i[s]=new v(o)).done,o.done||(h++,a+=o.tick(t));return n=a/h,w.update(_.tick(t,n)),w.done()||f||b?(w.update(100),y.trigger("done"),setTimeout(function(){return w.finish(),y.running=!1,y.trigger("hide")},Math.max(T.ghostTime,Math.max(T.minTime-(P()-m),0)))):e()})},y.start=function(t){d(T,t),y.running=!0;try{w.render()}catch(t){n=t}return document.querySelector(".pace")?(y.trigger("start"),y.go()):setTimeout(y.start,50)},"function"==typeof define&&define.amd?define(function(){return y}):"object"==typeof exports?module.exports=y:T.startOnPageLoad&&y.start()}.call(this); \$(window).scroll(function() { var offset = \$("body").offset().top + 600; if (\$(window).scrollTop() >= offset) { \$("#gototop").show("slow"); }else{ \$("#gototop").hide("slow"); } }); \$("#gototop").click(function(){ \$('html, body').animate({ scrollTop: 0 }, 'slow'); }); function showCookieBanner(){document.getElementById("cb-cookie-banner").style.display="block"}function hideCookieBanner(){localStorage.setItem("cb_isCookieAccepted","yes"),document.getElementById("cb-cookie-banner").style.display="none"}function initializeCookieBanner(){let e=localStorage.getItem("cb_isCookieAccepted");null===e&&(localStorage.setItem("cb_isCookieAccepted","no"),showCookieBanner()),"no"===e&&showCookieBanner()}window.onload=initializeCookieBanner(),window.cb_hideCookieBanner=hideCookieBanner; var _wau = _wau || []; _wau.push(["dynamic", "u5im502qx5", "di7", "c4302bffffff", "small"]); ```