-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathw-script3.js
1 lines (1 loc) · 245 KB
/
w-script3.js
1
(function(){function inIframe(){return window.location!=window.parent.location}function isMobileMenu(){return $("#menu-mobile").is(":visible")}function isDevice(e){return $("html").hasClass(e)}function isCMS(){return $("body").hasClass("wnd-cms")}function isEshop(){return $("body").hasClass("wnd-eshop")}function deviceDetect(e){var t,n=$("body"),i=$("html");if("detect"==e&&(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?(isMobileMenu()?(isDevice("mobile")||$(i).addClass("mobile"),$(i).removeClass("tablet")):(isDevice("tablet")||$(i).addClass("tablet"),$(i).removeClass("mobile")),$(n).hasClass("touched")||$(n).addClass("touched"),$(n).removeClass("desktop"),$(i).removeClass("pc")):($(i).hasClass("pc")||$(n).hasClass("desktop")||($(i).addClass("pc"),$(n).addClass("desktop")),$(i).removeClass("tablet").removeClass("mobile"),$(n).removeClass("touched")),/WebnodeFrontendTest/i.test(navigator.userAgent)&&($(n).hasClass("wnd-frontend-test")||$(n).addClass("wnd-frontend-test")),/MSIE|Trident|Edge/i.test(navigator.userAgent)&&($(n).hasClass("isIE")||$(n).addClass("isIE"))),"mobile-devices"==e){var o=!1;return t=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|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|xda|xiino/i.test(t)||/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(t.substr(0,4)))&&(o=!0),o}if("wnd-frontend-test"==e)return $(n).hasClass("wnd-frontend-test");if("touched"==e)return $(n).hasClass("touched");if("android"==e){o=!1;return/Android/i.test(navigator.userAgent)&&(o=!0),o}if("ios"==e){o=!1;return/iPhone|iPad|iPod/i.test(navigator.userAgent)&&(o=!0),o}if("iphone"==e){o=!1;return/iPhone|iPod/i.test(navigator.userAgent)&&(o=!0),o}if("black-berry"==e){o=!1;return/BlackBerry/i.test(navigator.userAgent)&&(o=!0),o}if("opera-mini"==e){o=!1;return/Opera Mini/i.test(navigator.userAgent)&&(o=!0),o}if("ie-mobile"==e){o=!1;return/IEMobile/i.test(navigator.userAgent)&&(o=!0),o}if("safari"==e){o=!1;return/Safari/i.test(navigator.userAgent)&&(o=!0),o}}function getAndroidVersion(e){var t=(e=(e||navigator.userAgent).toLowerCase()).match(/android\s([0-9\.]*)/);return!!t&&t[1]}function smoothScrolling(){$("a[href*=\\#]:not([href=\\#])").click(function(){if(location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")&&location.hostname==this.hostname){var e=$(this.hash);if((e=e.length?e:$("[name="+this.hash.slice(1)+"]")).length){var t=e.offset().top;return isCMS()&&(t-=$("#wnd_toolbar").outerHeight(!0)),$("html,body").animate({scrollTop:t},1e3),!1}}})}function waitForWebfonts(e,t){for(var n=0,i=0,o=e.length;i<o;++i)!function(i){var o=document.createElement("span");o.innerHTML="giItT1WQy@!-/#",o.style.position="absolute",o.style.left="-10000px",o.style.top="-10000px",o.style.fontSize="300px",o.style.fontFamily="sans-serif",o.style.fontVariant="normal",o.style.fontStyle="normal",o.style.fontWeight="normal",o.style.letterSpacing="0",document.body.appendChild(o);var r,s=o.offsetWidth;function a(){if(o&&o.offsetWidth!=s&&(++n,o.parentNode.removeChild(o),o=null),n>=e.length&&(r&&clearInterval(r),n==e.length))return t(),!0}o.style.fontFamily=i,a()||(r=setInterval(a,50))}(e[i])}function cmsReset(e){if(isCMS()){var t=e[0]?e[0]:e;if(t)(n=document.createEvent("Event")).initEvent("wnd-redraw-done",!1,!0),t.dispatchEvent(n)}else{var n;(n=document.createEvent("Event")).initEvent("wnd-redraw-done",!1,!0),document.body.dispatchEvent(n)}}function watchForPrint(){var e=function(){},t=function(){};window.matchMedia&&window.matchMedia("print").addListener(function(e){e.matches});window.onbeforeprint=e,window.onafterprint=t}function bindForms(){$(".form-file-button").on("click",function(){$(this).parent().prev().find("input").trigger("click")})}function debounce(e,t,n){var i;return function(){var o=this,r=arguments;clearTimeout(i),i=setTimeout(function(){i=null,n||e.apply(o,r)},t),n&&!i&&e.apply(o,r)}}function isElementInViewport(e){"function"==typeof $&&e instanceof $&&(e=e[0]);var t=e.getBoundingClientRect(),n=t.width*t.height,i=0,o=window.innerHeight||document.documentElement.clientHeight;return t.bottom<0?i=0:t.top>o?i=0:t.top<0&&t.bottom>o?i=t.width*o/n:t.top>=0&&t.bottom<=o?i=1:t.top<0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)?i=(t.height+t.top)*t.width/n:t.top>=0&&t.bottom>o&&(i=(t.height-(t.bottom-o))*t.width/n),i}function fullscreenHeader(){if(!inIframe()&&!deviceDetect("ios")&&$("body").hasClass("touched")){if($(".fullscreen")[0]||$(".fullscreen-all")[0])var e=45,t=0,n=$(window).width(),i=$(window).height();if($(".fullscreen")[0]){var o=$(".section-wrapper .fullscreen");t=i,n>=320&&i>480&&(t=.75*i),n>=480&&i>=600&&(t=.6*i)>550&&(t=550),n>=600&&i>=600&&(t=.5*i)>600&&(t=600),n>=900&&i>769&&(t=.7*i)>660&&(t=660),n>=900&&i<=768&&(t=i,isCMS()&&(t-=e)),n>=1400&&(t=.85*i)>800&&(t=800),n>=1600&&(t=.8*i)>845&&(t=845),n>=1800&&(t=.77*i)>870&&(t=870),$(o).css("height",t)}if($(".fullscreen-all")[0]){var r=$(".section-wrapper .fullscreen-all"),s=window.innerHeight>window.innerWidth,a="sidebar"==$("body").attr("data-layout-type"),l="static"==$("header").css("position"),c=$("header").outerHeight();(t=i)<400&&(t=400),!s&&a&&l&&(t-=c),s&&n<900&&(t*=.62),!s&&n<900&&(t*=.82),isCMS()&&(t-=e),$(r).css("min-height",t)}}}function shortContent(){$("body").removeClass("not-short-content");var e=!1;inIframe()&&deviceDetect("iphone")&&(e=!0);var t=!1;if("sidebar"==$("body").data("layout-type")&&"fixed"==$("#header").css("position")&&(t=!0),0==e){var n=$(window).height(),i=0,o=$("body"),r=$("#main .section:not(#layout-section):not(.wnd-disabled):last-child");if(0==t&&($("#header .section:not(#layout-section)").each(function(){i+=$(this).height()}),$("#footer .section:not(#layout-section)").each(function(){i+=$(this).height()})),$("#wnd_toolbar")[0]&&(n-=$("#wnd_toolbar").height()),$("#fe_footer")[0]&&(i+=$("#fe_footer").height()),$("#wnd_cookie_bar")[0]&&(i+=$("#wnd_cookie_bar").height()),$("#wnd_user_bar")[0]&&(i+=$("#wnd_user_bar").height()),$("#main .section:not(#layout-section):not(.wnd-disabled):not(#main-cart)").each(function(){if($(this).find(".content")[0]){var e=$(this).find(".content").outerHeight(!0);i+=e}else i+=$(this).outerHeight(!0)}),i<=n){if(!$(o).hasClass("short-content")){$(o).addClass("short-content");var s=document.createEvent("Event");s.initEvent("fixCartEvent",!1,!0),document.body.dispatchEvent(s),r[0]&&cmsReset(r)}}else $(o).hasClass("short-content")&&($(o).removeClass("short-content"),cmsReset(o))}}function msieversion(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);if(e.indexOf("Trident/")>0){var n=e.indexOf("rv:");return parseInt(e.substring(n+3,e.indexOf(".",n)),10)}var i=e.indexOf("Edge/");return i>0&&parseInt(e.substring(i+5,e.indexOf(".",i)),10)}function issafari(){return-1!=navigator.userAgent.indexOf("Safari")&&-1==navigator.userAgent.indexOf("Chrome")?1:0}function isfirefox(){return navigator.userAgent.indexOf("Firefox")>-1}!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";var n=[],i=e.document,o=Object.getPrototypeOf,r=n.slice,s=n.concat,a=n.push,l=n.indexOf,c={},u=c.toString,d=c.hasOwnProperty,h=d.toString,p=h.call(Object),f={};function m(e,t){var n=(t=t||i).createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}var g="3.1.1",v=function(e,t){return new v.fn.init(e,t)},y=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,w=/^-ms-/,b=/-([a-z])/g,x=function(e,t){return t.toUpperCase()};function C(e){var t=!!e&&"length"in e&&e.length,n=v.type(e);return"function"!==n&&!v.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}v.fn=v.prototype={jquery:g,constructor:v,length:0,toArray:function(){return r.call(this)},get:function(e){return null==e?r.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=v.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return v.each(this,e)},map:function(e){return this.pushStack(v.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(r.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:a,sort:n.sort,splice:n.splice},v.extend=v.fn.extend=function(){var e,t,n,i,o,r,s=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[a]||{},a++),"object"==typeof s||v.isFunction(s)||(s={}),a===l&&(s=this,a--);a<l;a++)if(null!=(e=arguments[a]))for(t in e)n=s[t],s!==(i=e[t])&&(c&&i&&(v.isPlainObject(i)||(o=v.isArray(i)))?(o?(o=!1,r=n&&v.isArray(n)?n:[]):r=n&&v.isPlainObject(n)?n:{},s[t]=v.extend(c,r,i)):void 0!==i&&(s[t]=i));return s},v.extend({expando:"jQuery"+(g+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===v.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=v.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==u.call(e)||(t=o(e))&&(n=d.call(t,"constructor")&&t.constructor,"function"!=typeof n||h.call(n)!==p))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[u.call(e)]||"object":typeof e},globalEval:function(e){m(e)},camelCase:function(e){return e.replace(w,"ms-").replace(b,x)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var n,i=0;if(C(e))for(n=e.length;i<n&&!1!==t.call(e[i],i,e[i]);i++);else for(i in e)if(!1===t.call(e[i],i,e[i]))break;return e},trim:function(e){return null==e?"":(e+"").replace(y,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(C(Object(e))?v.merge(n,"string"==typeof e?[e]:e):a.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:l.call(t,e,n)},merge:function(e,t){for(var n=+t.length,i=0,o=e.length;i<n;i++)e[o++]=t[i];return e.length=o,e},grep:function(e,t,n){for(var i=[],o=0,r=e.length,s=!n;o<r;o++)!t(e[o],o)!==s&&i.push(e[o]);return i},map:function(e,t,n){var i,o,r=0,a=[];if(C(e))for(i=e.length;r<i;r++)null!=(o=t(e[r],r,n))&&a.push(o);else for(r in e)null!=(o=t(e[r],r,n))&&a.push(o);return s.apply([],a)},guid:1,proxy:function(e,t){var n,i,o;if("string"==typeof t&&(n=e[t],t=e,e=n),v.isFunction(e))return i=r.call(arguments,2),(o=function(){return e.apply(t||this,i.concat(r.call(arguments)))}).guid=e.guid=e.guid||v.guid++,o},now:Date.now,support:f}),"function"==typeof Symbol&&(v.fn[Symbol.iterator]=n[Symbol.iterator]),v.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});var E=function(e){var t,n,i,o,r,s,a,l,c,u,d,h,p,f,m,g,v,y,w,b="sizzle"+1*new Date,x=e.document,C=0,E=0,I=se(),T=se(),k=se(),$=function(e,t){return e===t&&(d=!0),0},S={}.hasOwnProperty,D=[],P=D.pop,A=D.push,L=D.push,M=D.slice,R=function(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1},_="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",F="[\\x20\\t\\r\\n\\f]",O="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",N="\\["+F+"*("+O+")(?:"+F+"*([*^$|!~]?=)"+F+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+F+"*\\]",B=":("+O+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",z=new RegExp(F+"+","g"),q=new RegExp("^"+F+"+|((?:^|[^\\\\])(?:\\\\.)*)"+F+"+$","g"),j=new RegExp("^"+F+"*,"+F+"*"),H=new RegExp("^"+F+"*([>+~]|"+F+")"+F+"*"),W=new RegExp("="+F+"*([^\\]'\"]*?)"+F+"*\\]","g"),U=new RegExp(B),X=new RegExp("^"+O+"$"),Z={ID:new RegExp("^#("+O+")"),CLASS:new RegExp("^\\.("+O+")"),TAG:new RegExp("^("+O+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+B),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+F+"*(even|odd|(([+-]|)(\\d*)n|)"+F+"*(?:([+-]|)"+F+"*(\\d+)|))"+F+"*\\)|)","i"),bool:new RegExp("^(?:"+_+")$","i"),needsContext:new RegExp("^"+F+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+F+"*((?:-\\d)?\\d*)"+F+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,V=/^h\d$/i,G=/^[^{]+\{\s*\[native \w/,K=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Q=/[+~]/,J=new RegExp("\\\\([\\da-f]{1,6}"+F+"?|("+F+")|.)","ig"),ee=function(e,t,n){var i="0x"+t-65536;return i!=i||n?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ie=function(){h()},oe=ye(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{L.apply(D=M.call(x.childNodes),x.childNodes),D[x.childNodes.length].nodeType}catch(e){L={apply:D.length?function(e,t){A.apply(e,M.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}function re(e,t,i,o){var r,a,c,u,d,f,v,y=t&&t.ownerDocument,C=t?t.nodeType:9;if(i=i||[],"string"!=typeof e||!e||1!==C&&9!==C&&11!==C)return i;if(!o&&((t?t.ownerDocument||t:x)!==p&&h(t),t=t||p,m)){if(11!==C&&(d=K.exec(e)))if(r=d[1]){if(9===C){if(!(c=t.getElementById(r)))return i;if(c.id===r)return i.push(c),i}else if(y&&(c=y.getElementById(r))&&w(t,c)&&c.id===r)return i.push(c),i}else{if(d[2])return L.apply(i,t.getElementsByTagName(e)),i;if((r=d[3])&&n.getElementsByClassName&&t.getElementsByClassName)return L.apply(i,t.getElementsByClassName(r)),i}if(n.qsa&&!k[e+" "]&&(!g||!g.test(e))){if(1!==C)y=t,v=e;else if("object"!==t.nodeName.toLowerCase()){for((u=t.getAttribute("id"))?u=u.replace(te,ne):t.setAttribute("id",u=b),a=(f=s(e)).length;a--;)f[a]="#"+u+" "+ve(f[a]);v=f.join(","),y=Q.test(e)&&me(t.parentNode)||t}if(v)try{return L.apply(i,y.querySelectorAll(v)),i}catch(e){}finally{u===b&&t.removeAttribute("id")}}}return l(e.replace(q,"$1"),t,i,o)}function se(){var e=[];return function t(n,o){return e.push(n+" ")>i.cacheLength&&delete t[e.shift()],t[n+" "]=o}}function ae(e){return e[b]=!0,e}function le(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ce(e,t){for(var n=e.split("|"),o=n.length;o--;)i.attrHandle[n[o]]=t}function ue(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function de(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function he(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pe(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&oe(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function fe(e){return ae(function(t){return t=+t,ae(function(n,i){for(var o,r=e([],n.length,t),s=r.length;s--;)n[o=r[s]]&&(n[o]=!(i[o]=n[o]))})})}function me(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=re.support={},r=re.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},h=re.setDocument=function(e){var t,o,s=e?e.ownerDocument||e:x;return s!==p&&9===s.nodeType&&s.documentElement?(f=(p=s).documentElement,m=!r(p),x!==p&&(o=p.defaultView)&&o.top!==o&&(o.addEventListener?o.addEventListener("unload",ie,!1):o.attachEvent&&o.attachEvent("onunload",ie)),n.attributes=le(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=le(function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=G.test(p.getElementsByClassName),n.getById=le(function(e){return f.appendChild(e).id=b,!p.getElementsByName||!p.getElementsByName(b).length}),n.getById?(i.filter.ID=function(e){var t=e.replace(J,ee);return function(e){return e.getAttribute("id")===t}},i.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var n=t.getElementById(e);return n?[n]:[]}}):(i.filter.ID=function(e){var t=e.replace(J,ee);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},i.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var n,i,o,r=t.getElementById(e);if(r){if((n=r.getAttributeNode("id"))&&n.value===e)return[r];for(o=t.getElementsByName(e),i=0;r=o[i++];)if((n=r.getAttributeNode("id"))&&n.value===e)return[r]}return[]}}),i.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],o=0,r=t.getElementsByTagName(e);if("*"===e){for(;n=r[o++];)1===n.nodeType&&i.push(n);return i}return r},i.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&m)return t.getElementsByClassName(e)},v=[],g=[],(n.qsa=G.test(p.querySelectorAll))&&(le(function(e){f.appendChild(e).innerHTML="<a id='"+b+"'></a><select id='"+b+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+F+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\["+F+"*(?:value|"+_+")"),e.querySelectorAll("[id~="+b+"-]").length||g.push("~="),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||g.push(".#.+[+~]")}),le(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name"+F+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),f.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(n.matchesSelector=G.test(y=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&le(function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),v.push("!=",B)}),g=g.length&&new RegExp(g.join("|")),v=v.length&&new RegExp(v.join("|")),t=G.test(f.compareDocumentPosition),w=t||G.test(f.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},$=t?function(e,t){if(e===t)return d=!0,0;var i=!e.compareDocumentPosition-!t.compareDocumentPosition;return i||(1&(i=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===i?e===p||e.ownerDocument===x&&w(x,e)?-1:t===p||t.ownerDocument===x&&w(x,t)?1:u?R(u,e)-R(u,t):0:4&i?-1:1)}:function(e,t){if(e===t)return d=!0,0;var n,i=0,o=e.parentNode,r=t.parentNode,s=[e],a=[t];if(!o||!r)return e===p?-1:t===p?1:o?-1:r?1:u?R(u,e)-R(u,t):0;if(o===r)return ue(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)a.unshift(n);for(;s[i]===a[i];)i++;return i?ue(s[i],a[i]):s[i]===x?-1:a[i]===x?1:0},p):p},re.matches=function(e,t){return re(e,null,null,t)},re.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&h(e),t=t.replace(W,"='$1']"),n.matchesSelector&&m&&!k[t+" "]&&(!v||!v.test(t))&&(!g||!g.test(t)))try{var i=y.call(e,t);if(i||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){}return re(t,p,null,[e]).length>0},re.contains=function(e,t){return(e.ownerDocument||e)!==p&&h(e),w(e,t)},re.attr=function(e,t){(e.ownerDocument||e)!==p&&h(e);var o=i.attrHandle[t.toLowerCase()],r=o&&S.call(i.attrHandle,t.toLowerCase())?o(e,t,!m):void 0;return void 0!==r?r:n.attributes||!m?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},re.escape=function(e){return(e+"").replace(te,ne)},re.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},re.uniqueSort=function(e){var t,i=[],o=0,r=0;if(d=!n.detectDuplicates,u=!n.sortStable&&e.slice(0),e.sort($),d){for(;t=e[r++];)t===e[r]&&(o=i.push(r));for(;o--;)e.splice(i[o],1)}return u=null,e},o=re.getText=function(e){var t,n="",i=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i++];)n+=o(t);return n},(i=re.selectors={cacheLength:50,createPseudo:ae,match:Z,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(J,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(J,ee),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||re.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&re.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Z.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&U.test(n)&&(t=s(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(J,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=I[e+" "];return t||(t=new RegExp("(^|"+F+")"+e+"("+F+"|$)"))&&I(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(i){var o=re.attr(i,e);return null==o?"!="===t:!t||(o+="","="===t?o===n:"!="===t?o!==n:"^="===t?n&&0===o.indexOf(n):"*="===t?n&&o.indexOf(n)>-1:"$="===t?n&&o.slice(-n.length)===n:"~="===t?(" "+o.replace(z," ")+" ").indexOf(n)>-1:"|="===t&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,i,o){var r="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===i&&0===o?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,h,p,f,m=r!==s?"nextSibling":"previousSibling",g=t.parentNode,v=a&&t.nodeName.toLowerCase(),y=!l&&!a,w=!1;if(g){if(r){for(;m;){for(h=t;h=h[m];)if(a?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;f=m="only"===e&&!f&&"nextSibling"}return!0}if(f=[s?g.firstChild:g.lastChild],s&&y){for(w=(p=(c=(u=(d=(h=g)[b]||(h[b]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]||[])[0]===C&&c[1])&&c[2],h=p&&g.childNodes[p];h=++p&&h&&h[m]||(w=p=0)||f.pop();)if(1===h.nodeType&&++w&&h===t){u[e]=[C,p,w];break}}else if(y&&(w=p=(c=(u=(d=(h=t)[b]||(h[b]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]||[])[0]===C&&c[1]),!1===w)for(;(h=++p&&h&&h[m]||(w=p=0)||f.pop())&&((a?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++w||(y&&((u=(d=h[b]||(h[b]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]=[C,w]),h!==t)););return(w-=o)===i||w%i==0&&w/i>=0}}},PSEUDO:function(e,t){var n,o=i.pseudos[e]||i.setFilters[e.toLowerCase()]||re.error("unsupported pseudo: "+e);return o[b]?o(t):o.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ae(function(e,n){for(var i,r=o(e,t),s=r.length;s--;)e[i=R(e,r[s])]=!(n[i]=r[s])}):function(e){return o(e,0,n)}):o}},pseudos:{not:ae(function(e){var t=[],n=[],i=a(e.replace(q,"$1"));return i[b]?ae(function(e,t,n,o){for(var r,s=i(e,null,o,[]),a=e.length;a--;)(r=s[a])&&(e[a]=!(t[a]=r))}):function(e,o,r){return t[0]=e,i(t,null,r,n),t[0]=null,!n.pop()}}),has:ae(function(e){return function(t){return re(e,t).length>0}}),contains:ae(function(e){return e=e.replace(J,ee),function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:ae(function(e){return X.test(e||"")||re.error("unsupported lang: "+e),e=e.replace(J,ee).toLowerCase(),function(t){var n;do{if(n=m?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:pe(!1),disabled:pe(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return V.test(e.nodeName)},input:function(e){return Y.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:fe(function(){return[0]}),last:fe(function(e,t){return[t-1]}),eq:fe(function(e,t,n){return[n<0?n+t:n]}),even:fe(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:fe(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:fe(function(e,t,n){for(var i=n<0?n+t:n;--i>=0;)e.push(i);return e}),gt:fe(function(e,t,n){for(var i=n<0?n+t:n;++i<t;)e.push(i);return e})}}).pseudos.nth=i.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[t]=de(t);for(t in{submit:!0,reset:!0})i.pseudos[t]=he(t);function ge(){}function ve(e){for(var t=0,n=e.length,i="";t<n;t++)i+=e[t].value;return i}function ye(e,t,n){var i=t.dir,o=t.next,r=o||i,s=n&&"parentNode"===r,a=E++;return t.first?function(t,n,o){for(;t=t[i];)if(1===t.nodeType||s)return e(t,n,o);return!1}:function(t,n,l){var c,u,d,h=[C,a];if(l){for(;t=t[i];)if((1===t.nodeType||s)&&e(t,n,l))return!0}else for(;t=t[i];)if(1===t.nodeType||s)if(u=(d=t[b]||(t[b]={}))[t.uniqueID]||(d[t.uniqueID]={}),o&&o===t.nodeName.toLowerCase())t=t[i]||t;else{if((c=u[r])&&c[0]===C&&c[1]===a)return h[2]=c[2];if(u[r]=h,h[2]=e(t,n,l))return!0}return!1}}function we(e){return e.length>1?function(t,n,i){for(var o=e.length;o--;)if(!e[o](t,n,i))return!1;return!0}:e[0]}function be(e,t,n,i,o){for(var r,s=[],a=0,l=e.length,c=null!=t;a<l;a++)(r=e[a])&&(n&&!n(r,i,o)||(s.push(r),c&&t.push(a)));return s}function xe(e,t,n,i,o,r){return i&&!i[b]&&(i=xe(i)),o&&!o[b]&&(o=xe(o,r)),ae(function(r,s,a,l){var c,u,d,h=[],p=[],f=s.length,m=r||function(e,t,n){for(var i=0,o=t.length;i<o;i++)re(e,t[i],n);return n}(t||"*",a.nodeType?[a]:a,[]),g=!e||!r&&t?m:be(m,h,e,a,l),v=n?o||(r?e:f||i)?[]:s:g;if(n&&n(g,v,a,l),i)for(c=be(v,p),i(c,[],a,l),u=c.length;u--;)(d=c[u])&&(v[p[u]]=!(g[p[u]]=d));if(r){if(o||e){if(o){for(c=[],u=v.length;u--;)(d=v[u])&&c.push(g[u]=d);o(null,v=[],c,l)}for(u=v.length;u--;)(d=v[u])&&(c=o?R(r,d):h[u])>-1&&(r[c]=!(s[c]=d))}}else v=be(v===s?v.splice(f,v.length):v),o?o(null,s,v,l):L.apply(s,v)})}function Ce(e){for(var t,n,o,r=e.length,s=i.relative[e[0].type],a=s||i.relative[" "],l=s?1:0,u=ye(function(e){return e===t},a,!0),d=ye(function(e){return R(t,e)>-1},a,!0),h=[function(e,n,i){var o=!s&&(i||n!==c)||((t=n).nodeType?u(e,n,i):d(e,n,i));return t=null,o}];l<r;l++)if(n=i.relative[e[l].type])h=[ye(we(h),n)];else{if((n=i.filter[e[l].type].apply(null,e[l].matches))[b]){for(o=++l;o<r&&!i.relative[e[o].type];o++);return xe(l>1&&we(h),l>1&&ve(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(q,"$1"),n,l<o&&Ce(e.slice(l,o)),o<r&&Ce(e=e.slice(o)),o<r&&ve(e))}h.push(n)}return we(h)}function Ee(e,t){var n=t.length>0,o=e.length>0,r=function(r,s,a,l,u){var d,f,g,v=0,y="0",w=r&&[],b=[],x=c,E=r||o&&i.find.TAG("*",u),I=C+=null==x?1:Math.random()||.1,T=E.length;for(u&&(c=s===p||s||u);y!==T&&null!=(d=E[y]);y++){if(o&&d){for(f=0,s||d.ownerDocument===p||(h(d),a=!m);g=e[f++];)if(g(d,s||p,a)){l.push(d);break}u&&(C=I)}n&&((d=!g&&d)&&v--,r&&w.push(d))}if(v+=y,n&&y!==v){for(f=0;g=t[f++];)g(w,b,s,a);if(r){if(v>0)for(;y--;)w[y]||b[y]||(b[y]=P.call(l));b=be(b)}L.apply(l,b),u&&!r&&b.length>0&&v+t.length>1&&re.uniqueSort(l)}return u&&(C=I,c=x),w};return n?ae(r):r}return ge.prototype=i.filters=i.pseudos,i.setFilters=new ge,s=re.tokenize=function(e,t){var n,o,r,s,a,l,c,u=T[e+" "];if(u)return t?0:u.slice(0);for(a=e,l=[],c=i.preFilter;a;){for(s in n&&!(o=j.exec(a))||(o&&(a=a.slice(o[0].length)||a),l.push(r=[])),n=!1,(o=H.exec(a))&&(n=o.shift(),r.push({value:n,type:o[0].replace(q," ")}),a=a.slice(n.length)),i.filter)!(o=Z[s].exec(a))||c[s]&&!(o=c[s](o))||(n=o.shift(),r.push({value:n,type:s,matches:o}),a=a.slice(n.length));if(!n)break}return t?a.length:a?re.error(e):T(e,l).slice(0)},a=re.compile=function(e,t){var n,i=[],o=[],r=k[e+" "];if(!r){for(t||(t=s(e)),n=t.length;n--;)(r=Ce(t[n]))[b]?i.push(r):o.push(r);(r=k(e,Ee(o,i))).selector=e}return r},l=re.select=function(e,t,n,o){var r,l,c,u,d,h="function"==typeof e&&e,p=!o&&s(e=h.selector||e);if(n=n||[],1===p.length){if((l=p[0]=p[0].slice(0)).length>2&&"ID"===(c=l[0]).type&&9===t.nodeType&&m&&i.relative[l[1].type]){if(!(t=(i.find.ID(c.matches[0].replace(J,ee),t)||[])[0]))return n;h&&(t=t.parentNode),e=e.slice(l.shift().value.length)}for(r=Z.needsContext.test(e)?0:l.length;r--&&(c=l[r],!i.relative[u=c.type]);)if((d=i.find[u])&&(o=d(c.matches[0].replace(J,ee),Q.test(l[0].type)&&me(t.parentNode)||t))){if(l.splice(r,1),!(e=o.length&&ve(l)))return L.apply(n,o),n;break}}return(h||a(e,p))(o,t,!m,n,!t||Q.test(e)&&me(t.parentNode)||t),n},n.sortStable=b.split("").sort($).join("")===b,n.detectDuplicates=!!d,h(),n.sortDetached=le(function(e){return 1&e.compareDocumentPosition(p.createElement("fieldset"))}),le(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ce("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&le(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ce("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),le(function(e){return null==e.getAttribute("disabled")})||ce(_,function(e,t,n){var i;if(!n)return!0===e[t]?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),re}(e);v.find=E,v.expr=E.selectors,v.expr[":"]=v.expr.pseudos,v.uniqueSort=v.unique=E.uniqueSort,v.text=E.getText,v.isXMLDoc=E.isXML,v.contains=E.contains,v.escapeSelector=E.escape;var I=function(e,t,n){for(var i=[],o=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(o&&v(e).is(n))break;i.push(e)}return i},T=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},k=v.expr.match.needsContext,$=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,S=/^.[^:#\[\.,]*$/;function D(e,t,n){return v.isFunction(t)?v.grep(e,function(e,i){return!!t.call(e,i,e)!==n}):t.nodeType?v.grep(e,function(e){return e===t!==n}):"string"!=typeof t?v.grep(e,function(e){return l.call(t,e)>-1!==n}):S.test(t)?v.filter(t,e,n):(t=v.filter(t,e),v.grep(e,function(e){return l.call(t,e)>-1!==n&&1===e.nodeType}))}v.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?v.find.matchesSelector(i,e)?[i]:[]:v.find.matches(e,v.grep(t,function(e){return 1===e.nodeType}))},v.fn.extend({find:function(e){var t,n,i=this.length,o=this;if("string"!=typeof e)return this.pushStack(v(e).filter(function(){for(t=0;t<i;t++)if(v.contains(o[t],this))return!0}));for(n=this.pushStack([]),t=0;t<i;t++)v.find(e,o[t],n);return i>1?v.uniqueSort(n):n},filter:function(e){return this.pushStack(D(this,e||[],!1))},not:function(e){return this.pushStack(D(this,e||[],!0))},is:function(e){return!!D(this,"string"==typeof e&&k.test(e)?v(e):e||[],!1).length}});var P,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(v.fn.init=function(e,t,n){var o,r;if(!e)return this;if(n=n||P,"string"==typeof e){if(!(o="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:A.exec(e))||!o[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(o[1]){if(t=t instanceof v?t[0]:t,v.merge(this,v.parseHTML(o[1],t&&t.nodeType?t.ownerDocument||t:i,!0)),$.test(o[1])&&v.isPlainObject(t))for(o in t)v.isFunction(this[o])?this[o](t[o]):this.attr(o,t[o]);return this}return(r=i.getElementById(o[2]))&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v.isFunction(e)?void 0!==n.ready?n.ready(e):e(v):v.makeArray(e,this)}).prototype=v.fn,P=v(i);var L=/^(?:parents|prev(?:Until|All))/,M={children:!0,contents:!0,next:!0,prev:!0};function R(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}v.fn.extend({has:function(e){var t=v(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(v.contains(this,t[e]))return!0})},closest:function(e,t){var n,i=0,o=this.length,r=[],s="string"!=typeof e&&v(e);if(!k.test(e))for(;i<o;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&v.find.matchesSelector(n,e))){r.push(n);break}return this.pushStack(r.length>1?v.uniqueSort(r):r)},index:function(e){return e?"string"==typeof e?l.call(v(e),this[0]):l.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(v.uniqueSort(v.merge(this.get(),v(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),v.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return I(e,"parentNode")},parentsUntil:function(e,t,n){return I(e,"parentNode",n)},next:function(e){return R(e,"nextSibling")},prev:function(e){return R(e,"previousSibling")},nextAll:function(e){return I(e,"nextSibling")},prevAll:function(e){return I(e,"previousSibling")},nextUntil:function(e,t,n){return I(e,"nextSibling",n)},prevUntil:function(e,t,n){return I(e,"previousSibling",n)},siblings:function(e){return T((e.parentNode||{}).firstChild,e)},children:function(e){return T(e.firstChild)},contents:function(e){return e.contentDocument||v.merge([],e.childNodes)}},function(e,t){v.fn[e]=function(n,i){var o=v.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(o=v.filter(i,o)),this.length>1&&(M[e]||v.uniqueSort(o),L.test(e)&&o.reverse()),this.pushStack(o)}});var _=/[^\x20\t\r\n\f]+/g;function F(e){return e}function O(e){throw e}function N(e,t,n){var i;try{e&&v.isFunction(i=e.promise)?i.call(e).done(t).fail(n):e&&v.isFunction(i=e.then)?i.call(e,t,n):t.call(void 0,e)}catch(e){n.call(void 0,e)}}v.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return v.each(e.match(_)||[],function(e,n){t[n]=!0}),t}(e):v.extend({},e);var t,n,i,o,r=[],s=[],a=-1,l=function(){for(o=e.once,i=t=!0;s.length;a=-1)for(n=s.shift();++a<r.length;)!1===r[a].apply(n[0],n[1])&&e.stopOnFalse&&(a=r.length,n=!1);e.memory||(n=!1),t=!1,o&&(r=n?[]:"")},c={add:function(){return r&&(n&&!t&&(a=r.length-1,s.push(n)),function t(n){v.each(n,function(n,i){v.isFunction(i)?e.unique&&c.has(i)||r.push(i):i&&i.length&&"string"!==v.type(i)&&t(i)})}(arguments),n&&!t&&l()),this},remove:function(){return v.each(arguments,function(e,t){for(var n;(n=v.inArray(t,r,n))>-1;)r.splice(n,1),n<=a&&a--}),this},has:function(e){return e?v.inArray(e,r)>-1:r.length>0},empty:function(){return r&&(r=[]),this},disable:function(){return o=s=[],r=n="",this},disabled:function(){return!r},lock:function(){return o=s=[],n||t||(r=n=""),this},locked:function(){return!!o},fireWith:function(e,n){return o||(n=[e,(n=n||[]).slice?n.slice():n],s.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c},v.extend({Deferred:function(t){var n=[["notify","progress",v.Callbacks("memory"),v.Callbacks("memory"),2],["resolve","done",v.Callbacks("once memory"),v.Callbacks("once memory"),0,"resolved"],["reject","fail",v.Callbacks("once memory"),v.Callbacks("once memory"),1,"rejected"]],i="pending",o={state:function(){return i},always:function(){return r.done(arguments).fail(arguments),this},catch:function(e){return o.then(null,e)},pipe:function(){var e=arguments;return v.Deferred(function(t){v.each(n,function(n,i){var o=v.isFunction(e[i[4]])&&e[i[4]];r[i[1]](function(){var e=o&&o.apply(this,arguments);e&&v.isFunction(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[i[0]+"With"](this,o?[e]:arguments)})}),e=null}).promise()},then:function(t,i,o){var r=0;function s(t,n,i,o){return function(){var a=this,l=arguments,c=function(){var e,c;if(!(t<r)){if((e=i.apply(a,l))===n.promise())throw new TypeError("Thenable self-resolution");c=e&&("object"==typeof e||"function"==typeof e)&&e.then,v.isFunction(c)?o?c.call(e,s(r,n,F,o),s(r,n,O,o)):(r++,c.call(e,s(r,n,F,o),s(r,n,O,o),s(r,n,F,n.notifyWith))):(i!==F&&(a=void 0,l=[e]),(o||n.resolveWith)(a,l))}},u=o?c:function(){try{c()}catch(e){v.Deferred.exceptionHook&&v.Deferred.exceptionHook(e,u.stackTrace),t+1>=r&&(i!==O&&(a=void 0,l=[e]),n.rejectWith(a,l))}};t?u():(v.Deferred.getStackHook&&(u.stackTrace=v.Deferred.getStackHook()),e.setTimeout(u))}}return v.Deferred(function(e){n[0][3].add(s(0,e,v.isFunction(o)?o:F,e.notifyWith)),n[1][3].add(s(0,e,v.isFunction(t)?t:F)),n[2][3].add(s(0,e,v.isFunction(i)?i:O))}).promise()},promise:function(e){return null!=e?v.extend(e,o):o}},r={};return v.each(n,function(e,t){var s=t[2],a=t[5];o[t[1]]=s.add,a&&s.add(function(){i=a},n[3-e][2].disable,n[0][2].lock),s.add(t[3].fire),r[t[0]]=function(){return r[t[0]+"With"](this===r?void 0:this,arguments),this},r[t[0]+"With"]=s.fireWith}),o.promise(r),t&&t.call(r,r),r},when:function(e){var t=arguments.length,n=t,i=Array(n),o=r.call(arguments),s=v.Deferred(),a=function(e){return function(n){i[e]=this,o[e]=arguments.length>1?r.call(arguments):n,--t||s.resolveWith(i,o)}};if(t<=1&&(N(e,s.done(a(n)).resolve,s.reject),"pending"===s.state()||v.isFunction(o[n]&&o[n].then)))return s.then();for(;n--;)N(o[n],a(n),s.reject);return s.promise()}});var B=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;v.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&B.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},v.readyException=function(t){e.setTimeout(function(){throw t})};var z=v.Deferred();function q(){i.removeEventListener("DOMContentLoaded",q),e.removeEventListener("load",q),v.ready()}v.fn.ready=function(e){return z.then(e).catch(function(e){v.readyException(e)}),this},v.extend({isReady:!1,readyWait:1,holdReady:function(e){e?v.readyWait++:v.ready(!0)},ready:function(e){(!0===e?--v.readyWait:v.isReady)||(v.isReady=!0,!0!==e&&--v.readyWait>0||z.resolveWith(i,[v]))}}),v.ready.then=z.then,"complete"===i.readyState||"loading"!==i.readyState&&!i.documentElement.doScroll?e.setTimeout(v.ready):(i.addEventListener("DOMContentLoaded",q),e.addEventListener("load",q));var j=function(e,t,n,i,o,r,s){var a=0,l=e.length,c=null==n;if("object"===v.type(n))for(a in o=!0,n)j(e,t,a,n[a],!0,r,s);else if(void 0!==i&&(o=!0,v.isFunction(i)||(s=!0),c&&(s?(t.call(e,i),t=null):(c=t,t=function(e,t,n){return c.call(v(e),n)})),t))for(;a<l;a++)t(e[a],n,s?i:i.call(e[a],a,t(e[a],n)));return o?e:c?t.call(e):l?t(e[0],n):r},H=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function W(){this.expando=v.expando+W.uid++}W.uid=1,W.prototype={cache:function(e){var t=e[this.expando];return t||(t={},H(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var i,o=this.cache(e);if("string"==typeof t)o[v.camelCase(t)]=n;else for(i in t)o[v.camelCase(i)]=t[i];return o},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][v.camelCase(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,i=e[this.expando];if(void 0!==i){if(void 0!==t){v.isArray(t)?t=t.map(v.camelCase):t=(t=v.camelCase(t))in i?[t]:t.match(_)||[],n=t.length;for(;n--;)delete i[t[n]]}(void 0===t||v.isEmptyObject(i))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!v.isEmptyObject(t)}};var U=new W,X=new W,Z=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Y=/[A-Z]/g;function V(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(Y,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(i))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Z.test(e)?JSON.parse(e):e)}(n)}catch(e){}X.set(e,t,n)}else n=void 0;return n}v.extend({hasData:function(e){return X.hasData(e)||U.hasData(e)},data:function(e,t,n){return X.access(e,t,n)},removeData:function(e,t){X.remove(e,t)},_data:function(e,t,n){return U.access(e,t,n)},_removeData:function(e,t){U.remove(e,t)}}),v.fn.extend({data:function(e,t){var n,i,o,r=this[0],s=r&&r.attributes;if(void 0===e){if(this.length&&(o=X.get(r),1===r.nodeType&&!U.get(r,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&(0===(i=s[n].name).indexOf("data-")&&(i=v.camelCase(i.slice(5)),V(r,i,o[i])));U.set(r,"hasDataAttrs",!0)}return o}return"object"==typeof e?this.each(function(){X.set(this,e)}):j(this,function(t){var n;if(r&&void 0===t){if(void 0!==(n=X.get(r,e)))return n;if(void 0!==(n=V(r,e)))return n}else this.each(function(){X.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){X.remove(this,e)})}}),v.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=U.get(e,t),n&&(!i||v.isArray(n)?i=U.access(e,t,v.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=v.queue(e,t),i=n.length,o=n.shift(),r=v._queueHooks(e,t);"inprogress"===o&&(o=n.shift(),i--),o&&("fx"===t&&n.unshift("inprogress"),delete r.stop,o.call(e,function(){v.dequeue(e,t)},r)),!i&&r&&r.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return U.get(e,n)||U.access(e,n,{empty:v.Callbacks("once memory").add(function(){U.remove(e,[t+"queue",n])})})}}),v.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?v.queue(this[0],e):void 0===t?this:this.each(function(){var n=v.queue(this,e,t);v._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&v.dequeue(this,e)})},dequeue:function(e){return this.each(function(){v.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,o=v.Deferred(),r=this,s=this.length,a=function(){--i||o.resolveWith(r,[r])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)(n=U.get(r[s],e+"queueHooks"))&&n.empty&&(i++,n.empty.add(a));return a(),o.promise(t)}});var G=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,K=new RegExp("^(?:([+-])=|)("+G+")([a-z%]*)$","i"),Q=["Top","Right","Bottom","Left"],J=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&v.contains(e.ownerDocument,e)&&"none"===v.css(e,"display")},ee=function(e,t,n,i){var o,r,s={};for(r in t)s[r]=e.style[r],e.style[r]=t[r];for(r in o=n.apply(e,i||[]),t)e.style[r]=s[r];return o};function te(e,t,n,i){var o,r=1,s=20,a=i?function(){return i.cur()}:function(){return v.css(e,t,"")},l=a(),c=n&&n[3]||(v.cssNumber[t]?"":"px"),u=(v.cssNumber[t]||"px"!==c&&+l)&&K.exec(v.css(e,t));if(u&&u[3]!==c){c=c||u[3],n=n||[],u=+l||1;do{u/=r=r||".5",v.style(e,t,u+c)}while(r!==(r=a()/l)&&1!==r&&--s)}return n&&(u=+u||+l||0,o=n[1]?u+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=u,i.end=o)),o}var ne={};function ie(e){var t,n=e.ownerDocument,i=e.nodeName,o=ne[i];return o||(t=n.body.appendChild(n.createElement(i)),o=v.css(t,"display"),t.parentNode.removeChild(t),"none"===o&&(o="block"),ne[i]=o,o)}function oe(e,t){for(var n,i,o=[],r=0,s=e.length;r<s;r++)(i=e[r]).style&&(n=i.style.display,t?("none"===n&&(o[r]=U.get(i,"display")||null,o[r]||(i.style.display="")),""===i.style.display&&J(i)&&(o[r]=ie(i))):"none"!==n&&(o[r]="none",U.set(i,"display",n)));for(r=0;r<s;r++)null!=o[r]&&(e[r].style.display=o[r]);return e}v.fn.extend({show:function(){return oe(this,!0)},hide:function(){return oe(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){J(this)?v(this).show():v(this).hide()})}});var re=/^(?:checkbox|radio)$/i,se=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,ae=/^$|\/(?:java|ecma)script/i,le={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ce(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&v.nodeName(e,t)?v.merge([e],n):n}function ue(e,t){for(var n=0,i=e.length;n<i;n++)U.set(e[n],"globalEval",!t||U.get(t[n],"globalEval"))}le.optgroup=le.option,le.tbody=le.tfoot=le.colgroup=le.caption=le.thead,le.th=le.td;var de=/<|&#?\w+;/;function he(e,t,n,i,o){for(var r,s,a,l,c,u,d=t.createDocumentFragment(),h=[],p=0,f=e.length;p<f;p++)if((r=e[p])||0===r)if("object"===v.type(r))v.merge(h,r.nodeType?[r]:r);else if(de.test(r)){for(s=s||d.appendChild(t.createElement("div")),a=(se.exec(r)||["",""])[1].toLowerCase(),l=le[a]||le._default,s.innerHTML=l[1]+v.htmlPrefilter(r)+l[2],u=l[0];u--;)s=s.lastChild;v.merge(h,s.childNodes),(s=d.firstChild).textContent=""}else h.push(t.createTextNode(r));for(d.textContent="",p=0;r=h[p++];)if(i&&v.inArray(r,i)>-1)o&&o.push(r);else if(c=v.contains(r.ownerDocument,r),s=ce(d.appendChild(r),"script"),c&&ue(s),n)for(u=0;r=s[u++];)ae.test(r.type||"")&&n.push(r);return d}!function(){var e=i.createDocumentFragment().appendChild(i.createElement("div")),t=i.createElement("input");t.setAttribute("type","radio"),t.setAttribute("checked","checked"),t.setAttribute("name","t"),e.appendChild(t),f.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="<textarea>x</textarea>",f.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var pe=i.documentElement,fe=/^key/,me=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ge=/^([^.]*)(?:\.(.+)|)/;function ve(){return!0}function ye(){return!1}function we(){try{return i.activeElement}catch(e){}}function be(e,t,n,i,o,r){var s,a;if("object"==typeof t){for(a in"string"!=typeof n&&(i=i||n,n=void 0),t)be(e,a,n,i,t[a],r);return e}if(null==i&&null==o?(o=n,i=n=void 0):null==o&&("string"==typeof n?(o=i,i=void 0):(o=i,i=n,n=void 0)),!1===o)o=ye;else if(!o)return e;return 1===r&&(s=o,(o=function(e){return v().off(e),s.apply(this,arguments)}).guid=s.guid||(s.guid=v.guid++)),e.each(function(){v.event.add(this,t,o,i,n)})}v.event={global:{},add:function(e,t,n,i,o){var r,s,a,l,c,u,d,h,p,f,m,g=U.get(e);if(g)for(n.handler&&(n=(r=n).handler,o=r.selector),o&&v.find.matchesSelector(pe,o),n.guid||(n.guid=v.guid++),(l=g.events)||(l=g.events={}),(s=g.handle)||(s=g.handle=function(t){return void 0!==v&&v.event.triggered!==t.type?v.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(_)||[""]).length;c--;)p=m=(a=ge.exec(t[c])||[])[1],f=(a[2]||"").split(".").sort(),p&&(d=v.event.special[p]||{},p=(o?d.delegateType:d.bindType)||p,d=v.event.special[p]||{},u=v.extend({type:p,origType:m,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&v.expr.match.needsContext.test(o),namespace:f.join(".")},r),(h=l[p])||((h=l[p]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,i,f,s)||e.addEventListener&&e.addEventListener(p,s)),d.add&&(d.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),o?h.splice(h.delegateCount++,0,u):h.push(u),v.event.global[p]=!0)},remove:function(e,t,n,i,o){var r,s,a,l,c,u,d,h,p,f,m,g=U.hasData(e)&&U.get(e);if(g&&(l=g.events)){for(c=(t=(t||"").match(_)||[""]).length;c--;)if(p=m=(a=ge.exec(t[c])||[])[1],f=(a[2]||"").split(".").sort(),p){for(d=v.event.special[p]||{},h=l[p=(i?d.delegateType:d.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=r=h.length;r--;)u=h[r],!o&&m!==u.origType||n&&n.guid!==u.guid||a&&!a.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(h.splice(r,1),u.selector&&h.delegateCount--,d.remove&&d.remove.call(e,u));s&&!h.length&&(d.teardown&&!1!==d.teardown.call(e,f,g.handle)||v.removeEvent(e,p,g.handle),delete l[p])}else for(p in l)v.event.remove(e,p+t[c],n,i,!0);v.isEmptyObject(l)&&U.remove(e,"handle events")}},dispatch:function(e){var t,n,i,o,r,s,a=v.event.fix(e),l=new Array(arguments.length),c=(U.get(this,"events")||{})[a.type]||[],u=v.event.special[a.type]||{};for(l[0]=a,t=1;t<arguments.length;t++)l[t]=arguments[t];if(a.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,a)){for(s=v.event.handlers.call(this,a,c),t=0;(o=s[t++])&&!a.isPropagationStopped();)for(a.currentTarget=o.elem,n=0;(r=o.handlers[n++])&&!a.isImmediatePropagationStopped();)a.rnamespace&&!a.rnamespace.test(r.namespace)||(a.handleObj=r,a.data=r.data,void 0!==(i=((v.event.special[r.origType]||{}).handle||r.handler).apply(o.elem,l))&&!1===(a.result=i)&&(a.preventDefault(),a.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,a),a.result}},handlers:function(e,t){var n,i,o,r,s,a=[],l=t.delegateCount,c=e.target;if(l&&c.nodeType&&!("click"===e.type&&e.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(r=[],s={},n=0;n<l;n++)void 0===s[o=(i=t[n]).selector+" "]&&(s[o]=i.needsContext?v(o,this).index(c)>-1:v.find(o,this,null,[c]).length),s[o]&&r.push(i);r.length&&a.push({elem:c,handlers:r})}return c=this,l<t.length&&a.push({elem:c,handlers:t.slice(l)}),a},addProp:function(e,t){Object.defineProperty(v.Event.prototype,e,{enumerable:!0,configurable:!0,get:v.isFunction(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[v.expando]?e:new v.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==we()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===we()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&v.nodeName(this,"input"))return this.click(),!1},_default:function(e){return v.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},v.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},v.Event=function(e,t){return this instanceof v.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?ve:ye,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&v.extend(this,t),this.timeStamp=e&&e.timeStamp||v.now(),void(this[v.expando]=!0)):new v.Event(e,t)},v.Event.prototype={constructor:v.Event,isDefaultPrevented:ye,isPropagationStopped:ye,isImmediatePropagationStopped:ye,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=ve,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=ve,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=ve,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},v.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&fe.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&me.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},v.event.addProp),v.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){v.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=e.relatedTarget,o=e.handleObj;return i&&(i===this||v.contains(this,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),v.fn.extend({on:function(e,t,n,i){return be(this,e,t,n,i)},one:function(e,t,n,i){return be(this,e,t,n,i,1)},off:function(e,t,n){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,v(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,t,e[o]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=ye),this.each(function(){v.event.remove(this,e,n,t)})}});var xe=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Ce=/<script|<style|<link/i,Ee=/checked\s*(?:[^=]|=\s*.checked.)/i,Ie=/^true\/(.*)/,Te=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function ke(e,t){return v.nodeName(e,"table")&&v.nodeName(11!==t.nodeType?t:t.firstChild,"tr")&&e.getElementsByTagName("tbody")[0]||e}function $e(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Se(e){var t=Ie.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function De(e,t){var n,i,o,r,s,a,l,c;if(1===t.nodeType){if(U.hasData(e)&&(r=U.access(e),s=U.set(t,r),c=r.events))for(o in delete s.handle,s.events={},c)for(n=0,i=c[o].length;n<i;n++)v.event.add(t,o,c[o][n]);X.hasData(e)&&(a=X.access(e),l=v.extend({},a),X.set(t,l))}}function Pe(e,t){var n=t.nodeName.toLowerCase();"input"===n&&re.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function Ae(e,t,n,i){t=s.apply([],t);var o,r,a,l,c,u,d=0,h=e.length,p=h-1,g=t[0],y=v.isFunction(g);if(y||h>1&&"string"==typeof g&&!f.checkClone&&Ee.test(g))return e.each(function(o){var r=e.eq(o);y&&(t[0]=g.call(this,o,r.html())),Ae(r,t,n,i)});if(h&&(r=(o=he(t,e[0].ownerDocument,!1,e,i)).firstChild,1===o.childNodes.length&&(o=r),r||i)){for(l=(a=v.map(ce(o,"script"),$e)).length;d<h;d++)c=o,d!==p&&(c=v.clone(c,!0,!0),l&&v.merge(a,ce(c,"script"))),n.call(e[d],c,d);if(l)for(u=a[a.length-1].ownerDocument,v.map(a,Se),d=0;d<l;d++)c=a[d],ae.test(c.type||"")&&!U.access(c,"globalEval")&&v.contains(u,c)&&(c.src?v._evalUrl&&v._evalUrl(c.src):m(c.textContent.replace(Te,""),u))}return e}function Le(e,t,n){for(var i,o=t?v.filter(t,e):e,r=0;null!=(i=o[r]);r++)n||1!==i.nodeType||v.cleanData(ce(i)),i.parentNode&&(n&&v.contains(i.ownerDocument,i)&&ue(ce(i,"script")),i.parentNode.removeChild(i));return e}v.extend({htmlPrefilter:function(e){return e.replace(xe,"<$1></$2>")},clone:function(e,t,n){var i,o,r,s,a=e.cloneNode(!0),l=v.contains(e.ownerDocument,e);if(!(f.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||v.isXMLDoc(e)))for(s=ce(a),i=0,o=(r=ce(e)).length;i<o;i++)Pe(r[i],s[i]);if(t)if(n)for(r=r||ce(e),s=s||ce(a),i=0,o=r.length;i<o;i++)De(r[i],s[i]);else De(e,a);return(s=ce(a,"script")).length>0&&ue(s,!l&&ce(e,"script")),a},cleanData:function(e){for(var t,n,i,o=v.event.special,r=0;void 0!==(n=e[r]);r++)if(H(n)){if(t=n[U.expando]){if(t.events)for(i in t.events)o[i]?v.event.remove(n,i):v.removeEvent(n,i,t.handle);n[U.expando]=void 0}n[X.expando]&&(n[X.expando]=void 0)}}}),v.fn.extend({detach:function(e){return Le(this,e,!0)},remove:function(e){return Le(this,e)},text:function(e){return j(this,function(e){return void 0===e?v.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Ae(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||ke(this,e).appendChild(e)})},prepend:function(){return Ae(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=ke(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Ae(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Ae(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(v.cleanData(ce(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return v.clone(this,e,t)})},html:function(e){return j(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ce.test(e)&&!le[(se.exec(e)||["",""])[1].toLowerCase()]){e=v.htmlPrefilter(e);try{for(;n<i;n++)1===(t=this[n]||{}).nodeType&&(v.cleanData(ce(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return Ae(this,arguments,function(t){var n=this.parentNode;v.inArray(this,e)<0&&(v.cleanData(ce(this)),n&&n.replaceChild(t,this))},e)}}),v.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){v.fn[e]=function(e){for(var n,i=[],o=v(e),r=o.length-1,s=0;s<=r;s++)n=s===r?this:this.clone(!0),v(o[s])[t](n),a.apply(i,n.get());return this.pushStack(i)}});var Me=/^margin/,Re=new RegExp("^("+G+")(?!px)[a-z%]+$","i"),_e=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)};function Fe(e,t,n){var i,o,r,s,a=e.style;return(n=n||_e(e))&&(""!==(s=n.getPropertyValue(t)||n[t])||v.contains(e.ownerDocument,e)||(s=v.style(e,t)),!f.pixelMarginRight()&&Re.test(s)&&Me.test(t)&&(i=a.width,o=a.minWidth,r=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=i,a.minWidth=o,a.maxWidth=r)),void 0!==s?s+"":s}function Oe(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}!function(){function t(){if(l){l.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",l.innerHTML="",pe.appendChild(a);var t=e.getComputedStyle(l);n="1%"!==t.top,s="2px"===t.marginLeft,o="4px"===t.width,l.style.marginRight="50%",r="4px"===t.marginRight,pe.removeChild(a),l=null}}var n,o,r,s,a=i.createElement("div"),l=i.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",f.clearCloneStyle="content-box"===l.style.backgroundClip,a.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",a.appendChild(l),v.extend(f,{pixelPosition:function(){return t(),n},boxSizingReliable:function(){return t(),o},pixelMarginRight:function(){return t(),r},reliableMarginLeft:function(){return t(),s}}))}();var Ne=/^(none|table(?!-c[ea]).+)/,Be={position:"absolute",visibility:"hidden",display:"block"},ze={letterSpacing:"0",fontWeight:"400"},qe=["Webkit","Moz","ms"],je=i.createElement("div").style;function He(e){if(e in je)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=qe.length;n--;)if((e=qe[n]+t)in je)return e}function We(e,t,n){var i=K.exec(t);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):t}function Ue(e,t,n,i,o){var r,s=0;for(r=n===(i?"border":"content")?4:"width"===t?1:0;r<4;r+=2)"margin"===n&&(s+=v.css(e,n+Q[r],!0,o)),i?("content"===n&&(s-=v.css(e,"padding"+Q[r],!0,o)),"margin"!==n&&(s-=v.css(e,"border"+Q[r]+"Width",!0,o))):(s+=v.css(e,"padding"+Q[r],!0,o),"padding"!==n&&(s+=v.css(e,"border"+Q[r]+"Width",!0,o)));return s}function Xe(e,t,n){var i,o=!0,r=_e(e),s="border-box"===v.css(e,"boxSizing",!1,r);if(e.getClientRects().length&&(i=e.getBoundingClientRect()[t]),i<=0||null==i){if(((i=Fe(e,t,r))<0||null==i)&&(i=e.style[t]),Re.test(i))return i;o=s&&(f.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+Ue(e,t,n||(s?"border":"content"),o,r)+"px"}function Ze(e,t,n,i,o){return new Ze.prototype.init(e,t,n,i,o)}v.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Fe(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,r,s,a=v.camelCase(t),l=e.style;return t=v.cssProps[a]||(v.cssProps[a]=He(a)||a),s=v.cssHooks[t]||v.cssHooks[a],void 0===n?s&&"get"in s&&void 0!==(o=s.get(e,!1,i))?o:l[t]:("string"===(r=typeof n)&&(o=K.exec(n))&&o[1]&&(n=te(e,t,o),r="number"),void(null!=n&&n==n&&("number"===r&&(n+=o&&o[3]||(v.cssNumber[a]?"":"px")),f.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,i))||(l[t]=n))))}},css:function(e,t,n,i){var o,r,s,a=v.camelCase(t);return t=v.cssProps[a]||(v.cssProps[a]=He(a)||a),(s=v.cssHooks[t]||v.cssHooks[a])&&"get"in s&&(o=s.get(e,!0,n)),void 0===o&&(o=Fe(e,t,i)),"normal"===o&&t in ze&&(o=ze[t]),""===n||n?(r=parseFloat(o),!0===n||isFinite(r)?r||0:o):o}}),v.each(["height","width"],function(e,t){v.cssHooks[t]={get:function(e,n,i){if(n)return!Ne.test(v.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Xe(e,t,i):ee(e,Be,function(){return Xe(e,t,i)})},set:function(e,n,i){var o,r=i&&_e(e),s=i&&Ue(e,t,i,"border-box"===v.css(e,"boxSizing",!1,r),r);return s&&(o=K.exec(n))&&"px"!==(o[3]||"px")&&(e.style[t]=n,n=v.css(e,t)),We(0,n,s)}}}),v.cssHooks.marginLeft=Oe(f.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Fe(e,"marginLeft"))||e.getBoundingClientRect().left-ee(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),v.each({margin:"",padding:"",border:"Width"},function(e,t){v.cssHooks[e+t]={expand:function(n){for(var i=0,o={},r="string"==typeof n?n.split(" "):[n];i<4;i++)o[e+Q[i]+t]=r[i]||r[i-2]||r[0];return o}},Me.test(e)||(v.cssHooks[e+t].set=We)}),v.fn.extend({css:function(e,t){return j(this,function(e,t,n){var i,o,r={},s=0;if(v.isArray(t)){for(i=_e(e),o=t.length;s<o;s++)r[t[s]]=v.css(e,t[s],!1,i);return r}return void 0!==n?v.style(e,t,n):v.css(e,t)},e,t,arguments.length>1)}}),v.Tween=Ze,Ze.prototype={constructor:Ze,init:function(e,t,n,i,o,r){this.elem=e,this.prop=n,this.easing=o||v.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=r||(v.cssNumber[n]?"":"px")},cur:function(){var e=Ze.propHooks[this.prop];return e&&e.get?e.get(this):Ze.propHooks._default.get(this)},run:function(e){var t,n=Ze.propHooks[this.prop];return this.options.duration?this.pos=t=v.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Ze.propHooks._default.set(this),this}},Ze.prototype.init.prototype=Ze.prototype,Ze.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=v.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){v.fx.step[e.prop]?v.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[v.cssProps[e.prop]]&&!v.cssHooks[e.prop]?e.elem[e.prop]=e.now:v.style(e.elem,e.prop,e.now+e.unit)}}},Ze.propHooks.scrollTop=Ze.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},v.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},v.fx=Ze.prototype.init,v.fx.step={};var Ye,Ve,Ge=/^(?:toggle|show|hide)$/,Ke=/queueHooks$/;function Qe(){Ve&&(e.requestAnimationFrame(Qe),v.fx.tick())}function Je(){return e.setTimeout(function(){Ye=void 0}),Ye=v.now()}function et(e,t){var n,i=0,o={height:e};for(t=t?1:0;i<4;i+=2-t)o["margin"+(n=Q[i])]=o["padding"+n]=e;return t&&(o.opacity=o.width=e),o}function tt(e,t,n){for(var i,o=(nt.tweeners[t]||[]).concat(nt.tweeners["*"]),r=0,s=o.length;r<s;r++)if(i=o[r].call(n,t,e))return i}function nt(e,t,n){var i,o,r=0,s=nt.prefilters.length,a=v.Deferred().always(function(){delete l.elem}),l=function(){if(o)return!1;for(var t=Ye||Je(),n=Math.max(0,c.startTime+c.duration-t),i=1-(n/c.duration||0),r=0,s=c.tweens.length;r<s;r++)c.tweens[r].run(i);return a.notifyWith(e,[c,i,n]),i<1&&s?n:(a.resolveWith(e,[c]),!1)},c=a.promise({elem:e,props:v.extend({},t),opts:v.extend(!0,{specialEasing:{},easing:v.easing._default},n),originalProperties:t,originalOptions:n,startTime:Ye||Je(),duration:n.duration,tweens:[],createTween:function(t,n){var i=v.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(i),i},stop:function(t){var n=0,i=t?c.tweens.length:0;if(o)return this;for(o=!0;n<i;n++)c.tweens[n].run(1);return t?(a.notifyWith(e,[c,1,0]),a.resolveWith(e,[c,t])):a.rejectWith(e,[c,t]),this}}),u=c.props;for(function(e,t){var n,i,o,r,s;for(n in e)if(o=t[i=v.camelCase(n)],r=e[n],v.isArray(r)&&(o=r[1],r=e[n]=r[0]),n!==i&&(e[i]=r,delete e[n]),(s=v.cssHooks[i])&&"expand"in s)for(n in r=s.expand(r),delete e[i],r)n in e||(e[n]=r[n],t[n]=o);else t[i]=o}(u,c.opts.specialEasing);r<s;r++)if(i=nt.prefilters[r].call(c,e,u,c.opts))return v.isFunction(i.stop)&&(v._queueHooks(c.elem,c.opts.queue).stop=v.proxy(i.stop,i)),i;return v.map(u,tt,c),v.isFunction(c.opts.start)&&c.opts.start.call(e,c),v.fx.timer(v.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}v.Animation=v.extend(nt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return te(n.elem,e,K.exec(t),n),n}]},tweener:function(e,t){v.isFunction(e)?(t=e,e=["*"]):e=e.match(_);for(var n,i=0,o=e.length;i<o;i++)n=e[i],nt.tweeners[n]=nt.tweeners[n]||[],nt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var i,o,r,s,a,l,c,u,d="width"in t||"height"in t,h=this,p={},f=e.style,m=e.nodeType&&J(e),g=U.get(e,"fxshow");for(i in n.queue||(null==(s=v._queueHooks(e,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,h.always(function(){h.always(function(){s.unqueued--,v.queue(e,"fx").length||s.empty.fire()})})),t)if(o=t[i],Ge.test(o)){if(delete t[i],r=r||"toggle"===o,o===(m?"hide":"show")){if("show"!==o||!g||void 0===g[i])continue;m=!0}p[i]=g&&g[i]||v.style(e,i)}if((l=!v.isEmptyObject(t))||!v.isEmptyObject(p))for(i in d&&1===e.nodeType&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],null==(c=g&&g.display)&&(c=U.get(e,"display")),"none"===(u=v.css(e,"display"))&&(c?u=c:(oe([e],!0),c=e.style.display||c,u=v.css(e,"display"),oe([e]))),("inline"===u||"inline-block"===u&&null!=c)&&"none"===v.css(e,"float")&&(l||(h.done(function(){f.display=c}),null==c&&(u=f.display,c="none"===u?"":u)),f.display="inline-block")),n.overflow&&(f.overflow="hidden",h.always(function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]})),l=!1,p)l||(g?"hidden"in g&&(m=g.hidden):g=U.access(e,"fxshow",{display:c}),r&&(g.hidden=!m),m&&oe([e],!0),h.done(function(){for(i in m||oe([e]),U.remove(e,"fxshow"),p)v.style(e,i,p[i])})),l=tt(m?g[i]:0,i,h),i in g||(g[i]=l.start,m&&(l.end=l.start,l.start=0))}],prefilter:function(e,t){t?nt.prefilters.unshift(e):nt.prefilters.push(e)}}),v.speed=function(e,t,n){var o=e&&"object"==typeof e?v.extend({},e):{complete:n||!n&&t||v.isFunction(e)&&e,duration:e,easing:n&&t||t&&!v.isFunction(t)&&t};return v.fx.off||i.hidden?o.duration=0:"number"!=typeof o.duration&&(o.duration in v.fx.speeds?o.duration=v.fx.speeds[o.duration]:o.duration=v.fx.speeds._default),null!=o.queue&&!0!==o.queue||(o.queue="fx"),o.old=o.complete,o.complete=function(){v.isFunction(o.old)&&o.old.call(this),o.queue&&v.dequeue(this,o.queue)},o},v.fn.extend({fadeTo:function(e,t,n,i){return this.filter(J).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var o=v.isEmptyObject(e),r=v.speed(t,n,i),s=function(){var t=nt(this,v.extend({},e),r);(o||U.get(this,"finish"))&&t.stop(!0)};return s.finish=s,o||!1===r.queue?this.each(s):this.queue(r.queue,s)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,o=null!=e&&e+"queueHooks",r=v.timers,s=U.get(this);if(o)s[o]&&s[o].stop&&i(s[o]);else for(o in s)s[o]&&s[o].stop&&Ke.test(o)&&i(s[o]);for(o=r.length;o--;)r[o].elem!==this||null!=e&&r[o].queue!==e||(r[o].anim.stop(n),t=!1,r.splice(o,1));!t&&n||v.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=U.get(this),i=n[e+"queue"],o=n[e+"queueHooks"],r=v.timers,s=i?i.length:0;for(n.finish=!0,v.queue(this,e,[]),o&&o.stop&&o.stop.call(this,!0),t=r.length;t--;)r[t].elem===this&&r[t].queue===e&&(r[t].anim.stop(!0),r.splice(t,1));for(t=0;t<s;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),v.each(["toggle","show","hide"],function(e,t){var n=v.fn[t];v.fn[t]=function(e,i,o){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(et(t,!0),e,i,o)}}),v.each({slideDown:et("show"),slideUp:et("hide"),slideToggle:et("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){v.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),v.timers=[],v.fx.tick=function(){var e,t=0,n=v.timers;for(Ye=v.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||v.fx.stop(),Ye=void 0},v.fx.timer=function(e){v.timers.push(e),e()?v.fx.start():v.timers.pop()},v.fx.interval=13,v.fx.start=function(){Ve||(Ve=e.requestAnimationFrame?e.requestAnimationFrame(Qe):e.setInterval(v.fx.tick,v.fx.interval))},v.fx.stop=function(){e.cancelAnimationFrame?e.cancelAnimationFrame(Ve):e.clearInterval(Ve),Ve=null},v.fx.speeds={slow:600,fast:200,_default:400},v.fn.delay=function(t,n){return t=v.fx&&v.fx.speeds[t]||t,n=n||"fx",this.queue(n,function(n,i){var o=e.setTimeout(n,t);i.stop=function(){e.clearTimeout(o)}})},function(){var e=i.createElement("input"),t=i.createElement("select").appendChild(i.createElement("option"));e.type="checkbox",f.checkOn=""!==e.value,f.optSelected=t.selected,(e=i.createElement("input")).value="t",e.type="radio",f.radioValue="t"===e.value}();var it,ot=v.expr.attrHandle;v.fn.extend({attr:function(e,t){return j(this,v.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){v.removeAttr(this,e)})}}),v.extend({attr:function(e,t,n){var i,o,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return void 0===e.getAttribute?v.prop(e,t,n):(1===r&&v.isXMLDoc(e)||(o=v.attrHooks[t.toLowerCase()]||(v.expr.match.bool.test(t)?it:void 0)),void 0!==n?null===n?void v.removeAttr(e,t):o&&"set"in o&&void 0!==(i=o.set(e,n,t))?i:(e.setAttribute(t,n+""),n):o&&"get"in o&&null!==(i=o.get(e,t))?i:null==(i=v.find.attr(e,t))?void 0:i)},attrHooks:{type:{set:function(e,t){if(!f.radioValue&&"radio"===t&&v.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i=0,o=t&&t.match(_);if(o&&1===e.nodeType)for(;n=o[i++];)e.removeAttribute(n)}}),it={set:function(e,t,n){return!1===t?v.removeAttr(e,n):e.setAttribute(n,n),n}},v.each(v.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ot[t]||v.find.attr;ot[t]=function(e,t,i){var o,r,s=t.toLowerCase();return i||(r=ot[s],ot[s]=o,o=null!=n(e,t,i)?s:null,ot[s]=r),o}});var rt=/^(?:input|select|textarea|button)$/i,st=/^(?:a|area)$/i;function at(e){return(e.match(_)||[]).join(" ")}function lt(e){return e.getAttribute&&e.getAttribute("class")||""}v.fn.extend({prop:function(e,t){return j(this,v.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[v.propFix[e]||e]})}}),v.extend({prop:function(e,t,n){var i,o,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&v.isXMLDoc(e)||(t=v.propFix[t]||t,o=v.propHooks[t]),void 0!==n?o&&"set"in o&&void 0!==(i=o.set(e,n,t))?i:e[t]=n:o&&"get"in o&&null!==(i=o.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=v.find.attr(e,"tabindex");return t?parseInt(t,10):rt.test(e.nodeName)||st.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),f.optSelected||(v.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),v.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){v.propFix[this.toLowerCase()]=this}),v.fn.extend({addClass:function(e){var t,n,i,o,r,s,a,l=0;if(v.isFunction(e))return this.each(function(t){v(this).addClass(e.call(this,t,lt(this)))});if("string"==typeof e&&e)for(t=e.match(_)||[];n=this[l++];)if(o=lt(n),i=1===n.nodeType&&" "+at(o)+" "){for(s=0;r=t[s++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");o!==(a=at(i))&&n.setAttribute("class",a)}return this},removeClass:function(e){var t,n,i,o,r,s,a,l=0;if(v.isFunction(e))return this.each(function(t){v(this).removeClass(e.call(this,t,lt(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(_)||[];n=this[l++];)if(o=lt(n),i=1===n.nodeType&&" "+at(o)+" "){for(s=0;r=t[s++];)for(;i.indexOf(" "+r+" ")>-1;)i=i.replace(" "+r+" "," ");o!==(a=at(i))&&n.setAttribute("class",a)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):v.isFunction(e)?this.each(function(n){v(this).toggleClass(e.call(this,n,lt(this),t),t)}):this.each(function(){var t,i,o,r;if("string"===n)for(i=0,o=v(this),r=e.match(_)||[];t=r[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||((t=lt(this))&&U.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":U.get(this,"__className__")||""))})},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&(" "+at(lt(n))+" ").indexOf(t)>-1)return!0;return!1}});var ct=/\r/g;v.fn.extend({val:function(e){var t,n,i,o=this[0];return arguments.length?(i=v.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(null==(o=i?e.call(this,n,v(this).val()):e)?o="":"number"==typeof o?o+="":v.isArray(o)&&(o=v.map(o,function(e){return null==e?"":e+""})),(t=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,o,"value")||(this.value=o))})):o?(t=v.valHooks[o.type]||v.valHooks[o.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(o,"value"))?n:"string"==typeof(n=o.value)?n.replace(ct,""):null==n?"":n:void 0}}),v.extend({valHooks:{option:{get:function(e){var t=v.find.attr(e,"value");return null!=t?t:at(v.text(e))}},select:{get:function(e){var t,n,i,o=e.options,r=e.selectedIndex,s="select-one"===e.type,a=s?null:[],l=s?r+1:o.length;for(i=r<0?l:s?r:0;i<l;i++)if(((n=o[i]).selected||i===r)&&!n.disabled&&(!n.parentNode.disabled||!v.nodeName(n.parentNode,"optgroup"))){if(t=v(n).val(),s)return t;a.push(t)}return a},set:function(e,t){for(var n,i,o=e.options,r=v.makeArray(t),s=o.length;s--;)((i=o[s]).selected=v.inArray(v.valHooks.option.get(i),r)>-1)&&(n=!0);return n||(e.selectedIndex=-1),r}}}}),v.each(["radio","checkbox"],function(){v.valHooks[this]={set:function(e,t){if(v.isArray(t))return e.checked=v.inArray(v(e).val(),t)>-1}},f.checkOn||(v.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var ut=/^(?:focusinfocus|focusoutblur)$/;v.extend(v.event,{trigger:function(t,n,o,r){var s,a,l,c,u,h,p,f=[o||i],m=d.call(t,"type")?t.type:t,g=d.call(t,"namespace")?t.namespace.split("."):[];if(a=l=o=o||i,3!==o.nodeType&&8!==o.nodeType&&!ut.test(m+v.event.triggered)&&(m.indexOf(".")>-1&&(g=m.split("."),m=g.shift(),g.sort()),u=m.indexOf(":")<0&&"on"+m,(t=t[v.expando]?t:new v.Event(m,"object"==typeof t&&t)).isTrigger=r?2:3,t.namespace=g.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=o),n=null==n?[t]:v.makeArray(n,[t]),p=v.event.special[m]||{},r||!p.trigger||!1!==p.trigger.apply(o,n))){if(!r&&!p.noBubble&&!v.isWindow(o)){for(c=p.delegateType||m,ut.test(c+m)||(a=a.parentNode);a;a=a.parentNode)f.push(a),l=a;l===(o.ownerDocument||i)&&f.push(l.defaultView||l.parentWindow||e)}for(s=0;(a=f[s++])&&!t.isPropagationStopped();)t.type=s>1?c:p.bindType||m,(h=(U.get(a,"events")||{})[t.type]&&U.get(a,"handle"))&&h.apply(a,n),(h=u&&a[u])&&h.apply&&H(a)&&(t.result=h.apply(a,n),!1===t.result&&t.preventDefault());return t.type=m,r||t.isDefaultPrevented()||p._default&&!1!==p._default.apply(f.pop(),n)||!H(o)||u&&v.isFunction(o[m])&&!v.isWindow(o)&&((l=o[u])&&(o[u]=null),v.event.triggered=m,o[m](),v.event.triggered=void 0,l&&(o[u]=l)),t.result}},simulate:function(e,t,n){var i=v.extend(new v.Event,n,{type:e,isSimulated:!0});v.event.trigger(i,null,t)}}),v.fn.extend({trigger:function(e,t){return this.each(function(){v.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return v.event.trigger(e,t,n,!0)}}),v.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){v.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),v.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),f.focusin="onfocusin"in e,f.focusin||v.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){v.event.simulate(t,e.target,v.event.fix(e))};v.event.special[t]={setup:function(){var i=this.ownerDocument||this,o=U.access(i,t);o||i.addEventListener(e,n,!0),U.access(i,t,(o||0)+1)},teardown:function(){var i=this.ownerDocument||this,o=U.access(i,t)-1;o?U.access(i,t,o):(i.removeEventListener(e,n,!0),U.remove(i,t))}}});var dt=e.location,ht=v.now(),pt=/\?/;v.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||v.error("Invalid XML: "+t),n};var ft=/\[\]$/,mt=/\r?\n/g,gt=/^(?:submit|button|image|reset|file)$/i,vt=/^(?:input|select|textarea|keygen)/i;function yt(e,t,n,i){var o;if(v.isArray(t))v.each(t,function(t,o){n||ft.test(e)?i(e,o):yt(e+"["+("object"==typeof o&&null!=o?t:"")+"]",o,n,i)});else if(n||"object"!==v.type(t))i(e,t);else for(o in t)yt(e+"["+o+"]",t[o],n,i)}v.param=function(e,t){var n,i=[],o=function(e,t){var n=v.isFunction(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(v.isArray(e)||e.jquery&&!v.isPlainObject(e))v.each(e,function(){o(this.name,this.value)});else for(n in e)yt(n,e[n],t,o);return i.join("&")},v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=v.prop(this,"elements");return e?v.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!v(this).is(":disabled")&&vt.test(this.nodeName)&&!gt.test(e)&&(this.checked||!re.test(e))}).map(function(e,t){var n=v(this).val();return null==n?null:v.isArray(n)?v.map(n,function(e){return{name:t.name,value:e.replace(mt,"\r\n")}}):{name:t.name,value:n.replace(mt,"\r\n")}}).get()}});var wt=/%20/g,bt=/#.*$/,xt=/([?&])_=[^&]*/,Ct=/^(.*?):[ \t]*([^\r\n]*)$/gm,Et=/^(?:GET|HEAD)$/,It=/^\/\//,Tt={},kt={},$t="*/".concat("*"),St=i.createElement("a");function Dt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,o=0,r=t.toLowerCase().match(_)||[];if(v.isFunction(n))for(;i=r[o++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function Pt(e,t,n,i){var o={},r=e===kt;function s(a){var l;return o[a]=!0,v.each(e[a]||[],function(e,a){var c=a(t,n,i);return"string"!=typeof c||r||o[c]?r?!(l=c):void 0:(t.dataTypes.unshift(c),s(c),!1)}),l}return s(t.dataTypes[0])||!o["*"]&&s("*")}function At(e,t){var n,i,o=v.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((o[n]?e:i||(i={}))[n]=t[n]);return i&&v.extend(!0,e,i),e}St.href=dt.href,v.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:dt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(dt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$t,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":v.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?At(At(e,v.ajaxSettings),t):At(v.ajaxSettings,e)},ajaxPrefilter:Dt(Tt),ajaxTransport:Dt(kt),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var o,r,s,a,l,c,u,d,h,p,f=v.ajaxSetup({},n),m=f.context||f,g=f.context&&(m.nodeType||m.jquery)?v(m):v.event,y=v.Deferred(),w=v.Callbacks("once memory"),b=f.statusCode||{},x={},C={},E="canceled",I={readyState:0,getResponseHeader:function(e){var t;if(u){if(!a)for(a={};t=Ct.exec(s);)a[t[1].toLowerCase()]=t[2];t=a[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return u?s:null},setRequestHeader:function(e,t){return null==u&&(e=C[e.toLowerCase()]=C[e.toLowerCase()]||e,x[e]=t),this},overrideMimeType:function(e){return null==u&&(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(u)I.always(e[I.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||E;return o&&o.abort(t),T(0,t),this}};if(y.promise(I),f.url=((t||f.url||dt.href)+"").replace(It,dt.protocol+"//"),f.type=n.method||n.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(_)||[""],null==f.crossDomain){c=i.createElement("a");try{c.href=f.url,c.href=c.href,f.crossDomain=St.protocol+"//"+St.host!=c.protocol+"//"+c.host}catch(e){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=v.param(f.data,f.traditional)),Pt(Tt,f,n,I),u)return I;for(h in(d=v.event&&f.global)&&0==v.active++&&v.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Et.test(f.type),r=f.url.replace(bt,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(wt,"+")):(p=f.url.slice(r.length),f.data&&(r+=(pt.test(r)?"&":"?")+f.data,delete f.data),!1===f.cache&&(r=r.replace(xt,"$1"),p=(pt.test(r)?"&":"?")+"_="+ht+++p),f.url=r+p),f.ifModified&&(v.lastModified[r]&&I.setRequestHeader("If-Modified-Since",v.lastModified[r]),v.etag[r]&&I.setRequestHeader("If-None-Match",v.etag[r])),(f.data&&f.hasContent&&!1!==f.contentType||n.contentType)&&I.setRequestHeader("Content-Type",f.contentType),I.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+$t+"; q=0.01":""):f.accepts["*"]),f.headers)I.setRequestHeader(h,f.headers[h]);if(f.beforeSend&&(!1===f.beforeSend.call(m,I,f)||u))return I.abort();if(E="abort",w.add(f.complete),I.done(f.success),I.fail(f.error),o=Pt(kt,f,n,I)){if(I.readyState=1,d&&g.trigger("ajaxSend",[I,f]),u)return I;f.async&&f.timeout>0&&(l=e.setTimeout(function(){I.abort("timeout")},f.timeout));try{u=!1,o.send(x,T)}catch(e){if(u)throw e;T(-1,e)}}else T(-1,"No Transport");function T(t,n,i,a){var c,h,p,x,C,E=n;u||(u=!0,l&&e.clearTimeout(l),o=void 0,s=a||"",I.readyState=t>0?4:0,c=t>=200&&t<300||304===t,i&&(x=function(e,t,n){for(var i,o,r,s,a=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(o in a)if(a[o]&&a[o].test(i)){l.unshift(o);break}if(l[0]in n)r=l[0];else{for(o in n){if(!l[0]||e.converters[o+" "+l[0]]){r=o;break}s||(s=o)}r=r||s}if(r)return r!==l[0]&&l.unshift(r),n[r]}(f,I,i)),x=function(e,t,n,i){var o,r,s,a,l,c={},u=e.dataTypes.slice();if(u[1])for(s in e.converters)c[s.toLowerCase()]=e.converters[s];for(r=u.shift();r;)if(e.responseFields[r]&&(n[e.responseFields[r]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=r,r=u.shift())if("*"===r)r=l;else if("*"!==l&&l!==r){if(!(s=c[l+" "+r]||c["* "+r]))for(o in c)if((a=o.split(" "))[1]===r&&(s=c[l+" "+a[0]]||c["* "+a[0]])){!0===s?s=c[o]:!0!==c[o]&&(r=a[0],u.unshift(a[1]));break}if(!0!==s)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(e){return{state:"parsererror",error:s?e:"No conversion from "+l+" to "+r}}}return{state:"success",data:t}}(f,x,I,c),c?(f.ifModified&&((C=I.getResponseHeader("Last-Modified"))&&(v.lastModified[r]=C),(C=I.getResponseHeader("etag"))&&(v.etag[r]=C)),204===t||"HEAD"===f.type?E="nocontent":304===t?E="notmodified":(E=x.state,h=x.data,c=!(p=x.error))):(p=E,!t&&E||(E="error",t<0&&(t=0))),I.status=t,I.statusText=(n||E)+"",c?y.resolveWith(m,[h,E,I]):y.rejectWith(m,[I,E,p]),I.statusCode(b),b=void 0,d&&g.trigger(c?"ajaxSuccess":"ajaxError",[I,f,c?h:p]),w.fireWith(m,[I,E]),d&&(g.trigger("ajaxComplete",[I,f]),--v.active||v.event.trigger("ajaxStop")))}return I},getJSON:function(e,t,n){return v.get(e,t,n,"json")},getScript:function(e,t){return v.get(e,void 0,t,"script")}}),v.each(["get","post"],function(e,t){v[t]=function(e,n,i,o){return v.isFunction(n)&&(o=o||i,i=n,n=void 0),v.ajax(v.extend({url:e,type:t,dataType:o,data:n,success:i},v.isPlainObject(e)&&e))}}),v._evalUrl=function(e){return v.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},v.fn.extend({wrapAll:function(e){var t;return this[0]&&(v.isFunction(e)&&(e=e.call(this[0])),t=v(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return v.isFunction(e)?this.each(function(t){v(this).wrapInner(e.call(this,t))}):this.each(function(){var t=v(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v.isFunction(e);return this.each(function(n){v(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){v(this).replaceWith(this.childNodes)}),this}}),v.expr.pseudos.hidden=function(e){return!v.expr.pseudos.visible(e)},v.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},v.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Lt={0:200,1223:204},Mt=v.ajaxSettings.xhr();f.cors=!!Mt&&"withCredentials"in Mt,f.ajax=Mt=!!Mt,v.ajaxTransport(function(t){var n,i;if(f.cors||Mt&&!t.crossDomain)return{send:function(o,r){var s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)a[s]=t.xhrFields[s];for(s in t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest"),o)a.setRequestHeader(s,o[s]);n=function(e){return function(){n&&(n=i=a.onload=a.onerror=a.onabort=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?r(0,"error"):r(a.status,a.statusText):r(Lt[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=n(),i=a.onerror=n("error"),void 0!==a.onabort?a.onabort=i:a.onreadystatechange=function(){4===a.readyState&&e.setTimeout(function(){n&&i()})},n=n("abort");try{a.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}),v.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return v.globalEval(e),e}}}),v.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),v.ajaxTransport("script",function(e){var t,n;if(e.crossDomain)return{send:function(o,r){t=v("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&r("error"===e.type?404:200,e.type)}),i.head.appendChild(t[0])},abort:function(){n&&n()}}});var Rt=[],_t=/(=)\?(?=&|$)|\?\?/;function Ft(e){return v.isWindow(e)?e:9===e.nodeType&&e.defaultView}v.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Rt.pop()||v.expando+"_"+ht++;return this[e]=!0,e}}),v.ajaxPrefilter("json jsonp",function(t,n,i){var o,r,s,a=!1!==t.jsonp&&(_t.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&_t.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return o=t.jsonpCallback=v.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(_t,"$1"+o):!1!==t.jsonp&&(t.url+=(pt.test(t.url)?"&":"?")+t.jsonp+"="+o),t.converters["script json"]=function(){return s||v.error(o+" was not called"),s[0]},t.dataTypes[0]="json",r=e[o],e[o]=function(){s=arguments},i.always(function(){void 0===r?v(e).removeProp(o):e[o]=r,t[o]&&(t.jsonpCallback=n.jsonpCallback,Rt.push(o)),s&&v.isFunction(r)&&r(s[0]),s=r=void 0}),"script"}),f.createHTMLDocument=function(){var e=i.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),v.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(f.createHTMLDocument?((o=(t=i.implementation.createHTMLDocument("")).createElement("base")).href=i.location.href,t.head.appendChild(o)):t=i),s=!n&&[],(r=$.exec(e))?[t.createElement(r[1])]:(r=he([e],t,s),s&&s.length&&v(s).remove(),v.merge([],r.childNodes)));var o,r,s},v.fn.load=function(e,t,n){var i,o,r,s=this,a=e.indexOf(" ");return a>-1&&(i=at(e.slice(a)),e=e.slice(0,a)),v.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(o="POST"),s.length>0&&v.ajax({url:e,type:o||"GET",dataType:"html",data:t}).done(function(e){r=arguments,s.html(i?v("<div>").append(v.parseHTML(e)).find(i):e)}).always(n&&function(e,t){s.each(function(){n.apply(this,r||[e.responseText,t,e])})}),this},v.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){v.fn[t]=function(e){return this.on(t,e)}}),v.expr.pseudos.animated=function(e){return v.grep(v.timers,function(t){return e===t.elem}).length},v.offset={setOffset:function(e,t,n){var i,o,r,s,a,l,c=v.css(e,"position"),u=v(e),d={};"static"===c&&(e.style.position="relative"),a=u.offset(),r=v.css(e,"top"),l=v.css(e,"left"),("absolute"===c||"fixed"===c)&&(r+l).indexOf("auto")>-1?(s=(i=u.position()).top,o=i.left):(s=parseFloat(r)||0,o=parseFloat(l)||0),v.isFunction(t)&&(t=t.call(e,n,v.extend({},a))),null!=t.top&&(d.top=t.top-a.top+s),null!=t.left&&(d.left=t.left-a.left+o),"using"in t?t.using.call(e,d):u.css(d)}},v.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){v.offset.setOffset(this,e,t)});var t,n,i,o,r=this[0];return r?r.getClientRects().length?(i=r.getBoundingClientRect()).width||i.height?(n=Ft(o=r.ownerDocument),t=o.documentElement,{top:i.top+n.pageYOffset-t.clientTop,left:i.left+n.pageXOffset-t.clientLeft}):i:{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n=this[0],i={top:0,left:0};return"fixed"===v.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),v.nodeName(e[0],"html")||(i=e.offset()),i={top:i.top+v.css(e[0],"borderTopWidth",!0),left:i.left+v.css(e[0],"borderLeftWidth",!0)}),{top:t.top-i.top-v.css(n,"marginTop",!0),left:t.left-i.left-v.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===v.css(e,"position");)e=e.offsetParent;return e||pe})}}),v.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;v.fn[e]=function(i){return j(this,function(e,i,o){var r=Ft(e);return void 0===o?r?r[t]:e[i]:void(r?r.scrollTo(n?r.pageXOffset:o,n?o:r.pageYOffset):e[i]=o)},e,i,arguments.length)}}),v.each(["top","left"],function(e,t){v.cssHooks[t]=Oe(f.pixelPosition,function(e,n){if(n)return n=Fe(e,t),Re.test(n)?v(e).position()[t]+"px":n})}),v.each({Height:"height",Width:"width"},function(e,t){v.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,i){v.fn[i]=function(o,r){var s=arguments.length&&(n||"boolean"!=typeof o),a=n||(!0===o||!0===r?"margin":"border");return j(this,function(t,n,o){var r;return v.isWindow(t)?0===i.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(r=t.documentElement,Math.max(t.body["scroll"+e],r["scroll"+e],t.body["offset"+e],r["offset"+e],r["client"+e])):void 0===o?v.css(t,n,a):v.style(t,n,o,a)},t,s?o:void 0,s)}})}),v.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),v.parseJSON=JSON.parse,"function"==typeof define&&define.amd&&define("jquery",[],function(){return v});var Ot=e.jQuery,Nt=e.$;return v.noConflict=function(t){return e.$===v&&(e.$=Nt),t&&e.jQuery===v&&(e.jQuery=Ot),v},t||(e.jQuery=e.$=v),v}),function(e,t,n){function i(e,t){return typeof e===t}function o(e){return e.replace(/([a-z])-([a-z])/g,function(e,t,n){return t+n.toUpperCase()}).replace(/^-/,"")}function r(e,t){return!!~(""+e).indexOf(t)}function s(){return"function"!=typeof t.createElement?t.createElement(arguments[0]):b?t.createElementNS.call(t,"http://www.w3.org/2000/svg",arguments[0]):t.createElement.apply(t,arguments)}function a(e,t){return function(){return e.apply(t,arguments)}}function l(e){return e.replace(/([A-Z])/g,function(e,t){return"-"+t.toLowerCase()}).replace(/^ms-/,"-ms-")}function c(t,n,i){var o;if("getComputedStyle"in e){o=getComputedStyle.call(e,t,n);var r=e.console;if(null!==o)i&&(o=o.getPropertyValue(i));else if(r){r[r.error?"error":"log"].call(r,"getComputedStyle returning null, its possible modernizr test results are inaccurate")}}else o=!n&&t.currentStyle&&t.currentStyle[i];return o}function u(e,n,i,o){var r,a,l,c,u="modernizr",d=s("div"),h=function(){var e=t.body;return e||((e=s(b?"svg":"body")).fake=!0),e}();if(parseInt(i,10))for(;i--;)(l=s("div")).id=o?o[i]:u+(i+1),d.appendChild(l);return(r=s("style")).type="text/css",r.id="s"+u,(h.fake?h:d).appendChild(r),h.appendChild(d),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(t.createTextNode(e)),d.id=u,h.fake&&(h.style.background="",h.style.overflow="hidden",c=w.style.overflow,w.style.overflow="hidden",w.appendChild(h)),a=n(d,e),h.fake?(h.parentNode.removeChild(h),w.style.overflow=c,w.offsetHeight):d.parentNode.removeChild(d),!!a}function d(t,i){var o=t.length;if("CSS"in e&&"supports"in e.CSS){for(;o--;)if(e.CSS.supports(l(t[o]),i))return!0;return!1}if("CSSSupportsRule"in e){for(var r=[];o--;)r.push("("+l(t[o])+":"+i+")");return u("@supports ("+(r=r.join(" or "))+") { #modernizr { position: absolute; } }",function(e){return"absolute"==c(e,null,"position")})}return n}function h(e,t,a,l){function c(){h&&(delete k.style,delete k.modElem)}if(l=!i(l,"undefined")&&l,!i(a,"undefined")){var u=d(e,a);if(!i(u,"undefined"))return u}for(var h,p,f,m,g,v=["modernizr","tspan","samp"];!k.style&&v.length;)h=!0,k.modElem=s(v.shift()),k.style=k.modElem.style;for(f=e.length,p=0;f>p;p++)if(m=e[p],g=k.style[m],r(m,"-")&&(m=o(m)),k.style[m]!==n){if(l||i(a,"undefined"))return c(),"pfx"!=t||m;try{k.style[m]=a}catch(e){}if(k.style[m]!=g)return c(),"pfx"!=t||m}return c(),!1}function p(e,t,n,o,r){var s=e.charAt(0).toUpperCase()+e.slice(1),l=(e+" "+C.join(s+" ")+s).split(" ");return i(t,"string")||i(t,"undefined")?h(l,t,o,r):function(e,t,n){var o;for(var r in e)if(e[r]in t)return!1===n?e[r]:i(o=t[e[r]],"function")?a(o,n||t):o;return!1}(l=(e+" "+I.join(s+" ")+s).split(" "),t,n)}function f(e,t,i){return p(e,n,n,t,i)}var m=[],g=[],v={_version:"3.5.0",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){g.push({name:e,fn:t,options:n})},addAsyncTest:function(e){g.push({name:null,fn:e})}},y=function(){};y.prototype=v,y=new y;var w=t.documentElement,b="svg"===w.nodeName.toLowerCase(),x="Moz O ms Webkit",C=v._config.usePrefixes?x.split(" "):[];v._cssomPrefixes=C;var E=function(t){var i,o=prefixes.length,r=e.CSSRule;if(void 0===r)return n;if(!t)return!1;if((i=(t=t.replace(/^@/,"")).replace(/-/g,"_").toUpperCase()+"_RULE")in r)return"@"+t;for(var s=0;o>s;s++){var a=prefixes[s];if(a.toUpperCase()+"_"+i in r)return"@-"+a.toLowerCase()+"-"+t}return!1};v.atRule=E;var I=v._config.usePrefixes?x.toLowerCase().split(" "):[];v._domPrefixes=I;var T={elem:s("modernizr")};y._q.push(function(){delete T.elem});var k={style:T.elem.style};y._q.unshift(function(){delete k.style}),v.testAllProps=p,v.testAllProps=f,y.addTest("flexbox",f("flexBasis","1px",!0)),y.addTest("cssmask",f("maskRepeat","repeat-x",!0));var $=v.prefixed=function(e,t,n){return 0===e.indexOf("@")?E(e):(-1!=e.indexOf("-")&&(e=o(e)),t?p(e,t,n):p(e,"pfx"))};y.addTest("objectfit",!!$("objectFit"),{aliases:["object-fit"]}),function(){var e,t,n,o,r,s;for(var a in g)if(g.hasOwnProperty(a)){if(e=[],(t=g[a]).name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;n<t.options.aliases.length;n++)e.push(t.options.aliases[n].toLowerCase());for(o=i(t.fn,"function")?t.fn():t.fn,r=0;r<e.length;r++)1===(s=e[r].split(".")).length?y[s[0]]=o:(!y[s[0]]||y[s[0]]instanceof Boolean||(y[s[0]]=new Boolean(y[s[0]])),y[s[0]][s[1]]=o),m.push((o?"":"no-")+s.join("-"))}}(),function(e){var t=w.className,n=y._config.classPrefix||"";if(b&&(t=t.baseVal),y._config.enableJSClass){var i=new RegExp("(^|\\s)"+n+"no-js(\\s|$)");t=t.replace(i,"$1"+n+"js$2")}y._config.enableClasses&&(t+=" "+n+e.join(" "+n),b?w.className.baseVal=t:w.className=t)}(m),delete v.addTest,delete v.addAsyncTest;for(var S=0;S<y._q.length;S++)y._q[S]();e.Modernizr=y}(window,document),$(document).ready(function(){if($("html").removeClass("no-js").addClass("js"),navigator.userAgent.match(/IEMobile\/10\.0/)){var e=document.createElement("style");e.appendChild(document.createTextNode("@-ms-viewport{width:auto!important}")),document.querySelector("head").appendChild(e)}deviceDetect("detect"),inIframe()&&deviceDetect("iphone")&&$("body").addClass("ios-iframe"),smoothScrolling(),watchForPrint(),bindForms(),$(window).on("resize",function(){deviceDetect("detect")})}),$(document).ready(function(){fullscreenHeader(),$(window).on("resize orientationchange",function(){fullscreenHeader()})}),$(document).ready(function(){var e=!1,t=!1;setTimeout(function(){shortContent(),e=!0},500),isCMS()&&$(document).on("wnd-content-change",".wnd-page",function(){e?e=!1:setTimeout(function(){shortContent()},300)}),$(document).on("wnd-dynamic-content-change",".eshop",function(){e?e=!1:setTimeout(function(){shortContent()},300)}),$(window).on("resize orientationchange",function(){t?t=!1:setTimeout(function(){shortContent(),t=!0},500)})}),function(e){e.fn.parentResponsive=function(t){var n=e.extend({},e.fn.parentResponsive.defaults,t),o=n.classes.join(" ");!function(t,n){e(t).each(function(t){var r=e(this);if("none"==r.css("float"))r.removeClass(o);else{var s=r.outerWidth(),a="",l="",c=r.attr("class");if(c=c.split(" "),e.each(c,function(e){c[e]!=n.column&&(l+=c[e]+" ")}),e.each(n.classes,function(e){if(s>n.widths[e]&&s<=n.widths[e+1])for(i=0;i<=e;i++)a+=n.classes[i]+" "}),l!=a&&(r.removeClass(o).addClass(a),isCMS())){var u=r[0]?r[0]:r;if(u){var d=document.createEvent("Event");d.initEvent("wnd-redraw-done",!0,!0),u.dispatchEvent(d)}}}})}(e(this),n)},e.fn.parentResponsive.defaults={widths:[0,319,364,479,599,767,899,1023,9999],classes:["pr-0","pr-320","pr-365","pr-480","pr-600","pr-768","pr-1024","pr-infinity"],column:"pr"},e(document).ready(function(){var t=function(){e(".pr").parentResponsive()};isCMS()&&e(document).on("wnd-redraw",".content",function(){var t=e(this).find(".pr");t[0]&&setTimeout(function(){t.parentResponsive()},200)}),e(".pr")[0]&&(t(),e(window).on("resize orientationchange",function(){t()})),e(".pr").resize(function(){setTimeout(function(){t()},200)})})}(jQuery),$(document).ready(function(){var e,t=$("body"),n=$("#menu"),i=n.find(" > div"),o=!1,r=!1,s=isMobileMenu(),a=!1,l=!1,c=!1,u=$(window).width(),d=$(window).height(),h=document.getElementById(i.attr("id")),p=$(".nav-line .section-inner"),f=$(".logo"),m=void 0,g=void 0,v=n.attr("data-type"),y="top";"centered"==n.attr("data-align")&&(y="centered"),0==$(p).length&&(p=$(".nav-line"),f=$(".nav-line .logo"));var w,b,x,C=f.height(),E=$("li.wnd-homepage");w=E.length>0?n.find(".wnd-homepage").outerHeight(!0):n.find("ul > li"),"none"==n.css("display")&&(n.show(),w=E.outerHeight(!0),n.hide());var I,T=!1;function k(e){if(isCMS()){var t=document.createEvent("Event");"open"==e&&t.initEvent("wnd-open-menu",!0,!0),"close"==e&&t.initEvent("wnd-close-menu",!0,!0),h.dispatchEvent(t)}}function S(){var e=$("#menu-submit"),n=$(".close-menu"),r=$("#menu"),s=$("#menu-overlay");n.off("click").on("click",function(t){t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),$(e).trigger("click")}),e.off("click").on("click",function(n){n.preventDefault(),n.stopImmediatePropagation(),n.stopPropagation();var i=$("#menu");e.hasClass("active")?(e.removeClass("active"),i.removeClass("open"),$(s).removeClass("show"),$("html, body").removeClass("noscroll"),setTimeout(function(){i.removeClass("visible"),t.removeClass("menu-open"),$("#menu-overlay").remove()},250),k("close")):($("#menu-mobile").before('<div id="menu-overlay"></div>'),e.addClass("active"),$(s).addClass("show"),i.addClass("visible"),setTimeout(function(){i.addClass("open"),$("html, body").addClass("noscroll"),t.addClass("menu-open")},10),k("open"))}),isMobileMenu()&&"vertical"==v&&$("#wrapper").off("touchend MSPointerDown pointerdown click").on("touchend MSPointerDown pointerdown click",function(t){$(t.target).closest("#menu").length<=0&&$("#menu").hasClass("open")&&$(t.target).closest("#menu-mobile").length<=0&&e.trigger("click")}),$("a.mm-arrow").off("touchend MSPointerDown pointerdown click").on("touchend MSPointerDown pointerdown click",function(e){if(e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation(),o)return!1;o=!0,setTimeout(function(){o=!1},500);var t=$(this).parent().children("ul");if(isMobileMenu())$(this).hasClass("mm-down")?($(this).parent().addClass("hover"),$(this).removeClass("mm-down").addClass("mm-up"),t.addClass("open")):($(this).parent().removeClass("hover"),$(this).removeClass("mm-up").addClass("mm-down"),t.removeClass("open"));else if($(this).hasClass("mm-down")){$(this).parent().addClass("hover"),$(this).removeClass("mm-down").addClass("mm-up"),t.show();var n=t.outerHeight(!0);t.hide(),t.css("height","0"),t.addClass("open"),t.animate({height:n},{step:function(){"centered"==y&&i.height()>=r.height()&&r.removeClass("centered")},duration:500,complete:function(){P(),t.attr("style","")}})}else $(this).removeClass("mm-up").addClass("mm-down"),t.animate({height:0},{step:function(){"centered"==y&&i.height()<r.height()&&r.addClass("centered")},duration:500,complete:function(){$(this).parent().removeClass("hover"),t.attr("style",""),t.removeClass("open"),setTimeout(P,50)}})}),$(".scrollup").off("touchend MSPointerDown pointerdown click").on("touchend MSPointerDown pointerdown click",function(){if(1!=c){c=!0,setTimeout(function(){c=!1},500);var e=r.find("ul.level-1 > li:not(.menu-more)").outerHeight(!0),t=parseInt(i.position().top),n=Math.abs(t)-1*e;r.animate({scrollTop:n},{step:P,duration:500,complete:P})}}),$(".scrolldown").off("touchend MSPointerDown pointerdown click").on("touchend MSPointerDown pointerdown click",function(){if(1!=c){c=!0,setTimeout(function(){c=!1},500);var e=r.find("ul.level-1 > li:not(.menu-more)").outerHeight(!0),t=parseInt(i.position().top),n=Math.abs(t)+1*e;r.animate({scrollTop:n},{step:P,duration:500,complete:P})}})}function D(){var e=$("#menu"),n=$("#menublock"),i=$("header");if(!isMobileMenu()){var o;o="fixed"==$("#footer").css("position")?parseInt($("footer").outerHeight(!0)):0;var s=parseInt(n.css("paddingTop"))+parseInt(n.css("paddingBottom")),a=parseInt(n.css("marginTop"))+parseInt(n.css("marginBottom"));if(e.find("ul.level-1").length){var l=i.outerHeight(!0),c=t.outerHeight(!0);l!=c&&c<l&&(l=c);var u=parseInt(i.css("paddingTop")),d=parseInt($(".nav-line").css("paddingTop")),h=parseInt($(".logo").outerHeight(!0)),p=$("header .subclaim");p.length&&(h+=parseInt(p.outerHeight(!0)));var f=0;deviceDetect("ios")&&(f=60);var v=l-u-d-h-o-s-a-f,b=0;if(T)for("none"==e.css("display")?(e.show(),w=$("ul.level-1 > li:first-child").outerHeight(!0),e.hide()):w=$("ul.level-1 > li:first-child").outerHeight(!0);b+w<=v;)b+=w;else b=v;g=b;var x=0,C=$("#menu").find("ul.level-1 > li");C.length>0?($(C).each(function(){x+=parseInt($(this).outerHeight(!0))}),m=x):x=m}else b=g,x=m;$("html").hasClass("flexbox")&&null==navigator.userAgent.match(/iPad/i)?$(".nav-line").css("paddingBottom",o+"px"):(n.css("height",b+s),n.css("maxHeight",b+s)),x>b?($(".scrolldown").show(),"centered"==y&&e.removeClass("centered")):("centered"==y&&e.addClass("centered"),$(".scrollup").hide(),$(".scrolldown").hide())}r=!1}function P(){var e=$("#menu"),t=e.find("> div"),n=e.height(),i=t.height();if(i>n){var o=e.offset().top,r=t.offset().top,s=$(".scrolldown");o+n==r+i?$(s).hide():i<n?$(s).hide():i>n&&$(s).show();var a=$(".scrollup");r>=o?$(a).hide():"none"==$(a).css("display")&&$(a).show()}}function A(n){if(!r){r=!0;var o=$("#menu");if("resize"!=n||s!=isMobileMenu()){"centered"!=y||isMobileMenu()?"centered"==y&&isMobileMenu()&&o.removeClass("centered").attr("style",""):o.addClass("centered"),e=$("#menublock"),cart=$(".cartblock"),e.length>0&&isMobileMenu()?($("#menu").insertAfter(".logoblock"),e.remove()):isMobileMenu()||e.length||($('<div id="menublock"></div>').insertAfter(".logoblock"),o.appendTo("#menublock")),!isMobileMenu()&&isEshop()?cart.insertBefore("#menu"):isMobileMenu()||e.length||!isEshop()?e.length>0&&isMobileMenu()&&isEshop()&&cart.insertAfter(".logoblock"):cart.insertBefore("#menu"),!isMobileMenu()&&o.hasClass("visible")&&o.removeClass("visible"),"header-redraw"!=n&&!isMobileMenu()&&o.hasClass("open")&&o.removeClass("open"),$(".nav-line").removeClass("initial-state"),o.find("a.mm-arrow").remove();var a,l=$("#menu-submit");l.hasClass("active")||$("#menu, #menu ul").removeClass("open align").removeAttr("style"),o.find("li.wnd-with-submenu").removeClass("hover"),isMobileMenu()?(l.hasClass("active")?(o.addClass("open"),o.addClass("visible")):(o.removeClass("open"),o.removeClass("visible"),t.removeClass("noscroll"),t.removeClass("menu-open")),$(".nav-line").removeAttr("style")):D(),o.find("ul li.wnd-with-submenu").each(function(){($(this).parent().hasClass("level-1")||$(this).parent().hasClass("level-2"))&&($(this).hasClass("wnd-active-path")&&!$(this).hasClass("wnd-active")?$(this).append('<a class="mm-arrow mm-up" href="#"></a>'):$(this).append('<a class="mm-arrow mm-down" href="#"></a>')),$(this).parent().hasClass("level-3")&&$(this).removeClass("wnd-with-submenu"),isMobileMenu()?o.find("ul li.wnd-active-path").each(function(){$(this).children("a.mm-arrow").removeClass("mm-down").addClass("mm-up"),$(this).children("ul").addClass("open")}):($("li.wnd-active-path.wnd-with-submenu").addClass("hover"),$("li.wnd-active-path.wnd-with-submenu > ul").addClass("open"),$("li.wnd-active-path.wnd-with-submenu > .mm-arrow").removeClass("mm-down").addClass("mm-up"))}),isMobileMenu()?o.off("mousewheel DOMMouseScroll touchstart touchmove touchend"):(o.off("mousewheel DOMMouseScroll touchstart touchmove touchend").on("mousewheel DOMMouseScroll touchstart touchmove touchend",function(e){var t=null;if("mousewheel"==e.type)t=-1*e.originalEvent.wheelDelta;else if("DOMMouseScroll"==e.type)t=e.originalEvent.detail;else if("touchstart"==e.type)a=e.originalEvent.touches[0].clientY;else if("touchmove"==e.type){var n=e.originalEvent.changedTouches[0].clientY,r=o.height(),s=i.height(),l=o.offset().top,c=i.offset().top;l+r==c+s?a>n&&e.preventDefault():l==c&&a<n&&e.preventDefault()}t&&(e.preventDefault(),$(this).scrollTop(t+$(this).scrollTop())),P()}),o.off("scroll").on("scroll",function(){P()}),$(".scrollup").length||$("#menublock").append('<div class="scrollup"></div>'),$(".scrolldown").length||$("#menublock").append('<div class="scrolldown"></div>')),/iPhone/i.test(navigator.userAgent)&&(414==$(window).height()&&$(window).height()<$(window).width()?o.addClass("ip6"):o.removeClass("ip6")),o.addClass("loaded")}s=isMobileMenu(),D(),S(),"none"==o.css("display")&&o.show()}}function L(){var e=parseInt(f.width()),t=parseInt($(p).width()),n=parseInt(f.height()),i=parseInt($("li.wnd-homepage").outerHeight(!0));C=n,e==x&&t==b&&C==n&&w==i||(x=e,b=t,C=n,w=i,D(),S())}A(),"complete"!=document.readyState&&$(window).on("load",function(){A()}),$("html").hasClass("no-flexbox")&&(I=parseInt($("#menu-mobile").outerWidth(!0)),$(".logoblock").css("marginRight",I-20+"px")),isCMS()&&($(document).on("wnd-redraw",".header",function(){setTimeout(A("header-redraw"),20)}),$(document).on("wnd-content-change",".logo",function(){setTimeout(A,20)}),$(document).on("wnd-content-change",".system-footer",function(){A()})),$(window).on("resize",function(){a=!0,$(window).height()!=d&&(d=$(window).height(),A("resize")),$(window).width()!=u&&(u=$(window).width(),A("resize")),setTimeout(function(){a=!1},10)}),$(window).on("orientationchange",function(){a||l||(a=!0,l=!0,setTimeout(A,100),setTimeout(function(){a=!1,l=!1},20))}),$("body.wnd-cms #header").on("keyup click focusin focusout",".logo-content",function(e){"focusout"==e.type?setTimeout(function(){L()},100):L()})}),function(e){e.fn.feed=function(t){var n=e.extend({},e.fn.feed.defaults,t),i=e(this);i.each(function(){var t=e(this).find(n.wrapper),o=t.width(),r=e(this).find(n.item),s=0,a=[],l=[],c=[],u=[],d=[],h=[],p=[],f=[];r.each(function(t){var i="full";if(a[t]=parseFloat(e(this).outerWidth(!0)),l[t]=parseFloat(e(this).css("paddingTop")),c[t]=parseFloat(e(this).css("paddingRight")),u[t]=parseFloat(e(this).css("paddingBottom")),d[t]=parseFloat(e(this).css("paddingLeft")),e(this).hasClass("wnd-video-thumbnail")){var o=e(this).find(n.video_thumb);h[t]=parseFloat(e(o).outerWidth(!0)),p[t]=parseInt(e(o).outerHeight(!0))}else{if("gallery"==n.type)var r=e(this).find("a");else r=e(this).find("img");r[0]?(h[t]=parseInt(e(r).attr("width")),p[t]=parseInt(e(r).attr("height"))):(h[t]=0,p[t]=0,i="no-media")}if("outside"==n.title){if("no-media"==i)var m=e(this).find(n.item_wrapper);else m=e(this).find(n.title_class);"none"!=m.css("display")?f[t]=parseFloat(m.outerHeight(!0)):f[t]=0}else f[t]=0;s++});for(var m=[],g=[],v=[],y=[],w=0,b=[],x=[],C=[],E=Math.round(o/a[0]),I=1,T=0,k=[],$=[],S=0;S<E;S++)k.push(0);if(E>1){r.each(function(t){var i;($[t]=T,m[t]=a[t],w=parseFloat(p[t]/h[t]*(a[t]-d[t]-c[t])),isNaN(w)&&(w=0),b[t]=w,g[t]=w+l[t]+u[t]+f[t],"gallery"==n.type)&&(b[t]=Math.round(b[t]),void 0!==(i=e(this).find(".gallery-image")).attr("data-resize-value")?(C[t]=parseInt(i.attr("data-resize-value")),x=0!==C[t],b[t]+=C[t],g[t]+=C[t]):(0===t?(x[t]=!1,C[t]=0):Math.abs(b[t]-b[t-1])<n.resize_threshold?(x[t]=!0,C[t]=Math.floor(Math.random()*(n.resize_max-n.resize_min)+n.resize_min)):(x[t]=!1,C[t]=0),i.attr("data-resize-value",C[t]),b[t]+=C[t],g[t]+=C[t]));(1==I?(v[t]=0,y[t]=0==t?0:y[t-1]+m[t-1]):(y[t]=t/E==I-1?0:y[t-1]+m[t-1],v[t]=k[T]),(t+1)/E==I&&I++,k[T]+=g[t],++T+1>E&&(T=0),"gallery"==n.type&&C[t]>0)&&((i=e(this).find(".gallery-image")).length>0&&(i.addClass("stretched"),i.css("height",b[t])));e(this).css({top:v[t]+"px",left:y[t]+"px"})}),function t(){var i=k.slice();if("true"==n.bottom_line){var o,l,c,u,d;i.sort(function(e,t){return t-e}),o=e(k).index(i[0]),l=i[0],i.sort(function(e,t){return e-t}),c=e(k).index(i[0]),d=l-(u=i[0]);var h=0,p=s/E;h=p*E==s?p*E-1:parseInt(p)*E-1;var f=e.inArray(o,$,h);if(d>=1.1*g[f]){var m=u+g[f],w=l-g[f];v[f]=u,y[f]=a[f]*c,e(r[f]).css({top:v[f]+"px",left:y[f]+"px"}),k[o]=w,k[c]=m,t()}}}(),k.sort(function(e,t){return t-e}),t.css({height:k[0]+"px"}),i.addClass("feed-ready"),cmsReset(i)}else i.removeClass("feed-ready"),t.removeAttr("style"),r.removeAttr("style"),cmsReset(i)})},e.fn.feed.defaults={type:"gallery",title:"outside",title_class:".gallery-title",wrapper:".gallery-wrapper",item:".gallery-item",item_wrapper:"",video_thumb:".thumbnail",bottom_line:"true",resize_threshold:3,resize_min:20,resize_max:60}}(jQuery),function(e,t,n,i){"use strict";function o(e,t,n){return setTimeout(c(e,n),t)}function r(e,t,n){return!!Array.isArray(e)&&(s(e,n[t],n),!0)}function s(e,t,n){var o;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==i)for(o=0;o<e.length;)t.call(n,e[o],o,e),o++;else for(o in e)e.hasOwnProperty(o)&&t.call(n,e[o],o,e)}function a(t,n,i){var o="DEPRECATED METHOD: "+n+"\n"+i+" AT \n";return function(){var n=new Error("get-stack-trace"),i=n&&n.stack?n.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",r=e.console&&(e.console.warn||e.console.log);return r&&r.call(e.console,o,i),t.apply(this,arguments)}}function l(e,t,n){var i,o=t.prototype;(i=e.prototype=Object.create(o)).constructor=e,i._super=o,n&&J(i,n)}function c(e,t){return function(){return e.apply(t,arguments)}}function u(e,t){return typeof e==ne?e.apply(t&&t[0]||i,t):e}function d(e,t){return e===i?t:e}function h(e,t,n){s(g(t),function(t){e.addEventListener(t,n,!1)})}function p(e,t,n){s(g(t),function(t){e.removeEventListener(t,n,!1)})}function f(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function m(e,t){return e.indexOf(t)>-1}function g(e){return e.trim().split(/\s+/g)}function v(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var i=0;i<e.length;){if(n&&e[i][n]==t||!n&&e[i]===t)return i;i++}return-1}function y(e){return Array.prototype.slice.call(e,0)}function w(e,t,n){for(var i=[],o=[],r=0;r<e.length;){var s=t?e[r][t]:e[r];v(o,s)<0&&i.push(e[r]),o[r]=s,r++}return n&&(i=t?i.sort(function(e,n){return e[t]>n[t]}):i.sort()),i}function b(e,t){for(var n,o,r=t[0].toUpperCase()+t.slice(1),s=0;s<ee.length;){if((o=(n=ee[s])?n+r:t)in e)return o;s++}return i}function x(t){var n=t.ownerDocument||t;return n.defaultView||n.parentWindow||e}function C(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){u(e.options.enable,[e])&&n.handler(t)},this.init()}function E(e,t,n){var i=n.pointers.length,o=n.changedPointers.length,r=t&me&&i-o==0,s=t&(ve|ye)&&i-o==0;n.isFirst=!!r,n.isFinal=!!s,r&&(e.session={}),n.eventType=t,function(e,t){var n=e.session,i=t.pointers,o=i.length;n.firstInput||(n.firstInput=T(t)),o>1&&!n.firstMultiple?n.firstMultiple=T(t):1===o&&(n.firstMultiple=!1);var r=n.firstInput,s=n.firstMultiple,a=s?s.center:r.center,l=t.center=k(i);t.timeStamp=re(),t.deltaTime=t.timeStamp-r.timeStamp,t.angle=P(a,l),t.distance=D(a,l),function(e,t){var n=t.center,i=e.offsetDelta||{},o=e.prevDelta||{},r=e.prevInput||{};t.eventType!==me&&r.eventType!==ve||(o=e.prevDelta={x:r.deltaX||0,y:r.deltaY||0},i=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=o.x+(n.x-i.x),t.deltaY=o.y+(n.y-i.y)}(n,t),t.offsetDirection=S(t.deltaX,t.deltaY);var c=$(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=c.x,t.overallVelocityY=c.y,t.overallVelocity=oe(c.x)>oe(c.y)?c.x:c.y,t.scale=s?function(e,t){return D(t[0],t[1],Se)/D(e[0],e[1],Se)}(s.pointers,i):1,t.rotation=s?function(e,t){return P(t[1],t[0],Se)+P(e[1],e[0],Se)}(s.pointers,i):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,I(n,t);var u=e.element;f(t.srcEvent.target,u)&&(u=t.srcEvent.target),t.target=u}(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function I(e,t){var n,o,r,s,a=e.lastInterval||t,l=t.timeStamp-a.timeStamp;if(t.eventType!=ye&&(l>fe||a.velocity===i)){var c=t.deltaX-a.deltaX,u=t.deltaY-a.deltaY,d=$(l,c,u);o=d.x,r=d.y,n=oe(d.x)>oe(d.y)?d.x:d.y,s=S(c,u),e.lastInterval=t}else n=a.velocity,o=a.velocityX,r=a.velocityY,s=a.direction;t.velocity=n,t.velocityX=o,t.velocityY=r,t.direction=s}function T(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:ie(e.pointers[n].clientX),clientY:ie(e.pointers[n].clientY)},n++;return{timeStamp:re(),pointers:t,center:k(t),deltaX:e.deltaX,deltaY:e.deltaY}}function k(e){var t=e.length;if(1===t)return{x:ie(e[0].clientX),y:ie(e[0].clientY)};for(var n=0,i=0,o=0;t>o;)n+=e[o].clientX,i+=e[o].clientY,o++;return{x:ie(n/t),y:ie(i/t)}}function $(e,t,n){return{x:t/e||0,y:n/e||0}}function S(e,t){return e===t?we:oe(e)>=oe(t)?0>e?be:xe:0>t?Ce:Ee}function D(e,t,n){n||(n=$e);var i=t[n[0]]-e[n[0]],o=t[n[1]]-e[n[1]];return Math.sqrt(i*i+o*o)}function P(e,t,n){n||(n=$e);var i=t[n[0]]-e[n[0]],o=t[n[1]]-e[n[1]];return 180*Math.atan2(o,i)/Math.PI}function A(){this.evEl=Pe,this.evWin=Ae,this.pressed=!1,C.apply(this,arguments)}function L(){this.evEl=Re,this.evWin=_e,C.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function M(){this.evTarget=Oe,this.evWin=Ne,this.started=!1,C.apply(this,arguments)}function R(){this.evTarget=ze,this.targetIds={},C.apply(this,arguments)}function _(){C.apply(this,arguments);var e=c(this.handler,this);this.touch=new R(this.manager,e),this.mouse=new A(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}function F(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY};this.lastTouches.push(n);var i=this.lastTouches;setTimeout(function(){var e=i.indexOf(n);e>-1&&i.splice(e,1)},qe)}}function O(e,t){this.manager=e,this.set(t)}function N(e){this.options=J({},this.defaults,e||{}),this.id=le++,this.manager=null,this.options.enable=d(this.options.enable,!0),this.state=Qe,this.simultaneous={},this.requireFail=[]}function B(e){return e&it?"cancel":e&tt?"end":e&et?"move":e&Je?"start":""}function z(e){return e==Ee?"down":e==Ce?"up":e==be?"left":e==xe?"right":""}function q(e,t){var n=t.manager;return n?n.get(e):e}function j(){N.apply(this,arguments)}function H(){j.apply(this,arguments),this.pX=null,this.pY=null}function W(){j.apply(this,arguments)}function U(){N.apply(this,arguments),this._timer=null,this._input=null}function X(){j.apply(this,arguments)}function Z(){j.apply(this,arguments)}function Y(){N.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function V(e,t){return(t=t||{}).recognizers=d(t.recognizers,V.defaults.preset),new G(e,t)}function G(e,t){this.options=J({},V.defaults,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=function(e){var t=e.options.inputClass;return new(t||(ue?L:de?R:ce?_:A))(e,E)}(this),this.touchAction=new O(this,this.options.touchAction),K(this,!0),s(this.options.recognizers,function(e){var t=this.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])},this)}function K(e,t){var n,i=e.element;i.style&&(s(e.options.cssProps,function(o,r){n=b(i.style,r),t?(e.oldCssProps[n]=i.style[n],i.style[n]=o):i.style[n]=e.oldCssProps[n]||""}),t||(e.oldCssProps={}))}function Q(e,n){var i=t.createEvent("Event");i.initEvent(e,!0,!0),i.gesture=n,n.target.dispatchEvent(i)}var J,ee=["","webkit","Moz","MS","ms","o"],te=t.createElement("div"),ne="function",ie=Math.round,oe=Math.abs,re=Date.now;J="function"!=typeof Object.assign?function(e){if(e===i||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var o=arguments[n];if(o!==i&&null!==o)for(var r in o)o.hasOwnProperty(r)&&(t[r]=o[r])}return t}:Object.assign;var se=a(function(e,t,n){for(var o=Object.keys(t),r=0;r<o.length;)(!n||n&&e[o[r]]===i)&&(e[o[r]]=t[o[r]]),r++;return e},"extend","Use `assign`."),ae=a(function(e,t){return se(e,t,!0)},"merge","Use `assign`."),le=1,ce="ontouchstart"in e,ue=b(e,"PointerEvent")!==i,de=ce&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),he="touch",pe="mouse",fe=25,me=1,ge=2,ve=4,ye=8,we=1,be=2,xe=4,Ce=8,Ee=16,Ie=be|xe,Te=Ce|Ee,ke=Ie|Te,$e=["x","y"],Se=["clientX","clientY"];C.prototype={handler:function(){},init:function(){this.evEl&&h(this.element,this.evEl,this.domHandler),this.evTarget&&h(this.target,this.evTarget,this.domHandler),this.evWin&&h(x(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&p(this.element,this.evEl,this.domHandler),this.evTarget&&p(this.target,this.evTarget,this.domHandler),this.evWin&&p(x(this.element),this.evWin,this.domHandler)}};var De={mousedown:me,mousemove:ge,mouseup:ve},Pe="mousedown",Ae="mousemove mouseup";l(A,C,{handler:function(e){var t=De[e.type];t&me&&0===e.button&&(this.pressed=!0),t&ge&&1!==e.which&&(t=ve),this.pressed&&(t&ve&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:pe,srcEvent:e}))}});var Le={pointerdown:me,pointermove:ge,pointerup:ve,pointercancel:ye,pointerout:ye},Me={2:he,3:"pen",4:pe,5:"kinect"},Re="pointerdown",_e="pointermove pointerup pointercancel";e.MSPointerEvent&&!e.PointerEvent&&(Re="MSPointerDown",_e="MSPointerMove MSPointerUp MSPointerCancel"),l(L,C,{handler:function(e){var t=this.store,n=!1,i=e.type.toLowerCase().replace("ms",""),o=Le[i],r=Me[e.pointerType]||e.pointerType,s=r==he,a=v(t,e.pointerId,"pointerId");o&me&&(0===e.button||s)?0>a&&(t.push(e),a=t.length-1):o&(ve|ye)&&(n=!0),0>a||(t[a]=e,this.callback(this.manager,o,{pointers:t,changedPointers:[e],pointerType:r,srcEvent:e}),n&&t.splice(a,1))}});var Fe={touchstart:me,touchmove:ge,touchend:ve,touchcancel:ye},Oe="touchstart",Ne="touchstart touchmove touchend touchcancel";l(M,C,{handler:function(e){var t=Fe[e.type];if(t===me&&(this.started=!0),this.started){var n=function(e,t){var n=y(e.touches),i=y(e.changedTouches);return t&(ve|ye)&&(n=w(n.concat(i),"identifier",!0)),[n,i]}.call(this,e,t);t&(ve|ye)&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:he,srcEvent:e})}}});var Be={touchstart:me,touchmove:ge,touchend:ve,touchcancel:ye},ze="touchstart touchmove touchend touchcancel";l(R,C,{handler:function(e){var t=Be[e.type],n=function(e,t){var n=y(e.touches),i=this.targetIds;if(t&(me|ge)&&1===n.length)return i[n[0].identifier]=!0,[n,n];var o,r,s=y(e.changedTouches),a=[],l=this.target;if(r=n.filter(function(e){return f(e.target,l)}),t===me)for(o=0;o<r.length;)i[r[o].identifier]=!0,o++;for(o=0;o<s.length;)i[s[o].identifier]&&a.push(s[o]),t&(ve|ye)&&delete i[s[o].identifier],o++;return a.length?[w(r.concat(a),"identifier",!0),a]:void 0}.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:he,srcEvent:e})}});var qe=2500,je=25;l(_,C,{handler:function(e,t,n){var i=n.pointerType==he,o=n.pointerType==pe;if(!(o&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)(function(e,t){e&me?(this.primaryTouch=t.changedPointers[0].identifier,F.call(this,t)):e&(ve|ye)&&F.call(this,t)}).call(this,t,n);else if(o&&function(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var o=this.lastTouches[i],r=Math.abs(t-o.x),s=Math.abs(n-o.y);if(je>=r&&je>=s)return!0}return!1}.call(this,n))return;this.callback(e,t,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var He=b(te.style,"touchAction"),We=He!==i,Ue="compute",Xe="auto",Ze="manipulation",Ye="none",Ve="pan-x",Ge="pan-y",Ke=function(){if(!We)return!1;var t={},n=e.CSS&&e.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(i){t[i]=!n||e.CSS.supports("touch-action",i)}),t}();O.prototype={set:function(e){e==Ue&&(e=this.compute()),We&&this.manager.element.style&&Ke[e]&&(this.manager.element.style[He]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return s(this.manager.recognizers,function(t){u(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),function(e){if(m(e,Ye))return Ye;var t=m(e,Ve),n=m(e,Ge);return t&&n?Ye:t||n?t?Ve:Ge:m(e,Ze)?Ze:Xe}(e.join(" "))},preventDefaults:function(e){var t=e.srcEvent,n=e.offsetDirection;if(!this.manager.session.prevented){var i=this.actions,o=m(i,Ye)&&!Ke[Ye],r=m(i,Ge)&&!Ke[Ge],s=m(i,Ve)&&!Ke[Ve];if(o){var a=1===e.pointers.length,l=e.distance<2,c=e.deltaTime<250;if(a&&l&&c)return}return s&&r?void 0:o||r&&n&Ie||s&&n&Te?this.preventSrc(t):void 0}t.preventDefault()},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};var Qe=1,Je=2,et=4,tt=8,nt=tt,it=16;N.prototype={defaults:{},set:function(e){return J(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(r(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=q(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return r(e,"dropRecognizeWith",this)?this:(e=q(e,this),delete this.simultaneous[e.id],this)},requireFailure:function(e){if(r(e,"requireFailure",this))return this;var t=this.requireFail;return-1===v(t,e=q(e,this))&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(r(e,"dropRequireFailure",this))return this;e=q(e,this);var t=v(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){function t(t){n.manager.emit(t,e)}var n=this,i=this.state;tt>i&&t(n.options.event+B(i)),t(n.options.event),e.additionalEvent&&t(e.additionalEvent),i>=tt&&t(n.options.event+B(i))},tryEmit:function(e){return this.canEmit()?this.emit(e):void(this.state=32)},canEmit:function(){for(var e=0;e<this.requireFail.length;){if(!(this.requireFail[e].state&(32|Qe)))return!1;e++}return!0},recognize:function(e){var t=J({},e);return u(this.options.enable,[this,t])?(this.state&(nt|it|32)&&(this.state=Qe),this.state=this.process(t),void(this.state&(Je|et|tt|it)&&this.tryEmit(t))):(this.reset(),void(this.state=32))},process:function(e){},getTouchAction:function(){},reset:function(){}},l(j,N,{defaults:{pointers:1},attrTest:function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},process:function(e){var t=this.state,n=e.eventType,i=t&(Je|et),o=this.attrTest(e);return i&&(n&ye||!o)?t|it:i||o?n&ve?t|tt:t&Je?t|et:Je:32}}),l(H,j,{defaults:{event:"pan",threshold:10,pointers:1,direction:ke},getTouchAction:function(){var e=this.options.direction,t=[];return e&Ie&&t.push(Ge),e&Te&&t.push(Ve),t},directionTest:function(e){var t=this.options,n=!0,i=e.distance,o=e.direction,r=e.deltaX,s=e.deltaY;return o&t.direction||(t.direction&Ie?(o=0===r?we:0>r?be:xe,n=r!=this.pX,i=Math.abs(e.deltaX)):(o=0===s?we:0>s?Ce:Ee,n=s!=this.pY,i=Math.abs(e.deltaY))),e.direction=o,n&&i>t.threshold&&o&t.direction},attrTest:function(e){return j.prototype.attrTest.call(this,e)&&(this.state&Je||!(this.state&Je)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=z(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),l(W,j,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Ye]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||this.state&Je)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),l(U,N,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Xe]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,i=e.distance<t.threshold,r=e.deltaTime>t.time;if(this._input=e,!i||!n||e.eventType&(ve|ye)&&!r)this.reset();else if(e.eventType&me)this.reset(),this._timer=o(function(){this.state=nt,this.tryEmit()},t.time,this);else if(e.eventType&ve)return nt;return 32},reset:function(){clearTimeout(this._timer)},emit:function(e){this.state===nt&&(e&&e.eventType&ve?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=re(),this.manager.emit(this.options.event,this._input)))}}),l(X,j,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Ye]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||this.state&Je)}}),l(Z,j,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Ie|Te,pointers:1},getTouchAction:function(){return H.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return n&(Ie|Te)?t=e.overallVelocity:n&Ie?t=e.overallVelocityX:n&Te&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&oe(t)>this.options.velocity&&e.eventType&ve},emit:function(e){var t=z(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),l(Y,N,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Ze]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,i=e.distance<t.threshold,r=e.deltaTime<t.time;if(this.reset(),e.eventType&me&&0===this.count)return this.failTimeout();if(i&&r&&n){if(e.eventType!=ve)return this.failTimeout();var s=!this.pTime||e.timeStamp-this.pTime<t.interval,a=!this.pCenter||D(this.pCenter,e.center)<t.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,a&&s?this.count+=1:this.count=1,this._input=e,0===this.count%t.taps)return this.hasRequireFailures()?(this._timer=o(function(){this.state=nt,this.tryEmit()},t.interval,this),Je):nt}return 32},failTimeout:function(){return this._timer=o(function(){this.state=32},this.options.interval,this),32},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==nt&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),V.VERSION="2.0.8",V.defaults={domEvents:!1,touchAction:Ue,enable:!0,inputTarget:null,inputClass:null,preset:[[X,{enable:!1}],[W,{enable:!1},["rotate"]],[Z,{direction:Ie}],[H,{direction:Ie},["swipe"]],[Y],[Y,{event:"doubletap",taps:2},["tap"]],[U]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};G.prototype={set:function(e){return J(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},stop:function(e){this.session.stopped=e?2:1},recognize:function(e){var t=this.session;if(!t.stopped){this.touchAction.preventDefaults(e);var n,i=this.recognizers,o=t.curRecognizer;(!o||o&&o.state&nt)&&(o=t.curRecognizer=null);for(var r=0;r<i.length;)n=i[r],2===t.stopped||o&&n!=o&&!n.canRecognizeWith(o)?n.reset():n.recognize(e),!o&&n.state&(Je|et|tt)&&(o=t.curRecognizer=n),r++}},get:function(e){if(e instanceof N)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event==e)return t[n];return null},add:function(e){if(r(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},remove:function(e){if(r(e,"remove",this))return this;if(e=this.get(e)){var t=this.recognizers,n=v(t,e);-1!==n&&(t.splice(n,1),this.touchAction.update())}return this},on:function(e,t){if(e!==i&&t!==i){var n=this.handlers;return s(g(e),function(e){n[e]=n[e]||[],n[e].push(t)}),this}},off:function(e,t){if(e!==i){var n=this.handlers;return s(g(e),function(e){t?n[e]&&n[e].splice(v(n[e],t),1):delete n[e]}),this}},emit:function(e,t){this.options.domEvents&&Q(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(n&&n.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var i=0;i<n.length;)n[i](t),i++}},destroy:function(){this.element&&K(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},J(V,{INPUT_START:me,INPUT_MOVE:ge,INPUT_END:ve,INPUT_CANCEL:ye,STATE_POSSIBLE:Qe,STATE_BEGAN:Je,STATE_CHANGED:et,STATE_ENDED:tt,STATE_RECOGNIZED:nt,STATE_CANCELLED:it,STATE_FAILED:32,DIRECTION_NONE:we,DIRECTION_LEFT:be,DIRECTION_RIGHT:xe,DIRECTION_UP:Ce,DIRECTION_DOWN:Ee,DIRECTION_HORIZONTAL:Ie,DIRECTION_VERTICAL:Te,DIRECTION_ALL:ke,Manager:G,Input:C,TouchAction:O,TouchInput:R,MouseInput:A,PointerEventInput:L,TouchMouseInput:_,SingleTouchInput:M,Recognizer:N,AttrRecognizer:j,Tap:Y,Pan:H,Swipe:Z,Pinch:W,Rotate:X,Press:U,on:h,off:p,each:s,merge:ae,extend:se,assign:J,inherit:l,bindFn:c,prefixed:b}),(void 0!==e?e:"undefined"!=typeof self?self:{}).Hammer=V,"function"==typeof define&&define.amd?define(function(){return V}):"undefined"!=typeof module&&module.exports?module.exports=V:e.Hammer=V}(window,document),function(e){e.fn.slideShow=function(t){if(e(this).length<=0)return!1;var n=e.extend({},e.fn.slideShow.defaults,t),i=function(e,t){this.options=t,this.galleryElm=e,this.galleryID="undefined"!==e.attr("id")?e.attr("id"):this.generateBlockID(),this.blockClass=t.blockClass,this.contentBlockElm=this.galleryElm.find(t.contentBlockElm),this.photoListElm=this.contentBlockElm.find(t.photoListElm),this.photoItems=this.photoListElm.find(t.photoItemElm),this.photoPrevElm=this.contentBlockElm.find(t.photoPrevElm),this.photoNextElm=this.contentBlockElm.find(t.photoNextElm),this.navBlockWrapperElm=this.galleryElm.find(t.navBlockWrapperElm),this.navBlockContentElm=this.navBlockWrapperElm.find(t.navBlockContentElm),this.bulletListElm=null,this.navBullets=null,this.navBlockPrevElm=this.navBlockWrapperElm.find(t.navBlockPrevElm),this.navBlockNextElm=this.navBlockWrapperElm.find(t.navBlockNextElm),this.androidStockBrowser=this.detectAndroidStockBrowser(),this.images=this.loadSlideShowImages(),this.imagesTotal=this.images.length,this.currentImageIndex=0,this.reelPosition=this.imagesTotal,this.startOriginal=this.imagesTotal,this.startClones=2*this.imagesTotal,this.photoListElmWidth=null,this.reelWidth=null,this.reelContainerWidth=null,this.reelItemSize=null,this.reelItemMargin=null,this.reelEnd=!1,this.reelDirection=this.returnReelDirection(),this.lastReelDirection=this.reelDirection,this.autoplay=!1,this.autoplayFlag=!1,this.animationFlag=!1,this.navAnimationFlag=!1,this.initFlag=!1,this.eventsBound=!1,this.maxBullets=t.maxBullets,this.initAction="default"};i.prototype.generateBlockID=function(){var e,t;for(e="",t=0;t<10;t++)e+=Math.floor(16*Math.random()).toString(16).toUpperCase();return e},i.prototype.detectAndroidStockBrowser=function(){var e=navigator.userAgent;return e.indexOf("Mozilla/5.0")>-1&&e.indexOf("Android ")>-1&&e.indexOf("AppleWebKit")>-1&&e.indexOf("Version")>-1},i.prototype.tooFastClick=function(){return this.animationFlag},i.prototype.tooFastClickNav=function(){return this.navAnimationFlag},i.prototype.loadSlideShowImages=function(){var t=this,n=[];return this.photoItems.each(function(){var i=e(this).find(t.options.photoItemLinkElm),o=e(i).attr("href");n.push({imageId:o.substring(o.lastIndexOf("/")+1,o.lastIndexOf(".")),imageSrc:o,imageTitle:e(i).attr("data-litebox-text"),imageRatio:e(this).attr("class").replace(t.options.slideshowPhotoClass,"").replace("active","").trim(),imageThumbnail:o.substring(0,o.lastIndexOf("/"))+"/200/"+o.substring(o.lastIndexOf("/")+1)})}),n},i.prototype.returnReelDirection=function(){var e=window.getComputedStyle(this.navBlockWrapperElm.get(0),":after").getPropertyValue("content");return e.indexOf("horizontal")>=0?"horizontal":e.indexOf("vertical")>=0?"vertical":e.indexOf("bullets")>=0?"bullets":void 0},i.prototype.getReelDirection=function(){var e=window.getComputedStyle(this.navBlockWrapperElm.get(0),":after").getPropertyValue("content");e.indexOf("horizontal")>=0?this.reelDirection="horizontal":e.indexOf("vertical")>=0?this.reelDirection="vertical":e.indexOf("bullets")>=0&&(this.reelDirection="bullets")},i.prototype.galleryNotEmpty=function(){this.galleryElm.addClass("slideshow"),"default"===this.initAction&&this.photoListElm.find("li.active").length<=0?this.photoListElm.find("li").eq(this.currentImageIndex).addClass("active"):"add"!==this.initAction&&"delete"!==this.initAction||(this.photoListElm.find("li.active").removeClass("active"),this.photoListElm.find("li").eq(this.currentImageIndex).addClass("active"))},i.prototype.galleryEmpty=function(){this.galleryElm.find(".clone").remove(),this.clearReel(),this.galleryElm.removeClass("slideshow")},i.prototype.clearReel=function(){this.navBlockContentElm.removeClass("reel"),this.navBlockContentElm.removeClass("infinite"),null!==this.bulletListElm&&(this.bulletListElm.css("margin",""),this.bulletListElm.css("width",""),this.bulletListElm.css("height",""),this.bulletListElm.find("li").removeClass("large"))},i.prototype.hideReelControls=function(){this.navBlockWrapperElm.removeClass("show-arrows")},i.prototype.showReelControls=function(){this.navBlockWrapperElm.addClass("show-arrows")},i.prototype.runAutoplay=function(){if(this.options.autoplay&&!this.options.isCMS){var e=this;e.autoplay=setInterval(function(){e.nextImage(e.options.isEshopGallery?"fade":"slidefromright",!1)},e.options.timeout)}},i.prototype.stopAutoplay=function(){this.options.autoplay&&!1!==this.autoplay&&(clearInterval(this.autoplay),this.autoplay=!1,this.autoplayFlag=!1)},i.prototype.nextImage=function(e,t){this.currentImageIndex=this.currentImageIndex===this.imagesTotal-1?0:this.currentImageIndex+1,o.options.autoShiftReel&&"bullets"!==o.reelDirection&&!t?o.autoShiftReel():"bullets"===o.reelDirection&&o.navBlockContentElm.hasClass("infinite")&&o.shiftBulletsForward(),this.changePhoto(this.currentImageIndex,e)},i.prototype.prevImage=function(e,t){this.currentImageIndex=0===this.currentImageIndex?this.imagesTotal-1:this.currentImageIndex-1,this.changePhoto(this.currentImageIndex,e),"bullets"===o.reelDirection&&o.navBlockContentElm.hasClass("infinite")&&o.shiftBulletsBackward()},i.prototype.shiftReelForward=function(){this.navAnimationFlag=!0;var e=this.bulletListElm,t=this.reelPosition,n=this.reelItemSize+this.reelItemMargin,i=null,o=0,r=e.find("li.clicked");r.length?(i=r.index(),o=Math.abs(i-t),r.hasClass("clone")&&i>this.imagesTotal?(e.css("horizontal"===this.reelDirection?"marginLeft":"marginTop",(t-this.imagesTotal)*n*-1+"px"),t=t-this.imagesTotal+o+1,this.reelPosition=t):(t=i+1,this.reelPosition=t),r.removeClass("clicked")):t===this.startClones?(e.css("horizontal"===this.reelDirection?"marginLeft":"marginTop",this.startOriginal*n*-1+"px"),t=this.reelPosition=this.startOriginal+1):t=this.reelPosition+=1;"horizontal"===this.reelDirection?e.animate({marginLeft:t*n*-1},150,function(){}):e.animate({marginTop:t*n*-1},150,function(){})},i.prototype.shiftReelBackward=function(){this.navAnimationFlag=!0;var e=this.bulletListElm,t=this.reelPosition,n=this.reelItemSize+this.reelItemMargin,i=this.reelItemMargin,o=e.find("li.clicked");o.length?(t=o.index()-1,this.reelPosition=t,o.removeClass("clicked")):0===this.reelPosition?(e.css("horizontal"===this.reelDirection?"marginLeft":"marginTop",this.startOriginal*n*-1+i+"px"),t=this.reelPosition=this.startOriginal-1):t=this.reelPosition-=1;"horizontal"===this.reelDirection?e.animate({marginLeft:t*n*-1},150,function(){}):e.animate({marginTop:t*n*-1},150,function(){})},i.prototype.autoShiftReel=function(){for(var e=this.reelItemSize,t=this.reelItemMargin,n=this.reelContainerWidth,i=1,o=e*this.imagesTotal+t*(this.imagesTotal-1);(i+1)*(e+t)<n;)i++;this.currentImageIndex===i&&!1===this.autoplayFlag&&(this.autoplayFlag=!0),this.autoplayFlag&&o>n&&this.shiftReelForward()},i.prototype.shiftBulletsForward=function(t){void 0===t&&(t=1),this.navAnimationFlag=!0;var n=this.bulletListElm,i=this.reelPosition,o=(parseInt(this.bulletListElm.find("li:not(.active):not(.large)").width()),parseInt(this.bulletListElm.find("li:not(.active):not(.large)").css("marginLeft")),parseInt(this.bulletListElm.find("li.active").width()),parseInt(this.bulletListElm.find("li.active").css("marginLeft")),this);if(o.reelPosition===o.startClones&&1===t||(o.reelPosition===o.startClones-1||o.reelPosition===o.startClones)&&2===t){i=o.reelPosition=o.startOriginal-(o.startClones-o.reelPosition)+t;var r=0,s=0,a=0;this.bulletListElm.find("li").each(function(){a=parseInt(e(this).width())+parseInt(e(this).css("marginLeft"))+parseInt(e(this).css("marginRight")),s++<i-t&&(r+=a)}),n.css("marginLeft",-1*r+"px")}else i=o.reelPosition+=t;var l=0;s=0;this.bulletListElm.find("li").each(function(){a=parseInt(e(this).width())+parseInt(e(this).css("marginLeft"))+parseInt(e(this).css("marginRight")),s++<o.reelPosition&&(l+=a)}),n.animate({marginLeft:-1*l},150,function(){})},i.prototype.shiftBulletsBackward=function(t){void 0===t&&(t=1),this.navAnimationFlag=!0;var n=this.bulletListElm,i=this.reelPosition,o=(this.reelItemSize,this.reelItemMargin,this);if(0===o.reelPosition&&1===t||o.reelPosition<=1&&2===t){i=o.reelPosition=o.startOriginal+o.reelPosition-t;var r=0,s=0,a=0;this.bulletListElm.find("li").each(function(){a=parseInt(e(this).width())+parseInt(e(this).css("marginLeft"))+parseInt(e(this).css("marginRight")),s++<i+t&&(r+=a)}),n.css("marginLeft",-1*r+"px")}else i=this.reelPosition-=t;var l=0;s=0;this.bulletListElm.find("li").each(function(){a=parseInt(e(this).width())+parseInt(e(this).css("marginLeft"))+parseInt(e(this).css("marginRight")),s++<o.reelPosition&&(l+=a)}),n.animate({marginLeft:-1*l},150,function(){})},i.prototype.changePhoto=function(t,n){var i=this;if(this.animationFlag=!0,parseInt(t)!==parseInt(e(i.photoListElm).find("li.active").index())){if(i.currentImageIndex=parseInt(t),void 0===n||"slidefromright"!==n&&"slidefromleft"!==n&&"fade"!==n)e(i.photoListElm).addClass("switching"),e(i.bulletListElm).find("li").removeClass("active"),e(i.bulletListElm).find('li[data-image-id="'+t+'"]').addClass("active"),e(i.photoListElm).find("li").css("visibility","hidden").css("position","absolute"),e(i.photoListElm).find("li.active").removeClass("active"),e(i.photoListElm).find("li").eq(parseInt(t)).addClass("active"),e(i.photoListElm).find("li").eq(parseInt(t)).css("visibility","visible"),e(i.photoListElm).find("li").eq(parseInt(t)).css("position","static"),e(i.photoListElm).removeClass("switching"),i.animationFlag=!1,i.navAnimationFlag=!1;else{var o=e(i.photoListElm).height();e(i.photoListElm).css("height",o);var r=e(i.photoListElm).find("li.active"),s=e(i.photoListElm).find("li").eq(parseInt(t)),a=(e(r).height(),e(s).height());if(o!==a&&e(i.photoListElm).animate({height:a},{duration:300,step:function(){cmsReset(i.galleryElm)}},function(){}),"slidefromright"===n?(e(r).css("position","absolute").css("left","0").css("top","0"),e(r).animate({left:"-120%"},300,function(){e(r).removeClass("active"),e(r).css("position","").css("left","").css("top","")}),e(s).css("left","120%").css("opacity",1).css("visibility","visible"),e(s).animate({left:"0%"},300,function(){e(s).addClass("active").css("opacity","").css("left","").css("position",""),i.animationFlag=!1,i.navAnimationFlag=!1,e(i.photoListElm).css("height",""),cmsReset(i.galleryElm)})):"slidefromleft"===n?(e(r).css("position","absolute").css("left","0").css("top","0"),e(r).animate({left:"120%"},300,function(){e(r).removeClass("active"),e(r).css("position","").css("left","").css("top","")}),e(s).css("left","-120%").css("opacity",1).css("visibility","visible"),e(s).animate({left:"0%"},300,function(){e(s).addClass("active").css("opacity","").css("left","").css("position",""),i.animationFlag=!1,i.navAnimationFlag=!1,e(i.photoListElm).css("height",""),cmsReset(i.galleryElm)})):"fade"===n&&(e(r).css("position","absolute").css("left",0).css("top",0).css("opacity",1),e(r).animate({opacity:0},300,function(){}),e(s).css("position","absolute").css("left",0).css("top",0).css("opacity",0).css("visibility","visible"),e(s).animate({opacity:1},300,function(){e(r).removeClass("active").css("position","").css("left","").css("top","").css("opacity","").css("visibility","").attr("style",""),e(s).addClass("active").css("opacity","").css("left","").css("top","").css("position","").css("visibility","").attr("style",""),i.animationFlag=!1,i.navAnimationFlag=!1,e(i.photoListElm).css("height",""),cmsReset(i.galleryElm)})),e(i.bulletListElm).find("li").removeClass("active"),e(i.bulletListElm).find('li[data-image-id="'+t+'"]').addClass("active"),i.navBlockContentElm.hasClass("infinite")){e(i.bulletListElm).find("li").removeClass("large");var l=(i.currentImageIndex+1)%i.imagesTotal,c=i.currentImageIndex-1<0?i.imagesTotal-1:i.currentImageIndex-1;i.bulletListElm.find('li[data-image-id="'+l+'"]').addClass("large"),i.bulletListElm.find('li[data-image-id="'+c+'"]').addClass("large")}}cmsReset(i.galleryElm)}},i.prototype.createClones=function(){for(var t="",n=null,i=0;i<this.images.length;i++)t+='<li class="clone '+(n=this.images[i]).imageRatio+(i===this.currentImageIndex?" active":"")+'" data-image-id="'+i+'"><img src="'+n.imageThumbnail+'" alt=""></li>';e(this.bulletListElm).prepend(t),e(this.bulletListElm).append(t)},i.prototype.prepareReel=function(t){if("bullets"!==this.reelDirection){this.navBlockContentElm.removeClass("bullets"),this.getDimensions(),this.bulletListElm.find("li").removeClass("large");var n=this.reelItemSize,i=this.reelItemMargin,o=n*this.imagesTotal+i*(this.imagesTotal-1),r=this.reelContainerWidth,s=0;o<=r?(this.hideReelControls(),this.clearReel(),this.navBlockContentElm.addClass("centered")):(this.navBlockContentElm.hasClass("infinite")&&(this.navBlockContentElm.removeClass("infinite"),this.reelPosition+=2),this.showReelControls(),this.navBlockContentElm.addClass("reel"),this.navBlockContentElm.removeClass("centered"),o=n*(3*this.imagesTotal)+i*(3*this.imagesTotal-1),s=this.reelPosition*(n+i)*-1,this.bulletListElm.css("horizontal"===this.reelDirection?"width":"height",o+"px"),this.bulletListElm.css("horizontal"===this.reelDirection?"marginTop":"marginLeft",""),this.bulletListElm.css("horizontal"===this.reelDirection?"marginLeft":"marginTop",s+"px"),"vertical"===this.reelDirection?this.bulletListElm.css("width",""):this.bulletListElm.css("height","")),this.getDimensions()}else{this.navBlockContentElm.addClass("bullets"),this.getDimensions();n=this.reelItemSize,i=2*this.reelItemMargin,r=this.reelContainerWidth,s=0,o=0;if(this.imagesTotal<=this.maxBullets)this.clearReel(),this.navBlockContentElm.addClass("centered");else{this.navBlockContentElm.hasClass("reel")||!this.navBlockContentElm.hasClass("infinite")||"delete"===this.initAction||"add"===this.initAction?(this.bulletListElm.find("li.clicked").length?this.reelPosition=this.bulletListElm.find("li.clicked").index()-2:this.reelPosition-=2,this.navBlockContentElm.removeClass("reel")):"resize"!==t&&(this.bulletListElm.find("li.active").length?this.reelPosition=this.bulletListElm.find("li.original.active").index()-2:this.reelPosition-=2),this.navBlockContentElm.addClass("infinite");var a=(this.currentImageIndex+1)%this.imagesTotal,l=this.currentImageIndex-1<0?this.imagesTotal-1:this.currentImageIndex-1;this.bulletListElm.find('li[data-image-id="'+a+'"]').addClass("large"),this.bulletListElm.find('li[data-image-id="'+l+'"]').addClass("large"),s=0;var c=0,u=0,d=this;this.bulletListElm.find("li").each(function(){u=parseInt(e(this).width())+parseInt(e(this).css("marginLeft"))+parseInt(e(this).css("marginRight")),o+=u,c++<d.reelPosition&&(s+=u)}),this.bulletListElm.css("width",o+"px"),this.bulletListElm.css("marginTop",""),this.bulletListElm.css("marginLeft",-1*s+"px"),this.bulletListElm.css("height","")}this.getDimensions(),this.lastReelDirection=this.reelDirection}},i.prototype.buildNavReel=function(){e(this.navBlockWrapperElm).find("ul").length>0&&e(this.navBlockWrapperElm).find("ul").remove();for(var t=this.images.length,i=e("<ul></ul>"),o=null,r=this.currentImageIndex,s=0;s<t;s++)o=this.images[s],e(i).append('<li class="'+o.imageRatio+" original"+(s===r?" active":"")+'" data-image-id="'+s+'"><img src="'+o.imageThumbnail+'" alt=""></li>');if(e(this.navBlockContentElm).append(i),this.bulletListElm=this.navBlockContentElm.find(n.bulletListElm),this.navBullets=this.bulletListElm.find(n.bulletItemElm),this.createClones(),this.imagesTotal>this.maxBullets){var a=(this.currentImageIndex+1)%this.imagesTotal,l=this.currentImageIndex-1<0?this.imagesTotal-1:this.currentImageIndex-1;this.bulletListElm.find('li[data-image-id="'+a+'"]').addClass("large"),this.bulletListElm.find('li[data-image-id="'+l+'"]').addClass("large")}},i.prototype.getDimensions=function(){this.getReelDirection(),"horizontal"===this.reelDirection?(this.reelItemSize=parseInt(this.bulletListElm.find("li.original").width()),this.reelItemMargin=parseInt(e(this.navBullets).eq(1).css("marginLeft"))):"vertical"===this.reelDirection?(this.reelItemSize=parseInt(this.bulletListElm.find("li.original").height()),this.reelItemMargin=parseInt(e(this.navBullets).eq(1).css("marginTop"))):(this.reelItemSize=parseInt(this.bulletListElm.find("li:not(.active):not(.large)").width()),this.reelItemMargin=parseInt(this.bulletListElm.find("li:not(.active):not(.large)").css("marginLeft"))),this.reelWidth=this.reelItemSize*this.imagesTotal+this.reelItemMargin*(this.imagesTotal-1),this.reelContainerWidth="horizontal"===this.reelDirection?this.navBlockContentElm.outerWidth(!0):this.navBlockContentElm.outerHeight(!0),this.photoListElmWidth=this.photoListElm.width()},i.prototype.bindControls=function(){var t=this;if(this.galleryElm.off("mouseenter").on("mouseenter",function(){t.galleryElm.addClass("hover")}),this.galleryElm.off("mouseleave").on("mouseleave",function(){t.galleryElm.removeClass("hover")}),this.navBlockNextElm.off(this.options.touchEvents).on(this.options.touchEvents,function(e){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),t.tooFastClickNav()||(t.stopAutoplay(),t.nextImage("fade",!0),t.shiftReelForward())}),this.navBlockPrevElm.off(this.options.touchEvents).on(this.options.touchEvents,function(e){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),t.tooFastClickNav()||(t.stopAutoplay(),t.prevImage("fade",!0),t.shiftReelBackward())}),this.photoNextElm.off(this.options.touchEvents).on(this.options.touchEvents,function(){t.tooFastClick()||(t.stopAutoplay(),t.nextImage("slidefromright",!1))}),this.photoPrevElm.off(this.options.touchEvents).on(this.options.touchEvents,function(){t.tooFastClick()||(t.stopAutoplay(),t.prevImage("slidefromleft",!1))}),e(document).keydown(function(n){var i=e(t.navBlockContentElm).hasClass("reel"),o=37,r=39,s=isElementInViewport(t.galleryElm);i&&(e(t.bulletListElm).width()>e(t.bulletListElm).height()?(o=37,r=39):(o=38,r=40)),s>.3&&(n.keyCode===o?t.tooFastClick()||(t.stopAutoplay(),i?(t.prevImage("fade",!0),t.shiftReelBackward()):t.prevImage("slidefromleft",!1)):n.keyCode===r&&(t.tooFastClick()||(t.stopAutoplay(),i?(t.nextImage("fade",!0),t.shiftReelForward()):t.nextImage("slidefromright",!1))))}),this.photoItems.on("click",function(){t.stopAutoplay()}),e(t.bulletListElm).find("li").each(function(){e(this).on("click",function(){if(t.bulletListElm.find("li").removeClass("clicked"),e(this).addClass("clicked"),t.stopAutoplay(),"block"===e(this).find("img").css("display")){var n=parseInt(e(this).attr("data-image-id"));t.changePhoto(n,"fade")}else{n=parseInt(e(this).attr("data-image-id"));var i=parseInt(e(t.navBlockWrapperElm).find("li.active").attr("data-image-id")),o="",r=1;0===n&&i===t.imagesTotal-1?o="slidefromright":0===i&&n===t.imagesTotal-1?o="slidefromleft":n<2&&i>t.imagesTotal-1-2?(o="slidefromright",r=2):i<2&&n>t.imagesTotal-1-2?(o="slidefromleft",r=2):n>i?(o="slidefromright",r=n-i):(o="slidefromleft",r=i-n),t.changePhoto(n,o),t.navBlockContentElm.hasClass("infinite")&&("slidefromleft"===o?t.shiftBulletsBackward(r):"slidefromright"===o&&t.shiftBulletsForward(r))}})}),this.options.isCMS)return!1;var n=new Hammer(t.galleryElm.get(0).querySelector(t.options.photoListElm),{touchAction:"pan-y"}),i=null,o=null,r=null,s=null,a=null,l=null,c=null,u=null,d=null,h=null,p=null,f=null,m=null,g=null,v=null,y=null,w=null,b=null,x=!1,C=0,E=300;if(n.add(new Hammer.Pan({threshold:0,pointers:0,direction:Hammer.DIRECTION_ALL})),n.on("panstart panleft panright pancancel panend ",function(n){if("bullets"===t.reelDirection)if("panstart"===n.type){if(t.animationFlag||x)return void(x=!0);t.stopAutoplay(),t.galleryElm.addClass("dragged"),C=0,t.currentImageIndex,i=0===t.currentImageIndex?t.imagesTotal-1:t.currentImageIndex-1,o=t.currentImageIndex===t.imagesTotal-1?0:t.currentImageIndex+1,r=e(t.photoListElm).find("li.active"),s=e(t.photoListElm).find("li").eq(parseInt(i)),a=e(t.photoListElm).find("li").eq(parseInt(o)),l=parseInt(e(t.photoListElm).width()),c=parseInt(r.outerHeight()),u=c,d=e(t.photoListElm).find("li").eq(parseInt(i)).height(),h=e(t.photoListElm).find("li").eq(parseInt(o)).height(),p=-1*l,f=l,m=null,g=null,v=null,y=null,w=null,b=null,e(t.photoListElm).addClass("disable-pointer-events"),e(t.photoListElm).css("height",c),e(r).css("position","absolute").css("left","0").css("top","0"),e(s).css("position","absolute").css("left",p).css("top","0").css("opacity",1).css("visibility","visible").css("z-index",1),e(a).css("position","absolute").css("left",f).css("top","0").css("opacity",1).css("visibility","visible").css("z-index",1)}else if("panend"===n.type||"pancancel"===n.type){if(x)return void(x=!1);if(t.galleryElm.removeClass("dragged"),t.photoListElm.removeClass("disable-pointer-events"),"pancancel"===n.type)return;if((8==n.direction||16==n.direction||24==n.direction)&&0===C)return;if(t.animationFlag=!0,E=Math.abs(n.deltaX)/l*300,Math.abs(n.deltaX)>t.photoListElmWidth/4?(w=!0,parseInt(n.deltaX)<0?(m=-1*l,g=0,v=-2*l,y=h,b="forth"):(m=l,g=2*l,v=0,y=d,b="back")):(m=0,g=l,v=-1*l,y=c,w=!1,b=null),e(r).animate({left:m},E,function(){w&&(e(r).removeClass("active"),t.currentImageIndex="back"===b?i:o,"back"===b?e(s).addClass("active"):"forth"===b&&e(a).addClass("active")),e(r).css("position","").css("left","").css("top","").css("z-index","").css("visibility","")}),e(s).animate({left:v},E,function(){e(s).css("opacity","").css("left","").css("position","").css("z-index","").css("visibility",""),cmsReset(t.galleryElm)}),e(a).animate({left:g},E,function(){e(a).css("opacity","").css("left","").css("position","").css("z-index","").css("visibility",""),cmsReset(t.galleryElm)}),e(t.photoListElm).animate({height:y},E,function(){t.animationFlag=!1,t.navAnimationFlag=!1,e(t.photoListElm).css("height",""),cmsReset(t.galleryElm)}),w){if(e(t.bulletListElm).find("li").removeClass("active"),e(t.bulletListElm).find('li[data-image-id="'+("back"===b?i:o)+'"]').addClass("active"),t.navBlockContentElm.hasClass("infinite")){e(t.bulletListElm).find("li").removeClass("large");var I=(("back"===b?i:o)+1)%t.imagesTotal,T=("back"===b?i:o)-1<0?t.imagesTotal-1:("back"===b?i:o)-1;t.bulletListElm.find('li[data-image-id="'+I+'"]').addClass("large"),t.bulletListElm.find('li[data-image-id="'+T+'"]').addClass("large")}"forth"===b&&t.navBlockContentElm.hasClass("infinite")?t.shiftBulletsForward():"back"===b&&t.navBlockContentElm.hasClass("infinite")&&t.shiftBulletsBackward()}}else if("panstart"!==n.type){if(t.animationFlag||x)return void(x=!0);u=c+Math.abs(n.deltaX)/l*((parseInt(n.deltaX)<0?h:d)-c),e(t.photoListElm).css("height",u),C=n.deltaX,e(r).css("left",n.deltaX+"px"),e(s).css("left",p+n.deltaX+"px"),e(a).css("left",f+n.deltaX+"px")}}),e("body").hasClass("touched")){var I=new Hammer.Manager(t.bulletListElm.get(0));I.add(new Hammer.Pan({threshold:20,pointers:0})),I.on("pan",function(e){if("bullets"!==t.returnReelDirection()&&t.navBlockContentElm.hasClass("reel")){var n="horizontal"===t.reelDirection?e.deltaX:e.deltaY;e.isFinal&&(n>0?(t.stopAutoplay(),t.prevImage("fade",!0),t.shiftReelBackward()):n<0&&(t.stopAutoplay(),t.nextImage("fade",!0),t.shiftReelForward()))}})}},i.prototype.unbindEvents=function(){e(document).off("wnd-redraw."+this.galleryID,".content"),e(document).off("wnd-redraw-done."+this.galleryID,".column-content"),e(document).off("wnd-dynamic-content-change."+this.galleryID,String("#"+this.galleryID)),e(document).off("wnd-redraw."+this.galleryID),e(window).off("resize."+this.galleryID)},i.prototype.bindEvents=function(){var t=this;if(!t.eventsBound){e("body").hasClass("isIE")&&(document.ondragstart=function(){return!1});var n=debounce(function(n){var i=n.target;"IMG"!==i.tagName&&(e(i).hasClass(t.options.slideshowPhotoClass)&&(i=t.options.isEshopGallery?e(i).closest(".product-gallery"):e(i).closest(".gallery.block")),e(i).hasClass(t.blockClass)?(e(t.galleryElm).find(".clone").remove(),t.reload(t.galleryID),t.eventsBound=!0):e(i).hasClass(t.blockClass)||(e(t.galleryElm).find(".clone").remove(),t.unbindEvents(),t={},delete t))},500);e(document).off("wnd-redraw."+t.galleryID,String("#"+t.galleryID)),e(document).on("wnd-redraw."+t.galleryID,String("#"+t.galleryID),n),e(window).on("resize."+t.galleryID,function(){t.resizeAction()})}},i.prototype.reload=function(t){this.stopAutoplay(),this.galleryElm=e(document).find("#"+t),this.contentBlockElm=this.galleryElm.find(n.contentBlockElm),this.photoListElm=this.contentBlockElm.find(n.photoListElm),this.photoItems=this.photoListElm.find(n.photoItemElm),this.photoPrevElm=this.contentBlockElm.find(n.photoPrevElm),this.photoNextElm=this.contentBlockElm.find(n.photoNextElm),this.navBlockWrapperElm=this.galleryElm.find(n.navBlockWrapperElm),this.navBlockContentElm=this.navBlockWrapperElm.find(n.navBlockContentElm),this.bulletListElm=null,this.navBullets=null,this.navBlockPrevElm=this.navBlockWrapperElm.find(n.navBlockPrevElm),this.navBlockNextElm=this.navBlockWrapperElm.find(n.navBlockNextElm),this.images=this.loadSlideShowImages(),this.imagesTotal>this.images.length?this.initAction="delete":this.imagesTotal<this.images.length&&(this.initAction="add"),this.imagesTotal=this.images.length,this.reelPosition=this.imagesTotal,this.startOriginal=this.imagesTotal,this.startClones=2*this.imagesTotal,this.reelEnd=!1,this.reelDirection=this.returnReelDirection(),this.autoplay=!1,this.animationFlag=!1,this.navAnimationFlag=!1,this.initFlag=!1,this.currentImageIndex="default"===this.initAction?this.currentImageIndex:0;this.init()},i.prototype.resizeAction=function(){this.imagesTotal>1&&(this.getReelDirection(),this.images.length>1&&this.prepareReel("resize"))},i.prototype.init=function(){if(this.initFlag)return!1;this.initFlag=!0;var t=this;if(setTimeout(function(){t.initFlag=!1},1e3),this.images.length<=1?this.galleryEmpty():(this.galleryNotEmpty(),this.buildNavReel(),this.getDimensions(),this.prepareReel(),this.bindControls(),this.runAutoplay()),this.bindEvents(),this.initAction="default",this.options.isEshopGallery){var n=e(document).find(this.options.eshopDetailElm);n[0]&&cmsReset(n[0])}else cmsReset(this.galleryElm)};var o=new i(e(this),n);o.init()},e.fn.slideShow.defaults={touchEvents:"click",autoplay:!1,timeout:"5000",cover:!1,isCMS:!1,autoShiftReel:!0,isEshopGallery:!1,blockClass:"product-gallery",eshopDetailElm:".eshop-detail",contentBlockElm:".product-gallery-content",photoListElm:".product-gallery-list",photoItemElm:".product-gallery-photo",photoPrevElm:".arrow-prev",photoNextElm:".arrow-next",photoItemLinkElm:".product-gallery-link",photoItemImageDivElm:".product-gallery-image",photoItemImageElm:"img",navBlockWrapperElm:".product-gallery-nav",navBlockContentElm:".product-gallery-nav-content",bulletListElm:"ul",bulletItemElm:"li",navBlockPrevElm:".product-gallery-nav-arrow-prev",navBlockNextElm:".product-gallery-nav-arrow-next",slideshowPhotoClass:"product-gallery-photo",maxBullets:5}}(jQuery),function(e){e.fn.productSlider=function(t){if(e(this).length<=0)return!1;var n=e.extend({},e.fn.productSlider.defaults,t),i=function(e,t){this.sliderElm=e,this.sliderID="undefined"!==e.attr("id")?e.attr("id"):this.generateBlockID(),this.wrapperElm=e.find(".eshop-content"),this.reelElm=e.find(".eshop-container"),this.productsElements=e.find(".item"),this.navPrevElm=e.find(t.navPrev),this.navNextElm=e.find(t.navNext),this.navBlock=e.find(t.navBlock),this.navBlockContentElm=e.find(t.navBlockContentElm),this.bulletsUl=this.navBlock.find("ul"),this.bullets=this.bulletsUl.find("li").length?this.bulletsUl.find("li"):null,this.products=this.loadSliderProducts(),this.productsTotal=this.products.length,this.itemWidth=parseInt(this.sliderElm.width()),this.CPI=0,this.CPRP=this.CPI+2,this.options=t,this.autoplay=!1,this.resizeTimeout=!1,this.maxBullets=t.maxBullets,this.resizeFlag=!1,this.initFlag=!1,this.lastResize=!1,this.eventsBound=!1,this.animationFlag=!1,this.navReelPosition=this.productsTotal,this.startOriginal=this.productsTotal,this.startClones=2*this.productsTotal};i.prototype.generateBlockID=function(){var e,t;for(e="",t=0;t<10;t++)e+=Math.floor(16*Math.random()).toString(16).toUpperCase();return e},i.prototype.loadSliderProducts=function(){var t=[];return this.sliderElm.find(".item.original").each(function(){t.push({productImage:e(this).find(".item-media img ").attr("src"),productTitle:e(this).find(".item-head .product-title ").text().trim(),productPricePrefix:e(this).find(".item-head .product-price-prefix ").text().trim(),productPriceContent:e(this).find(".item-head .product-price-content ").text().trim(),productPriceSufix:e(this).find(".item-head .product-price-sufix ").text().trim(),productLink:e(this).find(".item-media > a").attr("src")})}),t},i.prototype.enoughContent=function(){return this.products.length<=1?(this.hideSliderControls(),!1):(this.showSliderControls(),!0)},i.prototype.prepareReel=function(t){var n=parseInt(this.wrapperElm.width()),i=n*(this.productsTotal+4),o=this;i+=o.productsTotal,e(o.sliderElm).find("article.item").css("width",n+"px"),t?o.reelElm.css("width",i+"px"):setTimeout(function(){o.reelElm.css("width",i+"px")},500),o.reelElm.css("marginLeft",o.CPRP*n*-1+"px"),o.itemWidth=n},i.prototype.buildNav=function(){var t=this.bulletsUl,i="";t.find(".clone").remove();for(var o=0;o<this.productsTotal;o++)i+='<li class="original'+(o===this.CPI?" active":"")+'" data-slide-number="'+o+'"></li>';if(e(t).html(i),this.bullets=t.find("li"),this.productsTotal<=this.maxBullets)this.navBlockContentElm.hasClass("infinite")&&this.navBlockContentElm.removeClass("infinite"),this.navBlockContentElm.addClass("centered");else{this.navBlockContentElm=this.sliderElm.find(n.navBlockContentElm),this.createBulletClones(),this.navBlockContentElm.hasClass("infinite")||(this.navReelPosition-=2),this.navBlockContentElm.hasClass("centered")&&this.navBlockContentElm.removeClass("centered"),this.navBlockContentElm.addClass("infinite");var r=(this.CPI+1)%this.productsTotal,s=this.CPI-1<0?this.productsTotal-1:this.CPI-1,a=0,l=0,c=0,u=0,d=this;this.bulletsUl.find('li[data-slide-number="'+r+'"]').addClass("large"),this.bulletsUl.find('li[data-slide-number="'+s+'"]').addClass("large"),this.bulletsUl.find("li").each(function(){u=parseInt(e(this).width())+parseInt(e(this).css("marginLeft"))+parseInt(e(this).css("marginRight")),l+=u,c++<d.navReelPosition&&(a+=u)}),this.bulletsUl.css("width",l+"px"),this.bulletsUl.css("marginLeft",-1*a+"px"),this.bulletsUl.css("marginTop",""),this.bulletsUl.css("height","")}cmsReset(this.sliderElm)},i.prototype.clearInlineStyles=function(){this.sliderElm.find(".clone .item-content div").removeAttr("style")},i.prototype.tooFastClick=function(){return this.animationFlag},i.prototype.bindControls=function(){var t=this;this.navNextElm.off(this.options.touchEvents).on(this.options.touchEvents,function(){t.tooFastClick()||(t.stopAutoplay(),t.nextSlide())}),this.navPrevElm.off(this.options.touchEvents).on(this.options.touchEvents,function(){t.tooFastClick()||(t.stopAutoplay(),t.prevSlide())}),e(document).keydown(function(e){37===e.keyCode?isElementInViewport(t.sliderElm)>.3&&(t.tooFastClick()||(t.stopAutoplay(),t.prevSlide())):39===e.keyCode&&isElementInViewport(t.sliderElm)>.3&&(t.tooFastClick()||(t.stopAutoplay(),t.nextSlide()))}),null!==this.bullets&&this.bullets.off(this.options.touchEvents).on(this.options.touchEvents,function(n){if(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),!t.tooFastClick()){t.stopAutoplay();var i=parseInt(e(t.bulletsUl).find("li.active").attr("data-slide-number")),o=parseInt(e(this).attr("data-slide-number")),r=null,s=0;0===i&&o===t.productsTotal-1?(t.CPI-=1,t.CPRP-=1,r="forward",s=1):i===t.productsTotal-1&&0===o?(t.CPI+=1,t.CPRP+=1,r="backward",s=1):(0===i&&o===t.productsTotal-2||1===i&&o===t.productsTotal-1)&&t.navBlockContentElm.hasClass("infinite")?(t.CPI-=2,t.CPRP-=2,r="forward",s=2):(i===t.productsTotal-1&&1===o||i===t.productsTotal-2&&0===o)&&t.navBlockContentElm.hasClass("infinite")?(t.CPI+=2,t.CPRP+=2,r="backward",s=2):(t.CPI=o,t.CPRP=t.CPI+2,r=i<o?"backward":"forward",s=Math.abs(i-o)),t.jumpToSlide(r,s)}});var n=new Hammer(t.sliderElm.get(0));n.on("swiperight",function(){t.productsTotal>1&&t.navPrevElm.click()}),n.on("swipeleft",function(){t.productsTotal>1&&t.navNextElm.click()})},i.prototype.shiftBullets=function(t,n){void 0===n&&(n=1),this.navAnimationFlag=!0;var i=this.bulletsUl,o=this.navReelPosition,r=this,s=0,a=0,l=0,c=0;"backward"===t?r.navReelPosition===r.startClones&&1===n||(r.navReelPosition===r.startClones-1||r.navReelPosition===r.startClones)&&2===n?(o=r.navReelPosition=r.startOriginal-(r.startClones-r.navReelPosition)+n,this.bulletsUl.find("li").each(function(){l=parseInt(e(this).width())+parseInt(e(this).css("marginLeft"))+parseInt(e(this).css("marginRight")),a++<o-n&&(s+=l)}),i.css("marginLeft",-1*s+"px")):o=r.navReelPosition+=n:0===r.navReelPosition&&1===n||r.navReelPosition<=1&&2===n?(o=r.navReelPosition=r.startOriginal+r.navReelPosition-n,this.bulletsUl.find("li").each(function(){l=parseInt(e(this).width())+parseInt(e(this).css("marginLeft"))+parseInt(e(this).css("marginRight")),a++<o+n&&(s+=l)}),i.css("marginLeft",-1*s+"px")):o=this.navReelPosition-=n,a=0,this.bulletsUl.find("li").each(function(){l=parseInt(e(this).width())+parseInt(e(this).css("marginLeft"))+parseInt(e(this).css("marginRight")),a++<r.navReelPosition&&(c+=l)}),i.animate({marginLeft:-1*c},150,function(){r.navAnimationFlag=!1})},i.prototype.jumpToSlide=function(t,n){var i=this,o=null;if(i.animationFlag=!0,o=i.CPI<0?i.productsTotal+i.CPI:i.CPI>=i.productsTotal?i.CPI-i.productsTotal:i.CPI,i.bulletsUl.find("li").removeClass("active"),i.bulletsUl.find('li[data-slide-number="'+o+'"]').addClass("active"),i.navBlockContentElm.hasClass("infinite")){e(i.bulletsUl).find("li").removeClass("large");var r=(o+1)%i.productsTotal,s=o-1<0?i.productsTotal-1:o-1;i.bulletsUl.find('li[data-slide-number="'+r+'"]').addClass("large"),i.bulletsUl.find('li[data-slide-number="'+s+'"]').addClass("large"),this.shiftBullets(t,n)}e(i.reelElm).animate({marginLeft:this.CPRP*i.itemWidth*-1},300,function(){(i.CPI<0||i.CPI>i.productsTotal-1)&&(i.CPI=o,i.CPRP=i.CPI+2,i.reelElm.css("marginLeft",i.itemWidth*i.CPRP*-1+"px")),i.animationFlag=!1})},i.prototype.nextSlide=function(){o.CPI+=1,o.CPRP+=1,o.jumpToSlide("backward",1)},i.prototype.prevSlide=function(){o.CPI-=1,o.CPRP-=1,o.jumpToSlide("forward",1)},i.prototype.runAutoplay=function(){if(this.options.autoplay){var e=this;this.options.isCMS?e.autoplay=setTimeout(function(){e.nextSlide(),e.stopAutoplay()},e.options.timeout):e.autoplay=setInterval(function(){e.nextSlide()},e.options.timeout)}},i.prototype.stopAutoplay=function(){this.options.autoplay&&!1!==this.autoplay&&(clearInterval(this.autoplay),this.autoplay=!1)},i.prototype.hideSliderControls=function(){this.navNextElm.addClass("hide").removeClass("show"),this.navPrevElm.addClass("hide").removeClass("show"),this.navBlock.addClass("hide").removeClass("show")},i.prototype.showSliderControls=function(){this.navNextElm.addClass("show").removeClass("hide"),this.navPrevElm.addClass("show").removeClass("hide"),this.navBlock.addClass("show").removeClass("hide")},i.prototype.disableAnimations=function(){this.sliderElm.addClass("disable-animations")},i.prototype.enableAnimations=function(){o.sliderElm.removeClass("disable-animations"),clearTimeout(o.resizeTimeout)},i.prototype.resizeAction=function(e){if(!this.initFlag){e=void 0!==e&&e;var t=this;t.resizeFlag||(t.resizeFlag=!0,t.disableAnimations(),clearTimeout(t.resizeTimeout),t.resizeTimeout=setTimeout(t.enableAnimations,200),t.enoughContent()&&t.prepareReel(!0),setTimeout(function(){t.resizeFlag=!1},100),t.bindControls(),cmsReset(t.sliderElm)),e?(clearTimeout(t.lastResize),t.lastResize=!1):(clearTimeout(t.lastResize),t.lastResize=setTimeout(function(){t.resizeAction(!0)},200))}},i.prototype.unbindEvents=function(){e(document).off("wnd-redraw."+this.sliderID,".content"),e(document).off("wnd-redraw-done."+this.sliderID,".column-content"),e(document).off("wnd-redraw."+this.sliderID,String("#"+this.sliderID)),e(window).off("resize."+this.sliderID)},i.prototype.bindEvents=function(){var t=this,n=debounce(function(n){var i=n.target;"IMG"!==i.tagName&&(e(i).hasClass("eshop")||(i=e(i).closest(".eshop")),e(i).hasClass("eshop-slider")&&e(i).hasClass("not-loaded")?(e(i).find(".clone").remove(),setTimeout(function(){t.reinit(t.sliderID)},50),this.eventsBound=!0):e(i).hasClass("eshop-slider")||(t.unbindEvents(),t={}))},500);e(window).on("resize."+t.sliderID,function(){t.resizeAction()}),e(document).on("wnd-redraw."+t.sliderID,".content",function(n){e(n.target).hasClass("eshop-slider")&&t.resizeAction()}),e(document).on("wnd-redraw-done."+t.sliderID,".column-content",function(){var n=e(this).closest(".content");e(n).find(".eshop-slider").each(function(){e(this).is(t.sliderElm)&&t.resizeAction()})}),t.options.isCMS&&(e(document).off("wnd-redraw."+t.sliderID,String("#"+t.sliderID)),e(document).on("wnd-redraw."+t.sliderID,String("#"+t.sliderID),n))},i.prototype.reinit=function(t){this.sliderElm=e(document).find("#"+t),this.wrapperElm=this.sliderElm.find(".eshop-content"),this.reelElm=this.sliderElm.find(".eshop-container"),this.productsElements=this.sliderElm.find(".item"),this.products=this.loadSliderProducts(),this.productsTotal=this.products.length,this.navPrevElm=this.sliderElm.find(this.options.navPrev),this.navNextElm=this.sliderElm.find(this.options.navNext),this.itemWidth=parseInt(this.sliderElm.width()),this.CPI=0,this.CPRP=this.CPI+2,this.autoplay=!1,this.resizeTimeout=!1,this.navBlock=this.sliderElm.find(this.options.navBlock),this.bulletsUl=this.navBlock.find("ul"),this.bullets=this.bulletsUl.find("li").length?this.bulletsUl.find("li"):null,this.resizeFlag=!1,this.initFlag=!1,this.eventsBound=!0,this.navReelPosition=this.productsTotal,this.startOriginal=this.productsTotal,this.startClones=2*this.productsTotal,this.init()},i.prototype.createClones=function(){for(var t,n,i=1;i<=this.options.clones;i++)n=this.productsElements.eq(this.productsTotal-i).attr("class").replace("original","clone").trim(),t=e("<article>").addClass(n).attr("data-clone-id",this.productsTotal-i).html(this.productsElements.eq(this.productsTotal-i).clone().find(".item-wrapper")),e(t).find(".thumbnail").removeAttr("id"),e(t).prependTo(this.reelElm);for(var o=0;o<this.options.clones;o++)n=this.productsElements.eq(o).attr("class").replace("original","clone").trim(),t=e("<article>").addClass(n).attr("data-clone-id",o).html(this.productsElements.eq(o).clone().find(".item-wrapper")),e(t).find(".thumbnail").removeAttr("id"),e(t).appendTo(this.reelElm);this.clearInlineStyles()},i.prototype.createBulletClones=function(){for(var t="",n=0;n<this.products.length;n++)this.products[n],t+='<li class="clone '+(n===this.CPI?" active":"")+'" data-slide-number="'+n+'"></li>';e(this.bulletsUl).prepend(t),e(this.bulletsUl).append(t),this.bullets=this.bulletsUl.find("li")},i.prototype.init=function(){this.initFlag=!0,this.enoughContent()&&(this.createClones(),this.prepareReel(!1),this.buildNav(),this.bindControls(),this.runAutoplay());var e=this;setTimeout(function(){e.sliderElm.removeClass("not-loaded"),e.eventsBound||e.bindEvents(),cmsReset(e.sliderElm);var t=document.createEvent("Event");t.initEvent("wnd-redraw-done",!0,!0),e.sliderElm[0].dispatchEvent(t)},500),cmsReset(e.sliderElm),this.initFlag=!1};var o=new i(e(this),n);o.init()},e.fn.productSlider.defaults={touchEvents:"click",autoplay:!1,timeout:"5000",navPrev:".slider-prev",navNext:".slider-next",navBlock:".eshop-slider-nav",navBlockContentElm:".eshop-slider-nav > .dots-content",isCMS:!1,maxBullets:5,clones:2}}(jQuery),function(e){e.fn.productCarousel=function(t){if(e(this).length<=0)return!1;var n=e.extend({},e.fn.productCarousel.defaults,t),i=function(t,n){this.carouselElm=t,this.carouselID="undefined"!==t.attr("id")?t.attr("id"):this.generateBlockID(),this.wrapperElm=t.find(".eshop-wrapper-correction"),this.carouselContainer=t.find(".eshop-container"),this.reelElm=this.carouselContainer,this.productsElements=t.find(".item.original"),this.products=this.loadCarouselProducts(),this.productsTotal=this.products.length,this.navPrevElm=t.find(n.navPrev),this.navNextElm=t.find(n.navNext),this.itemWidth=parseInt(this.carouselElm.width()),this.maxItemCount=parseInt(window.getComputedStyle(t[0],":before").getPropertyValue("content").replace('"',"").replace("'","")),this.itemCount=parseInt(window.getComputedStyle(t[0],":after").getPropertyValue("content").replace('"',"").replace("'","")),this.currentProductIndex=this.maxItemCount,this.options=n,this.autoplay=!1,this.resizeTimeout=!1,this.animationFlag=!1,this.initFlag=!1,this.lastResize=!1,this.eventsBound=!1,this.initialized=!1,this.isInIframe=e("body").hasClass("ios-iframe")};i.prototype.generateBlockID=function(){var e,t;for(e="",t=0;t<10;t++)e+=Math.floor(16*Math.random()).toString(16).toUpperCase();return e},i.prototype.loadCarouselProducts=function(){var t=[];return this.carouselElm.find(".item.original").each(function(){t.push({productImage:e(this).find("img ").attr("src"),productTitle:e(this).find(".product-title ").text().trim(),productPricePrefix:e(this).find(".product-price-prefix ").text().trim(),productPriceContent:e(this).find(".product-price-content ").text().trim(),productPriceSufix:e(this).find(".product-price-sufix ").text().trim(),productLink:e(this).find("h2 > a").attr("src")})}),t},i.prototype.enoughContent=function(){return this.products.length<=this.itemCount?(this.hideCarouselControls(),this.stopAutoplay(),!1):(this.showCarouselControls(),!0)},i.prototype.prepareReel=function(e){var t=parseInt(this.wrapperElm.width()/this.itemCount),n=t*this.productsTotal+2*this.maxItemCount*t;this.reelElm.find(".item").css("width",t+"px"),this.reelElm.css("width",n+"px"),this.reelElm.css("marginLeft",(e?this.currentProductIndex*t*-1:this.maxItemCount*t*-1)+"px"),e||(this.currentProductIndex=this.maxItemCount),this.itemWidth=t,e||this.checkImages()},i.prototype.replaceImgSrc=function(e,t,n){var i=e.lastIndexOf(t);return e=e.substring(0,i)+n+e.substring(i+t.length)},i.prototype.checkImages=function(){var t,n=this,i=this.reelElm.find("article.item").eq(0).find(".item-media").outerWidth(!0),o="/200/",r="";i>900?o="/":i>700?o="/900/":i>400?o="/700/":i>200&&(o="/450/"),this.reelElm.find(".item:not(.wnd-empty-thumbnail)").each(function(){if(t=e(this).find("img").attr("src"),r=t.indexOf("/700/")>-1?"/700/":t.indexOf("/450/")>-1?"/450/":t.indexOf("/200/")>-1?"/200/":"/",o!==r){var i=n.replaceImgSrc(t,r,o);e(this).find("img").attr("src",i)}})},i.prototype.tooFastClick=function(){return this.animationFlag},i.prototype.bindControls=function(){var t=this;if(this.navNextElm.off(this.options.touchEvents).on(this.options.touchEvents,function(){t.tooFastClick()||(t.stopAutoplay(),t.nextProduct())}),this.navPrevElm.off(this.options.touchEvents).on(this.options.touchEvents,function(){t.tooFastClick()||(t.stopAutoplay(),t.prevProduct())}),e(document).keydown(function(e){37===e.keyCode?isElementInViewport(t.carouselElm)>.3&&(t.tooFastClick()||(t.stopAutoplay(),t.prevProduct())):39===e.keyCode&&isElementInViewport(t.carouselElm)>.3&&(t.tooFastClick()||(t.stopAutoplay(),t.nextProduct()))}),this.options.isCMS)return!1;var n=new Hammer(t.carouselElm.get(0));n.on("swiperight",function(){t.navPrevElm.click()}),n.on("swipeleft",function(){t.navNextElm.click()})},i.prototype.jumpToProduct=function(){var e=this;e.animationFlag=!0,this.reelElm.animate({marginLeft:e.currentProductIndex*e.itemWidth*-1},300,function(){e.currentProductIndex===e.productsTotal+e.itemCount?(e.reelElm.css("marginLeft",e.itemCount*e.itemWidth*-1+"px"),e.currentProductIndex=e.itemCount):0===e.currentProductIndex&&(e.reelElm.css("marginLeft",e.productsTotal*e.itemWidth*-1+"px"),e.currentProductIndex=e.productsTotal),e.animationFlag=!1})},i.prototype.nextProduct=function(){this.currentProductIndex++,this.jumpToProduct()},i.prototype.prevProduct=function(){this.currentProductIndex--,this.jumpToProduct()},i.prototype.runAutoplay=function(){if(this.options.autoplay&&!this.isInIframe){var e=this;this.options.isCMS?e.autoplay=setTimeout(function(){e.nextProduct(),e.stopAutoplay()},e.options.timeout):e.autoplay=setInterval(function(){e.nextProduct()},e.options.timeout)}},i.prototype.stopAutoplay=function(){this.options.autoplay&&!1!==this.autoplay&&(clearInterval(this.autoplay),this.autoplay=!1)},i.prototype.hideCarouselControls=function(){this.carouselElm.addClass("static"),this.navNextElm.addClass("hide").removeClass("show"),this.navPrevElm.addClass("hide").removeClass("show")},i.prototype.showCarouselControls=function(){this.carouselElm.removeClass("static"),this.navNextElm.addClass("show").removeClass("hide"),this.navPrevElm.addClass("show").removeClass("hide")},i.prototype.bindEvents=function(){var t=this,n=debounce(function(n){var i=n.target;"IMG"!==i.tagName&&(e(i).hasClass("eshop")||(i=e(i).closest(".eshop")),e(i).hasClass("eshop-carousel")&&e(i).hasClass("not-loaded")?(e(t.carouselElm).find(".clone").remove(),setTimeout(function(){t.reload(t.carouselID)},100),this.eventsBound=!0):e(i).hasClass("eshop-carousel")||(t.unbindEvents(),t={},delete t))},500);e(window).on("resize."+t.carouselID,function(){t.resizeAction()}),e(document).on("wnd-redraw."+t.carouselID,".content",function(n){e(n.target).hasClass("eshop-carousel")&&t.resizeAction()}),e(document).on("wnd-redraw-done."+t.carouselID,".column-content",function(){var n=e(this).closest(".content");e(n).find(".eshop-carousel").each(function(){e(this).is(t.carouselElm)&&t.resizeAction()})}),e(document).off("wnd-redraw."+t.carouselID,String("#"+t.carouselID)),e(document).on("wnd-redraw."+t.carouselID,String("#"+t.carouselID),n)},i.prototype.clearReel=function(){this.reelElm.find(".item").css("width",""),this.reelElm.css("width",""),this.reelElm.css("marginLeft","")},i.prototype.resizeAction=function(e){if(!this.initFlag){var t=this;e=void 0!==e&&e;t.resizeFlag||(t.resizeFlag=!0,t.itemCount=parseInt(window.getComputedStyle(t.carouselElm[0],":after").getPropertyValue("content").replace('"',"").replace("'","")),t.enoughContent()?(t.prepareReel(!0),t.bindControls()):t.clearReel(),setTimeout(function(){t.resizeFlag=!1},100),t.bindEvents(),cmsReset(this.carouselElm)),e?(clearTimeout(t.lastResize),t.lastResize=!1):(clearTimeout(t.lastResize),t.lastResize=setTimeout(function(){t.resizeAction(!0)},200))}},i.prototype.unbindEvents=function(){e(document).off("wnd-redraw."+this.carouselID,".content"),e(document).off("wnd-redraw-done."+this.carouselID,".column-content"),e(document).off("wnd-redraw."+this.carouselID,String("#"+this.carouselID)),e(window).off("resize."+this.carouselID)},i.prototype.clearInlineStyles=function(){this.carouselElm.find(".item .product-title").removeAttr("style"),this.carouselElm.find(".item .product-ribbon").removeAttr("style"),this.carouselElm.find(".item .product-price").removeAttr("style"),this.carouselElm.find(".item .product-price-comparative").removeAttr("style")},i.prototype.copyInlineStyles=function(){var t,n,i,o,r=[".product-title",".product-ribbon",".product-price",".product-price-comparative"];for(i=this.productsElements.length-1;i>this.productsElements.length-1-this.maxItemCount;i--)for(n=0;n<r.length;n++)void 0!==(t=this.productsElements.eq(i).find(r[n]).attr("style"))&&e('div[data-clone-id="'+i+'"]').find(r[n]).attr("style",t);for(o=0;o<this.maxItemCount;o++)for(n=0;n<r.length;n++)void 0!==(t=this.productsElements.eq(o).find(r[n]).attr("style"))&&e('div[data-clone-id="'+o+'"]').find(r[n]).attr("style",t)},i.prototype.reload=function(t){this.stopAutoplay(),this.carouselElm=e(document).find("#"+t),this.wrapperElm=this.carouselElm.find(".eshop-wrapper-correction"),this.carouselContainer=this.carouselElm.find(".eshop-container"),this.reelElm=this.carouselContainer,this.productsElements=this.carouselElm.find(".item.original"),this.products=this.loadCarouselProducts(),this.productsTotal=this.products.length,this.navPrevElm=this.carouselElm.find(n.navPrev),this.navNextElm=this.carouselElm.find(n.navNext),this.itemWidth=parseInt(this.carouselElm.width()),this.maxItemCount=parseInt(window.getComputedStyle(this.carouselElm[0],":before").getPropertyValue("content").replace('"',"").replace("'","")),this.itemCount=parseInt(window.getComputedStyle(this.carouselElm[0],":after").getPropertyValue("content").replace('"',"").replace("'","")),this.currentProductIndex=this.maxItemCount,this.autoplay=!1,this.resizeTimeout=!1,this.resizeFlag=!1,this.initFlag=!1,this.eventsBound=!0,this.init()},i.prototype.init=function(){var t,n;this.initFlag=!0,0===this.productsElements.length&&!0===this.initialized&&this.reload(this.carouselID),this.carouselElm.find(".clone").remove(),this.productsTotal<this.maxItemCount&&(this.maxItemCount=this.productsTotal);for(var i=this.productsElements.length-1;i>this.productsElements.length-1-this.maxItemCount;i--)n=this.productsElements.eq(i).attr("class").replace("original","clone").trim(),t=e("<div>").addClass(n).attr("data-clone-id",i).html(this.productsElements.eq(i).clone().find(".item-wrapper")),e(t).find(".thumbnail").removeAttr("id"),e(t).prependTo(this.reelElm);for(var o=0;o<this.maxItemCount;o++)n=this.productsElements.eq(o).attr("class").replace("original","clone").trim(),t=e("<div>").addClass(n).attr("data-clone-id",o).html(this.productsElements.eq(o).clone().find(".item-wrapper")),e(t).find(".thumbnail").removeAttr("id"),e(t).appendTo(this.reelElm);this.clearInlineStyles(),this.enoughContent()?(this.prepareReel(!1),this.bindControls(),this.runAutoplay(),this.copyInlineStyles()):this.clearReel(),this.checkImages(),this.carouselElm.removeClass("not-loaded"),this.eventsBound||this.bindEvents(),cmsReset(this.carouselElm);var r=document.createEvent("Event");r.initEvent("wnd-redraw-done",!0,!0),this.carouselElm[0].dispatchEvent(r),this.initFlag=!1,this.initialized=!0},new i(e(this),n).init()},e.fn.productCarousel.defaults={touchEvents:"click",autoplay:!1,timeout:"5000",navPrev:".carousel-prev",navNext:".carousel-next",isCMS:!1}}(jQuery),$(document).ready(function(){!isCMS()&&isEshop()&&($(".eshop-cart-quantity-button").off("click").on("click",function(){var e=$(this).parent().find("input"),t=parseInt(e.val(),10),n=parseInt(e.attr("max"),10);isNaN(n)&&(n=999999),$(this).hasClass("eshop-cart-quantity-add")&&((t=Math.min(t+1,n+1))>=n&&$(this).addClass("disabled"),t>1&&$(this).parent().find(".eshop-cart-quantity-remove").removeClass("disabled")),$(this).hasClass("eshop-cart-quantity-remove")&&((t=Math.max(t-1,1))<=n&&$(this).parent().find(".disabled").removeClass("disabled"),1==t&&$(this).addClass("disabled")),$(e).val(t);var i=document.createEvent("Event");i.initEvent("change",!0,!0),e[0].dispatchEvent(i)}),$(".eshop-cart-quantity-content input").each(function(){var e=parseInt($(this).val(),10),t=parseInt($(this).attr("max"),10);1==e&&$(this).parent().find(".eshop-cart-quantity-remove").addClass("disabled"),e>=t&&$(this).parent().find(".eshop-cart-quantity-add").addClass("disabled"),1==e&&1==t&&$(this).prop("disabled",!0),0==t&&$(this).parent().find(".eshop-cart-quantity-button").addClass("disabled")}))});var is_cms=isCMS(),support3D=!msieversion()&&!issafari()&&!isfirefox(),force2D="2D"==$("body").attr("data-parallax");function backgroundResize(){var e=$(window).height(),t=$(window).width();$(".bgatt-parallax").each(function(n){var i=!1;$(this).hasClass("wnd-background-pattern")&&(i=!0);var o=$(this);if(is_cms||!support3D||force2D){var r=o.width(),s=o.height();if("sidebar"==$("body").attr("data-layout-type")){var a=parseInt($("header").css("marginLeft")),l=!1;$("header .section-bg").css("opacity")<1&&(l=!0),(1==l||a>0)&&(r=t)}var c,u=$(o).attr("style"),d=u.indexOf("http");c=u.indexOf("')")>-1?u.indexOf("')"):u.indexOf('")')>-1?u.indexOf('")'):u.indexOf(")");var h=u.substr(d,c-d);$("<img/>").attr("src",h).on("load",function(){var t=this.width,n=this.height,a=t/n;r>(t=(n=s+(e-s)+200)*a)&&(n=(t=r)/a),i||o.css("background-size",t+"px "+n+"px"),o.attr("resized-imgW",t),o.attr("resized-imgH",n),o.css("background-attachment","fixed")})}else{$(this).hasClass("parallax")||$(this).addClass("parallax");o=$(this);var p=$(this).parent().parent(),f=(s=p.height())+(e-s)+200;o.css("height",f+"px")}});var n=0;n=msieversion()?300:100,setTimeout(function(){parallaxPosition()},n)}function parallaxPosition(e){var t=$(window).height(),n=$(window).scrollTop(),i=n+t,o=(n+i)/2;$(".bgatt-parallax").each(function(e){var r,s,a=$(this),l=$(this).parent().parent(),c=!!$(l).is("#main .section-wrapper-content section:first-child"),u=!!$(l).is("#main .section-wrapper-content section:last-child"),d=$(this).hasClass("bgpos-top-center"),h=$(this).hasClass("bgpos-bottom-center");is_cms||!support3D||force2D?(s=a.offset().top,r=a.height()):(s=l.offset().top,r=l.outerHeight());var p,f,m,g,v,y,w=s+r;if(i>s&&n<w)if(is_cms||!support3D||force2D){f=a.attr("resized-imgw"),p=a.attr("resized-imgh");var b,x=0;if($(this).css("top").indexOf("px")>0&&parseInt($(this).css("top"),10)>0&&(x=parseInt($(this).css("top"),10)),m=0,g=-p+t,c&&d)y=m+(g-m)*(o-(s-=v=r<t?p-r:p-t))/((w+=v)-s)-(m+(g-m)*(t/2-s)/(w-s));else if(u&&h){y=m+(g-m)*(o-(s-=v=r<t?p-r:p-t))/((w+=v)-s)+(m+(g-m)*(v+t/2)/(w-s))}else y=m+(g-m)*(o-(s-=v=r<t?p-r:p-t))/((w+=v)-s);if(y+=x,"sidebar"==$("body").attr("data-layout-type")&&"fixed"==$("header").css("position")){var C=$("header").width(),E=parseInt($("header").css("marginLeft")),I=!1;$("header .section-bg").css("opacity")<1&&(I=!0),1==I||E>0?b="50%":(b=C+parseInt($(this).width()-f)/2,b+="px")}else b="50%";$(this).css("background-position",b+" "+y+"px")}else{if(m=0,g=-(p=a.height())+t,c&&d){y=m+(g-m)*(o-(s-=v=r<t?p-r:p-t))/((w+=v)-s)-(m+(g-m)*(t/2-s)/(w-s))+0}else if(u&&h){y=m+(g-m)*(o-(s-=v=r<t?p-r:p-t))/((w+=v)-s)+(m+(g-m)*(v+t/2)/(w-s))}else y=m+(g-m)*(o-(s-=v=r<t?p-r:p-t))/((w+=v)-s);var T="translate3d(0px,"+y+"px, 0px)";if("sidebar"==$("body").attr("data-layout-type")&&"fixed"==$("header").css("position")){C=$("header").width(),E=parseInt($("header").css("marginLeft")),I=!1;$("header .section-bg").css("opacity")<1&&(I=!0),0==I&&0==E&&a.css("margin-left",C+E+"px")}else a.css("margin-left","0px");a.css("-webkit-transform",T),a.css("-ms-transform",T),a.css("transform",T)}})}function fixedImage(){$(".bgatt-fixed").each(function(e){var t=$(this);if("fixed"==$("header").css("position")){var n={};n.src=getBackgroundImageUrl(t),$("<img/>").attr("src",n.src).on("load",function(){n.width=this.width,n.height=this.height,n.ratio=this.width/this.height;var e={height:$(window).height(),width:$(t).width(),ratio:this.width/this.height},i={};1==n.ratio?i.width=i.height=e.width>e.height?e.width:e.height:n.ratio>1?n.width*(e.height/n.height)>=e.width?(i.width=n.width*(e.height/n.height),i.height=e.height):(i.width=e.width,i.height=n.height*(e.width/n.width)):n.height*(e.width/n.width)>=e.height?(i.width=e.width,i.height=n.height*(e.width/n.width)):(i.width=n.width*(e.height/n.height),i.height=e.height);var o=$("header").width()+(e.width-i.width)/2+"px",r=i.height>e.height?"50%":"0px";$(t).css("background-position",o+" "+r),$(t).css("background-size",i.width+"px "+i.height+"px")})}else $(t).css("background-position","50% 50%"),$(t).css("background-size","cover")})}function borderControll(){var sectionCount=$(".section").length,currentSection=0,realSectionID=0,sectionsArray=[],layoutSection=$("#layout-section"),bordersAttr,borderParamsExist,currentSectionData,borderPos,borderAction,sectionSelector;function getSectionBackground(e){var t,n="",i="",o=$(e).find(".section-bg-layer"),r=$(e).find(".section-bg");return void 0!==o&&o.length||(o=e),$(o).attr("class").indexOf("wnd-background-solid")>-1?(t="solid","rgba(0, 0, 0, 0)"!=(n=$(o).css("backgroundColor"))&&"transparent"!=n&&void 0!==n||(n=$(e).css("backgroundColor"))):$(o).attr("class").indexOf("wnd-background-image")>-1?t="image":$(o).attr("class").indexOf("wnd-background-video")>-1?t="video":$(o).attr("class").indexOf("wnd-background-pattern")>-1?t="pattern":"section-bg-layer"==$(o).attr("class")?(t="solid",n=$(o).css("backgroundColor"),i=$(r).css("backgroundColor"),"rgba(0, 0, 0, 0)"!=n&&"transparent"!=n&&void 0!==n||"rgba(0, 0, 0, 0)"!=(n=$(e).css("backgroundColor"))&&"transparent"!=n&&void 0!==n||"rgba(0, 0, 0, 0)"==i&&"transparent"==i&&null==i||(n=i)):-1==$(o).attr("class").indexOf("section-bg-layer")&&(t="solid",n=$(o).css("backgroundColor")),"solid"==t&&(void 0!==n&&"rgba(0, 0, 0, 0)"!=n&&"transparent"!=n||void 0!==(n=$("body").css("backgroundColor"))&&"rgba(0, 0, 0, 0)"!=n&&"transparent"!=n||(n=$(".wnd-page").css("backgroundColor"))),{backgroundType:t,backgroundColor:n}}function handleBorder(borderElm,borderPos,curSec,action){var currentSection=$(".section").eq(curSec);"section"!=borderElm?eval('$(currentSection).find(".'+borderElm+'").'+action+'Class("border-'+borderPos+'")'):eval("$(currentSection)."+action+'Class("border-'+borderPos+'")')}sectionCount>1&&$(".section").each(function(){$(this).hasClass("wnd-disabled")?realSectionID++:(bordersAttr=$(this).attr("wn-border"),borderParamsExist=void 0!==bordersAttr&&!1!==bordersAttr,currentSectionData=getSectionBackground($(this),currentSection),sectionsArray.push({idSection:currentSection,realSectionId:realSectionID,bgColor:currentSectionData.backgroundColor,bgType:currentSectionData.backgroundType,sectionVisible:"block"==$(this).css("display"),borderTop:!!borderParamsExist&&bordersAttr.indexOf("top")>-1,borderBottom:!!borderParamsExist&&bordersAttr.indexOf("bottom")>-1,borderElm:borderParamsExist?$(this).attr("wn-border-element"):""}),realSectionID++,currentSection++)}),$.each(sectionsArray,function(e,t){if(t.borderTop||t.borderBottom){if(sectionSelector=e,t.borderTop&&e>0){for(sectionSelector=e-1;0==sectionsArray[sectionSelector];)sectionSelector--;if(sectionsArray[sectionSelector].borderBottom)return}if(t.borderBottom&&e<sectionCount-1)for(sectionSelector=e+1;0==sectionsArray[sectionSelector];)sectionSelector++;borderPos=t.borderTop?"top":"bottom",borderAction="solid"==t.bgType&&"solid"==sectionsArray[sectionSelector].bgType&&t.bgColor==sectionsArray[sectionSelector].bgColor?"add":"remove",handleBorder(t.borderElm,borderPos,t.realSectionId,borderAction)}}),"none"==$(layoutSection).attr("wn-border")&&($(layoutSection).removeClass("border-top").removeClass("border-bottom"),$(layoutSection).addClass("border-none"))}function blogSectionControl(){var e=$("body"),t=$("#main [class*='blog-detail-header']"),n="wn-blog-header-collapse",i="wn-section-closest-to-blog-header-collapse";if(!(t.length<1)){var o=t.next(".section");if(!(o.length<1)){var r=c(t.attr("class").split(/\s+/)),s=c(o.attr("class").split(/\s+/));if(r==s)if(r.indexOf("section-media")>-1){var a=t.find(".wnd-background-solid").css("background-color");a==o.find(".wnd-background-solid").css("background-color")&&void 0!==a?d():u()}else d();else if("section-none"==r||"section-none"==s){var l=c(e.attr("class").split(/\s+/));"section-none"!=r&&(r==l?d():u()),"section-none"!=s&&(s==l?d():u())}else u()}}function c(e){for(var t in e){var n=e[t];if(n.indexOf("section-")>-1)return n}}function u(){t.removeClass(n),o.removeClass(i)}function d(){t.addClass(n),o.addClass(i)}}function headerBorder(){if($(".section").length>2){var e=0,t=0;$(".section").each(function(){$(this).attr("class").indexOf(".header-01")>-1&&(t=e),e++});var n=$(".section").eq(t).css("backgroundColor"),i=$(".section").eq(t+1).css("backgroundColor"),o=$("body").css("backgroundColor");n==i?$(".section").eq(t).find(".nav-line").css("borderBottomWidth","1px"):$(".section").eq(t+1).attr("class").indexOf("media")>-1?$(".section").eq(t).find(".nav-line").css("borderBottomWidth","0px"):"rgba(0, 0, 0, 0)"==n&&o==i?$(".section").eq(t).find(".nav-line").css("borderBottomWidth","1px"):"rgba(0, 0, 0, 0)"==n&&o!=i?$(".section").eq(t).find(".nav-line").css("borderBottomWidth","0px"):i!=n?$(".section").eq(t).find(".nav-line").css("borderBottomWidth","0px"):$(".section").eq(t).find(".nav-line").css("borderBottomWidth","1px")}}function barsControlMobile(e,t){var n=$(e),i=n.find(".header-fixed"),o=(n.find(".header-bg"),$("#wnd_cookie_bar")),r=i.height(),s=parseFloat($(n).offset().top,10),a=parseFloat($(window).scrollTop(),10);"close"==t&&(s=Math.max(s-o.height(),0));var l=Math.max(s-a,0),c=Math.max(a-s,0);(l>0||a>0||"close"==t)&&isMobileMenu()?(i.css({top:l,position:"fixed"}),n.css({paddingTop:r})):(n.removeAttr("style"),i.removeAttr("style")),c>s?i.addClass("bgonscroll"):i.removeClass("bgonscroll")}function barsControlMobileInit(e){isCMS()||(barsControlMobile(e),$(window).on("scroll resize orientationchange",function(){barsControlMobile(e)}),$("#wnd_cookie_bar_close").on("touchend click",function(){barsControlMobile(e,"close")}))}function barsControlDesktop(e,t){var n=$(e),i=n.find(".header-01"),o=$("#wnd_cookie_bar"),r=parseFloat($(n).offset().top,10),s=parseFloat($(window).scrollTop(),10);"close"==t&&(r=Math.max(r-o.height(),0));var a=Math.max(r-s,0);(a>0||s>0||"close"==t)&&!isMobileMenu()?i.css({top:a,position:"fixed"}):(n.removeAttr("style"),i.removeAttr("style"))}function barsControlDesktopInit(e){isCMS()||(barsControlDesktop(e),$(window).on("scroll resize orientationchange",function(){barsControlDesktop(e)}),$("#wnd_cookie_bar_close").on("touchend click",function(){barsControlDesktop(e,"close")}),$("body").on("fixCartEvent",function(){barsControlDesktop(e)}))}function sectionControl(){$("#main");var e=$(".blog-header"),t=[],n=$(".section"),i="",o="";function r(e){var t=$(e).attr("class").split(/\s+/);for(var n in t){var i=t[n];if(i.indexOf("section-")>-1)return i}}function s(e){return $(e).find(".wnd-background-solid").css("background-color")}function a(){$(i).addClass("wn-space-bottom"),$(o).addClass("wn-space-top"),cmsReset(i)}function l(){$(i).removeClass("wn-space-bottom"),$(o).removeClass("wn-space-top"),cmsReset(i)}n.each(function(e){$(this).is("[data-space]")&&t.push(e)}),$(t).each(function(e){var c=t[e],u=c+1;if(i=n[c],o=n[u],$(o).hasClass("wnd-disabled"))l();else{var d=r(i);if(d!=r(o)||$(o).hasClass("footer"))l();else if(d.indexOf("section-media")>-1){var h=s(i);h==s(o)&&void 0!==h?a():l()}else a()}}),e[0]&&(isCMS()||1==e.find(".content .text-content:empty").length&&e.addClass("wn-empty"),1==e.find(".content > div:empty").length&&e.addClass("wn-empty"))}support3D=!1,$(document).ready(function(){deviceDetect("touched")||deviceDetect("wnd-frontend-test")||deviceDetect("mobile-devices")?$(".bgatt-parallax").removeClass("bgatt-parallax").addClass("bgatt-scroll"):($(window).on("resize orientationchange",function(){backgroundResize()}),$(window).scroll(function(){window.requestAnimationFrame(parallaxPosition)}),isCMS()?setTimeout(function(){backgroundResize()},50):backgroundResize()),isCMS()&&$(document).on("wnd-redraw","body",function(){setTimeout(function(){$(".bgatt-scroll").removeClass("parallax"),$(".bgatt-fixed").removeClass("parallax"),deviceDetect("touched")||($(window).on("resize orientationchange",function(){backgroundResize()}),backgroundResize())},200)})}),getBackgroundImageUrl=function(e){var t,n=$(e).attr("style"),i=n.indexOf("http");return t=n.indexOf("')")>-1?n.indexOf("')"):n.indexOf('")')>-1?n.indexOf('")'):n.indexOf(")"),n.substr(i,t-i)},$(document).ready(function(){"sidebar"==$("body").attr("data-layout-type")&&0==parseInt($("header").css("marginLeft"))&&1==$("header .section-bg").css("opacity")&&($(window).on("resize orientationchange",function(){fixedImage()}),setTimeout(function(){fixedImage()},200),isCMS()&&$(document).on("wnd-redraw","body",function(){setTimeout(function(){fixedImage()},200)}),deviceDetect("touched")||$(window).on("resize orientationchange",function(){fixedImage()}))}),$(document).ready(function(){borderControll(),isCMS()&&$(document).on("wnd-redraw","body",function(){"sidebar"==$("body").attr("data-layout-type")?setTimeout(function(){borderControll()},50):borderControll()})}),$(document).ready(function(){$("body").hasClass("wt-blogpost")&&(blogSectionControl(),$(document).on("wnd-redraw","body",function(){blogSectionControl()}))}),function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.PhotoSwipe=t()}(this,function(){"use strict";return function(e,t,n,i){var o={features:null,bind:function(e,t,n,i){var o=(i?"remove":"add")+"EventListener";t=t.split(" ");for(var r=0;r<t.length;r++)t[r]&&e[o](t[r],n,!1)},isArray:function(e){return e instanceof Array},createEl:function(e,t){var n=document.createElement(t||"div");return e&&(n.className=e),n},getScrollY:function(){var e=window.pageYOffset;return void 0!==e?e:document.documentElement.scrollTop},unbind:function(e,t,n){o.bind(e,t,n,!0)},removeClass:function(e,t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")},addClass:function(e,t){o.hasClass(e,t)||(e.className+=(e.className?" ":"")+t)},hasClass:function(e,t){return e.className&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(e.className)},getChildByClass:function(e,t){for(var n=e.firstChild;n;){if(o.hasClass(n,t))return n;n=n.nextSibling}},arraySearch:function(e,t,n){for(var i=e.length;i--;)if(e[i][n]===t)return i;return-1},extend:function(e,t,n){for(var i in t)if(t.hasOwnProperty(i)){if(n&&e.hasOwnProperty(i))continue;e[i]=t[i]}},easing:{sine:{out:function(e){return Math.sin(e*(Math.PI/2))},inOut:function(e){return-(Math.cos(Math.PI*e)-1)/2}},cubic:{out:function(e){return--e*e*e+1}}},detectFeatures:function(){if(o.features)return o.features;var e=o.createEl().style,t="",n={};if(n.oldIE=document.all&&!document.addEventListener,n.touch="ontouchstart"in window,window.requestAnimationFrame&&(n.raf=window.requestAnimationFrame,n.caf=window.cancelAnimationFrame),n.pointerEvent=navigator.pointerEnabled||navigator.msPointerEnabled,!n.pointerEvent){var i=navigator.userAgent;if(/iP(hone|od)/.test(navigator.platform)){var r=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);r&&r.length>0&&(r=parseInt(r[1],10))>=1&&r<8&&(n.isOldIOSPhone=!0)}var s=i.match(/Android\s([0-9\.]*)/),a=s?s[1]:0;(a=parseFloat(a))>=1&&(a<4.4&&(n.isOldAndroid=!0),n.androidVersion=a),n.isMobileOpera=/opera mini|opera mobi/i.test(i)}for(var l,c,u=["transform","perspective","animationName"],d=["","webkit","Moz","ms","O"],h=0;h<4;h++){t=d[h];for(var p=0;p<3;p++)l=u[p],c=t+(t?l.charAt(0).toUpperCase()+l.slice(1):l),!n[l]&&c in e&&(n[l]=c);t&&!n.raf&&(t=t.toLowerCase(),n.raf=window[t+"RequestAnimationFrame"],n.raf&&(n.caf=window[t+"CancelAnimationFrame"]||window[t+"CancelRequestAnimationFrame"]))}if(!n.raf){var f=0;n.raf=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-f)),i=window.setTimeout(function(){e(t+n)},n);return f=t+n,i},n.caf=function(e){clearTimeout(e)}}return n.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,o.features=n,n}};o.detectFeatures(),o.features.oldIE&&(o.bind=function(e,t,n,i){t=t.split(" ");for(var o,r=(i?"detach":"attach")+"Event",s=function(){n.handleEvent.call(n)},a=0;a<t.length;a++)if(o=t[a])if("object"==typeof n&&n.handleEvent){if(i){if(!n["oldIE"+o])return!1}else n["oldIE"+o]=s;e[r]("on"+o,n["oldIE"+o])}else e[r]("on"+o,n)});var r=this,s={allowPanToNext:!0,spacing:.12,bgOpacity:1,mouseUsed:!1,loop:!0,pinchToClose:!0,closeOnScroll:!0,closeOnVerticalDrag:!0,verticalDragRange:.75,hideAnimationDuration:333,showAnimationDuration:333,showHideOpacity:!1,focus:!0,escKey:!0,arrowKeys:!0,mainScrollEndFriction:.35,panEndFriction:.35,isClickableElement:function(e){return"A"===e.tagName},getDoubleTapZoom:function(e,t){return e?1:t.initialZoomLevel<.7?1:1.33},maxSpreadZoom:1.33,modal:!0,scaleMode:"fit"};o.extend(s,i);var a,l,c,u,d,h,p,f,m,g,v,y,w,b,x,C,E,I,T,k,$,S,D,P,A,L,M,R,_,F,O,N,B,z,q,j,H,W,U,X,Z,Y,V,G,K,Q,J,ee,te,ne,ie,oe,re,se,ae,le,ce={x:0,y:0},ue={x:0,y:0},de={x:0,y:0},he={},pe=0,fe={},me={x:0,y:0},ge=0,ve=!0,ye=[],we={},be=!1,xe=function(e,t){o.extend(r,t.publicMethods),ye.push(e)},Ce=function(e){var t=qt();return e>t-1?e-t:e<0?t+e:e},Ee={},Ie=function(e,t){return Ee[e]||(Ee[e]=[]),Ee[e].push(t)},Te=function(e){var t=Ee[e];if(t){var n=Array.prototype.slice.call(arguments);n.shift();for(var i=0;i<t.length;i++)t[i].apply(r,n)}},ke=function(){return(new Date).getTime()},$e=function(e){se=e,r.bg.style.opacity=e*s.bgOpacity},Se=function(e,t,n,i,o){(!be||o&&o!==r.currItem)&&(i/=o?o.fitRatio:r.currItem.fitRatio),e[S]=y+t+"px, "+n+"px"+w+" scale("+i+")"},De=function(e){te&&(e&&(g>r.currItem.fitRatio?be||(Gt(r.currItem,!1,!0),be=!0):be&&(Gt(r.currItem),be=!1)),Se(te,de.x,de.y,g))},Pe=function(e){e.container&&Se(e.container.style,e.initialPosition.x,e.initialPosition.y,e.initialZoomLevel,e)},Ae=function(e,t){t[S]=y+e+"px, 0px"+w},Le=function(e,t){if(!s.loop&&t){var n=u+(me.x*pe-e)/me.x,i=Math.round(e-ut.x);(n<0&&i>0||n>=qt()-1&&i<0)&&(e=ut.x+i*s.mainScrollEndFriction)}ut.x=e,Ae(e,d)},Me=function(e,t){var n=dt[e]-fe[e];return ue[e]+ce[e]+n-n*(t/v)},Re=function(e,t){e.x=t.x,e.y=t.y,t.id&&(e.id=t.id)},_e=function(e){e.x=Math.round(e.x),e.y=Math.round(e.y)},Fe=null,Oe=function(){Fe&&(o.unbind(document,"mousemove",Oe),o.addClass(e,"pswp--has_mouse"),s.mouseUsed=!0,Te("mouseUsed")),Fe=setTimeout(function(){Fe=null},100)},Ne=function(e,t){var n=Xt(r.currItem,he,e);return t&&(ee=n),n},Be=function(e){return e||(e=r.currItem),e.initialZoomLevel},ze=function(e){return e||(e=r.currItem),e.w>0?s.maxSpreadZoom:1},qe=function(e,t,n,i){return i===r.currItem.initialZoomLevel?(n[e]=r.currItem.initialPosition[e],!0):(n[e]=Me(e,i),n[e]>t.min[e]?(n[e]=t.min[e],!0):n[e]<t.max[e]&&(n[e]=t.max[e],!0))},je=function(e){var t="";s.escKey&&27===e.keyCode?t="close":s.arrowKeys&&(37===e.keyCode?t="prev":39===e.keyCode&&(t="next")),t&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey||(e.preventDefault?e.preventDefault():e.returnValue=!1,r[t]()))},He=function(e){e&&(Y||Z||ne||H)&&(e.preventDefault(),e.stopPropagation())},We=function(){r.setScrollOffset(0,o.getScrollY())},Ue={},Xe=0,Ze=function(e){Ue[e]&&(Ue[e].raf&&L(Ue[e].raf),Xe--,delete Ue[e])},Ye=function(e){Ue[e]&&Ze(e),Ue[e]||(Xe++,Ue[e]={})},Ve=function(){for(var e in Ue)Ue.hasOwnProperty(e)&&Ze(e)},Ge=function(e,t,n,i,o,r,s){var a,l=ke();Ye(e);var c=function(){if(Ue[e]){if((a=ke()-l)>=i)return Ze(e),r(n),void(s&&s());r((n-t)*o(a/i)+t),Ue[e].raf=A(c)}};c()},Ke={shout:Te,listen:Ie,viewportSize:he,options:s,isMainScrollAnimating:function(){return ne},getZoomLevel:function(){return g},getCurrentIndex:function(){return u},isDragging:function(){return U},isZooming:function(){return Q},setScrollOffset:function(e,t){fe.x=e,F=fe.y=t,Te("updateScrollOffset",fe)},applyZoomPan:function(e,t,n,i){de.x=t,de.y=n,g=e,De(i)},init:function(){if(!a&&!l){var n;r.framework=o,r.template=e,r.bg=o.getChildByClass(e,"pswp__bg"),M=e.className,a=!0,O=o.detectFeatures(),A=O.raf,L=O.caf,S=O.transform,_=O.oldIE,r.scrollWrap=o.getChildByClass(e,"pswp__scroll-wrap"),r.container=o.getChildByClass(r.scrollWrap,"pswp__container"),d=r.container.style,r.itemHolders=C=[{el:r.container.children[0],wrap:0,index:-1},{el:r.container.children[1],wrap:0,index:-1},{el:r.container.children[2],wrap:0,index:-1}],C[0].el.style.display=C[2].el.style.display="none",function(){if(S){var t=O.perspective&&!P;return y="translate"+(t?"3d(":"("),void(w=O.perspective?", 0px)":")")}S="left",o.addClass(e,"pswp--ie"),Ae=function(e,t){t.left=e+"px"},Pe=function(e){var t=e.fitRatio>1?1:e.fitRatio,n=e.container.style,i=t*e.w,o=t*e.h;n.width=i+"px",n.height=o+"px",n.left=e.initialPosition.x+"px",n.top=e.initialPosition.y+"px"},De=function(){if(te){var e=te,t=r.currItem,n=t.fitRatio>1?1:t.fitRatio,i=n*t.w,o=n*t.h;e.width=i+"px",e.height=o+"px",e.left=de.x+"px",e.top=de.y+"px"}}}(),m={resize:r.updateSize,orientationchange:function(){clearTimeout(N),N=setTimeout(function(){he.x!==r.scrollWrap.clientWidth&&r.updateSize()},500)},scroll:We,keydown:je,click:He};var i=O.isOldIOSPhone||O.isOldAndroid||O.isMobileOpera;for(O.animationName&&O.transform&&!i||(s.showAnimationDuration=s.hideAnimationDuration=0),n=0;n<ye.length;n++)r["init"+ye[n]]();t&&(r.ui=new t(r,o)).init(),Te("firstUpdate"),u=u||s.index||0,(isNaN(u)||u<0||u>=qt())&&(u=0),r.currItem=zt(u),(O.isOldIOSPhone||O.isOldAndroid)&&(ve=!1),e.setAttribute("aria-hidden","false"),s.modal&&(ve?e.style.position="fixed":(e.style.position="absolute",e.style.top=o.getScrollY()+"px")),void 0===F&&(Te("initialLayout"),F=R=o.getScrollY());var c="pswp--open ";for(s.mainClass&&(c+=s.mainClass+" "),s.showHideOpacity&&(c+="pswp--animate_opacity "),c+=P?"pswp--touch":"pswp--notouch",c+=O.animationName?" pswp--css_animation":"",c+=O.svg?" pswp--svg":"",o.addClass(e,c),r.updateSize(),h=-1,ge=null,n=0;n<3;n++)Ae((n+h)*me.x,C[n].el.style);_||o.bind(r.scrollWrap,f,r),Ie("initialZoomInEnd",function(){r.setContent(C[0],u-1),r.setContent(C[2],u+1),C[0].el.style.display=C[2].el.style.display="block",s.focus&&e.focus(),o.bind(document,"keydown",r),O.transform&&o.bind(r.scrollWrap,"click",r),s.mouseUsed||o.bind(document,"mousemove",Oe),o.bind(window,"resize scroll orientationchange",r),Te("bindEvents")}),r.setContent(C[1],u),r.updateCurrItem(),Te("afterInit"),ve||(b=setInterval(function(){Xe||U||Q||g!==r.currItem.initialZoomLevel||r.updateSize()},1e3)),o.addClass(e,"pswp--visible")}},close:function(){a&&(a=!1,l=!0,Te("close"),o.unbind(window,"resize scroll orientationchange",r),o.unbind(window,"scroll",m.scroll),o.unbind(document,"keydown",r),o.unbind(document,"mousemove",Oe),O.transform&&o.unbind(r.scrollWrap,"click",r),U&&o.unbind(window,p,r),clearTimeout(N),Te("unbindEvents"),jt(r.currItem,null,!0,r.destroy))},destroy:function(){Te("destroy"),Ft&&clearTimeout(Ft),e.setAttribute("aria-hidden","true"),e.className=M,b&&clearInterval(b),o.unbind(r.scrollWrap,f,r),o.unbind(window,"scroll",r),ft(),Ve(),Ee=null},panTo:function(e,t,n){n||(e>ee.min.x?e=ee.min.x:e<ee.max.x&&(e=ee.max.x),t>ee.min.y?t=ee.min.y:t<ee.max.y&&(t=ee.max.y)),de.x=e,de.y=t,De()},handleEvent:function(e){e=e||window.event,m[e.type]&&m[e.type](e)},goTo:function(e){var t=(e=Ce(e))-u;ge=t,u=e,r.currItem=zt(u),pe-=t,Le(me.x*pe),Ve(),ne=!1,r.updateCurrItem()},next:function(){r.goTo(u+1)},prev:function(){r.goTo(u-1)},updateCurrZoomItem:function(e){if(e&&Te("beforeChange",0),C[1].el.children.length){var t=C[1].el.children[0];te=o.hasClass(t,"pswp__zoom-wrap")?t.style:null}else te=null;ee=r.currItem.bounds,v=g=r.currItem.initialZoomLevel,de.x=ee.center.x,de.y=ee.center.y,e&&Te("afterChange")},invalidateCurrItems:function(){x=!0;for(var e=0;e<3;e++)C[e].item&&(C[e].item.needsUpdate=!0)},updateCurrItem:function(e){if(0!==ge){var t,n=Math.abs(ge);if(!(e&&n<2)){r.currItem=zt(u),be=!1,Te("beforeChange",ge),n>=3&&(h+=ge+(ge>0?-3:3),n=3);for(var i=0;i<n;i++)ge>0?(t=C.shift(),C[2]=t,Ae((++h+2)*me.x,t.el.style),r.setContent(t,u-n+i+1+1)):(t=C.pop(),C.unshift(t),Ae(--h*me.x,t.el.style),r.setContent(t,u+n-i-1-1));if(te&&1===Math.abs(ge)){var o=zt(E);o.initialZoomLevel!==g&&(Xt(o,he),Gt(o),Pe(o))}ge=0,r.updateCurrZoomItem(),E=u,Te("afterChange")}}},updateSize:function(t){if(!ve&&s.modal){var n=o.getScrollY();if(F!==n&&(e.style.top=n+"px",F=n),!t&&we.x===window.innerWidth&&we.y===window.innerHeight)return;we.x=window.innerWidth,we.y=window.innerHeight,e.style.height=we.y+"px"}if(he.x=r.scrollWrap.clientWidth,he.y=r.scrollWrap.clientHeight,We(),me.x=he.x+Math.round(he.x*s.spacing),me.y=he.y,Le(me.x*pe),Te("beforeResize"),void 0!==h){for(var i,a,l,c=0;c<3;c++)i=C[c],Ae((c+h)*me.x,i.el.style),l=u+c-1,s.loop&&qt()>2&&(l=Ce(l)),(a=zt(l))&&(x||a.needsUpdate||!a.bounds)?(r.cleanSlide(a),r.setContent(i,l),1===c&&(r.currItem=a,r.updateCurrZoomItem(!0)),a.needsUpdate=!1):-1===i.index&&l>=0&&r.setContent(i,l),a&&a.container&&(Xt(a,he),Gt(a),Pe(a));x=!1}v=g=r.currItem.initialZoomLevel,(ee=r.currItem.bounds)&&(de.x=ee.center.x,de.y=ee.center.y,De(!0)),Te("resize")},zoomTo:function(e,t,n,i,r){t&&(v=g,dt.x=Math.abs(t.x)-de.x,dt.y=Math.abs(t.y)-de.y,Re(ue,de));var s=Ne(e,!1),a={};qe("x",s,a,e),qe("y",s,a,e);var l=g,c=de.x,u=de.y;_e(a);var d=function(t){1===t?(g=e,de.x=a.x,de.y=a.y):(g=(e-l)*t+l,de.x=(a.x-c)*t+c,de.y=(a.y-u)*t+u),r&&r(t),De(1===t)};n?Ge("customZoomTo",0,1,n,i||o.easing.sine.inOut,d):d(1)}},Qe={},Je={},et={},tt={},nt={},it=[],ot={},rt=[],st={},at=0,lt={x:0,y:0},ct=0,ut={x:0,y:0},dt={x:0,y:0},ht={x:0,y:0},pt=function(e,t){return st.x=Math.abs(e.x-t.x),st.y=Math.abs(e.y-t.y),Math.sqrt(st.x*st.x+st.y*st.y)},ft=function(){V&&(L(V),V=null)},mt=function(){U&&(V=A(mt),Dt())},gt=function(e,t){return!(!e||e===document)&&!(e.getAttribute("class")&&e.getAttribute("class").indexOf("pswp__scroll-wrap")>-1)&&(t(e)?e:gt(e.parentNode,t))},vt={},yt=function(e,t){return vt.prevent=!gt(e.target,s.isClickableElement),Te("preventDragEvent",e,t,vt),vt.prevent},wt=function(e,t){return t.x=e.pageX,t.y=e.pageY,t.id=e.identifier,t},bt=function(e,t,n){n.x=.5*(e.x+t.x),n.y=.5*(e.y+t.y)},xt=function(){var e=de.y-r.currItem.initialPosition.y;return 1-Math.abs(e/(he.y/2))},Ct={},Et={},It=[],Tt=function(e){for(;It.length>0;)It.pop();return D?(le=0,it.forEach(function(e){0===le?It[0]=e:1===le&&(It[1]=e),le++})):e.type.indexOf("touch")>-1?e.touches&&e.touches.length>0&&(It[0]=wt(e.touches[0],Ct),e.touches.length>1&&(It[1]=wt(e.touches[1],Et))):(Ct.x=e.pageX,Ct.y=e.pageY,Ct.id="",It[0]=Ct),It},kt=function(e,t){var n,i,o,a,l=de[e]+t[e],c=t[e]>0,u=ut.x+t.x,d=ut.x-ot.x;return n=l>ee.min[e]||l<ee.max[e]?s.panEndFriction:1,l=de[e]+t[e]*n,!s.allowPanToNext&&g!==r.currItem.initialZoomLevel||(te?"h"!==ie||"x"!==e||Z||(c?(l>ee.min[e]&&(n=s.panEndFriction,ee.min[e],i=ee.min[e]-ue[e]),(i<=0||d<0)&&qt()>1?(a=u,d<0&&u>ot.x&&(a=ot.x)):ee.min.x!==ee.max.x&&(o=l)):(l<ee.max[e]&&(n=s.panEndFriction,ee.max[e],i=ue[e]-ee.max[e]),(i<=0||d>0)&&qt()>1?(a=u,d>0&&u<ot.x&&(a=ot.x)):ee.min.x!==ee.max.x&&(o=l))):a=u,"x"!==e)?void(ne||G||g>r.currItem.fitRatio&&(de[e]+=t[e]*n)):(void 0!==a&&(Le(a,!0),G=a!==ot.x),ee.min.x!==ee.max.x&&(void 0!==o?de.x=o:G||(de.x+=t.x*n)),void 0!==a)},$t=function(e){if(!("mousedown"===e.type&&e.button>0)){if(Bt)return void e.preventDefault();if(!W||"mousedown"!==e.type){if(yt(e,!0)&&e.preventDefault(),Te("pointerDown"),D){var t=o.arraySearch(it,e.pointerId,"id");t<0&&(t=it.length),it[t]={x:e.pageX,y:e.pageY,id:e.pointerId}}var n=Tt(e),i=n.length;K=null,Ve(),U&&1!==i||(U=oe=!0,o.bind(window,p,r),j=ae=re=H=G=Y=X=Z=!1,ie=null,Te("firstTouchStart",n),Re(ue,de),ce.x=ce.y=0,Re(tt,n[0]),Re(nt,tt),ot.x=me.x*pe,rt=[{x:tt.x,y:tt.y}],z=B=ke(),Ne(g,!0),ft(),mt()),!Q&&i>1&&!ne&&!G&&(v=g,Z=!1,Q=X=!0,ce.y=ce.x=0,Re(ue,de),Re(Qe,n[0]),Re(Je,n[1]),bt(Qe,Je,ht),dt.x=Math.abs(ht.x)-de.x,dt.y=Math.abs(ht.y)-de.y,J=pt(Qe,Je))}}},St=function(e){if(e.preventDefault(),D){var t=o.arraySearch(it,e.pointerId,"id");if(t>-1){var n=it[t];n.x=e.pageX,n.y=e.pageY}}if(U){var i=Tt(e);if(ie||Y||Q)K=i;else if(ut.x!==me.x*pe)ie="h";else{var r=Math.abs(i[0].x-tt.x)-Math.abs(i[0].y-tt.y);Math.abs(r)>=10&&(ie=r>0?"h":"v",K=i)}}},Dt=function(){if(K){var e=K.length;if(0!==e)if(Re(Qe,K[0]),et.x=Qe.x-tt.x,et.y=Qe.y-tt.y,Q&&e>1){if(tt.x=Qe.x,tt.y=Qe.y,!et.x&&!et.y&&function(e,t){return e.x===t.x&&e.y===t.y}(K[1],Je))return;Re(Je,K[1]),Z||(Z=!0,Te("zoomGestureStarted"));var t=pt(Qe,Je),n=Rt(t);n>r.currItem.initialZoomLevel+r.currItem.initialZoomLevel/15&&(ae=!0);var i=1,o=Be(),a=ze();if(n<o)if(s.pinchToClose&&!ae&&v<=r.currItem.initialZoomLevel){var l=1-(o-n)/(o/1.2);$e(l),Te("onPinchClose",l),re=!0}else(i=(o-n)/o)>1&&(i=1),n=o-i*(o/3);else n>a&&((i=(n-a)/(6*o))>1&&(i=1),n=a+i*o);i<0&&(i=0),bt(Qe,Je,lt),ce.x+=lt.x-ht.x,ce.y+=lt.y-ht.y,Re(ht,lt),de.x=Me("x",n),de.y=Me("y",n),j=n>g,g=n,De()}else{if(!ie)return;if(oe&&(oe=!1,Math.abs(et.x)>=10&&(et.x-=K[0].x-nt.x),Math.abs(et.y)>=10&&(et.y-=K[0].y-nt.y)),tt.x=Qe.x,tt.y=Qe.y,0===et.x&&0===et.y)return;if("v"===ie&&s.closeOnVerticalDrag&&"fit"===s.scaleMode&&g===r.currItem.initialZoomLevel){ce.y+=et.y,de.y+=et.y;var c=xt();return H=!0,Te("onVerticalDrag",c),$e(c),void De()}(function(e,t,n){if(e-z>50){var i=rt.length>2?rt.shift():{};i.x=t,i.y=n,rt.push(i),z=e}})(ke(),Qe.x,Qe.y),Y=!0,ee=r.currItem.bounds,kt("x",et)||(kt("y",et),_e(de),De())}}},Pt=function(e){if(O.isOldAndroid){if(W&&"mouseup"===e.type)return;e.type.indexOf("touch")>-1&&(clearTimeout(W),W=setTimeout(function(){W=0},600))}var t;if(Te("pointerUp"),yt(e,!1)&&e.preventDefault(),D){var n=o.arraySearch(it,e.pointerId,"id");n>-1&&(t=it.splice(n,1)[0],navigator.pointerEnabled?t.type=e.pointerType||"mouse":(t.type={4:"mouse",2:"touch",3:"pen"}[e.pointerType],t.type||(t.type=e.pointerType||"mouse")))}var i,a=Tt(e),l=a.length;if("mouseup"===e.type&&(l=0),2===l)return K=null,!0;1===l&&Re(nt,a[0]),0!==l||ie||ne||(t||("mouseup"===e.type?t={x:e.pageX,y:e.pageY,type:"mouse"}:e.changedTouches&&e.changedTouches[0]&&(t={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY,type:"touch"})),Te("touchRelease",e,t));var c=-1;if(0===l&&(U=!1,o.unbind(window,p,r),ft(),Q?c=0:-1!==ct&&(c=ke()-ct)),ct=1===l?ke():-1,i=-1!==c&&c<150?"zoom":"swipe",Q&&l<2&&(Q=!1,1===l&&(i="zoomPointerUp"),Te("zoomGestureEnded")),K=null,Y||Z||ne||H)if(Ve(),q||(q=At()),q.calculateSwipeSpeed("x"),H)if(xt()<s.verticalDragRange)r.close();else{var u=de.y,d=se;Ge("verticalDrag",0,1,300,o.easing.cubic.out,function(e){de.y=(r.currItem.initialPosition.y-u)*e+u,$e((1-d)*e+d),De()}),Te("onVerticalDrag",1)}else{if((G||ne)&&0===l){if(Mt(i,q))return;i="zoomPointerUp"}if(!ne)return"swipe"!==i?void _t():void(!G&&g>r.currItem.fitRatio&&Lt(q))}},At=function(){var e,t,n={lastFlickOffset:{},lastFlickDist:{},lastFlickSpeed:{},slowDownRatio:{},slowDownRatioReverse:{},speedDecelerationRatio:{},speedDecelerationRatioAbs:{},distanceOffset:{},backAnimDestination:{},backAnimStarted:{},calculateSwipeSpeed:function(i){rt.length>1?(e=ke()-z+50,t=rt[rt.length-2][i]):(e=ke()-B,t=nt[i]),n.lastFlickOffset[i]=tt[i]-t,n.lastFlickDist[i]=Math.abs(n.lastFlickOffset[i]),n.lastFlickDist[i]>20?n.lastFlickSpeed[i]=n.lastFlickOffset[i]/e:n.lastFlickSpeed[i]=0,Math.abs(n.lastFlickSpeed[i])<.1&&(n.lastFlickSpeed[i]=0),n.slowDownRatio[i]=.95,n.slowDownRatioReverse[i]=1-n.slowDownRatio[i],n.speedDecelerationRatio[i]=1},calculateOverBoundsAnimOffset:function(e,t){n.backAnimStarted[e]||(de[e]>ee.min[e]?n.backAnimDestination[e]=ee.min[e]:de[e]<ee.max[e]&&(n.backAnimDestination[e]=ee.max[e]),void 0!==n.backAnimDestination[e]&&(n.slowDownRatio[e]=.7,n.slowDownRatioReverse[e]=1-n.slowDownRatio[e],n.speedDecelerationRatioAbs[e]<.05&&(n.lastFlickSpeed[e]=0,n.backAnimStarted[e]=!0,Ge("bounceZoomPan"+e,de[e],n.backAnimDestination[e],t||300,o.easing.sine.out,function(t){de[e]=t,De()}))))},calculateAnimOffset:function(e){n.backAnimStarted[e]||(n.speedDecelerationRatio[e]=n.speedDecelerationRatio[e]*(n.slowDownRatio[e]+n.slowDownRatioReverse[e]-n.slowDownRatioReverse[e]*n.timeDiff/10),n.speedDecelerationRatioAbs[e]=Math.abs(n.lastFlickSpeed[e]*n.speedDecelerationRatio[e]),n.distanceOffset[e]=n.lastFlickSpeed[e]*n.speedDecelerationRatio[e]*n.timeDiff,de[e]+=n.distanceOffset[e])},panAnimLoop:function(){if(Ue.zoomPan&&(Ue.zoomPan.raf=A(n.panAnimLoop),n.now=ke(),n.timeDiff=n.now-n.lastNow,n.lastNow=n.now,n.calculateAnimOffset("x"),n.calculateAnimOffset("y"),De(),n.calculateOverBoundsAnimOffset("x"),n.calculateOverBoundsAnimOffset("y"),n.speedDecelerationRatioAbs.x<.05&&n.speedDecelerationRatioAbs.y<.05))return de.x=Math.round(de.x),de.y=Math.round(de.y),De(),void Ze("zoomPan")}};return n},Lt=function(e){return e.calculateSwipeSpeed("y"),ee=r.currItem.bounds,e.backAnimDestination={},e.backAnimStarted={},Math.abs(e.lastFlickSpeed.x)<=.05&&Math.abs(e.lastFlickSpeed.y)<=.05?(e.speedDecelerationRatioAbs.x=e.speedDecelerationRatioAbs.y=0,e.calculateOverBoundsAnimOffset("x"),e.calculateOverBoundsAnimOffset("y"),!0):(Ye("zoomPan"),e.lastNow=ke(),void e.panAnimLoop())},Mt=function(e,t){var n,i,a;if(ne||(at=u),"swipe"===e){var l=tt.x-nt.x,c=t.lastFlickDist.x<10;l>30&&(c||t.lastFlickOffset.x>20)?i=-1:l<-30&&(c||t.lastFlickOffset.x<-20)&&(i=1)}i&&((u+=i)<0?(u=s.loop?qt()-1:0,a=!0):u>=qt()&&(u=s.loop?0:qt()-1,a=!0),a&&!s.loop||(ge+=i,pe-=i,n=!0));var d,h=me.x*pe,p=Math.abs(h-ut.x);return n||h>ut.x==t.lastFlickSpeed.x>0?(d=Math.abs(t.lastFlickSpeed.x)>0?p/Math.abs(t.lastFlickSpeed.x):333,d=Math.min(d,400),d=Math.max(d,250)):d=333,at===u&&(n=!1),ne=!0,Te("mainScrollAnimStart"),Ge("mainScroll",ut.x,h,d,o.easing.cubic.out,Le,function(){Ve(),ne=!1,at=-1,(n||at!==u)&&r.updateCurrItem(),Te("mainScrollAnimComplete")}),n&&r.updateCurrItem(!0),n},Rt=function(e){return 1/J*e*v},_t=function(){var e=g,t=Be(),n=ze();g<t?e=t:g>n&&(e=n);var i,s=se;return re&&!j&&!ae&&g<t?(r.close(),!0):(re&&(i=function(e){$e((1-s)*e+s)}),r.zoomTo(e,0,200,o.easing.cubic.out,i),!0)};xe("Gestures",{publicMethods:{initGestures:function(){var e=function(e,t,n,i,o){I=e+t,T=e+n,k=e+i,$=o?e+o:""};(D=O.pointerEvent)&&O.touch&&(O.touch=!1),D?navigator.pointerEnabled?e("pointer","down","move","up","cancel"):e("MSPointer","Down","Move","Up","Cancel"):O.touch?(e("touch","start","move","end","cancel"),P=!0):e("mouse","down","move","up"),p=T+" "+k+" "+$,f=I,D&&!P&&(P=navigator.maxTouchPoints>1||navigator.msMaxTouchPoints>1),r.likelyTouchDevice=P,m[I]=$t,m[T]=St,m[k]=Pt,$&&(m[$]=m[k]),O.touch&&(f+=" mousedown",p+=" mousemove mouseup",m.mousedown=m[I],m.mousemove=m[T],m.mouseup=m[k]),P||(s.allowPanToNext=!1)}}});var Ft,Ot,Nt,Bt,zt,qt,jt=function(t,n,i,a){var l;Ft&&clearTimeout(Ft),Bt=!0,Nt=!0,t.initialLayout?(l=t.initialLayout,t.initialLayout=null):l=s.getThumbBoundsFn&&s.getThumbBoundsFn(u);var d=i?s.hideAnimationDuration:s.showAnimationDuration,h=function(){Ze("initialZoom"),i?(r.template.removeAttribute("style"),r.bg.removeAttribute("style")):($e(1),n&&(n.style.display="block"),o.addClass(e,"pswp--animated-in"),Te("initialZoom"+(i?"OutEnd":"InEnd"))),a&&a(),Bt=!1};if(!d||!l||void 0===l.x)return Te("initialZoom"+(i?"Out":"In")),g=t.initialZoomLevel,Re(de,t.initialPosition),De(),e.style.opacity=i?0:1,$e(1),void(d?setTimeout(function(){h()},d):h());!function(){var n=c,a=!r.currItem.src||r.currItem.loadError||s.showHideOpacity;t.miniImg&&(t.miniImg.style.webkitBackfaceVisibility="hidden"),i||(g=l.w/t.w,de.x=l.x,de.y=l.y-R,r[a?"template":"bg"].style.opacity=.001,De()),Ye("initialZoom"),i&&!n&&o.removeClass(e,"pswp--animated-in"),a&&(i?o[(n?"remove":"add")+"Class"](e,"pswp--animate_opacity"):setTimeout(function(){o.addClass(e,"pswp--animate_opacity")},30)),Ft=setTimeout(function(){if(Te("initialZoom"+(i?"Out":"In")),i){var r=l.w/t.w,s={x:de.x,y:de.y},c=g,u=se,p=function(t){1===t?(g=r,de.x=l.x,de.y=l.y-F):(g=(r-c)*t+c,de.x=(l.x-s.x)*t+s.x,de.y=(l.y-F-s.y)*t+s.y),De(),a?e.style.opacity=1-t:$e(u-t*u)};n?Ge("initialZoom",0,1,d,o.easing.cubic.out,p,h):(p(1),Ft=setTimeout(h,d+20))}else g=t.initialZoomLevel,Re(de,t.initialPosition),De(),$e(1),a?e.style.opacity=1:$e(1),Ft=setTimeout(h,d+20)},i?25:90)}()},Ht={},Wt=[],Ut={index:0,errorMsg:'<div class="pswp__error-msg"><a href="%url%" target="_blank">The image</a> could not be loaded.</div>',forceProgressiveLoading:!1,preload:[1,1],getNumItemsFn:function(){return Ot.length}},Xt=function(e,t,n){if(e.src&&!e.loadError){var i=!n;if(i&&(e.vGap||(e.vGap={top:0,bottom:0}),Te("parseVerticalMargin",e)),Ht.x=t.x,Ht.y=t.y-e.vGap.top-e.vGap.bottom,i){var o=Ht.x/e.w,r=Ht.y/e.h;e.fitRatio=o<r?o:r;var a=s.scaleMode;"orig"===a?n=1:"fit"===a&&(n=e.fitRatio),n>1&&(n=1),e.initialZoomLevel=n,e.bounds||(e.bounds={center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}})}if(!n)return;return function(e,t,n){var i=e.bounds;i.center.x=Math.round((Ht.x-t)/2),i.center.y=Math.round((Ht.y-n)/2)+e.vGap.top,i.max.x=t>Ht.x?Math.round(Ht.x-t):i.center.x,i.max.y=n>Ht.y?Math.round(Ht.y-n)+e.vGap.top:i.center.y,i.min.x=t>Ht.x?0:i.center.x,i.min.y=n>Ht.y?e.vGap.top:i.center.y}(e,e.w*n,e.h*n),i&&n===e.initialZoomLevel&&(e.initialPosition=e.bounds.center),e.bounds}return e.w=e.h=0,e.initialZoomLevel=e.fitRatio=1,e.bounds={center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}},e.initialPosition=e.bounds.center,e.bounds},Zt=function(e,t,n,i,o,s){t.loadError||i&&(t.imageAppended=!0,Gt(t,i,t===r.currItem&&be),n.appendChild(i),s&&setTimeout(function(){t&&t.loaded&&t.placeholder&&(t.placeholder.style.display="none",t.placeholder=null)},500))},Yt=function(e){e.loading=!0,e.loaded=!1;var t=e.img=o.createEl("pswp__img","img"),n=function(){e.loading=!1,e.loaded=!0,e.loadComplete?e.loadComplete(e):e.img=null,t.onload=t.onerror=null,t=null};return t.onload=n,t.onerror=function(){e.loadError=!0,n()},t.src=e.src,t},Vt=function(e,t){if(e.src&&e.loadError&&e.container)return t&&(e.container.innerHTML=""),e.container.innerHTML=s.errorMsg.replace("%url%",e.src),!0},Gt=function(e,t,n){if(e.src){t||(t=e.container.lastChild);var i=n?e.w:Math.round(e.w*e.fitRatio),o=n?e.h:Math.round(e.h*e.fitRatio);e.placeholder&&!e.loaded&&(e.placeholder.style.width=i+"px",e.placeholder.style.height=o+"px"),t.style.width=i+"px",t.style.height=o+"px"}},Kt=function(){if(Wt.length){for(var e,t=0;t<Wt.length;t++)(e=Wt[t]).holder.index===e.index&&Zt(e.index,e.item,e.baseDiv,e.img,0,e.clearPlaceholder);Wt=[]}};xe("Controller",{publicMethods:{lazyLoadItem:function(e){e=Ce(e);var t=zt(e);t&&(!t.loaded&&!t.loading||x)&&(Te("gettingData",e,t),t.src&&Yt(t))},initController:function(){o.extend(s,Ut,!0),r.items=Ot=n,zt=r.getItemAt,qt=s.getNumItemsFn,s.loop,qt()<3&&(s.loop=!1),Ie("beforeChange",function(e){var t,n=s.preload,i=null===e||e>=0,o=Math.min(n[0],qt()),a=Math.min(n[1],qt());for(t=1;t<=(i?a:o);t++)r.lazyLoadItem(u+t);for(t=1;t<=(i?o:a);t++)r.lazyLoadItem(u-t)}),Ie("initialLayout",function(){r.currItem.initialLayout=s.getThumbBoundsFn&&s.getThumbBoundsFn(u)}),Ie("mainScrollAnimComplete",Kt),Ie("initialZoomInEnd",Kt),Ie("destroy",function(){for(var e,t=0;t<Ot.length;t++)(e=Ot[t]).container&&(e.container=null),e.placeholder&&(e.placeholder=null),e.img&&(e.img=null),e.preloader&&(e.preloader=null),e.loadError&&(e.loaded=e.loadError=!1);Wt=null})},getItemAt:function(e){return e>=0&&void 0!==Ot[e]&&Ot[e]},allowProgressiveImg:function(){return s.forceProgressiveLoading||!P||s.mouseUsed||screen.width>1200},setContent:function(e,t){s.loop&&(t=Ce(t));var n=r.getItemAt(e.index);n&&(n.container=null);var i,l=r.getItemAt(t);if(l){Te("gettingData",t,l),e.index=t,e.item=l;var c=l.container=o.createEl("pswp__zoom-wrap");if(!l.src&&l.html&&(l.html.tagName?c.appendChild(l.html):c.innerHTML=l.html),Vt(l),Xt(l,he),!l.src||l.loadError||l.loaded)l.src&&!l.loadError&&((i=o.createEl("pswp__img","img")).style.opacity=1,i.src=l.src,Gt(l,i),Zt(0,l,c,i));else{if(l.loadComplete=function(n){if(a){if(e&&e.index===t){if(Vt(n,!0))return n.loadComplete=n.img=null,Xt(n,he),Pe(n),void(e.index===u&&r.updateCurrZoomItem());n.imageAppended?!Bt&&n.placeholder&&(n.placeholder.style.display="none",n.placeholder=null):O.transform&&(ne||Bt)?Wt.push({item:n,baseDiv:c,img:n.img,index:t,holder:e,clearPlaceholder:!0}):Zt(0,n,c,n.img,0,!0)}n.loadComplete=null,n.img=null,Te("imageLoadComplete",t,n)}},o.features.transform){var d="pswp__img pswp__img--placeholder";d+=l.msrc?"":" pswp__img--placeholder--blank";var h=o.createEl(d,l.msrc?"img":"");l.msrc&&(h.src=l.msrc),Gt(l,h),c.appendChild(h),l.placeholder=h}l.loading||Yt(l),r.allowProgressiveImg()&&(!Nt&&O.transform?Wt.push({item:l,baseDiv:c,img:l.img,index:t,holder:e}):Zt(0,l,c,l.img,0,!0))}Nt||t!==u?Pe(l):(te=c.style,jt(l,i||l.img)),e.el.innerHTML="",e.el.appendChild(c)}else e.el.innerHTML=""},cleanSlide:function(e){e.img&&(e.img.onload=e.img.onerror=null),e.loaded=e.loading=e.img=e.imageAppended=!1}}});var Qt,Jt,en={},tn=function(e,t,n){var i=document.createEvent("CustomEvent"),o={origEvent:e,target:e.target,releasePoint:t,pointerType:n||"touch"};i.initCustomEvent("pswpTap",!0,!0,o),e.target.dispatchEvent(i)};xe("Tap",{publicMethods:{initTap:function(){Ie("firstTouchStart",r.onTapStart),Ie("touchRelease",r.onTapRelease),Ie("destroy",function(){en={},Qt=null})},onTapStart:function(e){e.length>1&&(clearTimeout(Qt),Qt=null)},onTapRelease:function(e,t){if(t&&!Y&&!X&&!Xe){var n=t;if(Qt&&(clearTimeout(Qt),Qt=null,function(e,t){return Math.abs(e.x-t.x)<25&&Math.abs(e.y-t.y)<25}(n,en)))return void Te("doubleTap",n);if("mouse"===t.type)return void tn(e,t,"mouse");if("BUTTON"===e.target.tagName.toUpperCase()||o.hasClass(e.target,"pswp__single-tap"))return void tn(e,t);Re(en,n),Qt=setTimeout(function(){tn(e,t),Qt=null},300)}}}}),xe("DesktopZoom",{publicMethods:{initDesktopZoom:function(){_||(P?Ie("mouseUsed",function(){r.setupDesktopZoom()}):r.setupDesktopZoom(!0))},setupDesktopZoom:function(t){Jt={};var n="wheel mousewheel DOMMouseScroll";Ie("bindEvents",function(){o.bind(e,n,r.handleMouseWheel)}),Ie("unbindEvents",function(){Jt&&o.unbind(e,n,r.handleMouseWheel)}),r.mouseZoomedIn=!1;var i,s=function(){r.mouseZoomedIn&&(o.removeClass(e,"pswp--zoomed-in"),r.mouseZoomedIn=!1),g<1?o.addClass(e,"pswp--zoom-allowed"):o.removeClass(e,"pswp--zoom-allowed"),a()},a=function(){i&&(o.removeClass(e,"pswp--dragging"),i=!1)};Ie("resize",s),Ie("afterChange",s),Ie("pointerDown",function(){r.mouseZoomedIn&&(i=!0,o.addClass(e,"pswp--dragging"))}),Ie("pointerUp",a),t||s()},handleMouseWheel:function(e){if(g<=r.currItem.fitRatio)return s.modal&&(!s.closeOnScroll||Xe||U?e.preventDefault():S&&Math.abs(e.deltaY)>2&&(c=!0,r.close())),!0;if(e.stopPropagation(),Jt.x=0,"deltaX"in e)1===e.deltaMode?(Jt.x=18*e.deltaX,Jt.y=18*e.deltaY):(Jt.x=e.deltaX,Jt.y=e.deltaY);else if("wheelDelta"in e)e.wheelDeltaX&&(Jt.x=-.16*e.wheelDeltaX),e.wheelDeltaY?Jt.y=-.16*e.wheelDeltaY:Jt.y=-.16*e.wheelDelta;else{if(!("detail"in e))return;Jt.y=e.detail}Ne(g,!0);var t=de.x-Jt.x,n=de.y-Jt.y;(s.modal||t<=ee.min.x&&t>=ee.max.x&&n<=ee.min.y&&n>=ee.max.y)&&e.preventDefault(),r.panTo(t,n)},toggleDesktopZoom:function(t){t=t||{x:he.x/2+fe.x,y:he.y/2+fe.y};var n=s.getDoubleTapZoom(!0,r.currItem),i=g===n;r.mouseZoomedIn=!i,r.zoomTo(i?r.currItem.initialZoomLevel:n,t,333),o[(i?"remove":"add")+"Class"](e,"pswp--zoomed-in")}}});var nn,on,rn,sn,an,ln,cn,un,dn,hn,pn,fn,mn={history:!0,galleryUID:1},gn=function(){return pn.hash.substring(1)},vn=function(){nn&&clearTimeout(nn),rn&&clearTimeout(rn)},yn=function(){var e=gn(),t={};if(e.length<5)return t;var n,i=e.split("&");for(n=0;n<i.length;n++)if(i[n]){var o=i[n].split("=");o.length<2||(t[o[0]]=o[1])}if(s.galleryPIDs){var r=t.pid;for(t.pid=0,n=0;n<Ot.length;n++)if(Ot[n].pid===r){t.pid=n;break}}else t.pid=parseInt(t.pid,10)-1;return t.pid<0&&(t.pid=0),t},wn=function(){if(rn&&clearTimeout(rn),Xe||U)rn=setTimeout(wn,500);else{sn?clearTimeout(on):sn=!0;var e=u+1,t=zt(u);t.hasOwnProperty("pid")&&(e=t.pid);var n=cn+"&gid="+s.galleryUID+"&pid="+e;un||-1===pn.hash.indexOf(n)&&(hn=!0);var i=pn.href.split("#")[0]+"#"+n;fn?"#"+n!==window.location.hash&&history[un?"replaceState":"pushState"]("",document.title,i):un?pn.replace(i):pn.hash=n,un=!0,on=setTimeout(function(){sn=!1},60)}};xe("History",{publicMethods:{initHistory:function(){if(o.extend(s,mn,!0),s.history){pn=window.location,hn=!1,dn=!1,un=!1,cn=gn(),fn="pushState"in history,cn.indexOf("gid=")>-1&&(cn=(cn=cn.split("&gid=")[0]).split("?gid=")[0]),Ie("afterChange",r.updateURL),Ie("unbindEvents",function(){o.unbind(window,"hashchange",r.onHashChange)});var e=function(){ln=!0,dn||(hn?history.back():cn?pn.hash=cn:fn?history.pushState("",document.title,pn.pathname+pn.search):pn.hash=""),vn()};Ie("unbindEvents",function(){c&&e()}),Ie("destroy",function(){ln||e()}),Ie("firstUpdate",function(){u=yn().pid});var t=cn.indexOf("pid=");t>-1&&"&"===(cn=cn.substring(0,t)).slice(-1)&&(cn=cn.slice(0,-1)),setTimeout(function(){a&&o.bind(window,"hashchange",r.onHashChange)},40)}},onHashChange:function(){return gn()===cn?(dn=!0,void r.close()):void(sn||(an=!0,r.goTo(yn().pid),an=!1))},updateURL:function(){vn(),an||(un?nn=setTimeout(wn,800):wn())}}}),o.extend(r,Ke)}}),$(document).ready(function(){if($(document).keydown(function(e){if((32==e.which||38==e.which||40==e.which)&&$(".pswp").hasClass("pswp--open"))return!1}),!isCMS()){var e=function(e,t,n){var i=e.lastIndexOf(t);return e=e.substring(0,i)+n+e.substring(i+1)};$("body").append('\x3c!-- Root element of PhotoSwipe. Must have class pswp. --\x3e<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true"><div class="pswp__bg"></div><div class="pswp__scroll-wrap"><div class="pswp__container"><div class="pswp__item"></div><div class="pswp__item"></div><div class="pswp__item"></div></div><div class="pswp__ui pswp__ui--hidden"><div class="pswp__top-bar"><div class="pswp__counter"></div><button class="pswp__button pswp__button--close" title="Close (Esc)"></button><button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button><button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button><div class="pswp__preloader"><div class="pswp__preloader__icn"><div class="pswp__preloader__cut"><div class="pswp__preloader__donut"></div></div></div></div></div><div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap"><div class="pswp__share-tooltip"></div></div><button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)"></button><button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)"></button><div class="pswp__caption"><div class="pswp__caption__center"></div></div></div></div></div>');var t=$(".pswp")[0];$(".gallery").each(function(){var n=$(this),i=function(){var t=[];return n.find("a").each(function(){var n=$(this).attr("href"),i=$(this).attr("width"),o=$(this).attr("height"),r=$(this).find(".gallery-title span").text(),s={desktopImg:{src:n,w:i,h:o,title:r},tabletImg:{src:e(n,"/","/700/"),w:700,h:700/i*o,title:r},phabletImg:{src:e(n,"/","/450/"),w:450,h:450/i*o,title:r},mobileImg:{src:e(n,"/","/200/"),w:200,h:200/i*o,title:r}};t.push(s)}),t}();n.on("click",".gallery-photo a",function(e){e.preventDefault();var n=$(this).parent(),o=$(this).closest(".gallery").find(".gallery-photo").index(n),r="mobile",s=new PhotoSwipe(t,PhotoSwipeUI_Default,i,{index:o,bgOpacity:.9,showHideOpacity:!0,forceProgressiveLoading:!0});s.listen("gettingData",function(e,t){var n=s.viewportSize.x*(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI);n>900?(t.src=t.desktopImg.src,t.w=t.desktopImg.w,t.h=t.desktopImg.h,t.title=t.desktopImg.title,r="desktop"):n>700?(t.src=t.tabletImg.src,t.w=t.tabletImg.w,t.h=t.tabletImg.h,t.title=t.tabletImg.title,r="tablet"):n>400?(t.src=t.phabletImg.src,t.w=t.phabletImg.w,t.h=t.phabletImg.h,t.title=t.phabletImg.title,r="phablet"):n>200&&(t.src=t.mobileImg.src,t.w=t.mobileImg.w,t.h=t.mobileImg.h,t.title=t.mobileImg.title,r="mobile")}),s.listen("beforeResize",function(){var e,t;(e=s.viewportSize.x*(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI))>900?t="desktop":e>700?t="tablet":e>400?t="phablet":e>200&&(t="mobile"),r!==t&&(s.invalidateCurrItems(),r=t)}),s.init()})}),$(".product-gallery").each(function(){var n=$(this),i=function(){var t=[];return n.find(".product-gallery-link").each(function(){var n=$(this).attr("href"),i=$(this).attr("width"),o=$(this).attr("height"),r=$(this).find(".product-gallery-title span").text(),s={desktopImg:{src:n,w:i,h:o,title:r},tabletImg:{src:e(n,"/","/700/"),w:700,h:700/i*o,title:r},phabletImg:{src:e(n,"/","/450/"),w:450,h:450/i*o,title:r},mobileImg:{src:e(n,"/","/200/"),w:200,h:200/i*o,title:r}};t.push(s)}),t}();n.on("click",".product-gallery-photo a",function(e){e.preventDefault();var n=$(this).parent(),o=$(this).closest(".product-gallery").find(".product-gallery-photo").index(n),r=new PhotoSwipe(t,PhotoSwipeUI_Default,i,{index:o,bgOpacity:.9,showHideOpacity:!0,forceProgressiveLoading:!0});r.listen("gettingData",function(e,t){var n=r.viewportSize.x*(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI);n>900?(t.src=t.desktopImg.src,t.w=t.desktopImg.w,t.h=t.desktopImg.h,t.title=t.desktopImg.title):n>700?(t.src=t.tabletImg.src,t.w=t.tabletImg.w,t.h=t.tabletImg.h,t.title=t.tabletImg.title):n>400?(t.src=t.phabletImg.src,t.w=t.phabletImg.w,t.h=t.phabletImg.h,t.title=t.phabletImg.title):n>200&&(t.src=t.mobileImg.src,t.w=t.mobileImg.w,t.h=t.mobileImg.h,t.title=t.mobileImg.title)}),r.init()})}),$(".image-lightbox").each(function(){var n=$(this),i=function(){var t=[];return n.find("a").each(function(){var n=$(this).attr("href"),i=$(this).attr("width"),o=$(this).attr("height"),r=$(this).attr("title"),s={desktopImg:{src:n,w:i,h:o,title:r},tabletImg:{src:e(n,"/","/700/"),w:700,h:700/i*o,title:r},phabletImg:{src:e(n,"/","/450/"),w:450,h:450/i*o,title:r},mobileImg:{src:e(n,"/","/200/"),w:200,h:200/i*o,title:r}};t.push(s)}),t}();n.on("click","a.litebox",function(e){e.preventDefault();var n=$(this).parent().index(),o="mobile",r=new PhotoSwipe(t,PhotoSwipeUI_Default,i,{index:n,bgOpacity:.9,showHideOpacity:!0,forceProgressiveLoading:!0});r.listen("gettingData",function(e,t){var n=r.viewportSize.x*(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI);n>900?(t.src=t.desktopImg.src,t.w=t.desktopImg.w,t.h=t.desktopImg.h,t.title=t.desktopImg.title,o="desktop"):n>700?(t.src=t.tabletImg.src,t.w=t.tabletImg.w,t.h=t.tabletImg.h,t.title=t.tabletImg.title,o="tablet"):n>400?(t.src=t.phabletImg.src,t.w=t.phabletImg.w,t.h=t.phabletImg.h,t.title=t.phabletImg.title,o="phablet"):n>200&&(t.src=t.mobileImg.src,t.w=t.mobileImg.w,t.h=t.mobileImg.h,t.title=t.mobileImg.title,o="mobile")}),r.listen("beforeResize",function(){var e,t;(e=r.viewportSize.x*(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI))>900?t="desktop":e>700?t="tablet":e>400?t="phablet":e>200&&(t="mobile"),o!==t&&(r.invalidateCurrItems(),o=t)}),r.init()})})}}),function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.PhotoSwipeUI_Default=t()}(this,function(){"use strict";return function(e,t){var n,i,o,r,s,a,l,c,u,d,h,p,f,m,g,v,y,w,b=this,x=!1,C=!0,E=!0,I={barsSize:{top:44,bottom:"auto"},closeElClasses:["item","caption","zoom-wrap","ui","top-bar"],timeToIdle:4e3,timeToIdleOutside:1e3,loadingIndicatorDelay:1e3,addCaptionHTMLFn:function(e,t){return e.title?(t.children[0].innerHTML=e.title,!0):(t.children[0].innerHTML="",!1)},closeEl:!0,captionEl:!0,fullscreenEl:!0,zoomEl:!0,shareEl:!0,counterEl:!0,arrowEl:!0,preloaderEl:!0,tapToClose:!1,tapToToggleControls:!0,clickToCloseNonZoomable:!0,shareButtons:[{id:"facebook",label:"Share on Facebook",url:"https://www.facebook.com/sharer/sharer.php?u={{url}}"},{id:"twitter",label:"Tweet",url:"https://twitter.com/intent/tweet?text={{text}}&url={{url}}"},{id:"pinterest",label:"Pin it",url:"http://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}"},{id:"download",label:"Download image",url:"{{raw_image_url}}",download:!0}],getImageURLForShare:function(){return e.currItem.src||""},getPageURLForShare:function(){return window.location.href},getTextForShare:function(){return e.currItem.title||""},indexIndicatorSep:" / ",fitControlsWidth:1200},T=function(e){if(v)return!0;e=e||window.event,g.timeToIdle&&g.mouseUsed&&!u&&_();for(var n,i,o=(e.target||e.srcElement).getAttribute("class")||"",r=0;r<B.length;r++)(n=B[r]).onTap&&o.indexOf("pswp__"+n.name)>-1&&(n.onTap(),i=!0);if(i){e.stopPropagation&&e.stopPropagation(),v=!0;var s=t.features.isOldAndroid?600:30;setTimeout(function(){v=!1},s)}},k=function(){return!e.likelyTouchDevice||g.mouseUsed||screen.width>g.fitControlsWidth},$=function(e,n,i){t[(i?"add":"remove")+"Class"](e,"pswp__"+n)},S=function(){var e=1===g.getNumItemsFn();e!==m&&($(i,"ui--one-slide",e),m=e)},D=function(){$(l,"share-modal--hidden",E)},P=function(){return(E=!E)?(t.removeClass(l,"pswp__share-modal--fade-in"),setTimeout(function(){E&&D()},300)):(D(),setTimeout(function(){E||t.addClass(l,"pswp__share-modal--fade-in")},30)),E||L(),!1},A=function(t){var n=(t=t||window.event).target||t.srcElement;return e.shout("shareLinkClick",t,n),!(!n.href||!n.hasAttribute("download")&&(window.open(n.href,"pswp_share","scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,top=100,left="+(window.screen?Math.round(screen.width/2-275):100)),E||P(),1))},L=function(){for(var e,t,n,i,o="",r=0;r<g.shareButtons.length;r++)e=g.shareButtons[r],t=g.getImageURLForShare(e),n=g.getPageURLForShare(e),i=g.getTextForShare(e),o+='<a href="'+e.url.replace("{{url}}",encodeURIComponent(n)).replace("{{image_url}}",encodeURIComponent(t)).replace("{{raw_image_url}}",t).replace("{{text}}",encodeURIComponent(i))+'" target="_blank" class="pswp__share--'+e.id+'"'+(e.download?"download":"")+">"+e.label+"</a>",g.parseShareButtonOut&&(o=g.parseShareButtonOut(e,o));l.children[0].innerHTML=o,l.children[0].onclick=A},M=function(e){for(var n=0;n<g.closeElClasses.length;n++)if(t.hasClass(e,"pswp__"+g.closeElClasses[n]))return!0},R=0,_=function(){clearTimeout(w),R=0,u&&b.setIdle(!1)},F=function(e){var t=(e=e||window.event).relatedTarget||e.toElement;t&&"HTML"!==t.nodeName||(clearTimeout(w),w=setTimeout(function(){b.setIdle(!0)},g.timeToIdleOutside))},O=function(e){p!==e&&($(h,"preloader--active",!e),p=e)},N=function(e){var n=e.vGap;if(k()){var s=g.barsSize;if(g.captionEl&&"auto"===s.bottom)if(r||((r=t.createEl("pswp__caption pswp__caption--fake")).appendChild(t.createEl("pswp__caption__center")),i.insertBefore(r,o),t.addClass(i,"pswp__ui--fit")),g.addCaptionHTMLFn(e,r,!0)){var a=r.clientHeight;n.bottom=parseInt(a,10)||44}else n.bottom=s.top;else n.bottom="auto"===s.bottom?0:s.bottom;n.top=s.top}else n.top=n.bottom=0},B=[{name:"caption",option:"captionEl",onInit:function(e){o=e}},{name:"share-modal",option:"shareEl",onInit:function(e){l=e},onTap:function(){P()}},{name:"button--share",option:"shareEl",onInit:function(e){a=e},onTap:function(){P()}},{name:"button--zoom",option:"zoomEl",onTap:e.toggleDesktopZoom},{name:"counter",option:"counterEl",onInit:function(e){s=e}},{name:"button--close",option:"closeEl",onTap:e.close},{name:"button--arrow--left",option:"arrowEl",onTap:e.prev},{name:"button--arrow--right",option:"arrowEl",onTap:e.next},{name:"button--fs",option:"fullscreenEl",onTap:function(){n.isFullscreen()?n.exit():n.enter()}},{name:"preloader",option:"preloaderEl",onInit:function(e){h=e}}];b.init=function(){t.extend(e.options,I,!0),g=e.options,i=t.getChildByClass(e.scrollWrap,"pswp__ui"),d=e.listen,function(){var e;d("onVerticalDrag",function(e){C&&e<.95?b.hideControls():!C&&e>=.95&&b.showControls()}),d("onPinchClose",function(t){C&&t<.9?(b.hideControls(),e=!0):e&&!C&&t>.9&&b.showControls()}),d("zoomGestureEnded",function(){(e=!1)&&!C&&b.showControls()})}(),d("beforeChange",b.update),d("doubleTap",function(t){var n=e.currItem.initialZoomLevel;e.getZoomLevel()!==n?e.zoomTo(n,t,333):e.zoomTo(g.getDoubleTapZoom(!1,e.currItem),t,333)}),d("preventDragEvent",function(e,t,n){var i=e.target||e.srcElement;i&&i.getAttribute("class")&&e.type.indexOf("mouse")>-1&&(i.getAttribute("class").indexOf("__caption")>0||/(SMALL|STRONG|EM)/i.test(i.tagName))&&(n.prevent=!1)}),d("bindEvents",function(){t.bind(i,"pswpTap click",T),t.bind(e.scrollWrap,"pswpTap",b.onGlobalTap),e.likelyTouchDevice||t.bind(e.scrollWrap,"mouseover",b.onMouseOver)}),d("unbindEvents",function(){E||P(),y&&clearInterval(y),t.unbind(document,"mouseout",F),t.unbind(document,"mousemove",_),t.unbind(i,"pswpTap click",T),t.unbind(e.scrollWrap,"pswpTap",b.onGlobalTap),t.unbind(e.scrollWrap,"mouseover",b.onMouseOver),n&&(t.unbind(document,n.eventK,b.updateFullscreen),n.isFullscreen()&&(g.hideAnimationDuration=0,n.exit()),n=null)}),d("destroy",function(){g.captionEl&&(r&&i.removeChild(r),t.removeClass(o,"pswp__caption--empty")),l&&(l.children[0].onclick=null),t.removeClass(i,"pswp__ui--over-close"),t.addClass(i,"pswp__ui--hidden"),b.setIdle(!1)}),g.showAnimationDuration||t.removeClass(i,"pswp__ui--hidden"),d("initialZoomIn",function(){g.showAnimationDuration&&t.removeClass(i,"pswp__ui--hidden")}),d("initialZoomOut",function(){t.addClass(i,"pswp__ui--hidden")}),d("parseVerticalMargin",N),function(){var e,n,o,r=function(i){if(i)for(var r=i.length,s=0;s<r;s++){e=i[s],n=e.className;for(var a=0;a<B.length;a++)o=B[a],n.indexOf("pswp__"+o.name)>-1&&(g[o.option]?(t.removeClass(e,"pswp__element--disabled"),o.onInit&&o.onInit(e)):t.addClass(e,"pswp__element--disabled"))}};r(i.children);var s=t.getChildByClass(i,"pswp__top-bar");s&&r(s.children)}(),g.shareEl&&a&&l&&(E=!0),S(),g.timeToIdle&&d("mouseUsed",function(){t.bind(document,"mousemove",_),t.bind(document,"mouseout",F),y=setInterval(function(){2==++R&&b.setIdle(!0)},g.timeToIdle/2)}),g.fullscreenEl&&!t.features.isOldAndroid&&(n||(n=b.getFullscreenAPI()),n?(t.bind(document,n.eventK,b.updateFullscreen),b.updateFullscreen(),t.addClass(e.template,"pswp--supports-fs")):t.removeClass(e.template,"pswp--supports-fs")),g.preloaderEl&&(O(!0),d("beforeChange",function(){clearTimeout(f),f=setTimeout(function(){e.currItem&&e.currItem.loading?(!e.allowProgressiveImg()||e.currItem.img&&!e.currItem.img.naturalWidth)&&O(!1):O(!0)},g.loadingIndicatorDelay)}),d("imageLoadComplete",function(t,n){e.currItem===n&&O(!0)}))},b.setIdle=function(e){u=e,$(i,"ui--idle",e)},b.update=function(){C&&e.currItem?(b.updateIndexIndicator(),g.captionEl&&(g.addCaptionHTMLFn(e.currItem,o),$(o,"caption--empty",!e.currItem.title)),x=!0):x=!1,E||P(),S()},b.updateFullscreen=function(i){i&&setTimeout(function(){e.setScrollOffset(0,t.getScrollY())},50),t[(n.isFullscreen()?"add":"remove")+"Class"](e.template,"pswp--fs")},b.updateIndexIndicator=function(){g.counterEl&&(s.innerHTML=e.getCurrentIndex()+1+g.indexIndicatorSep+g.getNumItemsFn())},b.onGlobalTap=function(n){var i=(n=n||window.event).target||n.srcElement;if(!v)if(n.detail&&"mouse"===n.detail.pointerType){if(M(i))return void e.close();t.hasClass(i,"pswp__img")&&(1===e.getZoomLevel()&&e.getZoomLevel()<=e.currItem.fitRatio?g.clickToCloseNonZoomable&&e.close():e.toggleDesktopZoom(n.detail.releasePoint))}else if(g.tapToToggleControls&&(C?b.hideControls():b.showControls()),g.tapToClose&&(t.hasClass(i,"pswp__img")||M(i)))return void e.close()},b.onMouseOver=function(e){var t=(e=e||window.event).target||e.srcElement;$(i,"ui--over-close",M(t))},b.hideControls=function(){t.addClass(i,"pswp__ui--hidden"),C=!1},b.showControls=function(){C=!0,x||b.update(),t.removeClass(i,"pswp__ui--hidden")},b.supportsFullscreen=function(){var e=document;return!!(e.exitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen||e.msExitFullscreen)},b.getFullscreenAPI=function(){var t,n=document.documentElement,i="fullscreenchange";return n.requestFullscreen?t={enterK:"requestFullscreen",exitK:"exitFullscreen",elementK:"fullscreenElement",eventK:i}:n.mozRequestFullScreen?t={enterK:"mozRequestFullScreen",exitK:"mozCancelFullScreen",elementK:"mozFullScreenElement",eventK:"moz"+i}:n.webkitRequestFullscreen?t={enterK:"webkitRequestFullscreen",exitK:"webkitExitFullscreen",elementK:"webkitFullscreenElement",eventK:"webkit"+i}:n.msRequestFullscreen&&(t={enterK:"msRequestFullscreen",exitK:"msExitFullscreen",elementK:"msFullscreenElement",eventK:"MSFullscreenChange"}),t&&(t.enter=function(){return c=g.closeOnScroll,g.closeOnScroll=!1,"webkitRequestFullscreen"!==this.enterK?e.template[this.enterK]():void e.template[this.enterK](Element.ALLOW_KEYBOARD_INPUT)},t.exit=function(){return g.closeOnScroll=c,document[this.exitK]()},t.isFullscreen=function(){return document[this.elementK]}),t}}}),$(document).ready(function(){waitForWebfonts(["proxima-nova"],function(){$("html").addClass("fonts-loaded")})}),$(document).ready(function(){var e=function(e){$(e).feed({type:"gallery",title:"outside",title_class:".gallery-title",wrapper:".gallery-wrapper",item:".gallery-photo",item_wrapper:".gallery-image",video_thumb:"",bottom_line:"true"})},t=function(t,n){var i=t;n=void 0===n?400:n;setTimeout(function(){e(i)},n)},n=function(e){$(e).slideShow({isCMS:isCMS(),autoplay:!0,blockClass:"gallery-slideshow",contentBlockElm:".gallery-content",photoListElm:".gallery-list",photoItemElm:".gallery-photo",photoPrevElm:".gallery-arrow-prev",photoNextElm:".gallery-arrow-next",photoItemLinkElm:".gallery-link",photoItemImageDivElm:".gallery-image",navBlockWrapperElm:".gallery-nav",navBlockContentElm:".gallery-nav-content",navBlockPrevElm:".gallery-nav-arrow-prev",navBlockNextElm:".gallery-nav-arrow-next",slideshowPhotoClass:"gallery-photo"})},i=function(e,i){for(var o in e)$("#"+o).length<=0&&delete e[o];return $(".gallery").each(function(){var i,o=$(this).attr("id"),r=$(this);i=$(this).hasClass("gallery-classic")?"classic":$(this).hasClass("gallery-slideshow")?"slideshow":"feed",void 0===e[o]?(e[o]=i,"slideshow"===i&&n(r),"feed"===i&&t(r,400)):e[o]!=i&&("classic"!==i&&$("#"+o).find(".clone").remove(),"slideshow"===i&&n($("#"+o)),"feed"===i&&($("#"+o).find(".clone").remove(),t($("#"+o),400)),e[o]=i)}),e};if(isCMS()){var o=i([]);$(document).on("wnd-content-change",".gallery",function(){i(o,$(this))}),$(document).on("wnd-content-change",function(e){$(e.target).hasClass("section")&&i(o)}),$(document).on("wnd-redraw",".content",function(){$(this).find(".gallery-feed").each(function(){t($(this),400)})}),$(window).on("resize orientationchange",function(){$(".gallery-feed").each(function(){e($(this))})})}else $(".gallery").each(function(){$(this).hasClass("gallery-slideshow")&&n($(this)),$(this).hasClass("gallery-feed")&&t($(this),400)}),$(window).on("resize orientationchange",function(){$(".gallery-feed").each(function(){e($(this))})})}),$(document).ready(function(){var e=function(){$(".blog-feed").feed({type:"blog",title:"outside",title_class:".item-content",wrapper:".blog-container",item:".item",item_wrapper:".item-wrapper",video_thumb:".thumbnail",bottom_line:"true",pager:".pager"})};$(".blog-feed")[0]&&(e(),$(window).on("resize orientationchange",function(){e()})),isCMS()&&($(document).on("wnd-redraw",".blog",function(){$(this).hasClass("blog-feed")&&$(this).feed({type:"blog",title:"outside",title_class:".item-content",wrapper:".blog-container",item:".item",item_wrapper:".item-wrapper",video_thumb:".thumbnail",bottom_line:"true",pager:".pager"})}),$(document).on("wnd-redraw",".content",function(){$(".blog-feed")[0]&&setTimeout(function(){e()},400)}))}),$(document).ready(function(){var e=function(e){for(var t in e)$("#"+t).length<=0&&delete e[t];return $(".eshop").each(function(){var t,n=$(this).attr("id"),i=$(this);t=$(this).hasClass("eshop-carousel")?"carousel":$(this).hasClass("eshop-slider")?"slider":"grid",void 0===e[n]?(e[n]=t,"slider"===t&&$(i).productSlider({isCMS:!0,autoplay:!0}),"carousel"===t&&$(i).productCarousel({isCMS:!0,autoplay:!0})):e[n]!=t&&("carousel"!==t&&$("#"+n).find(".clone").remove(),"slider"===t&&$("#"+n).productSlider({isCMS:!0,autoplay:!0}),"carousel"===t&&$("#"+n).productCarousel({isCMS:!0,autoplay:!0}),e[n]=t)}),e};if(isCMS()){var t=e([]),n=debounce(function(n){e(t)},500);$(document).on("wnd-dynamic-content-change",".eshop",n),$(document).on("wnd-content-change",function(n){$(n.target).hasClass("section")&&setTimeout(function(){e(t)},500)})}else $(".eshop").each(function(){$(this).hasClass("eshop-slider")&&$(this).productSlider({isCMS:!1,autoplay:!0}),$(this).hasClass("eshop-carousel")&&$(this).productCarousel({isCMS:!1,autoplay:!0})});$("body").removeClass("eshop-hide")}),$(document).ready(function(){var e=$(".product-gallery");e[0]&&e.each(function(){var e;e=$(this),$(e).slideShow({isCMS:isCMS(),isEshopGallery:!0,autoplay:!1,blockClass:"product-gallery",slideshowPhotoClass:"product-gallery-photo"})}),isCMS()||($(document).on("wnd-add-to-cart",".product-cart",function(e){$(this).addClass("wnd-waiting").removeClass("wnd-button-ready")}),$(document).on("wnd-add-to-cart-done",".product-cart",function(e){var t=e.target;$(".cart").addClass("wnd-add-product"),setTimeout(function(){$(t).parent().addClass("wnd-waiting-done")},500),setTimeout(function(){$(t).parent().removeClass("wnd-waiting-done").removeClass("wnd-waiting").addClass("wnd-button-ready"),$(".cart").removeClass("wnd-add-product")},1500)}))}),$(document).ready(function(){barsControlMobileInit(".header-01")}),$(document).ready(function(){var e=!1;sectionControl(),isCMS()&&$(document).on("wnd-content-change","body",function(){setTimeout(function(){e?e=!1:(sectionControl(),e=!0)},100)})});})()