PageSourceSearch

https://www.euroespa.com/template/js/init.combined.js?ver=1743110793

js euroespa.com collected 2026-10-04 11:01:54 UTC 66,568 bytes, 1,155 lines download raw bytes

1/*! jQuery Easing v1.3 */
2jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,f,a,h,g){return jQuery.easing[jQuery.easing.def](e,f,a,h,g)},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a},easeOutQuart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a}return -h/2*((f-=2)*f*f*f-2)+a},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeInSine:function(e,f,a,h,g){return -h*Math.cos(f/g*(Math.PI/2))+h+a},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a},easeInOutSine:function(e,f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeInCirc:function(e,f,a,h,g){return -h*(Math.sqrt(1-(f/=g)*f)-1)+a},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+a}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a},easeInElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return -(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e},easeOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return g*Math.pow(2,-10*h)*Math.sin((h*k-i)*(2*Math.PI)/j)+l+e},easeInOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k/2)==2){return e+l}if(!j){j=k*(0.3*1.5)}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}if(h<1){return -0.5*(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e}return g*Math.pow(2,-10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j)*0.5+l+e},easeInBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*(f/=h)*f*((g+1)*f-g)+a},easeOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*((f=f/h-1)*f*((g+1)*f+g)+1)+a},easeInOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}if((f/=h/2)<1){return i/2*(f*f*(((g*=(1.525))+1)*f-g))+a}return i/2*((f-=2)*f*(((g*=(1.525))+1)*f+g)+2)+a},easeInBounce:function(e,f,a,h,g){return h-jQuery.easing.easeOutBounce(e,g-f,0,h,g)+a},easeOutBounce:function(e,f,a,h,g){if((f/=g)<(1/2.75)){return h*(7.5625*f*f)+a}else{if(f<(2/2.75)){return h*(7.5625*(f-=(1.5/2.75))*f+0.75)+a}else{if(f<(2.5/2.75)){return h*(7.5625*(f-=(2.25/2.75))*f+0.9375)+a}else{return h*(7.5625*(f-=(2.625/2.75))*f+0.984375)+a}}}},easeInOutBounce:function(e,f,a,h,g){if(f<g/2){return jQuery.easing.easeInBounce(e,f*2,0,h,g)*0.5+a}return jQuery.easing.easeOutBounce(e,f*2-g,0,h,g)*0.5+h*0.5+a}});
3
4/*! jQuery Validation Plugin - v1.16.0 - 12/2/2016 */
5!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.settings.submitHandler&&(c.submitButton=b.target),a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return!c.settings.submitHandler||(c.submitButton&&(d=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),e=c.settings.submitHandler.call(c,c.currentForm,b),c.submitButton&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element
vendor: 12,786 bytes, line 5
5(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(null!=j&&null!=j.form){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(b,c){i[c]=f[c],delete f[c],"required"===c&&a(j).removeAttr("aria-required")}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g),a(j).attr("aria-required","true")),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}}),a.extend(a.expr.pseudos||a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){var c=a(b).val();return null!==c&&!!a.trim(""+c)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){!this.form&&this.hasAttribute("contenteditable")&&(this.form=a(this).closest("form")[0]);var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler),a(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)a[b]&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.hasAttribute("contenteditable")&&(this.form=a(this).closest("form")[0]),!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type;return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=b.hasAttribute("contenteditable")?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f=a(b).rules(),g=a.map(f,function(a,b){return b}).length,h=!1,i=this.elementValue(b);if("function"==typeof f.normalizer){if(i=f.normalizer.call(b,i),"string"!=typeof i)throw new TypeError("The normalizer should return a string value.");delete f.normalizer}for(d in f){e={method:d,parameters:f[d]};try{if(c=a.validator.methods[d].call(this,i,b,e.parameters),"dependency-mismatch"===c&&1===g){h=!0;continue}if(h=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(j){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",j),j instanceof TypeError&&(j.message+=".  Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),j}}if(!h)return this.objectLength(f)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(void 0!==arguments[a])return arguments[a]},defaultMessage:function(b,c){"string"==typeof c&&(c={method:c});var d=this.findDefined(this.customMessage(b.name,c.method),this.customDataMessage(b,c.method),!this.settings.ignoreTitle&&b.title||void 0,a.validator.messages[c.method],"<strong>Warning: No message defined for "+b.name+"</strong>"),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.n
5ame],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return a.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);
vendor: 5,900 bytes, line 5
5return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(d,e){b[d]=a.isFunction(e)&&"normalizer"!==d?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e<=d},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("val
5idate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var b,c={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)}),a});
6
7!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],n):n(e.jQuery)}(this,function(e){"use strict";function n(n){var t=this;if(1===arguments.length&&"function"==typeof n&&(n=[n]),!(n instanceof Array))throw new SyntaxError("isInViewport: Argument(s) passed to .do/.run should be a function or an array of functions");return n.forEach(function(n){"function"!=typeof n?(console.warn("isInViewport: Argument(s) passed to .do/.run should be a function or an array of functions"),console.warn("isInViewport: Ignoring non-function values in array and moving on")):[].slice.call(t).forEach(function(t){return n.call(e(t))})}),this}function t(n){var t=e("<div></div>").css({width:"100%"});n.append(t);var o=n.width()-t.width();return t.remove(),o}function o(n,r){var i=n.getBoundingClientRect(),a=i.top,u=i.bottom,c=i.left,f=i.right,s=e.extend({tolerance:0,viewport:window},r),d=!1,l=s.viewport.jquery?s.viewport:e(s.viewport);l.length||(console.warn("isInViewport: The viewport selector you have provided matches no element on page."),console.warn("isInViewport: Defaulting to viewport as window"),l=e(window));var p=l.height(),w=l.width(),h=l[0].toString();if(l[0]!==window&&"[object Window]"!==h&&"[object DOMWindow]"!==h){var v=l[0].getBoundingClientRect();a-=v.top,u-=v.top,c-=v.left,f-=v.left,o.scrollBarWidth=o.scrollBarWidth||t(l),w-=o.scrollBarWidth}return s.tolerance=~~Math.round(parseFloat(s.tolerance)),s.tolerance<0&&(s.tolerance=p+s.tolerance),f<=0||c>=w?d:d=s.tolerance?a<=s.tolerance&&u>=s.tolerance:u>0&&a<=p}function r(n){if(n){var t=n.split(",");return 1===t.length&&isNaN(t[0])&&(t[1]=t[0],t[0]=void 0),{tolerance:t[0]?t[0].trim():void 0,viewport:t[1]?e(t[1].trim()):void 0}}return{}}e=e&&e.hasOwnProperty("default")?e.default:e,/**
8 * @author  Mudit Ameta
9 * @license https://github.com/zeusdeux/isInViewport/blob/master/license.md MIT
10 */
11e.extend(e.expr.pseudos||e.expr[":"],{"in-viewport":e.expr.createPseudo?e.expr.createPseudo(function(e){return function(n){return o(n,r(e))}}):function(e,n,t){return o(e,r(t[3]))}}),e.fn.isInViewport=function(e){return this.filter(function(n,t){return o(t,e)})},e.fn.run=n});
12
13/*! Debounce */
14function debounce(n,u,x){var e;return function(){e&&clearTimeout(e),e=setTimeout(function(){n(),e=null},u||100)}}
15
16window.addEventListener('load', function () {
17
18	if ( typeof initCookieConsent !== 'function' )
19		return;
20
21	var cookieconsent = initCookieConsent();
22	cookieconsent.run({
23		autorun: true,
24		current_lang: document.documentElement.getAttribute('lang'),
25		autoclear_cookies: true,
26		page_scripts: true,
27		gui_options: {
28			consent_modal: {
29				layout: 'bar',               // box/cloud/bar
30				position: 'bottom center',     // bottom/middle/top + left/right/center
31				transition: 'slide',           // zoom/slide
32				swap_buttons: false            // enable to invert buttons
33			},
34			settings_modal: {
35				layout: 'box',                 // box/bar
36				// position: 'left',           // left/right
37				transition: 'slide'            // zoom/slide
38			}
39		},
40		languages: {
41			en: {
42				consent_modal: {
43					title: false,
44					description: 'This site uses cookies to offer you a better browsing experience and our services. Find out more on <a href="https://www.euroespa.com/cookie-policy/" target="_blank" aria-label="Cookie policy" class="cc-link">how we use cookies</a>.<a data-cc="c-settings" id="c-settings" class="vh">Show cookie settings</a>',
45					primary_btn: {
46						text: 'Accept',
47						role: 'accept_all'
48					},
49					secondary_btn: {
50						text: 'Deny',
51						role: 'accept_necessary'
52					}
53				},
54				settings_modal: {
55					title: 'Cookie preferences',
56					save_settings_btn: 'Save settings',
57					accept_all_btn: 'Accept all',
58					reject_all_btn: 'Reject all',
59					cookie_table_headers: [
60						{col1: 'Name'},
61						{col2: 'Domain'},
62						{col3: 'Expiration'},
63						{col4: 'Description'},
64						{col5: 'Type'}
65					],
66					blocks: [
67						{
68							title: 'Customize Consent Preference',
69							description: 'We use cookies to help you navigate efficiently and perform certain functions.'
70						}, {
71							title: 'Functional',
72							description: 'These cookies are essential for the proper functioning of my website. Without these cookies, the website would not work properly.',
73							toggle: {
74								value: 'necessary',
75								enabled: true,
76								readonly: true
77							},
78							cookie_table: [
79								{
80									col1: 'wfont',
81									col2: 'euroespa.com',
82									col3: '1 day',
83									col4: 'Font optimalization',
84									col5: 'Permanent cookie',
85									is_regex: true
86								}
87							]
88						}, {
89							title: 'Statistics',
90							description: 'Cookies of this kind are used to collect about the navigation path with the end goal to analyze the statistics in an aggregated manner to enhance the website.',
91							toggle: {
92								value: 'analytics',
93								enabled: false,
94								readonly: false
95							},
96							cookie_table: [
97								{
98									col1: '^_ga',
99									col2: 'google.com',
100									col3: '2 years',
101									col4: 'Google Analytics',
102									col5: 'Permanent cookie',
103									is_regex: true
104								},
105								{
106									col1: '_gid',
107									col2: 'google.com',
108									col3: '1 day',
109									col4: 'Google Analytics',
110									col5: 'Permanent cookie'
111								}
112							]
113						}, {
114							title: 'More information',
115							description: 'For any queries in relation to our policy on cookies and your choices, please <button class="cc-link" data-modal="contact-form" onclick="document.documentElement.classList.remove(\'show--settings\');">contact us</button>.<br><a href="https://www.euroespa.com/cookie-policy/" target="_blank" class="cc-link">Cookie Policy</a>&nbsp;&nbsp;&nbsp;<a href="https://www.euroespa.com/data-privacy-policy/" target="_blank" class="cc-link">Terms and Conditions</a>',
116						}
117					]
118				}
119			}
120		}
121	});
122	(function () {
123		let cc = document.querySelector('#c-bns');
124		if ( cc ) {
125			let rc = document.createElement('button');
126			rc.setAttribute('id','c-p-bnc');
127			rc.setAttribute('class','c-bn c_link');
128			rc.innerHTML = '&#x2715;';
129			rc.setAttribute('data-cc', 'accept-necessary');
130			rc.addEventListener('click', () => {
131				document.querySelector('#c-s-bn').click()
132			});
133
134			cc.insertAdjacentElement('afterend', rc);
135
136			let r = document.createElement('button');
137			r.setAttribute('id','c-p-bn');
138			r.setAttribute('class','c-bn c_link');
139			r.innerHTML = 'Show Preferences';
140			r.setAttribute('data-cc', 'c-settings');
141			r.addEventListener('click', () => {
142				document.querySelector('#c-settings').click()
143			});
144			let c = document.querySelector('#c-bns');
145			c.insertAdjacentElement('afterend', r);
146		}
147	})()
148
149});
150
151jQuery(document).ready(function($) {
152
153	var scrollTopP = 0;
154	$(window).on('load resize scroll', function() {
155
156        var scrollTop = $(window).scrollTop(),
157            mainSlider = $('.main-slider').innerHeight(),
158            headingHid = Math.max(0, ( 1 - ( scrollTop * 5 / 1000 ) ) );
159
160        if ( $('.main-slider').length > 0 ) {
161			if ( scrollTop < scrollTopP )
162				$('html').addClass('scroll-up');
163			else
164				$('html').removeClass('scroll-up');
165
166	        if ( scrollTop <= mainSlider ) {
167
168				$('.header__opacity').css({ opacity: headingHid });
169
170				if ( headingHid > 0)
171					$('html').removeClass('header--white');
172				else
173					$('html').addClass('header--white');
174
175				$('html').addClass('header--slider-section');
176
177			} else if ( $('.main-slider').length > 0 ) {
178				$('html').removeClass('header--slider header--slider-section');
179			}
180		}
181
182        var imgPos = scrollTop / 2 ;
183		$('.parallax-background').css({
184			"background-position" : "center -" + ( 90 + scrollTop ) + "px"
185		});
186
187		$('.parallax-half').css({
188			"transform" : "translate3d(0px, " + imgPos  + "px, .01px)",
189			"-webkit-transform" : "translate3d(0px, " + imgPos  + "px, .01px)"
190		});
191		$('.parallax-quarter').css({
192			"transform" : "translate3d(0px, " + imgPos / 2  + "px, .01px)",
193			"-webkit-transform" : "translate3d(0px, " + imgPos / 2  + "px, .01px)"
194		});
195		$('.parallax-opposite').css({
196			"transform" : "translate3d(0px, -" + imgPos / 4  + "px, .01px)",
197			"-webkit-transform" : "translate3d(0px, -" + imgPos / 4  + "px, .01px)"
198		});
199		$('.parallax').each(function() {
200
201			var height = $(this).outerHeight();
202			var offset = $(this).offset().top;
203			//var int    = 100 - ( $(window).height() / 10 );
204			//var percent = ( $(window).height() / 100 * int ) + 100;
205			var pixels = 500;
206			var calc  = offset + height - pixels;
207
208			if ( calc <= scrollTop ) {
209				var opacity = ( scrollTop - offset - pixels ) / 1000;
210				$(this).css("opacity", 1 - ( ( scrollTop - height - offset + pixels ) / pixels  ) );
211			} else {
212				$(this).css("opacity", 1 );
213			}
214		});
215
216		scrollTopP = scrollTop;
217
218	});
219
220    var PhotoSwipe = window.PhotoSwipe,
221        PhotoSwipeUI_Default = window.PhotoSwipeUI_Default;
222
223    $('body').on('click', 'a[data-width]:has(img)', function(e) {
224        if( !PhotoSwipe || !PhotoSwipeUI_Default ) {
225            return;
226        }
227        e.preventDefault();
228        openPhotoSwipe( false, this, false );
229    });
230
231    var parseThumbnailElements = function(link) {
232        var elements = $('body').find('a[data-width]:has(img)'),
233            galleryItems = [],
234            index;
235
236        elements.each(function(i) {
237            var element = $(this);
238
239            caption = element.attr('data-caption');
240
241            if( caption == null ) {
242                describedby = element.children().first().attr('aria-describedby');
243                if(describedby != null ) {
244                    description = $('#'+describedby);
245                    if( description != null) caption = description.text();
246                } else {
247                    describedby = element.children().first().attr('figcaption');
248                    if(describedby != null ) {
249                        caption = element.next().text();
250                    }
251                }
252            }
253
254            if( caption == null ) {
255                if( element.next().is('.wp-caption-text') ) {
256                    caption = element.next().text();
257                } else if( element.parent().next().is('.wp-caption-text') ) {
258                    caption = element.parent().next().text();
259                } else if( element.parent().next().is('.gallery-caption') ) {
260                    caption = element.parent().next().text();
261                } else if( element.next().is("figcaption") ) {
262                    caption = element.next().text();
263                } else {
264                    caption = element.attr('title');
265                }
266            }
267
268            galleryItems.push({
269                src: element.attr('href'),
270                w: element.attr('data-width'),
271                h: element.attr('data-height'),
272                title: caption,
273                getThumbBoundsFn: false,
274                showHideOpacity: true,
275                el: element
276            });
277            if( link === element.get(0) ) {
278                index = i;
279            }
280        });
281
282        return [galleryItems, parseInt(index, 10)];
283    };
284
285    var photoswipeParseHash = function() {
286        var hash = window.location.hash.substring(1), params = {};
287
288        if(hash.length < 5) {
289            return params;
290        }
291
292        var vars = hash.split('&');
293        for (var i = 0; i < vars.length; i++) {
294            if(!vars[i]) {
295                continue;
296            }
297            var pair = vars[i].split('=');
298            if(pair.length < 2) {
299                continue;
300            }
301            params[pair[0]] = pair[1];
302        }
303
304        if(params.gid) {
305            params.gid = parseInt(params.gid, 10);
306        }
307
308        return params;
309    };
310
311    var openPhotoSwipe = function( element_index, element, fromURL ) {
312        var pswpElement = $('.pswp').get(0),
313            gallery,
314            options,
315            items, index;
316
317        items = parseThumbnailElements(element);
318        if(element_index == false) {
319            index = items[1];
320        } else {
321            index = element_index;
322        }
323        items = items[0];
324
325        options = {
326            index: index,
327            getThumbBoundsFn: false,
328            showHideOpacity: true,
329            loop: true,
330            history: true,
331            shareEl: true,
332            closeOnScroll: false,
333			shareButtons: [
334			    {id:'facebook', label:'Facebook', url:'https://www.facebook.com/sharer/sharer.php?u={{url}}'},
335			    {id:'twitter', label:'Tweet', url:'https://twitter.com/intent/tweet?text={{text}}&url={{url}}'},
336			    {id:'pinterest', label:'Pin it', url:'http://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}'},
337			    {id:'download', label:'Download', url:'{{raw_image_url}}', download:true}
338			],
339		};
340
341        if(fromURL == true) {
342            options.index = parseInt(index, 10) - 1;
343        }
344
345        gallery = new PhotoSwipe( pswpElement, PhotoSwipeUI_Default, items, options);
346        gallery.listen('gettingData', function (index, item) {
347            if (item.w < 1 || item.h < 1) {
348                var img = new Image();
349                img.onload = function () {
350                    item.w = this.width;
351                    item.h = this.height;
352                    gallery.updateSize(true);
353                };
354                img.src = item.src;
355            }
356        });
357        gallery.init();
358    };
359
360    var hashData = photoswipeParseHash();
361    if(hashData.pid && hashData.gid) {
362        openPhotoSwipe( hashData.pid, null, true );
363    }
364
365	window.sr = ScrollReveal({
366		useDelay : 'always',
367		duration : 1200,
368		easing   : 'ease-in-out',
369		distance : '10px',
370		opacity  : 0,
371		mobile   : false,
372		scale    : 1,
373		afterReveal: function ( el ) {
374			$(el).addClass( 'animated' );
375		},
376	});
377
378
379	$('.slider:not(.round)').each(function(index, el) {
380		var slider = $( this );
381
382		if ( slider.hasClass('thesubmenu') ) {
383
384			var active = $( this ).find( '.current-menu-item:not(.current-page-ancestor)' ).index();
385
386			$('.thesubmenu .menu-item').each(function(index) {
387				var width = $(this)[0].getBoundingClientRect().width;
388				$(this).attr('style', 'width: ' + Math.ceil( width ) + 'px');
389			});
390
391			$(window).on('resize', function(e) {
392
393				//slider.data('slider').center = ( totalWidth > Math.max(document.documentElement.clientWidth, window.innerWidth || 0) );
394				slider.data('slider').startPosition = ( active - 1 < 0 ) ? 0 : active-1;
395
396				if( slider.data('slider.carousel') !== undefined ) {
397
398					//slider.data('slider.carousel').options.center = ( totalWidth > Math.max(document.documentElement.clientWidth, window.innerWidth || 0) );
399
400
401					slider.trigger('to.slider.carousel', [ ( active - 1 < 0 ) ? 0 : active-1,0]);
402
403
404				}
405
406			}).trigger('resize');
407
408		}
409
410		$( this ).on('initialized.slider.carousel', function(property) {
411
412			$('.thesubmenu .menu-item').each(function(index) {
413				var width = $(this)[0].getBoundingClientRect().width;
414				$(this).parent().attr('style', 'width: ' + Math.ceil( width ) + 'px');
415			});
416					slider.trigger('refresh.slider.carousel');
417
418			if ( $( this ).find( '.slider-lazy' ).length == 0 )
419		    	animateSlide(property);
420
421		}).on('loaded.slider.lazy', function(property){
422
423		}).on('loaded.slider.lazy translate.slider.carousel', function(property) {
424
425		    animateSlide(property);
426
427			var slider = $(this).closest('.slider');
428
429		}).on('mouseenter', slider, function(e) {
430
431			var slider = $(this).closest('.slider');
432
433			//slider.trigger('stop.slider.autoplay');
434
435			var video = slider.find('.slider-item.active video');
436			/*
437			if ( video.length > 0 )
438				video.get(0).play();
439			*/
440		}).on('mouseleave', slider, function(e) {
441
442			var slider = $(this).closest('.slider');
443/*
444			if ( slider.hasClass('slider--autoplay') )
445				slider.trigger('play.slider.autoplay');
446*/
447			var video = slider.find('.slider-item.active video');
448			/*
449			if ( video.length > 0 )
450				video.get(0).pause();
451			*/
452		}).on('click', '.slider-dots, .slider-nav', function(e) {
453
454			if( $(this).closest('.slider').data('slider').autoplay ) {
455				$(this).closest('.slider').trigger('stop.slider.autoplay');
456
457				$(this).closest('.slider').trigger('play.slider.autoplay');
458			}
459
460		}).sliderCarousel(
461			$.extend( {}, $( this ).data('slider'),{
462				navElement: 'button role="presentation"',
463				navClass:  ['slider-prev', 'slider-next'],
464				navText: ['<i class="icon-arrow-left"></i>', '<i class="icon-arrow-right"></i>']
465			} )
466		).on('mousewheel', '.slider-stage', function (e) {
467			if ( $(this).closest('.slider').hasClass('slider--mousewheel') > 0 ) {
468			    if ( e.originalEvent.wheelDelta > 0 ) {
469			        slider.trigger('next.slider');
470			    } else {
471			        slider.trigger('prev.slider');
472			    }
473			    e.preventDefault();
474		    }
475		});
476	});
477
478    function animateSlide(property) {
479		var eq = property.item.index;
480		var current = $(property.target).find("." + property.relatedTarget.options.itemClass).eq(eq).find('[data-sr-slide]');
481		if ( current.length ) {
482			current.removeAttr('data-sr-id style');
483            sr.sync();
484
485            var slideTransform = ( ( property['relatedTarget']['_coordinates'][0] != undefined ) ? property['relatedTarget']['_coordinates'][0] : 0 ) * eq;
486			current.each(function(index, el) {
487				if ( ! $(this).is("[sr-id]") ) {
488					sr.reveal( el, $.extend( {},
489						$( this ).data('sr-slide'),{
490							viewOffset: {
491								right: slideTransform
492							}
493						}
494					));
495				}
496			});
497		}
498    }
499
500    function scrollReveal() {
501		$( '[data-sr]' ).each(function(index, el) {
502			if ( $( el ).attr( 'data-sr-chain' ) !== undefined ) {
503				sr.reveal(
504					$( el ).attr( 'data-sr-chain' ),
505					$.extend( {}, $( el ).data('sr'),{} ),
506					( ( $( el ).attr( 'data-sr-chain-delay' ) !== undefined ) ? parseInt( $( el ).attr( 'data-sr-chain-delay' ) ) : 50 )
507				);
508			} else {
509				sr.reveal( el, $.extend( {}, $( el ).data('sr'),{} ) );
510			}
511		});
512	}
513	scrollReveal();
514
515   	function data_jump_offset() {
516		var offset = 82;
517		if ( 960 <= Math.max(document.documentElement.clientWidth, window.innerWidth || 0) ) {
518			offset = 82;
519		}
520		return offset;
521   	}
522
523	$viewport = $('html,body');
524   	$('[data-jump]').on('click', function(e) {
525
526   		var id = $(this).attr('data-jump');
527
528		if ( $( '#' + id ).length > 0 ) {
529	   		e.preventDefault();
530	   		e.stopPropagation();
531
532	   		if ( ! $( '#' + id ).is(':visible') ) {
533	   			$( '#' + id ).slideDown();
534	   			$(this).animate({opacity: 0}, 1000).css( 'pointer-events','none' );
535	   		}
536
537			$viewport.on( 'scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove', function(){
538				$viewport.stop();
539			});
540
541		    $viewport.animate({
542		        scrollTop: $('#' + id ).offset().top - data_jump_offset()
543		    }, 600, 'easeOutExpo', function() {
544		    	$viewport.off("scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove");
545		    });
546
547		    $(this).closest('ul').find('li').removeClass('current_page_item').removeClass('current-menu-item');
548		    $(this).parent().addClass('current-menu-item');
549
550		    if ( $('html').hasClass('nav--open') ) {
551		    	$('html').removeClass('nav--open');
552		    	$('.supercontainer-inner').off( clickevent );
553		    }
554
555	    } else {
556	    	localStorage.setItem( 'jump', id );
557	    }
558    });
559
560    $(window).load(function() {
561
562    	var menu = localStorage.getItem( 'jump' );
563
564    	if (menu && $( '#' + menu ).length > 0) {
565
566    		if ( !$( '#' + menu ).is('visible') )
567    			$( '#' + menu ).slideDown();
568
569			$viewport.on( 'scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove', function(){
570				$viewport.stop();
571			});
572		    $viewport.animate({
573		        scrollTop: $( '#' + menu ).offset().top - data_jump_offset()
574		    }, 600, 'easeOutExpo');
575	    }
576	    window.localStorage.clear();
577    });
578
579	$('.video-container').click(function() {
580	    if( $( this ).find( 'iframe' ).length === 0 ) {
581	    	var video = $( this ).data( 'url' );
582	    	$( this ).html('<iframe width="1280" height="720" src="' + video + '?autoplay=1&amp;loop=0&amp;rel=0&amp;wmode=transparent&amp;showinfo=0&amp;VQ=HD720" frameborder="0" allowfullscreen wmode="Opaque"></iframe>');
583	    }
584	});
585
586    function is_mobile() {
587        var check = false;
588        (function(a) {
589            if (/(android|ipad|playbook|silk|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4))) {
590                check = true;
591            }
592        })(navigator.userAgent || navigator.vendor || window.opera);
593        return check;
594    }
595
596    var is_mobile = is_mobile();
597    var clickevent = 'click';
598
599    $('.burger').on( clickevent, function(e) {
600        e.stopPropagation();
601        e.preventDefault();
602        $('html').toggleClass('nav--open');
603
604	    $('.supercontainer-inner').off( clickevent );
605
606	    $('html.nav--open .supercontainer-inner').on( clickevent, function(e) {
607	        $('html').toggleClass('nav--open');
608	        $('html .supercontainer-inner').off( clickevent );
609	    });
610
611        if ( $('html.nav--open').length > 0 ) {
612        	$('.main-menu .menu-item').removeAttr('data-sr-id style');
613			sr.reveal(
614				'.main-menu .menu-item',
615				{ "origin": "right", "distance": "20px", "delay": 500, "opacity": 0, "duration": 800, "viewFactor": -10000 },
616				50
617			);
618		}
619    });
620
621
622	$(document).on('submit','.form-data', function(e){
623		form_data( $(this), e, '' );
624	}).on('click','a.form-data,button.form-data', function(e){
625		form_data( $(this), e, $(this).data( 'param' ) );
626	});
627
628	/*
629	$(document).on('click','.block-voting button:not(.active)', function(e){
630		var vote     = $(this).closest('.vote');
631		var post_id  = $(this).closest('.block-voting').data('post-id');
632		var block_id = $(this).closest('.block-voting').data('block-id');
633		var unique_id = vote.data('id');
634
635		var block = $(this).closest('.block-voting');
636		var info = block.find('.block-voting-info');
637
638		$.ajax({
639			url: '/api/voting/v1/' + post_id,
640			type: 'POST',
641			cache: false,
642			data: {
643				'_nonce': nonce,
644				'post_id'   : post_id,
645				'block_id'  : block_id,
646				'unique_id' : unique_id
647			},
648			timeout: 60000,
649			error: function(xmlhttprequest, textstatus, message) {
650				block.removeClass('loading');
651				info.text( response.data);
652			},
653			beforeSend: function() {
654				block.addClass('loading');
655			},
656			success: function( response ) {
657
658				info.text( response.data);
659
660				if ( response.success )
661					location.reload();
662
663			}
664		});
665	});
666	*/
667
668	Array.prototype.forEach.call( document.querySelectorAll('.block-voting'), function(block) {
669
670		var sendBtn = block.querySelector( 'button');
671		if ( ! sendBtn )
672			return false;
673
674		var inputs = block.querySelectorAll('input[required]');
675		var groups = [];
676		for ( var i = 0; i < inputs.length; ++i ) {
677		  	groups.push( inputs[i].name );
678		}
679		var groups = Array.from( new Set( groups ) );
680
681		if ( groups ) {
682			Array.prototype.forEach.call( block.querySelectorAll('input[required]'), function(input) {
683				input.addEventListener('change', function (e) {
684					sendBtn.disabled = false;
685					Array.prototype.every.call( groups, function(group) {
686						if ( block.querySelector('input[name="' + group + '"]').classList.contains('forced') ) {
687							if ( block.querySelectorAll('input[name="' + group + '"]:checked').length !== block.querySelectorAll('input[name="' + group + '"]').length ) {
688								sendBtn.disabled = true;
689								return false;
690							}
691							return true;
692						}
693
694						if ( block.querySelector('input[name="' + group + '"]').classList.contains('min') ) {
695							if ( block.querySelectorAll('input[name="' + group + '"]:checked').length < block.querySelector('input[name="' + group + '"]').dataset.min ) {
696								sendBtn.disabled = true;
697							}
698						}
699
700						if ( block.querySelector('input[name="' + group + '"]').classList.contains('max') ) {
701							if ( block.querySelectorAll('input[name="' + group + '"]:checked').length > block.querySelector('input[name="' + group + '"]').dataset.max ) {
702								sendBtn.disabled = true;
703							}
704						}
705
706						if ( ! block.querySelector('input[name="' + group + '"]:checked') ) {
707							sendBtn.disabled = true;
708							return false;
709						}
710						return true;
711
712					});
713				});
714			});
715
716		}
717
718		sendBtn.addEventListener('click', function (e) {
719			e.preventDefault();
720
721			var post_id  = block.dataset.postId;
722			var block_id = block.dataset.blockId;
723			var info = block.querySelector('.block-voting-info');
724			/*
725			const checkedInputsCount = block.querySelectorAll(":checked").length;
726			if ( groupsCount > checkedInputsCount ) {
727				return alert( "At least one group is blank." );
728			}
729			*/
730			if ( confirm( "Are you really sure? The option cannot be changed after submission." ) == true) {
731
732				var request = new FormData();
733				var unique_id = '';
734				Array.prototype.forEach.call( block.querySelectorAll('input:checked'), function(input) {
735					unique_id += input.value + '|';
736				});
737
738				request.append('_nonce', nonce );
739				request.append('post_id', post_id );
740				request.append('block_id', block_id );
741				request.append('unique_id', unique_id.replace(/\|$/, "") );
742
743				var xhr = new XMLHttpRequest();
744				xhr.open('POST', '/api/voting/v1/' + post_id, true);
745				xhr.onloadstart = function () {
746					block.classList.add( 'loading' );
747				};
748				xhr.onerror = function () {
749
750					block.classList.remove( 'loading' );
751					var response = JSON.parse( this.responseText );
752					info.innerHTML = response.data;
753				};
754				xhr.onload = function () {
755					var response = JSON.parse( this.responseText );
756					info.innerHTML = response.data;
757
758					if ( response.success ) {
759						location.reload();
760					} else {
761						block.classList.remove( 'loading' );
762						window.scrollTo({
763							top: 200,
764							behavior: 'smooth'
765						});
766					}
767				};
768				xhr.send(request);
769			}
770
771		});
772	});
773
774
775	function form_data( el, e, param ) {
776
777		e.preventDefault();
778
779		var is_form = el.is( 'form' );
780		var form = ( is_form ) ? el : el.parent().closest('.form-data');
781
782		form.find( '.form-loading' ).addClass( 'loading' );
783
784        grecaptcha.ready(function() {
785        	var type = form.find( 'input[name="action"]').val();
786            grecaptcha.execute('6Lcnj7EUAAAAAC1W1DutUspDrt_W4tp_2GK18oib', {action: type}).then(function(token) {
787
788                form.find('input[name="captcha"]').val(token);
789
790				if ( is_form ) {
791					var request = new FormData( e.target )
792				} else {
793					var request = new FormData();
794					for ( var key in param ) {
795					    request.append(key, param[key]);
796					}
797				}
798
799				$.ajax({
800					url: '/ajax/',
801					type: 'post',
802					cache: false,
803				    processData: false,
804				    contentType: false,
805					data: request,
806					timeout: 60000,
807				    error: function(xmlhttprequest, textstatus, message) {
808				    	if ( message === 'Internal Server Error' )
809				    		div = '#inline-ajax-server-error';
810				    	else
811				    		div = '#inline-ajax-timeout';
812
813						$('#inline-ajax-error .inline-ajax-error-msg').html( message );
814
815						form.find( '.form-loading' ).removeClass('loading');
816				    },
817					beforeSend: function() {
818
819					},
820					success: function( response ) {
821
822						if ( typeof response.data !== 'undefined' && typeof response.data.reload !== 'undefined' ) {
823							location.reload(true);
824							return;
825						}
826						if ( response.data.form === 'form-login' ) {
827							var info = form.find('.switcher:visible .form-info').eq(0);
828						} else {
829							var info = form.find('.form-info');
830						}
831
832						if( info.length === 0 )
833							var info = form.closest('.form-info');
834
835						form.css('min-height', form.height() + 'px' ).find( '.form-loading' ).removeClass('loading');
836
837						info.hide().removeClass('form-error');
838
839						if ( response.data.msg !== '' ) {
840
841							if ( info.length === 1 ) {
842								info.html(response.data.msg).fadeIn();
843
844								if ( ! info.is( ':in-viewport' ) ) {
845									$('html,body').animate({
846										scrollTop: info.offset().top - 100
847									}, 1000);
848								}
849							}
850						}
851
852						if ( response.data.html && response.data.htmlTo ) {
853
854							$('' + response.data.htmlTo + '').html( response.data.html ).fadeIn();
855
856							if ( ! $('' + response.data.htmlTo + '').is( ':in-viewport' ) ) {
857								$('html,body').animate({
858									scrollTop: $('' + htmlTo + '').offset().top - 100
859								}, 1000);
860							}
861						}
862
863						if ( response.data.htmlAppend && response.data.htmlTo ) {
864
865							$('' + response.data.htmlTo + '').append( response.data.htmlAppend ).fadeIn();
866
867						}
868
869						if ( ! response.success )
870							info.addClass('form-error');
871
872						if ( response.success ) {
873							if ( typeof response.data.dont_hide === 'undefined' )
874								form.find('.form-hide').hide();
875
876						}
877
878						//info.fadeIn();
879
880						if ( response.data.jump )
881							localStorage.setItem( 'jump', response.data.jump );
882
883						if ( response.data.redirect_to ) {
884							window.location.replace( response.data.redirect_to ); return false;
885						}
886
887						if ( response.data.callback ) {
888							$(document).trigger( response.data.callback, response.data.callback_arg );
889						}
890					}
891				});
892
893            });
894        });
895	}
896
897	$('.form-validate').each(function() {
898	    $(this).validate({
899			rules: {
900				pass1: {
901					required: true,
902					minlength: 8
903				},
904				pass2: {
905					required: true,
906					minlength: 8,
907				}
908			},
909		    errorPlacement: function(error, element) {
910			    if ( element.attr( 'type' ) == 'checkbox' ) {
911			        //error.insertAfter( $(element).parents('div').prev( $('.question') ) );
912			    } else {
913			       	error.insertAfter(element);
914			    }
915		    },
916	    });
917	});
918
919    if ( $('.map').length > 0 ) {
920
921		$('.map').each(function(){
922
923			$el = $(this);
924			var markers = $el[0].getElementsByClassName("marker");
925
926			var map = L.map( $el[0], {
927				zoom: 18,
928		        zoomSnap: ( window.innerWidth > 900 ) ? 0.25 : 0.25,
929		        zoomDelta: ( window.innerWidth > 900 ) ? 1.25 : 0.75,
930				//minZoom: 8,
931				gestureHandling: true,
932			    gestureHandlingOptions: {
933			        duration: 5000
934			    },
935				center: new L.latLng([markers[0].getAttribute('data-lat'), markers[0].getAttribute('data-lng')]),
936				attributionControl: false,
937				layers: L.tileLayer('https://maps.tilehosting.com/styles/bright/{z}/{x}/{y}.png?key=krA36cvh6XCPhV0EJlUl' )//'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png')
938			});
939
940			var locationLayer = new L.FeatureGroup();
941
942			var mapIconUrl = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 357.97 233.79"><defs><linearGradient id="a" x1="396.43" x2="754.4" y1="601.45" y2="601.45" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#00c3ff"/><stop offset=".5" stop-color="#77eb86"/><stop offset="1" stop-color="#d9e021"/></linearGradient></defs><path fill="url(#a)" d="M715.82 549.53H572.93v-24.82a40.16 40.16 0 0 0-40.16-40.16h-96.18a40.16 40.16 0 0 0-40.16 40.16v49.63a40.16 40.16 0 0 0 40.16 40.16h69.35v65.26a38.57 38.57 0 0 0 38.57 38.57h171.31a38.57 38.57 0 0 0 38.57-38.57V588.1a38.57 38.57 0 0 0-38.57-38.57zm-279.23 45.13a20.34 20.34 0 0 1-20.32-2
9420.32v-49.63a20.34 20.34 0 0 1 20.32-20.32h96.18a20.34 20.34 0 0 1 20.32 20.32v24.81h-8.58a38.57 38.57 0 0 0-38.57 38.57v6.56zm116.5-25.29v5a20.34 20.34 0 0 1-20.32 20.32h-7v-6.59a18.75 18.75 0 0 1 18.73-18.73zm181.46 110.4a18.75 18.75 0 0 1-18.73 18.73H544.51a18.75 18.75 0 0 1-18.73-18.73V614.5h7a40.16 40.16 0 0 0 40.16-40.16v-5h142.88a18.75 18.75 0 0 1 18.73 18.73z" transform="translate(-396.43 -484.55)"/></svg>';
943
944
945			for (index = 0; index < markers.length; ++index) {
946
947				var marker = L.marker([markers[index].getAttribute('data-lat'), markers[index].getAttribute('data-lng')], {
948					icon: L.divIcon({
949						className: "leaflet-data-marker",
950						html: L.Util.template(mapIconUrl, {
951							mapIconUrl: mapIconUrl,
952						}) + markers[index].innerHTML,
953						iconAnchor  : [50, 25],
954						iconSize    : [100, 50],
955						popupAnchor : [0, -28],
956					}),
957					id: index
958				});
959				/*.bindPopup(markers[index].innerHTML, {
960					'maxWidth': '300',
961					'width': '300',
962					'className' : 'pin'
963				}).openPopup();*/
964
965				locationLayer.addLayer(marker);
966
967			};
968
969			map.on('zoomend', function(e) {
970				map.options.zoomSnap = 1;
971				map.options.zoomDelta = 1;
972			});
973
974			map.on('popupopen', function(e) {
975			    var px = map.project(e.popup._latlng);
976			    px.y -= e.popup._container.clientHeight/2;
977			    map.panTo(map.unproject(px),{animate: true});
978			});
979
980			locationLayer.addTo(map);
981
982
983		});
984    }
985
986	$('body').on('click', '[data-modal]', function(e) {
987
988		e.preventDefault();
989		e.stopPropagation();
990
991		var modal = $('#modal-' + $(this).data('modal') );
992		var modalClose = modal.find('.modal-close');
993
994		modal.css({ 'display': 'block'});
995		$('html').addClass('modal--open');
996
997		modalClose.click(function(e) {
998			modal.css({ 'display': 'none'});
999			$('html').removeClass('modal--open');
1000		});
1001
1002		$(window).mousedown(function(e) {
1003			if ( e.target == modal[0] ) {
1004				modal.css({ 'display': 'none'});
1005				$('html').removeClass('modal--open');
1006			}
1007		});
1008
1009		$(window).on('keyup', function(e) {
1010			if ( e.keyCode == 27 ) {
1011				$('html').removeClass('modal--open');
1012				modal.css({ 'display': 'none'});
1013			}
1014		});
1015
1016	});
1017
1018	$('#modal-search-s').on('keyup', debounce(function(e) {
1019		$('#modal-search-s').closest('form').trigger('submit');
1020	},300));
1021
1022
1023	$('.search-clear').on('click', function(e) {
1024		e.preventDefault();
1025		$(this).parent().find('input[type="search"]').val('');
1026	});
1027
1028
1029    if ( $('#library .explorer').length > 0 ) {
1030
1031        list = $(".dd");
1032        list.bind('mouseenter touchstart hover', function() {
1033            $(this).find("ul").slideDown();
1034        });
1035        list.bind('mouseleave touchend', function() {
1036            $(this).find("ul").hide();
1037        });
1038        $(".dd li").click(function(e) {
1039            $(this).parent().slideUp();
1040        })
1041        $(".dd:not(.df) li").click(function(e) {
1042            var text = $("span", this).html();
1043            var value = $(this).data("value");
1044            $(this).parent().parent().find('.panel').text(text).addClass('active')
1045            $("#radius").val("" + value + "").prop('selected', true).change();
1046            $(this).parent().find('li').removeClass("active");
1047            $(this).addClass("active")
1048        })
1049
1050		var $list = jQuery('.explorer .listing'),
1051			template = Handlebars.compile(jQuery('#library_template').html());
1052
1053		$('.explorer').jplist({
1054		    itemsBox: '.listing',
1055		    itemPath: '[data-type="item"]',
1056		    panelPath: '.controls',
1057		    noResults: '.no-results',
1058		    dataSource: {
1059				type: 'server',
1060				server: {
1061			        ajax:{
1062			          	url: '/ajax/',
1063						dataType: 'json',
1064						type: 'POST',
1065						data: { action: $('#library').attr('class') + 's' }
1066			        }
1067				},
1068				render: function(dataItem, statuses){
1069					$list.html(template(dataItem.content));
1070					scrollReveal();
1071				}
1072			},
1073			controlTypes:{
1074				'textbox':{
1075					className: 'Textbox'
1076					,options: {
1077						eventName: 'submit' //'keyup', 'input' or other event
1078						,ignore: ''
1079					}
1080				}
1081			}
1082		});
1083	}
1084
1085	var delay = (function(){
1086	  var timer = 0;
1087	  return function(callback, ms){
1088	    clearTimeout (timer);
1089	    timer = setTimeout(callback, ms);
1090	  };
1091	})();
1092
1093	$('#library .text-filter-box input').keyup(function() {
1094		$input = $(this)
1095	    delay(function(){
1096	    	if ($input.val().length > 3) {
1097	    		$('#title-search-button').trigger('click');
1098	    	}
1099	    }, 1000 );
1100	});
1101
1102	$('.accordion-item-title').click( function(e) {
1103		if ( !$(e.target).is('a, a *') ) {
1104			var accordion = $(this).parent();
1105
1106			var height = $(this).next().prop('scrollHeight');
1107
1108			if ( accordion.hasClass('accordion-item--active') ) {
1109				accordion.removeClass('accordion-item--active'); return false;
1110			}
1111
1112			$(this).next().css('max-height', height + 'px')
1113
1114			accordion.addClass('accordion-item--active').siblings().removeClass('accordion-item--active');
1115
1116			$(this).parents( '.accordion-content' ).each(function() {
1117				if ( accordion.hasClass('accordion-item--active') )
1118					$(this).css('max-height', parseInt( $(this)[0].style.maxHeight ) + height + 'px');
1119				else
1120					$(this).css('max-height', parseInt( $(this)[0].style.maxHeight ) - height + 'px');
1121
1122			});
1123			/*
1124			setTimeout( function() {
1125				if ( accordion.hasClass('accordion-item--active') ) {
1126				    $viewport.animate({
1127				        scrollTop: accordion.offset().top - data_jump_offset()
1128				    }, 200, 'easeOutExpo', function() {
1129				    	$viewport.off("scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove");
1130				    });
1131				}
1132			}, 500);
1133			*/
1134
1135/*
1136			$('.parallax').each(function() {
1137				hidden.css('max-height', parseInt(hidden[0].style.maxHeight) + $(this).next().prop('scrollHeight') + 'px');
1138*/
1139			return false;
1140		}
1141	});
1142
1143	$('.notification,.notification-list').hover(
1144		function() {
1145			$('html').addClass('notification-on');
1146		},
1147		function() {
1148			setTimeout(function() {
1149				if ( $('.notification-list:hover').length == 0 )
1150					$('html').removeClass("notification-on");
1151			}.bind(this), 800)
1152		}
1153	);
1154
1155});

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.