(()=>{"use strict";const e=window.wp.i18n,t=e=>Math.abs(parseInt(e,10)),a=(e,t,a)=>{const n=new CustomEvent(`wpcf7${t}`,{bubbles:!0,detail:a});"string"==typeof e&&(e=document.querySelector(e)),e.dispatchEvent(n)},n=(e,t)=>{const n=new Map([["init","init"],["validation_failed","invalid"],["acceptance_missing","unaccepted"],["spam","spam"],["aborted","aborted"],["mail_sent","sent"],["mail_failed","failed"],["submitting","submitting"],["resetting","resetting"],["validating","validating"],["payment_required","payment-required"]]);n.has(t)&&(t=n.get(t)),Array.from(n.values()).includes(t)||(t=`custom-${t=(t=t.replace(/[^0-9a-z]+/i," ").trim()).replace(/\s+/,"-")}`);const r=e.getAttribute("data-status");if(e.wpcf7.status=t,e.setAttribute("data-status",t),e.classList.add(t),r&&r!==t){e.classList.remove(r);const t={contactFormId:e.wpcf7.id,pluginVersion:e.wpcf7.pluginVersion,contactFormLocale:e.wpcf7.locale,unitTag:e.wpcf7.unitTag,containerPostId:e.wpcf7.containerPost,status:e.wpcf7.status,prevStatus:r};a(e,"statuschanged",t)}return t},r=e=>{const{root:t,namespace:a="contact-form-7/v1"}=wpcf7.api;return c.reduceRight(((e,t)=>a=>t(a,e)),(e=>{let n,r,{url:c,path:o,endpoint:s,headers:i,body:l,data:p,...d}=e;"string"==typeof s&&(n=a.replace(/^\/|\/$/g,""),r=s.replace(/^\//,""),o=r?n+"/"+r:n),"string"==typeof o&&(-1!==t.indexOf("?")&&(o=o.replace("?","&")),o=o.replace(/^\//,""),c=t+o),i={Accept:"application/json, */*;q=0.1",...i},delete i["X-WP-Nonce"],p&&(l=JSON.stringify(p),i["Content-Type"]="application/json");const f={code:"fetch_error",message:"You are probably offline."},u={code:"invalid_json",message:"The response is not a valid JSON response."};return window.fetch(c||o||window.location.href,{...d,headers:i,body:l}).then((e=>Promise.resolve(e).then((e=>{if(e.status>=200&&e.status<300)return e;throw e})).then((e=>{if(204===e.status)return null;if(e&&e.json)return e.json().catch((()=>{throw u}));throw u}))),(()=>{throw f}))}))(e)},c=[];function o(e,t={}){const{target:a,scope:r=e,...c}=t;if(void 0===e.wpcf7?.schema)return;const o={...e.wpcf7.schema};if(void 0!==a){if(!e.contains(a))return;if(!a.closest(".wpcf7-form-control-wrap[data-name]"))return;if(a.closest(".novalidate"))return}const p=r.querySelectorAll(".wpcf7-form-control-wrap"),d=Array.from(p).reduce(((e,t)=>(t.closest(".novalidate")||t.querySelectorAll(":where(input, textarea, select):enabled").forEach((t=>{if(t.name)switch(t.type){case"button":case"image":case"reset":case"submit":break;case"checkbox":case"radio":t.checked&&e.append(t.name,t.value);break;case"select-multiple":for(const a of t.selectedOptions)e.append(t.name,a.value);break;case"file":for(const a of t.files)e.append(t.name,a);break;default:e.append(t.name,t.value)}})),e)),new FormData),f=e.getAttribute("data-status");Promise.resolve(n(e,"validating")).then((n=>{if(void 0!==swv){const n=swv.validate(o,d,t);for(const t of p){if(void 0===t.dataset.name)continue;const c=t.dataset.name;if(n.has(c)){const{error:t,validInputs:a}=n.get(c);i(e,c),void 0!==t&&s(e,c,t,{scope:r}),l(e,c,null!=a?a:[])}if(t.contains(a))break}}})).finally((()=>{n(e,f)}))}r.use=e=>{c.unshift(e)};const s=(e,t,a,n)=>{const{scope:r=e,...c}=null!=n?n:{},o=`${e.wpcf7?.unitTag}-ve-${t}`.replaceAll(/[^0-9a-z_-]+/gi,""),s=e.querySelector(`.wpcf7-form-control-wrap[data-name="${t}"] .wpcf7-form-control`);(()=>{const t=document.createElement("li");t.setAttribute("id",o),s&&s.id?t.insertAdjacentHTML("beforeend",`<a href="#${s.id}">${a}</a>`):t.insertAdjacentText("beforeend",a),e.wpcf7.parent.querySelector(".screen-reader-response ul").appendChild(t)})(),r.querySelectorAll(`.wpcf7-form-control-wrap[data-name="${t}"]`).forEach((e=>{const t=document.createElement("span");t.classList.add("wpcf7-not-valid-tip"),t.setAttribute("aria-hidden","true"),t.insertAdjacentText("beforeend",a),e.appendChild(t),e.querySelectorAll("[aria-invalid]").forEach((e=>{e.setAttribute("aria-invalid","true")})),e.querySelectorAll(".wpcf7-form-control").forEach((e=>{e.classList.add("wpcf7-not-valid"),e.setAttribute("aria-describedby",o),"function"==typeof e.setCustomValidity&&e.setCustomValidity(a),e.closest(".use-floating-validation-tip")&&(e.addEventListener("focus",(e=>{t.setAttribute("style","display: none")})),t.addEventListener("click",(e=>{t.setAttribute("style","display: none")})))}))}))},i=(e,t)=>{const a=`${e.wpcf7?.unitTag}-ve-${t}`.replaceAll(/[^0-9a-z_-]+/gi,"");e.wpcf7.parent.querySelector(`.screen-reader-response ul li#${a}`)?.remove(),e.querySelectorAll(`.wpcf7-form-control-wrap[data-name="${t}"]`).forEach((e=>{e.querySelector(".wpcf7-not-valid-tip")?.remove(),e.querySelectorAll("[aria-invalid]").forEach((e=>{e.setAttribute("aria-invalid","false")})),e.querySelectorAll(".wpcf7-form-control").forEach((e=>{e.removeAttribute("aria-describedby"),e.classList.remove("wpcf7-not-valid"),"function"==typeof e.setCustomValidity&&e.setCustomValidity("")}))}))},l=(e,t,a)=>{e.querySelectorAll(`[data-reflection-of="${t}"]`).forEach((e=>{if("output"===e.tagName.toLowerCase()){const t=e;0===a.length&&a.push(t.dataset.default),a.slice(0,1).forEach((e=>{e instanceof File&&(e=e.name),t.textContent=e}))}else e.querySelectorAll("output").forEach((e=>{e.hasAttribute("data-default")?0===a.length?e.removeAttribute("hidden"):e.setAttribute("hidden","hidden"):e.remove()})),a.forEach((a=>{a instanceof File&&(a=a.name);const n=document.createElement("output");n.setAttribute("name",t),n.textContent=a,e.appendChild(n)}))}))};function p(e,t={}){if(wpcf7.blocked)return d(e),void n(e,"submitting");const c=new FormData(e);t.submitter&&t.submitter.name&&c.append(t.submitter.name,t.submitter.value);const o={contactFormId:e.wpcf7.id,pluginVersion:e.wpcf7.pluginVersion,contactFormLocale:e.wpcf7.locale,unitTag:e.wpcf7.unitTag,containerPostId:e.wpcf7.containerPost,status:e.wpcf7.status,inputs:Array.from(c,(e=>{const t=e[0],a=e[1];return!t.match(/^_/)&&{name:t,value:a}})).filter((e=>!1!==e)),formData:c};r({endpoint:`contact-forms/${e.wpcf7.id}/feedback`,method:"POST",body:c,wpcf7:{endpoint:"feedback",form:e,detail:o}}).then((t=>{const r=n(e,t.status);return o.status=t.status,o.apiResponse=t,["invalid","unaccepted","spam","aborted"].includes(r)?a(e,r,o):["sent","failed"].includes(r)&&a(e,`mail${r}`,o),a(e,"submit",o),t})).then((t=>{t.posted_data_hash&&(e.querySelector('input[name="_wpcf7_posted_data_hash"]').value=t.posted_data_hash),"mail_sent"===t.status&&(e.reset(),e.wpcf7.resetOnMailSent=!0),t.invalid_fields&&t.invalid_fields.forEach((t=>{s(e,t.field,t.message)})),e.wpcf7.parent.querySelector('.screen-reader-response [role="status"]').insertAdjacentText("beforeend",t.message),e.querySelectorAll(".wpcf7-response-output").forEach((e=>{e.innerText=t.message}))})).catch((e=>console.error(e)))}r.use(((e,t)=>{if(e.wpcf7&&"feedback"===e.wpcf7.endpoint){const{form:t,detail:r}=e.wpcf7;d(t),a(t,"beforesubmit",r),n(t,"submitting")}return t(e)}));const d=e=>{e.querySelectorAll(".wpcf7-form-control-wrap").forEach((t=>{t.dataset.name&&i(e,t.dataset.name)})),e.wpcf7.parent.querySelector('.screen-reader-response [role="status"]').innerText="",e.querySelectorAll(".wpcf7-response-output").forEach((e=>{e.innerText=""}))};function f(e){const t=new FormData(e),c={contactFormId:e.wpcf7.id,pluginVersion:e.wpcf7.pluginVersion,contactFormLocale:e.wpcf7.locale,unitTag:e.wpcf7.unitTag,containerPostId:e.wpcf7.containerPost,status:e.wpcf7.status,inputs:Array.from(t,(e=>{const t=e[0],a=e[1];return!t.match(/^_/)&&{name:t,value:a}})).filter((e=>!1!==e)),formData:t};r({endpoint:`contact-forms/${e.wpcf7.id}/refill`,method:"GET",wpcf7:{endpoint:"refill",form:e,detail:c}}).then((t=>{e.wpcf7.resetOnMailSent?(delete e.wpcf7.resetOnMailSent,n(e,"mail_sent")):n(e,"init"),c.apiResponse=t,a(e,"reset",c)})).catch((e=>console.error(e)))}r.use(((e,t)=>{if(e.wpcf7&&"refill"===e.wpcf7.endpoint){const{form:t,detail:a}=e.wpcf7;d(t),n(t,"resetting")}return t(e)}));const u=(e,t)=>{for(const a in t){const n=t[a];e.querySelectorAll(`input[name="${a}"]`).forEach((e=>{e.value=""})),e.querySelectorAll(`img.wpcf7-captcha-${a.replaceAll(":","")}`).forEach((e=>{e.setAttribute("src",n)}));const r=/([0-9]+)\.(png|gif|jpeg)$/.exec(n);r&&e.querySelectorAll(`input[name="_wpcf7_captcha_challenge_${a}"]`).forEach((e=>{e.value=r[1]}))}},m=(e,t)=>{for(const a in t){const n=t[a][0],r=t[a][1];e.querySelectorAll(`.wpcf7-form-control-wrap[data-name="${a}"]`).forEach((e=>{e.querySelector(`input[name="${a}"]`).value="",e.querySelector(".wpcf7-quiz-label").textContent=n,e.querySelector(`input[name="_wpcf7_quiz_answer_${a}"]`).value=r}))}};function w(e){const a=new FormData(e);e.wpcf7={id:t(a.get("_wpcf7")),status:e.getAttribute("data-status"),pluginVersion:a.get("_wpcf7_version"),locale:a.get("_wpcf7_locale"),unitTag:a.get("_wpcf7_unit_tag"),containerPost:t(a.get("_wpcf7_container_post")),parent:e.closest(".wpcf7"),get schema(){return wpcf7.schemas.get(this.id)}},wpcf7.schemas.set(e.wpcf7.id,void 0),e.querySelectorAll(".has-spinner").forEach((e=>{e.insertAdjacentHTML("afterend",'<span class="wpcf7-spinner"></span>')})),(e=>{e.querySelectorAll(".wpcf7-exclusive-checkbox").forEach((t=>{t.addEventListener("change",(t=>{const a=t.target.getAttribute("name");e.querySelectorAll(`input[type="checkbox"][name="${a}"]`).forEach((e=>{e!==t.target&&(e.checked=!1)}))}))}))})(e),(e=>{e.querySelectorAll(".has-free-text").forEach((t=>{const a=t.querySelector("input.wpcf7-free-text"),n=t.querySelector('input[type="checkbox"], input[type="radio"]');a.disabled=!n.checked,e.addEventListener("change",(e=>{a.disabled=!n.checked,e.target===n&&n.checked&&a.focus()}))}))})(e),(e=>{e.querySelectorAll(".wpcf7-validates-as-url").forEach((e=>{e.addEventListener("change",(t=>{let a=e.value.trim();a&&!a.match(/^[a-z][a-z0-9.+-]*:/i)&&-1!==a.indexOf(".")&&(a=a.replace(/^\/+/,""),a="http://"+a),e.value=a}))}))})(e),(e=>{if(!e.querySelector(".wpcf7-acceptance")||e.classList.contains("wpcf7-acceptance-as-validation"))return;const t=()=>{let t=!0;e.querySelectorAll(".wpcf7-acceptance").forEach((e=>{if(!t||e.classList.contains("optional"))return;const a=e.querySelector('input[type="checkbox"]');(e.classList.contains("invert")&&a.checked||!e.classList.contains("invert")&&!a.checked)&&(t=!1)})),e.querySelectorAll(".wpcf7-submit").forEach((e=>{e.disabled=!t}))};t(),e.addEventListener("change",(e=>{t()})),e.addEventListener("wpcf7reset",(e=>{t()}))})(e),(e=>{const a=(e,a)=>{const n=t(e.getAttribute("data-starting-value")),r=t(e.getAttribute("data-maximum-value")),c=t(e.getAttribute("data-minimum-value")),o=e.classList.contains("down")?n-a.value.trim().length:a.value.trim().length;e.setAttribute("data-current-value",o),e.innerText=o,r&&r<a.value.length?e.classList.add("too-long"):e.classList.remove("too-long"),c&&a.value.length<c?e.classList.add("too-short"):e.classList.remove("too-short")},n=t=>{t={init:!1,...t},e.querySelectorAll(".wpcf7-character-count").forEach((n=>{const r=n.getAttribute("data-target-name"),c=e.querySelector(`[name="${r}"]`);c&&(c.value=c.defaultValue,a(n,c),t.init&&c.addEventListener("keyup",(e=>{a(n,c)})))}))};n({init:!0}),e.addEventListener("wpcf7reset",(e=>{n()}))})(e),window.addEventListener("load",(t=>{wpcf7.cached&&e.reset()})),e.addEventListener("reset",(t=>{wpcf7.reset(e)})),e.addEventListener("submit",(t=>{wpcf7.submit(e,{submitter:t.submitter}),t.preventDefault()})),e.addEventListener("wpcf7submit",(t=>{t.detail.apiResponse.captcha&&u(e,t.detail.apiResponse.captcha),t.detail.apiResponse.quiz&&m(e,t.detail.apiResponse.quiz)})),e.addEventListener("wpcf7reset",(t=>{t.detail.apiResponse.captcha&&u(e,t.detail.apiResponse.captcha),t.detail.apiResponse.quiz&&m(e,t.detail.apiResponse.quiz)})),e.addEventListener("change",(t=>{t.target.closest(".wpcf7-form-control")&&wpcf7.validate(e,{target:t.target})})),e.addEventListener("wpcf7statuschanged",(t=>{const a=t.detail.status;e.querySelectorAll(".active-on-any").forEach((e=>{e.removeAttribute("inert"),e.classList.remove("active-on-any")})),e.querySelectorAll(`.inert-on-${a}`).forEach((e=>{e.setAttribute("inert","inert"),e.classList.add("active-on-any")}))}))}document.addEventListener("DOMContentLoaded",(t=>{var a;if("undefined"!=typeof wpcf7)if(void 0!==wpcf7.api)if("function"==typeof window.fetch)if("function"==typeof window.FormData)if("function"==typeof NodeList.prototype.forEach)if("function"==typeof String.prototype.replaceAll){wpcf7={init:w,submit:p,reset:f,validate:o,schemas:new Map,...null!==(a=wpcf7)&&void 0!==a?a:{}},document.querySelectorAll("form .wpcf7[data-wpcf7-id]").forEach((t=>{const a=document.createElement("p");a.setAttribute("class","wpcf7-form-in-wrong-place");const n=document.createElement("strong");n.append((0,e.__)("Error:","contact-form-7"));const r=(0,e.__)("This contact form is placed in the wrong place.","contact-form-7");a.append(n," ",r),t.replaceWith(a)})),document.querySelectorAll(".wpcf7 > form").forEach((e=>{wpcf7.init(e),e.closest(".wpcf7").classList.replace("no-js","js")}));for(const e of wpcf7.schemas.keys())r({endpoint:`contact-forms/${e}/feedback/schema`,method:"GET"}).then((t=>{wpcf7.schemas.set(e,t)}))}else console.error("Your browser does not support String.replaceAll().");else console.error("Your browser does not support NodeList.forEach().");else console.error("Your browser does not support window.FormData().");else console.error("Your browser does not support window.fetch().");else console.error("wpcf7.api is not defined.");else console.error("wpcf7 is not defined.")}))})();
!function(e,t,n){function r(e,t){return typeof e===t}function i(){var e,t,n,i,s,o,a;for(var d in x)if(x.hasOwnProperty(d)){if(e=[],t=x[d],t.name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;n<t.options.aliases.length;n++)e.push(t.options.aliases[n].toLowerCase());for(i=r(t.fn,"function")?t.fn():t.fn,s=0;s<e.length;s++)o=e[s],a=o.split("."),1===a.length?Modernizr[a[0]]=i:(!Modernizr[a[0]]||Modernizr[a[0]]instanceof Boolean||(Modernizr[a[0]]=new Boolean(Modernizr[a[0]])),Modernizr[a[0]][a[1]]=i),y.push((i?"":"no-")+a.join("-"))}}function s(e){var t=T.className,n=Modernizr._config.classPrefix||"";if(b&&(t=t.baseVal),Modernizr._config.enableJSClass){var r=new RegExp("(^|\\s)"+n+"no-js(\\s|$)");t=t.replace(r,"$1"+n+"js$2")}Modernizr._config.enableClasses&&(t+=" "+n+e.join(" "+n),b?T.className.baseVal=t:T.className=t)}function o(){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){return e.replace(/([a-z])-([a-z])/g,function(e,t,n){return t+n.toUpperCase()}).replace(/^-/,"")}function d(e,t){if("object"==typeof e)for(var n in e)z(e,n)&&d(n,e[n]);else{e=e.toLowerCase();var r=e.split("."),i=Modernizr[r[0]];if(2==r.length&&(i=i[r[1]]),"undefined"!=typeof i)return Modernizr;t="function"==typeof t?t():t,1==r.length?Modernizr[r[0]]=t:(!Modernizr[r[0]]||Modernizr[r[0]]instanceof Boolean||(Modernizr[r[0]]=new Boolean(Modernizr[r[0]])),Modernizr[r[0]][r[1]]=t),s([(t&&0!=t?"":"no-")+r.join("-")]),Modernizr._trigger(e,t)}return Modernizr}function u(){var e=t.body;return e||(e=o(b?"svg":"body"),e.fake=!0),e}function f(e,n,r,i){var s,a,d,f,l="modernizr",c=o("div"),p=u();if(parseInt(r,10))for(;r--;)d=o("div"),d.id=i?i[r]:l+(r+1),c.appendChild(d);return s=o("style"),s.type="text/css",s.id="s"+l,(p.fake?p:c).appendChild(s),p.appendChild(c),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(t.createTextNode(e)),c.id=l,p.fake&&(p.style.background="",p.style.overflow="hidden",f=T.style.overflow,T.style.overflow="hidden",T.appendChild(p)),a=n(c,e),p.fake?(p.parentNode.removeChild(p),T.style.overflow=f,T.offsetHeight):c.parentNode.removeChild(c),!!a}function l(e,t){return!!~(""+e).indexOf(t)}function c(e,t){return function(){return e.apply(t,arguments)}}function p(e,t,n){var i;for(var s in e)if(e[s]in t)return n===!1?e[s]:(i=t[e[s]],r(i,"function")?c(i,n||t):i);return!1}function h(e){return e.replace(/([A-Z])/g,function(e,t){return"-"+t.toLowerCase()}).replace(/^ms-/,"-ms-")}function m(t,r){var i=t.length;if("CSS"in e&&"supports"in e.CSS){for(;i--;)if(e.CSS.supports(h(t[i]),r))return!0;return!1}if("CSSSupportsRule"in e){for(var s=[];i--;)s.push("("+h(t[i])+":"+r+")");return s=s.join(" or "),f("@supports ("+s+"){ #modernizr { position: absolute; }}",function(e){return"absolute"==getComputedStyle(e,null).position})}return n}function g(e,t,i,s){function d(){f&&(delete q.style,delete q.modElem)}if(s=r(s,"undefined")?!1:s,!r(i,"undefined")){var u=m(e,i);if(!r(u,"undefined"))return u}for(var f,c,p,h,g,A=["modernizr","tspan","samp"];!q.style&&A.length;)f=!0,q.modElem=o(A.shift()),q.style=q.modElem.style;for(p=e.length,c=0;p>c;c++)if(h=e[c],g=q.style[h],l(h,"-")&&(h=a(h)),q.style[h]!==n){if(s||r(i,"undefined"))return d(),"pfx"==t?h:!0;try{q.style[h]=i}catch(v){}if(q.style[h]!=g)return d(),"pfx"==t?h:!0}return d(),!1}function A(e,t,n,i,s){var o=e.charAt(0).toUpperCase()+e.slice(1),a=(e+" "+P.join(o+" ")+o).split(" ");return r(t,"string")||r(t,"undefined")?g(a,t,i,s):(a=(e+" "+R.join(o+" ")+o).split(" "),p(a,t,n))}function v(e,t,r){return A(e,n,n,t,r)}var y=[],x=[],w={_version:"3.3.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){x.push({name:e,fn:t,options:n})},addAsyncTest:function(e){x.push({name:null,fn:e})}},Modernizr=function(){};Modernizr.prototype=w,Modernizr=new Modernizr,Modernizr.addTest("eventlistener","addEventListener"in e),Modernizr.addTest("history",function(){var t=navigator.userAgent;return-1===t.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone")?e.history&&"pushState"in e.history:!1}),Modernizr.addTest("svg",!!t.createElementNS&&!!t.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect);var T=t.documentElement,b="svg"===T.nodeName.toLowerCase();Modernizr.addTest("canvas",function(){var e=o("canvas");return!(!e.getContext||!e.getContext("2d"))}),Modernizr.addTest("multiplebgs",function(){var e=o("a").style;return e.cssText="background:url(https://),url(https://),red url(https://)",/(url\s*\(.*?){3}/.test(e.background)}),Modernizr.addTest("csspointerevents",function(){var e=o("a").style;return e.cssText="pointer-events:auto","auto"===e.pointerEvents}),Modernizr.addTest("time","valueAsDate"in o("time")),Modernizr.addTest("placeholder","placeholder"in o("input")&&"placeholder"in o("textarea"));var C=function(){function e(e,t){var i;return e?(t&&"string"!=typeof t||(t=o(t||"div")),e="on"+e,i=e in t,!i&&r&&(t.setAttribute||(t=o("div")),t.setAttribute(e,""),i="function"==typeof t[e],t[e]!==n&&(t[e]=n),t.removeAttribute(e)),i):!1}var r=!("onblur"in t.documentElement);return e}();w.hasEvent=C,Modernizr.addTest("hashchange",function(){return C("hashchange",e)===!1?!1:t.documentMode===n||t.documentMode>7});var S=w._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):["",""];w._prefixes=S,Modernizr.addTest("csscalc",function(){var e="width:",t="calc(10px);",n=o("a");return n.style.cssText=e+S.join(t+e),!!n.style.length}),Modernizr.addTest("cssgradients",function(){for(var e,t="background-image:",n="gradient(linear,left top,right bottom,from(#9f9),to(white));",r="",i=0,s=S.length-1;s>i;i++)e=0===i?"to ":"",r+=t+S[i]+"linear-gradient("+e+"left top, #9f9, white);";Modernizr._config.usePrefixes&&(r+=t+"-webkit-"+n);var a=o("a"),d=a.style;return d.cssText=r,(""+d.backgroundImage).indexOf("gradient")>-1}),Modernizr.addTest("csspositionsticky",function(){var e="position:",t="sticky",n=o("a"),r=n.style;return r.cssText=e+S.join(t+";"+e).slice(0,-e.length),-1!==r.position.indexOf(t)});var _="CSS"in e&&"supports"in e.CSS,E="supportsCSS"in e;Modernizr.addTest("supports",_||E);var z;!function(){var e={}.hasOwnProperty;z=r(e,"undefined")||r(e.call,"undefined")?function(e,t){return t in e&&r(e.constructor.prototype[t],"undefined")}:function(t,n){return e.call(t,n)}}(),w._l={},w.on=function(e,t){this._l[e]||(this._l[e]=[]),this._l[e].push(t),Modernizr.hasOwnProperty(e)&&setTimeout(function(){Modernizr._trigger(e,Modernizr[e])},0)},w._trigger=function(e,t){if(this._l[e]){var n=this._l[e];setTimeout(function(){var e,r;for(e=0;e<n.length;e++)(r=n[e])(t)},0),delete this._l[e]}},Modernizr._q.push(function(){w.addTest=d}),Modernizr.addAsyncTest(function(){if(!Modernizr.canvas)return!1;var e=new Image,t=o("canvas"),n=t.getContext("2d");e.onload=function(){d("apng",function(){return"undefined"==typeof t.getContext?!1:(n.drawImage(e,0,0),0===n.getImageData(0,0,1,1).data[3])})},e.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACGFjVEwAAAABAAAAAcMq2TYAAAANSURBVAiZY2BgYPgPAAEEAQB9ssjfAAAAGmZjVEwAAAAAAAAAAQAAAAEAAAAAAAAAAAD6A+gBAbNU+2sAAAARZmRBVAAAAAEImWNgYGBgAAAABQAB6MzFdgAAAABJRU5ErkJggg=="});var j=w.testStyles=f;Modernizr.addTest("touchevents",function(){var n;if("ontouchstart"in e||e.DocumentTouch&&t instanceof DocumentTouch)n=!0;else{var r=["@media (",S.join("touch-enabled),("),"heartz",")","{#modernizr{top:9px;position:absolute}}"].join("");j(r,function(e){n=9===e.offsetTop})}return n});var k=function(){var e=navigator.userAgent,t=e.match(/applewebkit\/([0-9]+)/gi)&&parseFloat(RegExp.$1),n=e.match(/w(eb)?osbrowser/gi),r=e.match(/windows phone/gi)&&e.match(/iemobile\/([0-9])+/gi)&&parseFloat(RegExp.$1)>=9,i=533>t&&e.match(/android/gi);return n||i||r}();k?Modernizr.addTest("fontface",!1):j('@font-face {font-family:"font";src:url("https://")}',function(e,n){var r=t.getElementById("smodernizr"),i=r.sheet||r.styleSheet,s=i?i.cssRules&&i.cssRules[0]?i.cssRules[0].cssText:i.cssText||"":"",o=/src/i.test(s)&&0===s.indexOf(n.split(" ")[0]);Modernizr.addTest("fontface",o)}),j("#modernizr div {width:100px} #modernizr :last-child{width:200px;display:block}",function(e){Modernizr.addTest("lastchild",e.lastChild.offsetWidth>e.firstChild.offsetWidth)},2),j("#modernizr div {width:1px} #modernizr div:nth-child(2n){width:2px;}",function(e){for(var t=e.getElementsByTagName("div"),n=!0,r=0;5>r;r++)n=n&&t[r].offsetWidth===r%2+1;Modernizr.addTest("nthchild",n)},5),j("#modernizr { height: 50vh; }",function(t){var n=parseInt(e.innerHeight/2,10),r=parseInt((e.getComputedStyle?getComputedStyle(t,null):t.currentStyle).height,10);Modernizr.addTest("cssvhunit",r==n)});var B=function(){var t=e.matchMedia||e.msMatchMedia;return t?function(e){var n=t(e);return n&&n.matches||!1}:function(t){var n=!1;return f("@media "+t+" { #modernizr { position: absolute; }}",function(t){n="absolute"==(e.getComputedStyle?e.getComputedStyle(t,null):t.currentStyle).position}),n}}();w.mq=B,Modernizr.addTest("mediaqueries",B("only all"));var O="Moz O ms Webkit",P=w._config.usePrefixes?O.split(" "):[];w._cssomPrefixes=P;var N=function(t){var r,i=S.length,s=e.CSSRule;if("undefined"==typeof s)return n;if(!t)return!1;if(t=t.replace(/^@/,""),r=t.replace(/-/g,"_").toUpperCase()+"_RULE",r in s)return"@"+t;for(var o=0;i>o;o++){var a=S[o],d=a.toUpperCase()+"_"+r;if(d in s)return"@-"+a.toLowerCase()+"-"+t}return!1};w.atRule=N;var R=w._config.usePrefixes?O.toLowerCase().split(" "):[];w._domPrefixes=R;var M={elem:o("modernizr")};Modernizr._q.push(function(){delete M.elem});var q={style:M.elem.style};Modernizr._q.unshift(function(){delete q.style}),w.testAllProps=A;var I=w.prefixed=function(e,t,n){return 0===e.indexOf("@")?N(e):(-1!=e.indexOf("-")&&(e=a(e)),t?A(e,t,n):A(e,"pfx"))};Modernizr.addTest("requestanimationframe",!!I("requestAnimationFrame",e),{aliases:["raf"]}),Modernizr.addTest("objectfit",!!I("objectFit"),{aliases:["object-fit"]}),w.testAllProps=v,Modernizr.addTest("ellipsis",v("textOverflow","ellipsis")),Modernizr.addTest("cssfilters",function(){if(Modernizr.supports)return v("filter","blur(2px)");var e=o("a");return e.style.cssText=S.join("filter:blur(2px); "),!!e.style.length&&(t.documentMode===n||t.documentMode>9)}),Modernizr.addTest("flexbox",v("flexBasis","1px",!0)),Modernizr.addTest("csstransforms",function(){return-1===navigator.userAgent.indexOf("Android 2.")&&v("transform","scale(1)",!0)}),Modernizr.addTest("csstransforms3d",function(){var e=!!v("perspective","1px",!0),t=Modernizr._config.usePrefixes;if(e&&(!t||"webkitPerspective"in T.style)){var n,r="#modernizr{width:0;height:0}";Modernizr.supports?n="@supports (perspective: 1px)":(n="@media (transform-3d)",t&&(n+=",(-webkit-transform-3d)")),n+="{#modernizr{width:7px;height:18px;margin:0;padding:0;border:0}}",j(r+n,function(t){e=7===t.offsetWidth&&18===t.offsetHeight})}return e}),Modernizr.addTest("csstransitions",v("transition","all",!0)),Modernizr.addTest("cssanimations",v("animationName","a",!0)),i(),s(y),delete w.addTest,delete w.addAsyncTest;for(var U=0;U<Modernizr._q.length;U++)Modernizr._q[U]();e.Modernizr=Modernizr}(window,document);
var SPB=SPB||{};function detectIE(){var e=window.navigator.userAgent,a=e.indexOf("MSIE ");if(a>0)return parseInt(e.substring(a+5,e.indexOf(".",a)),10);if(e.indexOf("Trident/")>0){var t=e.indexOf("rv:");return parseInt(e.substring(t+3,e.indexOf(".",t)),10)}var i=e.indexOf("Edge/");return i>0&&parseInt(e.substring(i+5,e.indexOf(".",i)),10)}!function(){"use strict";SPB.general={init:function(){detectIE()&&jQuery("html").removeClass("flexbox"),SPB.general.checkElemTitle(),SPB.general.initRows(),SPB.general.initCols(),SPB.general.initFullWidthElements(),jQuery(".spb-col-custom-offset").each(function(){var e=jQuery(this).parents(".spb-row").first();e.hasClass("has-offset-elements")||e.addClass("has-offset-elements");var a=jQuery(this).parents("section.row").first();a.hasClass("has-offset-elements")||a.addClass("has-offset-elements")})},load:function(){SPB.general.offsetCalc(),SPB.var.window.smartresize(function(){SPB.general.offsetCalc()})},offsetCalc:function(){var e=0;jQuery("#wpadminbar").length>0&&(e=jQuery("#wpadminbar").height(),SPB.var.wpadminbarheight=jQuery("#wpadminbar").height()),SPB.var.body.hasClass("sticky-header-enabled")&&!SPB.var.body.hasClass("sticky-header-transparent")&&(e+=jQuery(".sticky-header").height()>0?jQuery(".sticky-header").height():jQuery("#header-section").height()),jQuery(".sticky-top-bar").length>0&&(e+=jQuery(".sticky-top-bar").height()>0?jQuery(".sticky-top-bar").height():jQuery("#top-bar").height()),SPB.var.offset=e},checkElemTitle:function(){jQuery(".title-wrap").each(function(){var e=jQuery(this);e.find(".carousel-arrows").length>0&&e.addClass("has-arrows")})},initFullWidthElements:function(){var e=[];jQuery(".spb-full-width-element").each(function(){var a={},t=jQuery(this);a.element=t,a.isFullWidth=!0,t.parent().addClass("has-fw-elements"),a.isVideo=t.find("video.parallax-video").length>0,a.isParallax=!!t.hasClass("spb-row-parallax"),e.push(a)}),jQuery.each(e,function(e,a){a.isFullWidth&&SPB.general.fullWidthRow(a.element,!1,!0),a.isParallax&&SPB.general.parallaxRow(a.element),a.isVideo&&jQuery.canVideoautoplay(function(e){if(e||SPB.var.isAndroid){var t=a.element;SPB.general.resizeVideoRow(t),t.find("video").get(0).addEventListener("loadeddata",function(){SPB.general.resizeVideoRow(t)},!1)}else a.element.find("video").remove()})}),setTimeout(function(){SPB.var.resizeTrigger=!0,SPB.var.window.trigger("resize")},200),setTimeout(function(){SPB.var.resizeTrigger=!1},220),SPB.var.window.on("throttledresize",function(){SPB.var.resizeTrigger||jQuery.each(e,function(e,a){a.isFullWidth&&SPB.general.fullWidthRow(a.element,!1,!0),a.isParallax&&SPB.general.parallaxRow(a.element),a.isVideo&&!SPB.var.isMobile&&SPB.general.resizeVideoRow(a.element)})})},initRows:function(){jQuery(".spb-row").each(function(){var e={},a=jQuery(this);e.element=a,e.isParallax=!!a.hasClass("spb-row-parallax"),e.isFullWidth="full-width-contained"===a.data("wrap")||"full-width-stretch"===a.data("wrap"),e.isFullWidthStretch="full-width-stretch"===a.data("wrap"),e.isVideo="video"===a.data("row-type"),e.isWindowHeight="window-height"===a.data("row-height"),e.columnEqualHeights=!0===a.data("col-equal-heights"),e.columnContentPosition=""!==a.data("data-col-content-pos"),SPB.var.pageRows.push(e)}),jQuery.each(SPB.var.pageRows,function(e,a){a.isParallax&&SPB.general.parallaxRow(a.element),a.isFullWidth&&SPB.general.fullWidthRow(a.element,!0,a.isFullWidthStretch),a.isSlider&&SPB.general.sliderRow(a.element),a.isVideo&&jQuery.canVideoautoplay(function(e){if(e||SPB.var.isAndroid){var t=a.element;SPB.general.resizeVideoRow(t),t.find("video").get(0).addEventListener("loadeddata",function(){SPB.general.resizeVideoRow(t)},!1)}else a.element.find("video").remove()}),a.isWindowHeight&&SPB.general.windowHeightRow(a.element),a.columnEqualHeights&&SPB.general.columnEqualHeightsRow(a.element),a.element.imagesLoaded(function(){a.columnContentPosition&&SPB.general.columnContentPositionRow(a.element)})}),jQuery(".spb-column-container.spb-row-parallax").each(function(){SPB.general.parallaxRow(jQuery(this))}),jQuery(window).on("load",function(){jQuery.each(SPB.var.pageRows,function(e,a){setTimeout(function(){a.columnEqualHeights&&SPB.general.columnEqualHeightsRow(a.element)},200)})}),setTimeout(function(){SPB.var.resizeTrigger=!0,SPB.var.window.trigger("resize")},200),setTimeout(function(){SPB.var.resizeTrigger=!1},220),SPB.var.window.on("throttledresize",function(){SPB.var.resizeTrigger||(jQuery.each(SPB.var.pageRows,function(e,a){a.isParallax&&SPB.general.parallaxRowResize(a.element),a.isFullWidth&&SPB.general.fullWidthRow(a.element,!0,a.isFullWidthStretch),a.isVideo&&!SPB.var.isMobile&&SPB.general.resizeVideoRow(a.element),a.columnContentPosition&&SPB.general.columnContentPositionRow(a.element),a.columnEqualHeights&&SPB.general.columnEqualHeightsRow(a.element)}),jQuery(".spb-column-container.spb-row-parallax").each(function(){SPB.general.parallaxRow(jQuery(this))}))}),jQuery(".spb-row-expanding").length>0&&SPB.general.expandingRow()},expandingRow:function(){jQuery(document).on("click",".spb-row-expand-text",function(e){e.preventDefault();var a=jQuery(this),t=a.next();t.hasClass("spb-row-expanding-open")&&!t.hasClass("spb-row-expanding-active")?(t.addClass("spb-row-expanding-open").addClass("spb-row-expanding-active").slideUp(800),setTimeout(function(){a.removeClass("row-open").find("span").text(a.data("closed-text")),t.css("display","block").removeClass("spb-row-expanding-open").removeClass("spb-row-expanding-active")},800)):t.hasClass("spb-row-expanding-active")||(a.addClass("row-open").find("span").text(a.data("open-text")),t.css("display","none").addClass("spb-row-expanding-open").addClass("spb-row-expanding-active").slideDown(800),setTimeout(function(){t.removeClass("spb-row-expanding-active")},800))})},parallaxRow:function(e){SPB.general.parallaxRowResize(e);var a=.2;"fast"===e.data("parallax-speed")?a=.4:"slow"===e.data("parallax-speed")&&(a=.1),e.parallax("50%",a,!1)},parallaxRowResize:function(e){var a=.2;"fast"===e.data("parallax-speed")?a=.4:"slow"===e.data("parallax-speed")&&(a=.1);var t=Math.ceil(SPB.var.window.height()*a+e.outerHeight(!0)),i=(t-e.height())/4;e.find(".spb-row-parallax-layer").css({"margin-top":"-"+i+"px",height:t})},sliderRow:function(e){var a="";e.find(".spb-row-no-cols-wrapper").length>0?(a=e.find(".spb-row-no-cols-wrapper"),e.find(".spb-row-no-cols-wrapper > .row").addClass("row-slider-slide")):e.find("> .spb_content_element > .row").length>1&&(a=e.find("> .spb_content_element"),e.find("> .spb_content_element > .row").addClass("row-slider-slide"));var t=e.find(".spb-row-slider-atts");a.flickity({cellAlign:"left",contain:!0,cellSelector:".row-slider-slide",wrapAround:t.data("loop"),freeScroll:t.data("freescroll"),draggable:t.data("draggable"),initialIndex:t.data("initial-index"),setGallerySize:!0,autoPlay:parseInt(t.data("autoplay"),10),pageDots:t.data("dots"),prevNextButtons:t.data("arrows"),rightToLeft:SPB.var.isRTL})},fullWidthRow:function(e,a,t){var i,n,s,r;a?(n=(i=e.parent(".fw-row")).next(".spb-row-sizer")?i.next(".spb-row-sizer"):i.parent().find(".spb-row-sizer"),r=e.children(".spb_content_element"),n.offset()&&(s=n.offset().left)):(n=(i=e).next(".spb-fw-sizer")?i.next(".spb-fw-sizer"):i.parent().find(".spb-fw-sizer")).offset()&&(s=n.offset().left),i.addClass("spb-hidden");var A=parseInt(i.css("margin-left"),10),o=parseInt(i.css("margin-right"),10),l=Math.floor(0-s-A),d=Math.floor(SPB.var.window.width());if(SPB.var.body.hasClass("layout-boxed")?(d=Math.ceil(jQuery("#container").width()),l+=jQuery("#container").offset().left):SPB.var.body.hasClass("vertical-header")?(d=Math.ceil(jQuery("#main-container").width()),l+=jQuery("#main-container").offset().left):(SPB.var.body.hasClass("hero-content-split")||SPB.var.body.hasClass("boxed-inner-page"))&&(d=Math.ceil(jQuery(".inner-page-wrap").parent().outerWidth()),l+=jQuery(".inner-page-wrap").parent().offset().left),SPB.var.body.css("padding-left")){var c=parseInt(SPB.var.body.css("padding-left"),10);d-=c,l+=c}SPB.var.body.css("padding-right")&&(d-=parseInt(SPB.var.body.css("padding-right"),10));if(i.css({position:"relative",left:SPB.var.body.hasClass("rtl")?-l:l,width:d}),i.addClass("fw-row-adjusted"),!t&&r){var u=-1*l;u<0&&(u=0);var h=d-u-n.width()+A+o;if(h<0&&(h=0),SPB.var.body.hasClass("rtl")){var f=u;u=h,h=f}r.css({"padding-left":u+"px","padding-right":h+"px"})}e.attr("data-sb-init","true"),e.css("opacity",1).css("visibility","visible"),i.removeClass("spb-hidden")},resizeVideoRow:function(e){if(0!==e.find("video").length){var a=e.find("video"),t=e.outerHeight(),i=e.outerWidth(),n=a[0].videoWidth,s=a[0].videoHeight,r=i/n,A=t/s,o=r>A?r:A,l=n/s*(t+20);o*n<l&&(o=l/n),a.width(Math.ceil(o*n+2)),a.height(Math.ceil(o*s+50)),a.css("margin-top",-(a.height()-t)/2),a.css("margin-left",-(a.width()-i)/2)}},windowHeightRow:function(e){var a=SPB.var.window.height();e.css("min-height",a)},initCols:function(){jQuery(".spb-column-container").each(function(){var e={},a=jQuery(this);e.element=a,e.isSlider=!0===a.data("col-slider"),SPB.var.pageCols.push(e)}),jQuery.each(SPB.var.pageCols,function(e,a){a.isSlider&&SPB.general.sliderCol(a.element)})},sliderCol:function(e){var a=e.find(".spb-col-slider-atts");e.find(".spb-column-inner > .row").addClass("col-slider-slide"),e.find(".spb-column-inner").flickity({cellAlign:"left",contain:!0,cellSelector:".col-slider-slide",wrapAround:a.data("loop"),freeScroll:a.data("freescroll"),draggable:a.data("draggable"),initialIndex:a.data("initial-index"),setGallerySize:!0,autoPlay:parseInt(a.data("autoplay"),10),pageDots:a.data("dots"),prevNextButtons:a.data("arrows"),rightToLeft:SPB.var.isRTL})},columnEqualHeightsRow:function(e){SPB.var.window.width()>=768?(e.find("> .spb_content_element .spb-column-container").css("min-height",""),e.find("> .spb_content_element .spb-column-container").parent().equalHeights()):e.find("> .spb_content_element .spb-column-container").css("min-height","")},columnContentPositionRow:function(e){var a=e.data("col-content-pos");void 0!==a&&"top"!==a&&(e.addClass("spb-hidden"),e.find(".spb-column-inner,.spb-row-multi-col").length>0&&e.find(".spb-column-inner > .row,.spb-row-multi-col > .row").each(function(){var e=jQuery(this),t=0;e.find("> div").length>1&&(e.addClass("multi-column-row"),e.find("> div").each(function(){var e=parseInt(jQuery(this).css("padding-top"))+parseInt(jQuery(this).css("padding-bottom")),a=jQuery(this).find(".spb-asset-content").first().innerHeight()+e;a>t&&(t=a)}),e.css("min-height",t),e.find("> div").css("min-height",t),e.find("> div").each(function(){jQuery(this).addClass("spb-hidden");var e=jQuery(this).find(".spb-asset-content").first(),i=parseInt(jQuery(this).css("padding-top"))+parseInt(jQuery(this).css("padding-bottom"))+parseInt(e.css("padding-top"))+parseInt(e.css("padding-bottom")),n=e.height()+i,s=Math.floor(t/2-n/2);s>0?"center"===a?e.css("margin-top",s).css("margin-bottom",s):"bottom"===a&&e.css("margin-top",2*s):e.css("margin-top","").css("margin-bottom",""),jQuery(this).removeClass("spb-hidden")}))}),e.removeClass("spb-hidden"))}},SPB.assets={init:function(){jQuery(".chart-shortcode").length>0&&SPB.assets.chartAssets(),jQuery(".sf-count-asset").length>0&&SPB.assets.countAssets(),jQuery(".sf-countdown").length>0&&SPB.assets.countdownAssets(),jQuery(".sf-image-banner").length>0&&SPB.assets.imageBanners()},load:function(){jQuery(".chart-shortcode").length>0&&SPB.assets.animateCharts()},chartAssets:function(){jQuery(".chart-shortcode").each(function(){jQuery(this).easyPieChart({animate:1e3,lineCap:"round",lineWidth:jQuery(this).attr("data-linewidth"),size:jQuery(this).attr("data-size"),barColor:jQuery(this).attr("data-barcolor"),trackColor:jQuery(this).attr("data-trackcolor"),scaleColor:"transparent"})})},animateCharts:function(){jQuery(".chart-shortcode").each(function(){jQuery(this).appear(function(){if(!jQuery(this).hasClass("animated")){jQuery(this).addClass("animated");var e=parseInt(jQuery(this).attr("data-animatepercent"),10);jQuery(this).data("easyPieChart").update(e)}})})},countAssets:function(){jQuery(".sf-count-asset").each(function(){var e=jQuery(this),a=e.find(".count-number"),t=e.find(".count-divider").find("span"),i=e.find(".count-subject");a.fitText(.4,{minFontSize:"16px",maxFontSize:"62px"}),SPB.var.isMobile?a.countTo({onComplete:function(){t.hasClass("icon-divide")||t.animate({width:50},400,"easeOutCubic"),i.delay(100).animate({opacity:1,bottom:"0px"},600,"easeOutCubic")}}):e.appear(function(){a.countTo({onComplete:function(){t.hasClass("icon-divide")||t.animate({width:80},400,"easeOutCubic"),i.delay(100).animate({opacity:1,bottom:"0px"},600,"easeOutCubic")}})},{accX:0,accY:-150},"easeInCubic")})},countdownAssets:function(){jQuery(".sf-countdown").each(function(){var e=jQuery(this),a=parseInt(e.data("year"),10),t=parseInt(e.data("month"),10),i=parseInt(e.data("day"),10),n=new Date(a,t-1,i),s=jQuery("#countdown-locale"),r=[s.data("label_years"),s.data("label_months"),s.data("label_weeks"),s.data("label_days"),s.data("label_hours"),s.data("label_mins"),s.data("label_secs")],A=[s.data("label_year"),s.data("label_month"),s.data("label_week"),s.data("label_day"),s.data("label_hour"),s.data("label_min"),s.data("label_sec")];e.countdown({until:n,since:null,labels:r,labels1:A,onExpiry:function(){setTimeout(function(){e.fadeOut(500)},1e3)}})})},imageBanners:function(){jQuery(".sf-image-banner").each(function(){if(jQuery(this).find(".image-banner-content").vCenter(),!Modernizr.objectfit){var e=jQuery(this).find(".img-wrap > img").prop("src");e&&jQuery(this).find(".img-wrap").css("backgroundImage","url("+e+")").addClass("compat-object-fit")}})}},SPB.animatedHeadline={init:function(){var e=jQuery(".spb-animated-headline");e.each(function(){var e=jQuery(this).find(".sf-headline");setTimeout(function(){SPB.animatedHeadline.animateHeadline(e)},2500)}),SPB.animatedHeadline.singleLetters(jQuery(".sf-headline.letters").find("b"))},singleLetters:function(e){e.each(function(){for(var e=jQuery(this),a=e.text().split(""),t=e.hasClass("is-visible"),i=0;i<a.length;i++)e.parents(".rotate-2").length>0&&(a[i]="<em>"+a[i]+"</em>"),a[i]=t?'<i class="in">'+a[i]+"</i>":"<i>"+a[i]+"</i>";var n=a.join("");e.html(n).css("opacity",1)})},animateHeadline:function(e){var a=2500;e.each(function(){var e=jQuery(this);if(e.hasClass("loading-bar")){a=3800;setTimeout(function(){e.find(".sf-words-wrapper").addClass("is-loading")},800)}else if(e.hasClass("clip")){var t=e.find(".sf-words-wrapper"),i=t.width()+10;t.css("width",i)}else if(!e.hasClass("type")){var n=e.find(".sf-words-wrapper b"),s=0;n.each(function(){var e=jQuery(this).width()+10;e>s&&(s=e)}),s=s>0?s:"",e.find(".sf-words-wrapper").css("width",s)}setTimeout(function(){SPB.animatedHeadline.hideWord(e.find(".is-visible").eq(0))},a)})},hideWord:function(e){var a=SPB.animatedHeadline.takeNext(e);if(e.parents(".sf-headline").hasClass("type")){var t=e.parent(".sf-words-wrapper");t.addClass("selected").removeClass("waiting"),setTimeout(function(){t.removeClass("selected"),e.removeClass("is-visible").addClass("is-hidden").children("i").removeClass("in").addClass("out")},500),setTimeout(function(){SPB.animatedHeadline.showWord(a,150)},1300)}else if(e.parents(".sf-headline").hasClass("letters")){var i=e.children("i").length>=a.children("i").length;SPB.animatedHeadline.hideLetter(e.find("i").eq(0),e,i,50),SPB.animatedHeadline.showLetter(a.find("i").eq(0),a,i,50)}else e.parents(".sf-headline").hasClass("clip")?e.parents(".sf-words-wrapper").animate({width:"2px"},600,function(){SPB.animatedHeadline.switchWord(e,a),SPB.animatedHeadline.showWord(a)}):e.parents(".sf-headline").hasClass("loading-bar")?(e.parents(".sf-words-wrapper").removeClass("is-loading"),SPB.animatedHeadline.switchWord(e,a),setTimeout(function(){SPB.animatedHeadline.hideWord(a)},3800),setTimeout(function(){e.parents(".sf-words-wrapper").addClass("is-loading")},800)):(SPB.animatedHeadline.switchWord(e,a),setTimeout(function(){SPB.animatedHeadline.hideWord(a)},2500))},showWord:function(e,a){e.parents(".sf-headline").hasClass("type")?(SPB.animatedHeadline.showLetter(e.find("i").eq(0),e,!1,a),e.addClass("is-visible").removeClass("is-hidden")):e.parents(".sf-headline").hasClass("clip")&&e.parents(".sf-words-wrapper").animate({width:e.width()+10},600,function(){setTimeout(function(){SPB.animatedHeadline.hideWord(e)},1500)})},hideLetter:function(e,a,t,i){if(e.removeClass("in").addClass("out"),e.is(":last-child")?t&&setTimeout(function(){SPB.animatedHeadline.hideWord(SPB.animatedHeadline.takeNext(a))},2500):setTimeout(function(){SPB.animatedHeadline.hideLetter(e.next(),a,t,i)},i),e.is(":last-child")&&jQuery("html").hasClass("no-csstransitions")){var n=SPB.animatedHeadline.takeNext(a);SPB.animatedHeadline.switchWord(a,n)}},showLetter:function(e,a,t,i){e.addClass("in").removeClass("out"),e.is(":last-child")?(a.parents(".sf-headline").hasClass("type")&&setTimeout(function(){a.parents(".sf-words-wrapper").addClass("waiting")},200),t||setTimeout(function(){SPB.animatedHeadline.hideWord(a)},2500)):setTimeout(function(){SPB.animatedHeadline.showLetter(e.next(),a,t,i)},i)},takeNext:function(e){return e.is(":last-child")?e.parent().children().eq(0):e.next()},takePrev:function(e){return e.is(":first-child")?e.parent().children().last():e.prev()},switchWord:function(e,a){e.removeClass("is-visible").addClass("is-hidden"),a.removeClass("is-hidden").addClass("is-visible")}},SPB.directoryUserListings={init:function(){jQuery(document).on("click",".cancel-listing-modal",function(){return jQuery(".spb-modal-listing").html(""),jQuery(".spb-modal-listing ").hide(),jQuery("#spb_edit_listing").hide(),!1}),jQuery(document).on("click",".save-listing-modal",function(){jQuery("#add-directory-entry").submit()}),jQuery("body").append('<div id="spb_edit_listing"></div><div class="spb-modal-listing"></div>'),jQuery(document).on("click",".edit-listing",function(){var e=jQuery(".user-listing-results").attr("data-ajax-url"),a={action:"sf_edit_directory_item",listing_id:jQuery(this).attr("data-listing-id")};return jQuery.post(e,a,function(e){jQuery("#spb_edit_listing").show().css({"padding-top":60}),jQuery(".spb-modal-listing").html(e),jQuery(".spb-modal-listing").show(),jQuery("#spb_edit_listing").html("")}),!1}),jQuery(document).on("click",".delete-listing-confirmation",function(e){e.preventDefault();var a=jQuery(".user-listing-results").attr("data-ajax-url"),t={action:"sf_delete_directory_item",listing_id:jQuery("#modal-from-dom").attr("listing-id")};jQuery.post(a,t,function(){location.reload()})}),jQuery(document).on("click",".cancel-delete-listing",function(e){e.preventDefault(),jQuery("#modal-from-dom").modal("hide")}),jQuery(document).on("click",".delete-listing",function(e){e.preventDefault();var a=jQuery(this).attr("data-listing-id");jQuery("#modal-from-dom").attr("listing-id",a),jQuery("#modal-from-dom").data("id",a).modal("show")})}},SPB.dynamicHeader={init:function(){SPB.var.body.hasClass("sticky-header-transparent")&&SPB.var.window.scroll(function(){var e=jQuery(".dynamic-header-change:in-viewport"),a=SPB.var.window.scrollTop();e.length>0&&e.each(function(){var e=jQuery(this),t=e.offset().top,i=t+e.outerHeight(),n=e.data("header-style");a<t||a>i||(""===n&&""!==SPB.var.defaultHeaderStyle&&jQuery(".header-wrap").attr("data-style",SPB.var.defaultHeaderStyle),a>t&&a<i&&jQuery(".header-wrap").attr("data-style",n))})})}},SPB.isotopeAsset={init:function(){jQuery(".spb-isotope").each(function(){var e=jQuery(this),a=e.data("layout-mode");e.isotope({resizable:!0,layoutMode:a,isOriginLeft:!SPB.var.isRTL}),setTimeout(function(){e.isotope("layout")},500)})}},SPB.faqs={init:function(){jQuery(".faq-item").on("click",function(){var e=jQuery(this);e.toggleClass("closed"),e.find(".faq-text").slideToggle(400)})}},SPB.iconBoxGrid={init:function(){jQuery(document).on("click",".spb_icon_box_grid a.box-link",function(e){var a=jQuery(this).attr("href"),t=jQuery(this).data("offset")?jQuery(this).data("offset"):0;if(!a||0!==a.indexOf("#"))return e;var i=SPB.var.offset;SPB.var.isScrolling=!0,jQuery("html, body").stop().animate({scrollTop:jQuery(a).offset().top-i+t},1e3,"easeInOutExpo",function(){SPB.var.isScrolling=!1}),e.preventDefault()})}},SPB.mlparallax={init:function(){jQuery(".spb_multilayer_parallax").each(function(){var e=jQuery(this),a=e.data("xscalar"),t=e.data("xscalar"),i=parseInt(SPB.var.window.height(),10),n=e.data("fullscreen"),s=parseInt(e.data("max-height"),10);jQuery("#wpadminbar").length>0&&(i-=jQuery("#wpadminbar").height()),s=n?i:i>s?s:i,e.imagesLoaded(function(){SPB.mlparallax.setContentLayerPos(e),e.mlparallax({scalarX:a,scalarY:t}),e.animate({opacity:1,height:s},400)})})},setContentLayerPos:function(e){e.find(".content-layer").each(function(){jQuery(this).vCenter()})}},SPB.svgIconAnimate={init:function(){jQuery(".sf-svg-icon-animate").each(function(){var e=jQuery(this),a=e.attr("id"),t=e.data("svg-src"),i=e.data("anim-type");if(e.hasClass("animation-disabled"))new Vivus(a,{duration:1,file:t,type:i,selfDestroy:!0,onReady:function(e){e.finish()}});else{new Vivus(a,{duration:200,file:t,type:i,pathTimingFunction:Vivus.EASE_IN,animTimingFunction:Vivus.EASE_OUT});setTimeout(function(){e.css("opacity",1)},50)}})}},SPB.teamMemberAjax={init:function(){jQuery(document).on("click",".team-member-ajax",function(e){if(SPB.var.isMobile||SPB.var.window.width()<1e3)return e;e.preventDefault(),SPB.var.body.addClass("sf-team-ajax-will-open"),SPB.var.body.addClass("sf-container-block sf-ajax-loading"),jQuery(".sf-container-overlay").animate({opacity:1},300);var a=jQuery(this).data("id");jQuery.post(ajaxurl,{action:"spb_team_member_ajax",post_id:a},function(e){var a=jQuery(e).filter("#postdata").html();SPB.var.body.append('<div class="sf-team-ajax-container"></div>'),jQuery(".sf-team-ajax-container").html(a),setTimeout(function(){jQuery(".sf-container-overlay").addClass("loading-done"),SPB.var.body.addClass("sf-team-ajax-open"),jQuery(".sf-container-overlay").on("click touchstart",SPB.teamMemberAjax.closeOverlay)},300)})}),jQuery(document).on("click",".team-ajax-close",function(e){e.preventDefault(),SPB.teamMemberAjax.closeOverlay()})},closeOverlay:function(){SPB.var.body.removeClass("sf-team-ajax-open"),jQuery(".sf-container-overlay").off("click touchstart").animate({opacity:0},500,function(){SPB.var.body.removeClass("sf-container-block"),SPB.var.body.removeClass("sf-team-ajax-will-open"),jQuery(".sf-team-ajax-container").remove(),jQuery(".sf-container-overlay").removeClass("loading-done")})}},SPB.tourElements={init:function(){jQuery(".spb_tour").each(function(){var e=jQuery(this),a=parseInt(e.data("interval"),0);if(console.log(a),a>0){a*=1e3;var t=setInterval(function(){var a=e.find("li.active");a.is(".tabs-left li:last-child")?e.find(".tabs-left li:first > a").trigger("click"):a.next().find("a").trigger("click")},a);e.data("interval",t),e.on("click",".tabs-left li > a",function(e){return void 0!==e.originalEvent&&clearInterval(t),e})}})}},SPB.var={},SPB.var.window=jQuery(window),SPB.var.body=jQuery("body"),SPB.var.isRTL=!!SPB.var.body.hasClass("rtl"),SPB.var.deviceAgent=navigator.userAgent.toLowerCase(),SPB.var.isMobile=SPB.var.deviceAgent.match(/(iphone|ipod|ipad|android|iemobile)/),SPB.var.isIEMobile=SPB.var.deviceAgent.match(/(iemobile)/),SPB.var.isSafari=-1!=navigator.userAgent.indexOf("Safari")&&-1==navigator.userAgent.indexOf("Chrome")&&-1==navigator.userAgent.indexOf("Android"),SPB.var.isFirefox=navigator.userAgent.indexOf("Firefox")>-1,SPB.var.isAndroid=SPB.var.deviceAgent.indexOf("android")>-1,SPB.var.defaultHeaderStyle=jQuery(".header-wrap").data("default-style"),SPB.var.isScrolling=!1,SPB.var.offset=0,SPB.var.wpadminbarheight=32,SPB.var.resizeTrigger=!1,SPB.var.pageRows=[],SPB.var.pageCols=[],SPB.onReady={init:function(){SPB.general.init(),SPB.assets.init(),jQuery(".spb_directory_user_listings_widget").length>0&&SPB.directoryUserListings.init(),jQuery(".spb_faqs_element").length>0&&SPB.faqs.init(),jQuery(".spb_icon_box_grid").length>0&&SPB.iconBoxGrid.init(),jQuery(".sf-svg-icon-animate").length>0&&SPB.svgIconAnimate.init(),SPB.var.body.hasClass("sticky-header-transparent")&&SPB.dynamicHeader.init(),jQuery(".spb-isotope").length>0&&SPB.isotopeAsset.init(),jQuery(".spb_multilayer_parallax").length>0&&SPB.mlparallax.init(),jQuery(".spb_tour").length>0&&SPB.tourElements.init()}},SPB.onLoad={init:function(){SPB.general.load(),SPB.assets.load(),jQuery(".spb-animated-headline").length>0&&SPB.animatedHeadline.init(),jQuery(".team-member-ajax").length>0&&SPB.teamMemberAjax.init()}},jQuery(document).ready(SPB.onReady.init),jQuery(window).on("load",SPB.onLoad.init)}(jQuery),function(e){var a,t,i,n=e.event,s={_:0},r=0;a=n.special.throttledresize={setup:function(){e(this).on("resize",a.handler)},teardown:function(){e(this).off("resize",a.handler)},handler:function(A,o){var l=this,d=arguments;t=!0,i||(setInterval(function(){(++r>a.threshold&&t||o)&&(A.type="throttledresize",n.dispatch.apply(l,d),t=!1,r=0),r>9&&(e(s).stop(),i=!1,r=0)},30),i=!0)},threshold:0}}(jQuery),function(e){e.extend({canVideoautoplay:function(a){var t=!1;try{if(!(!navigator.userAgent.match(/(iPhone|iPod)/g)||"playsInline"in document.createElement("video")))return a(!1);var i=e('<video src="data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAAA7RtZGF0AAACrAYF//+o3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE1MiByMTkgYmEyNDg5OSAtIEguMjY0L01QRUctNCBBVkMgY29kZWMgLSBDb3B5bGVmdCAyMDAzLTIwMTcgLSBodHRwOi8vd3d3LnZpZGVvbGFuLm9yZy94MjY0Lmh0bWwgLSBvcHRpb25zOiBjYWJhYz0xIHJlZj0zIGRlYmxvY2s9MTowOjAgYW5hbHlzZT0weDM6MHgxMTMgbWU9aGV4IHN1Ym1lPTcgcHN5PTEgcHN5X3JkPTEuMDA6MC4wMCBtaXhlZF9yZWY9MSBtZV9yYW5nZT0xNiBjaHJvbWFfbWU9MSB0cmVsbGlzPTEgOHg4ZGN0PTEgY3FtPTAgZGVhZHpvbmU9MjEsMTEgZmFzdF9wc2tpcD0xIGNocm9tYV9xcF9vZmZzZXQ9LTIgdGhyZWFkcz0zIGxvb2thaGVhZF90aHJlYWRzPTEgc2xpY2VkX3RocmVhZHM9MCBucj0wIGRlY2ltYXRlPTEgaW50ZXJsYWNlZD0wIGJsdXJheV9jb21wYXQ9MCBjb25zdHJhaW5lZF9pbnRyYT0wIGJmcmFtZXM9MyBiX3B5cmFtaWQ9MiBiX2FkYXB0PTEgYl9iaWFzPTAgZGlyZWN0PTEgd2VpZ2h0Yj0xIG9wZW5fZ29wPTAgd2VpZ2h0cD0yIGtleWludD0yNTAga2V5aW50X21pbj0yNSBzY2VuZWN1dD00MCBpbnRyYV9yZWZyZXNoPTAgcmNfbG9va2FoZWFkPTQwIHJjPWNyZiBtYnRyZWU9MSBjcmY9MjguMCBxY29tcD0wLjYwIHFwbWluPTAgcXBtYXg9NjkgcXBzdGVwPTQgaXBfcmF0aW89MS40MCBhcT0xOjEuMDAAgAAAACpliIQAJ//+8dzwKZrlxoFv6nFTjrH/8I5IvpuR7wM+8DluLAAQcGNdwkEAAAAKQZokbEJ/8yAHLAAAAAhBnkJ4jf8JeQAAAAgBnmF0Rf8KSAAAAAgBnmNqRf8KSQAAABBBmmhJqEFomUwIR//kQBXxAAAACUGehkURLG8JeQAAAAgBnqV0Rf8KSQAAAAgBnqdqRf8KSAAAAA9BmqxJqEFsmUwI/4cAU8AAAAAJQZ7KRRUsbwl5AAAACAGe6XRF/wpIAAAACAGe62pF/wpIAAAADkGa70moQWyZTAi/AAJPAAAACUGfDUUVLG8JeQAAAAgBny5qRf8KSQAAA8ptb292AAAAbG12aGQAAAAAAAAAAAAAAAAAAAPoAAACFwABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAC9HRyYWsAAABcdGtoZAAAAAMAAAAAAAAAAAAAAAEAAAAAAAACFwAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAoAAAAFoAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAAhcAAAMAAAEAAAAAAmxtZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAACzgAAAYAFXEAAAAAAAtaGRscgAAAAAAAAAAdmlkZQAAAAAAAAAAAAAAAFZpZGVvSGFuZGxlcgAAAAIXbWluZgAAABR2bWhkAAAAAQAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAAB13N0YmwAAACXc3RzZAAAAAAAAAABAAAAh2F2YzEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAoABaAEgAAABIAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY//8AAAAxYXZjQwFkAAv/4QAYZ2QAC6zZQo35IQAAAwAMAAADAs4PFCmWAQAGaOviSyLAAAAAGHN0dHMAAAAAAAAAAQAAABAAAAGAAAAAFHN0c3MAAAAAAAAAAQAAAAEAAACIY3R0cwAAAAAAAAAPAAAAAQAAAwAAAAABAAAHgAAAAAEAAAMAAAAAAQAAAAAAAAABAAABgAAAAAEAAAeAAAAAAQAAAwAAAAABAAAAAAAAAAEAAAGAAAAAAQAAB4AAAAABAAADAAAAAAEAAAAAAAAAAQAAAYAAAAABAAAGAAAAAAIAAAGAAAAAHHN0c2MAAAAAAAAAAQAAAAEAAAAQAAAAAQAAAFRzdHN6AAAAAAAAAAAAAAAQAAAC3gAAAA4AAAAMAAAADAAAAAwAAAAUAAAADQAAAAwAAAAMAAAAEwAAAA0AAAAMAAAADAAAABIAAAANAAAADAAAABRzdGNvAAAAAAAAAAEAAAAwAAAAYnVkdGEAAABabWV0YQAAAAAAAAAhaGRscgAAAAAAAAAAbWRpcmFwcGwAAAAAAAAAAAAAAAAtaWxzdAAAACWpdG9vAAAAHWRhdGEAAAABAAAAAExhdmY1Ny43Ny4xMDA=" controls playsinline muted width="20" height="20" style="position:fixed;z-index:1000;top:0;left:0"></video>');e("body").prepend(i),t=!0,i[0].play(),i[0].onplay=function(){this.playing=!0},i[0].oncanplay=function(){i[0].playing?a(!0):a(!1),i[0].pause(),i.remove()}}catch(e){}t||a(!1)}})}(jQuery),function(e){e.fn.vCenter=function(){return this.each(function(){var a=e(this).outerHeight();e(this).css("margin-bottom",-a/2)})},e.fn.vCenterTop=function(){return this.each(function(){var a=e(this).outerHeight();e(this).css("margin-top",-a/2)})}}(jQuery);
var SWIFTSLIDER=SWIFTSLIDER||{};!function(){"use strict";var e=[],t=jQuery(window),i=jQuery("body"),n=navigator.userAgent.toLowerCase(),r=(n.match(/(iphone|ipod|android|iemobile)/),n.match(/(iphone|ipod|ipad|android|iemobile)/)),s=(n.match(/(iphone|ipod|ipad)/),n.indexOf("android")>-1),a=(navigator.userAgent.search("Safari")>=0&&navigator.userAgent.search("Chrome"),-1!=navigator.userAgent.indexOf("Safari")||-1==navigator.userAgent.indexOf("Chrome")),o=null,l=0;SWIFTSLIDER.curtainAnimating=!1,SWIFTSLIDER={init:function(){jQuery(".swift-slider").each(function(e){var i=jQuery(this),n=i.attr("id"),r=i.data("fullscreen"),s=parseInt(t.height(),10),a=parseInt(i.data("max-height"),10);if(i.hasClass("no-slides"))return!1;jQuery("#wpadminbar").length>0&&(s-=jQuery("#wpadminbar").height());var o=s>a||!r&&a?a:s;jQuery("#top-bar").length>0&&(o-=jQuery("#top-bar").height()),i.css("height",o),SWIFTSLIDER.setupSlider(e,n),SWIFTSLIDER.prepareFirstSlide(e,jQuery("#"+n))}),t.on("throttledresize",function(){setTimeout(function(){SWIFTSLIDER.resizeSliders()},100)})},setupSlider:function(t,i){var n="#"+i,r=jQuery(n),s=r.data("slider-type"),a=parseInt(r.data("autoplay"),10),o=r.data("transition"),l=r.data("loop"),d=!1,p=!0,c=!0;1===r.data("slide-count")&&(p=!1,c=!1,d=!0),"curtain"==s?e[t]=new Swiper(n,{loop:!1,progress:!0,mode:"vertical",transition:"slide",speed:1e3,autoplay:a,keyboardControl:!0,simulateTouch:!1,mousewheelControl:!0,mousewheelControlForceToAxis:!0,noSwiping:d,onFirstInit:SWIFTSLIDER.afterSliderCurtainInit,onSlideChangeStart:SWIFTSLIDER.slideTransitionStart,onSlideChangeEnd:SWIFTSLIDER.slideTransitionEnd,onTouchStart:function(e){for(var t=0;t<e.slides.length;t++)e.setTransition(e.slides[t],0)},onSetWrapperTransition:function(e,t){for(var i=0;i<e.slides.length;i++)e.setTransition(e.slides[i],t)}}):"slider"==s&&"fade"==o?e[t]=new Swiper(n,{loop:l,progress:!0,touchRatio:.7,speed:1200,transition:"fade",autoplay:a,grabCursor:c,paginationClickable:!0,keyboardControl:!0,noSwiping:d,simulateTouch:p,onFirstInit:SWIFTSLIDER.afterSliderInit,onSlideChangeStart:SWIFTSLIDER.slideTransitionStart,onSlideChangeEnd:SWIFTSLIDER.slideTransitionEnd,onProgressChange:function(e){for(var t=0;t<e.slides.length;t++){var i=e.slides[t],n=i.progress*e.width;e.setTransform(i,"translate3d("+n+"px,0,0)")}},onTouchStart:function(e){for(var t=0;t<e.slides.length;t++)e.setTransition(e.slides[t],0)},onSetWrapperTransition:function(e,t){for(var i=0;i<e.slides.length;i++)e.setTransition(e.slides[i],t)}}):(e[t]=new Swiper(n,{loop:l,touchRatio:.7,mode:"horizontal",transition:"slide",speed:600,autoplay:a,grabCursor:c,paginationClickable:!0,keyboardControl:!0,noSwiping:d,simulateTouch:p,onFirstInit:SWIFTSLIDER.afterSliderInit,onSlideChangeStart:SWIFTSLIDER.slideTransitionStart,onSlideChangeEnd:SWIFTSLIDER.slideTransitionEnd}),d&&r.addClass("no-swiping")),e[t].resizeFix()},prepareFirstSlide:function(t,i){var n=600;if(i.find(".swift-slider-pagination, .swift-slider-prev, .swift-slider-next, .swift-slider-continue").removeClass("dark").removeClass("light").addClass(i.find(".swiper-slide-active").data("style")),i.find(".swiper-slide-active video").length>0)jQuery.canVideoautoplay(function(r){if(r||s){var a=i.find(".swiper-slide-active video").first(),o=a.get(0);o.load(),o.addEventListener("loadeddata",function(){SWIFTSLIDER.sliderLoaded(t,i),SWIFTSLIDER.setSliderContent(i),SWIFTSLIDER.showControls(i),SWIFTSLIDER.slideTransitionEnd(e[t],n)}),o.onended=function(e){a.attr("loop")||i.find(".swiper-slide-active video").addClass("finished")}}else i.find(".swiper-slide-active video").remove(),SWIFTSLIDER.sliderLoaded(t,i),SWIFTSLIDER.setSliderContent(i),SWIFTSLIDER.showControls(i),SWIFTSLIDER.slideTransitionEnd(e[t],n)});else{var r=i.find(".swiper-slide-active").data("slide-img");if(r&&r.length>0){var a=new Image;jQuery(a).load(function(){SWIFTSLIDER.sliderLoaded(t,i),SWIFTSLIDER.setSliderContent(i),SWIFTSLIDER.showControls(i),SWIFTSLIDER.slideTransitionEnd(e[t],n)}),a.src=r}else SWIFTSLIDER.sliderLoaded(t,i),SWIFTSLIDER.setSliderContent(i),SWIFTSLIDER.showControls(i),SWIFTSLIDER.slideTransitionEnd(e[t],n)}},afterSliderInit:function(e){SWIFTSLIDER.resizeSliders(),t.scroll(function(){jQuery(".swift-slider").each(function(){var e=jQuery(this),t=e.find(".swiper-slide-active").find("video");t.length>0&&(e.is(":in-viewport")&&!t.hasClass("finished")?t.parents(".swiper-slide-active").length>0&&t.get(0).play():t.each(function(){jQuery(this).get(0).pause()}))})})},afterSliderCurtainInit:function(e){var i=e,n=jQuery(i.container),r=n.find(".swift-scroll-indicator");SWIFTSLIDER.resizeSliders(),setTimeout(function(){SWIFTSLIDER.scrollIndicatorAnimate(r)},1e3),t.scrollTop()<10?SWIFTSLIDER.curtainEnter(i,n):jQuery("body,html").animate({scrollTop:n.scrollTop()},200,"easeOutCubic",function(){SWIFTSLIDER.curtainEnter(i,n)}),n.on("mouseenter",function(){SWIFTSLIDER.curtainEnter(i,n)}),n.on("mouseleave",function(){})},scrollIndicatorAnimate:function(e){var t=e.find("span");if(e.hasClass("indicator-hidden"))return!1;t.each(function(i,n){(n=jQuery(n)).delay(100*i).animate({opacity:1},100,function(){n.animate({opacity:0},500,function(){i===t.length-1&&setTimeout(function(){SWIFTSLIDER.scrollIndicatorAnimate(e)},2e3)})})})},curtainEnter:function(e,i){var n=!1;"undefined"!=typeof SWIFT&&(n=SWIFT.isScrolling),t.scrollTop()>0&&!n&&jQuery("body,html").animate({scrollTop:i.scrollTop()},800,"easeOutCubic",function(){SWIFTSLIDER.curtainAnimating=!1}),i.data("continue")||(SWIFTSLIDER.curtainAnimating=!1)},sliderLoaded:function(t,n){n.find("#swift-slider-loader").fadeOut(400),n.find(".swiper-wrapper").animate({opacity:1},400),n.find(".video-overlay").animate({opacity:1},400),!(n.parent().parent("#container").length>0||n.parent().parent("body").length>0||0===n.offset().top)||i.hasClass("header-standard")||i.hasClass("layout-boxed")||"curtain"==n.data("slider-type")||r||i.hasClass("ss-parallax-disabled")||i.hasClass("post-type-archive-product")||(n.addClass("swift-slider-parallax"),o=n,SWIFTSLIDER.parallax()),n.find(".swift-slider-prev").on("click",function(n){n.preventDefault(),"rtl"==i.css("direction").toLowerCase()?e[t].swipeNext():e[t].swipePrev()}),n.find(".swift-slider-next").on("click",function(n){n.preventDefault(),"rtl"==i.css("direction").toLowerCase()?e[t].swipePrev():e[t].swipeNext()}),n.find(".swift-slider-pagination").on("click","> div",function(i){e[t].swipeTo(jQuery(this).index()),n.find(".swift-slider-pagination .dot").removeClass("active"),jQuery(this).addClass("active")}),n.find(".swift-slider-continue").on("click",function(e){e.preventDefault(),SWIFTSLIDER.curtainAdvance(n)})},curtainAdvance:function(e){if(!e.data("continue"))return!1;var t=i.hasClass("sticky-header-enabled")&&!i.hasClass("header-below-slider")&&jQuery(".header-wrap").is(":visible")?jQuery(".sticky-header").outerHeight():0;i.hasClass("mh-sticky")&&jQuery("#mobile-header").is(":visible")&&(t=jQuery("#mobile-header").outerHeight()),i.hasClass("sh-dynamic")&&!jQuery(".header-wrap").hasClass("full-header-stick")&&(t-=20),jQuery(".sticky-top-bar").length>0&&jQuery(".sticky-top-bar").is(":visible")&&(t+=jQuery(".sticky-top-bar").outerHeight());var n=e.offset().top+e.height()-t;jQuery("#wpadminbar").length>0&&(n-=jQuery("#wpadminbar").height()),jQuery("body,html").stop(!0,!1).animate({scrollTop:n},800),r||i.css("overflow","")},showControls:function(e){"curtain"!=e.data("slider-type")?(e.data("loop")&&e.find(".swift-slider-prev").fadeIn(400),e.find(".swift-slider-next").fadeIn(400),e.find(".swift-slider-pagination .dot").first().addClass("active"),e.find(".swift-slider-pagination").fadeIn(600),e.find(".swift-slider-continue").removeClass("continue-hidden")):"curtain"===e.data("slider-type")&&(e.find(".swift-slider-pagination .dot").first().addClass("active"),e.find(".swift-slider-pagination").css("margin-top",-e.find(".swift-slider-pagination").height()/2),e.find(".swift-slider-pagination").fadeIn(600),e.find(".swiper-slide").length<2&&e.find(".swift-slider-continue").removeClass("continue-hidden"))},parallax:function(){l=o.height(),t.smartresize(function(){l=o.height()}),window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,1e3/60)},a&&window.addEventListener("scroll",function(){requestAnimationFrame(SWIFTSLIDER.parallaxScroll)},!1)},parallaxScroll:function(e){var n=t.scrollTop();t.width()>768&&(o.stop(!0,!0).transition({y:-.2*n},0),o.find(".caption-wrap").stop(!0,!0).transition({y:-.15*n,opacity:1-n/(l-150)},0),o.find(".swift-slider-pagination").stop(!0,!0).transition({opacity:1-n/(l-150)},0));var r=o.parent();t.height();n>=r.offset().top+r.height()-(i.hasClass("sticky-header-enabled")&&!i.hasClass("header-below-slider")&&jQuery(".header-wrap").is(":visible")?jQuery(".sticky-header").outerHeight():0)?r.addClass("not-visible"):r.removeClass("not-visible")},resizeSliders:function(e){var i=parseInt(t.height(),10);if(jQuery("#wpadminbar").length>0&&(i-=jQuery("#wpadminbar").height()),e){var n=e,r=n.data("fullscreen"),s=parseInt(n.data("max-height"),10),a=n.find(".video-wrap"),o=i>s&&!r?s:i,l=n.width();SWIFTSLIDER.setSliderSize(n,r,l,o),a.length>0&&SWIFTSLIDER.setSlideVideoSize(a,l,o)}else jQuery(".swift-slider").each(function(){var e=jQuery(this),t=e.data("fullscreen"),n=parseInt(e.data("max-height"),10),r=e.find(".video-wrap"),s=i>n&&!t?n:i,a=e.width();SWIFTSLIDER.setSliderSize(e,t,a,s),r.length>0&&SWIFTSLIDER.setSlideVideoSize(r,a,s)})},setSliderSize:function(e,t,n,r){i.hasClass("vertical-header")||i.hasClass("header-naked-light")||i.hasClass("header-naked-dark")||i.hasClass("header-below-slider")||i.hasClass("header-standard-overlay")||!t||!jQuery(".header-wrap").is(":visible")||(r-=jQuery(".header-wrap").height()),i.hasClass("vertical-header")&&jQuery("#wpadminbar").length,jQuery("#mobile-top-text").is(":visible")&&(r-=jQuery("#mobile-top-text").height()),jQuery("#mobile-header").is(":visible")&&!i.hasClass("header-below-slider")&&(r=r-jQuery("#mobile-header").height()-20),jQuery("#top-bar").length>0&&(r-=jQuery("#top-bar").height()),jQuery("#sf-header-banner").length>0&&(r-=jQuery("#sf-header-banner").height()),e.css("height",r),e.parents(".swift-slider-outer").css("height",r),e.find(".swiper-container, .swiper-slide").css("height",r),e.find(".swiper-container").css("width",n);var s=0;e.find(".caption-content").each(function(){var e=jQuery(this),t=jQuery(this).height();t>s&&(s=t),e.css("margin-top",-t/2)}),s>r&&(e.css("height",s+60),e.parents(".swift-slider-outer").css("height",s+60),e.find(".swiper-container, .swiper-slide").css("height",s+60))},setSlideVideoSize:function(e,t,i){var n=e.find(".video"),r=parseInt(n.data("width"),10),s=parseInt(n.data("height"),10);0===r&&(r=n[0].videoWidth),0===s&&(s=n[0].videoHeight),0===r&&(r=1920),0===s&&(s=1080),n.css("height",i).css("width",t),e.width(t).height(i);var a=t/r,o=i/s,l=a>o?a:o,d=r/s*(i+20);l*r<d&&(l=d/r),n.width(Math.ceil(l*r+2)),n.height(Math.ceil(l*s+2)),n.css("margin-top",-(n.height()-e.height())/2),n.css("margin-left",-(n.width()-e.width())/2)},slideTransitionStart:function(e){var n=jQuery(e.container),r=jQuery(e.activeSlide()),s=e.activeIndex,a=r.data("slide-id")?parseInt(r.data("slide-id"),10):1,o=n.find(".swift-slider-pagination").find(".dot").length,l=n.data("continue");if(n.is(":in-viewport")&&(i.hasClass("header-naked-light")||i.hasClass("header-naked-dark"))&&t.scrollTop()<1){var d=r.data("header-style");jQuery(".header-wrap").attr("data-style",d)}"curtain"===n.data("slider-type")?s+=1:n.data("loop")?0===s?s=o:s>o&&(s-=o):s+=1,n.find(".swift-slider-pagination .dot").removeClass("active"),jQuery.isNumeric(s)&&n.find(".swift-slider-pagination .dot:nth-child("+s+")").addClass("active"),a>1?n.find(".swift-scroll-indicator").fadeOut(300):n.find(".swift-scroll-indicator").fadeIn(300),a===o&&l?setTimeout(function(){n.find(".swift-slider-continue").removeClass("continue-hidden")},600):setTimeout(function(){},300),n.find(".swift-slider-pagination, .swift-slider-prev, .swift-slider-next, .swift-slider-continue").removeClass("dark").removeClass("light").addClass(r.data("style")),1!==s||n.data("loop")?s!==n.find(".swiper-slide").length||n.data("loop")?(n.find(".swift-slider-prev").css("display","block"),n.find(".swift-slider-next").css("display","block")):(n.find(".swift-slider-prev").css("display","block"),n.find(".swift-slider-next").css("display","none")):(n.find(".swift-slider-prev").css("display","none"),n.find(".swift-slider-next").css("display","block"))},slideTransitionEnd:function(e,n){var r=jQuery(e.container),a=jQuery(e.activeSlide()),o=(e.activeIndex>=0&&e.activeIndex,a.data("slide-id")?parseInt(a.data("slide-id"),10):1),l=n||0,d=r.find(".swift-slider-pagination").find(".dot").length,p=jQuery(".swift-slider-prev").find("h4"),c=jQuery(".swift-slider-next").find("h4"),u=1===o?r.find('.swiper-slide[data-slide-id="'+d+'"]').data("slide-title"):r.find('.swiper-slide[data-slide-id="'+(o-1)+'"]').data("slide-title"),A=o===d?r.find('.swiper-slide[data-slide-id="1"]').data("slide-title"):r.find('.swiper-slide[data-slide-id="'+(o+1)+'"]').data("slide-title");SWIFTSLIDER.resizeSliders(r),p.text(u),c.text(A),r.find(".swiper-slide").each(function(e){var n=jQuery(this),a=n.data("slide-id"),d=n.find(".caption-content"),p=n.find(".video-wrap > video").first(),c=n.data("header-style"),u=!1;p.length>0&&(u=!0),u&&jQuery.canVideoautoplay(function(e){e||s||(p.remove(),u=!1)}),u&&(p.get(0).pause(),0!==p.get(0).currentTime&&(p.get(0).currentTime=0)),a!==o&&d.length>0&&d.css({"margin-top":"","padding-top":"","padding-bottom":"",opacity:"0"}).removeClass("caption-active"),a===o&&(r.is(":in-viewport")&&(i.hasClass("header-naked-light")||i.hasClass("header-naked-dark"))&&t.scrollTop()<1&&jQuery(".header-wrap").attr("data-style",c),setTimeout(function(){if(u&&(r.is(":in-viewport")&&!p.hasClass("finished")?p.parents(".swiper-slide-active").length>0&&p.get(0).play():p.get(0).pause()),d.length>0){var e=d.height();d.addClass("caption-active"),d.css("margin-top",-e/2).stop().animate({opacity:1,"padding-top":0,"padding-bottom":0},800,"easeOutQuart")}},l))})},setSliderContent:function(e){e.find(".swiper-slide").each(function(){var e=jQuery(this).find(".caption-content"),t=e.height();e.css("margin-top",-t/2)})}};var d=function(){jQuery(".swift-slider").length>0&&SWIFTSLIDER.init()};jQuery(document).ready(d)}(jQuery);var Swiper=function(e,t){"use strict";if(!document.body.outerHTML&&document.body.__defineGetter__&&HTMLElement){var i=HTMLElement.prototype;i.__defineGetter__&&i.__defineGetter__("outerHTML",function(){return(new XMLSerializer).serializeToString(this)})}if(window.getComputedStyle||(window.getComputedStyle=function(e,t){return this.el=e,this.getPropertyValue=function(t){var i=/(\-([a-z]){1})/g;return"float"===t&&(t="styleFloat"),i.test(t)&&(t=t.replace(i,function(){return arguments[2].toUpperCase()})),e.currentStyle[t]?e.currentStyle[t]:null},this}),Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){for(var i=t||0,n=this.length;i<n;i++)if(this[i]===e)return i;return-1}),(document.querySelectorAll||window.jQuery)&&void 0!==e&&(e.nodeType||0!==k(e).length)){var n,r,s,a,o,l,d=this;d.touches={start:0,startX:0,startY:0,current:0,currentX:0,currentY:0,diff:0,abs:0},d.positions={start:0,abs:0,diff:0,current:0},d.times={start:0,end:0},d.id=(new Date).getTime(),d.container=e.nodeType?e:k(e)[0],d.isTouched=!1,d.isMoved=!1,d.activeIndex=0,d.centerIndex=0,d.activeLoaderIndex=0,d.activeLoopIndex=0,d.previousIndex=null,d.velocity=0,d.snapGrid=[],d.slidesGrid=[],d.imagesToLoad=[],d.imagesLoaded=0,d.wrapperLeft=0,d.wrapperRight=0,d.wrapperTop=0,d.wrapperBottom=0,d.isAndroid=navigator.userAgent.toLowerCase().indexOf("android")>=0;var p={eventTarget:"wrapper",mode:"horizontal",touchRatio:1,speed:300,freeMode:!1,freeModeFluid:!1,momentumRatio:1,momentumBounce:!0,momentumBounceRatio:1,slidesPerView:1,slidesPerGroup:1,slidesPerViewFit:!0,simulateTouch:!0,followFinger:!0,shortSwipes:!0,longSwipesRatio:.5,moveStartThreshold:!1,onlyExternal:!1,createPagination:!0,pagination:!1,paginationElement:"span",paginationClickable:!1,paginationAsRange:!0,resistance:!0,scrollContainer:!1,preventLinks:!0,preventLinksPropagation:!1,noSwiping:!1,noSwipingClass:"swiper-no-swiping",initialSlide:0,keyboardControl:!1,mousewheelControl:!1,mousewheelControlForceToAxis:!1,useCSS3Transforms:!0,autoplay:!1,autoplayDisableOnInteraction:!0,autoplayStopOnLast:!1,loop:!1,loopAdditionalSlides:0,roundLengths:!1,calculateHeight:!1,cssWidthAndHeight:!1,updateOnImagesReady:!0,releaseFormElements:!0,watchActiveIndex:!1,visibilityFullFit:!1,offsetPxBefore:0,offsetPxAfter:0,offsetSlidesBefore:0,offsetSlidesAfter:0,centeredSlides:!1,queueStartCallbacks:!1,queueEndCallbacks:!1,autoResize:!0,resizeReInit:!1,DOMAnimation:!0,loader:{slides:[],slidesHTMLType:"inner",surroundGroups:1,logic:"reload",loadAllSlides:!1},swipeToPrev:!0,swipeToNext:!0,slideElement:"div",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",wrapperClass:"swiper-wrapper",paginationElementClass:"swiper-pagination-switch",paginationActiveClass:"swiper-active-switch",paginationVisibleClass:"swiper-visible-switch"};for(var c in t=t||{},p)if(c in t&&"object"==typeof t[c])for(var u in p[c])u in t[c]||(t[c][u]=p[c][u]);else c in t||(t[c]=p[c]);d.params=t,t.scrollContainer&&(t.freeMode=!0,t.freeModeFluid=!0),t.loop&&(t.resistance="100%");var A="horizontal"===t.mode,h=["mousedown","mousemove","mouseup"];d.browser.ie10&&(h=["MSPointerDown","MSPointerMove","MSPointerUp"]),d.browser.ie11&&(h=["pointerdown","pointermove","pointerup"]),d.touchEvents={touchStart:d.support.touch||!t.simulateTouch?"touchstart":h[0],touchMove:d.support.touch||!t.simulateTouch?"touchmove":h[1],touchEnd:d.support.touch||!t.simulateTouch?"touchend":h[2]};for(var f=d.container.childNodes.length-1;f>=0;f--)if(d.container.childNodes[f].className)for(var g=d.container.childNodes[f].className.split(/\s+/),w=0;w<g.length;w++)g[w]===t.wrapperClass&&(n=d.container.childNodes[f]);d.wrapper=n,d._extendSwiperSlide=function(e){return e.append=function(){return t.loop?e.insertAfter(d.slides.length-d.loopedSlides):(d.wrapper.appendChild(e),d.reInit()),e},e.prepend=function(){return t.loop?(d.wrapper.insertBefore(e,d.slides[d.loopedSlides]),d.removeLoopedSlides(),d.calcSlides(),d.createLoop()):d.wrapper.insertBefore(e,d.wrapper.firstChild),d.reInit(),e},e.insertAfter=function(i){return void 0!==i&&(t.loop?((n=d.slides[i+1+d.loopedSlides])?d.wrapper.insertBefore(e,n):d.wrapper.appendChild(e),d.removeLoopedSlides(),d.calcSlides(),d.createLoop()):(n=d.slides[i+1],d.wrapper.insertBefore(e,n)),d.reInit(),e);var n},e.clone=function(){return d._extendSwiperSlide(e.cloneNode(!0))},e.remove=function(){d.wrapper.removeChild(e),d.reInit()},e.html=function(t){return void 0===t?e.innerHTML:(e.innerHTML=t,e)},e.index=function(){for(var t,i=d.slides.length-1;i>=0;i--)e===d.slides[i]&&(t=i);return t},e.isActive=function(){return e.index()===d.activeIndex},e.swiperSlideDataStorage||(e.swiperSlideDataStorage={}),e.getData=function(t){return e.swiperSlideDataStorage[t]},e.setData=function(t,i){return e.swiperSlideDataStorage[t]=i,e},e.data=function(t,i){return void 0===i?e.getAttribute("data-"+t):(e.setAttribute("data-"+t,i),e)},e.getWidth=function(t,i){return d.h.getWidth(e,t,i)},e.getHeight=function(t,i){return d.h.getHeight(e,t,i)},e.getOffset=function(){return d.h.getOffset(e)},e},d.calcSlides=function(e){var i=!!d.slides&&d.slides.length;d.slides=[],d.displaySlides=[];for(var n=0;n<d.wrapper.childNodes.length;n++)if(d.wrapper.childNodes[n].className)for(var r=d.wrapper.childNodes[n].className.split(/\s+/),s=0;s<r.length;s++)r[s]===t.slideClass&&d.slides.push(d.wrapper.childNodes[n]);for(n=d.slides.length-1;n>=0;n--)d._extendSwiperSlide(d.slides[n]);!1!==i&&(i!==d.slides.length||e)&&(R(),F(),d.updateActiveSlide(),d.params.pagination&&d.createPagination(),d.callPlugins("numberOfSlidesChanged"))},d.createSlide=function(e,i,n){i=i||d.params.slideClass,n=n||t.slideElement;var r=document.createElement(n);return r.innerHTML=e||"",r.className=i,d._extendSwiperSlide(r)},d.appendSlide=function(e,t,i){if(e)return e.nodeType?d._extendSwiperSlide(e).append():d.createSlide(e,t,i).append()},d.prependSlide=function(e,t,i){if(e)return e.nodeType?d._extendSwiperSlide(e).prepend():d.createSlide(e,t,i).prepend()},d.insertSlideAfter=function(e,t,i,n){return void 0!==e&&(t.nodeType?d._extendSwiperSlide(t).insertAfter(e):d.createSlide(t,i,n).insertAfter(e))},d.removeSlide=function(e){if(d.slides[e]){if(t.loop){if(!d.slides[e+d.loopedSlides])return!1;d.slides[e+d.loopedSlides].remove(),d.removeLoopedSlides(),d.calcSlides(),d.createLoop()}else d.slides[e].remove();return!0}return!1},d.removeLastSlide=function(){return d.slides.length>0&&(t.loop?(d.slides[d.slides.length-1-d.loopedSlides].remove(),d.removeLoopedSlides(),d.calcSlides(),d.createLoop()):d.slides[d.slides.length-1].remove(),!0)},d.removeAllSlides=function(){for(var e=d.slides.length,t=d.slides.length-1;t>=0;t--)d.slides[t].remove(),t===e-1&&d.setWrapperTranslate(0)},d.getSlide=function(e){return d.slides[e]},d.getLastSlide=function(){return d.slides[d.slides.length-1]},d.getFirstSlide=function(){return d.slides[0]},d.activeSlide=function(){return d.slides[d.activeIndex]},d.fireCallback=function(){var e=arguments[0];if("[object Array]"===Object.prototype.toString.call(e))for(var i=0;i<e.length;i++)"function"==typeof e[i]&&e[i](arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]);else"[object String]"===Object.prototype.toString.call(e)?t["on"+e]&&d.fireCallback(t["on"+e],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]):e(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5])},d.addCallback=function(e,t){var i,n;return this.params["on"+e]?(n=this.params["on"+e],"[object Array]"===Object.prototype.toString.apply(n)?this.params["on"+e].push(t):"function"==typeof this.params["on"+e]?(i=this.params["on"+e],this.params["on"+e]=[],this.params["on"+e].push(i),this.params["on"+e].push(t)):void 0):(this.params["on"+e]=[],this.params["on"+e].push(t))},d.removeCallbacks=function(e){d.params["on"+e]&&(d.params["on"+e]=null)};var v=[];for(var m in d.plugins)if(t[m]){var S=d.plugins[m](d,t[m]);S&&v.push(S)}d.callPlugins=function(e,t){t||(t={});for(var i=0;i<v.length;i++)e in v[i]&&v[i][e](t)},!d.browser.ie10&&!d.browser.ie11||t.onlyExternal||d.wrapper.classList.add("swiper-wp8-"+(A?"horizontal":"vertical")),t.freeMode&&(d.container.className+=" swiper-free-mode"),d.initialized=!1,d.init=function(e,i){var n=d.h.getWidth(d.container,!1,t.roundLengths),a=d.h.getHeight(d.container,!1,t.roundLengths);if(n!==d.width||a!==d.height||e){var o,p,c,u,h,f,g;d.width=n,d.height=a,l=A?n:a;var w=d.wrapper;if(e&&d.calcSlides(i),"auto"===t.slidesPerView){var v=0,m=0;t.slidesOffset>0&&(w.style.paddingLeft="",w.style.paddingRight="",w.style.paddingTop="",w.style.paddingBottom=""),w.style.width="",w.style.height="",t.offsetPxBefore>0&&(A?d.wrapperLeft=t.offsetPxBefore:d.wrapperTop=t.offsetPxBefore),t.offsetPxAfter>0&&(A?d.wrapperRight=t.offsetPxAfter:d.wrapperBottom=t.offsetPxAfter),t.centeredSlides&&(A?(d.wrapperLeft=(l-this.slides[0].getWidth(!0,t.roundLengths))/2,d.wrapperRight=(l-d.slides[d.slides.length-1].getWidth(!0,t.roundLengths))/2):(d.wrapperTop=(l-d.slides[0].getHeight(!0,t.roundLengths))/2,d.wrapperBottom=(l-d.slides[d.slides.length-1].getHeight(!0,t.roundLengths))/2)),A?(d.wrapperLeft>=0&&(w.style.paddingLeft=d.wrapperLeft+"px"),d.wrapperRight>=0&&(w.style.paddingRight=d.wrapperRight+"px")):(d.wrapperTop>=0&&(w.style.paddingTop=d.wrapperTop+"px"),d.wrapperBottom>=0&&(w.style.paddingBottom=d.wrapperBottom+"px")),f=0;var S=0;for(d.snapGrid=[],d.slidesGrid=[],c=0,g=0;g<d.slides.length;g++){o=d.slides[g].getWidth(!0,t.roundLengths),p=d.slides[g].getHeight(!0,t.roundLengths),t.calculateHeight&&(c=Math.max(c,p));var y=A?o:p;if(t.centeredSlides){var T=g===d.slides.length-1?0:d.slides[g+1].getWidth(!0,t.roundLengths),C=g===d.slides.length-1?0:d.slides[g+1].getHeight(!0,t.roundLengths),b=A?T:C;if(y>l){if(t.slidesPerViewFit)d.snapGrid.push(f+d.wrapperLeft),d.snapGrid.push(f+y-l+d.wrapperLeft);else for(var x=0;x<=Math.floor(y/(l+d.wrapperLeft));x++)0===x?d.snapGrid.push(f+d.wrapperLeft):d.snapGrid.push(f+d.wrapperLeft+l*x);d.slidesGrid.push(f+d.wrapperLeft)}else d.snapGrid.push(S),d.slidesGrid.push(S);S+=y/2+b/2}else{if(y>l)if(t.slidesPerViewFit)d.snapGrid.push(f),d.snapGrid.push(f+y-l);else if(0!==l)for(var E=0;E<=Math.floor(y/l);E++)d.snapGrid.push(f+l*E);else d.snapGrid.push(f);else d.snapGrid.push(f);d.slidesGrid.push(f)}f+=y,v+=o,m+=p}t.calculateHeight&&(d.height=c),A?(s=v+d.wrapperRight+d.wrapperLeft,t.cssWidthAndHeight&&"height"!==t.cssWidthAndHeight||(w.style.width=v+"px"),t.cssWidthAndHeight&&"width"!==t.cssWidthAndHeight||(w.style.height=d.height+"px")):(t.cssWidthAndHeight&&"height"!==t.cssWidthAndHeight||(w.style.width=d.width+"px"),t.cssWidthAndHeight&&"width"!==t.cssWidthAndHeight||(w.style.height=m+"px"),s=m+d.wrapperTop+d.wrapperBottom)}else if(t.scrollContainer)w.style.width="",w.style.height="",u=d.slides[0].getWidth(!0,t.roundLengths),h=d.slides[0].getHeight(!0,t.roundLengths),s=A?u:h,w.style.width=u+"px",w.style.height=h+"px",r=A?u:h;else{if(t.calculateHeight){for(c=0,h=0,A||(d.container.style.height=""),w.style.height="",g=0;g<d.slides.length;g++)d.slides[g].style.height="",c=Math.max(d.slides[g].getHeight(!0),c),A||(h+=d.slides[g].getHeight(!0));p=c,d.height=p,A?h=p:(l=p,d.container.style.height=l+"px")}else p=A?d.height:d.height/t.slidesPerView,t.roundLengths&&(p=Math.ceil(p)),h=A?d.height:d.slides.length*p;for(o=A?d.width/t.slidesPerView:d.width,t.roundLengths&&(o=Math.ceil(o)),u=A?d.slides.length*o:d.width,r=A?o:p,t.offsetSlidesBefore>0&&(A?d.wrapperLeft=r*t.offsetSlidesBefore:d.wrapperTop=r*t.offsetSlidesBefore),t.offsetSlidesAfter>0&&(A?d.wrapperRight=r*t.offsetSlidesAfter:d.wrapperBottom=r*t.offsetSlidesAfter),t.offsetPxBefore>0&&(A?d.wrapperLeft=t.offsetPxBefore:d.wrapperTop=t.offsetPxBefore),t.offsetPxAfter>0&&(A?d.wrapperRight=t.offsetPxAfter:d.wrapperBottom=t.offsetPxAfter),t.centeredSlides&&(A?(d.wrapperLeft=(l-r)/2,d.wrapperRight=(l-r)/2):(d.wrapperTop=(l-r)/2,d.wrapperBottom=(l-r)/2)),A?(d.wrapperLeft>0&&(w.style.paddingLeft=d.wrapperLeft+"px"),d.wrapperRight>0&&(w.style.paddingRight=d.wrapperRight+"px")):(d.wrapperTop>0&&(w.style.paddingTop=d.wrapperTop+"px"),d.wrapperBottom>0&&(w.style.paddingBottom=d.wrapperBottom+"px")),s=A?u+d.wrapperRight+d.wrapperLeft:h+d.wrapperTop+d.wrapperBottom,parseFloat(u)>0&&(!t.cssWidthAndHeight||"height"===t.cssWidthAndHeight)&&(w.style.width=u+"px"),parseFloat(h)>0&&(!t.cssWidthAndHeight||"width"===t.cssWidthAndHeight)&&(w.style.height=h+"px"),f=0,d.snapGrid=[],d.slidesGrid=[],g=0;g<d.slides.length;g++)d.snapGrid.push(f),d.slidesGrid.push(f),f+=r,parseFloat(o)>0&&(!t.cssWidthAndHeight||"height"===t.cssWidthAndHeight)&&(d.slides[g].style.width=o+"px"),parseFloat(p)>0&&(!t.cssWidthAndHeight||"width"===t.cssWidthAndHeight)&&(d.slides[g].style.height=p+"px")}d.initialized?(d.callPlugins("onInit"),t.onInit&&d.fireCallback(t.onInit,d)):(d.callPlugins("onFirstInit"),t.onFirstInit&&d.fireCallback(t.onFirstInit,d)),d.initialized=!0}},d.reInit=function(e){d.init(!0,e)},d.resizeFix=function(e){d.callPlugins("beforeResizeFix"),setTimeout(function(){d.init(t.resizeReInit||e),t.freeMode?d.getWrapperTranslate()<-W()&&(d.setWrapperTransition(0),d.setWrapperTranslate(-W())):(d.swipeTo(t.loop?d.activeLoopIndex:d.activeIndex,0,!1),t.autoplay&&(d.support.transitions&&void 0!==E?void 0!==E&&(clearTimeout(E),E=void 0,d.startAutoplay()):void 0!==I&&(clearInterval(I),I=void 0,d.startAutoplay()))),d.callPlugins("afterResizeFix")},100)},d.destroy=function(e){var i=d.h.removeEventListener,n="wrapper"===t.eventTarget?d.wrapper:d.container;if(d.browser.ie10||d.browser.ie11?(i(n,d.touchEvents.touchStart,z),i(document,d.touchEvents.touchMove,N),i(document,d.touchEvents.touchEnd,V)):(d.support.touch&&(i(n,"touchstart",z),i(n,"touchmove",N),i(n,"touchend",V)),t.simulateTouch&&(i(n,"mousedown",z),i(document,"mousemove",N),i(document,"mouseup",V))),t.autoResize&&i(window,"resize",d.resizeFix),R(),t.paginationClickable&&X(),t.mousewheelControl&&d._wheelEvent&&i(d.container,d._wheelEvent,D),t.keyboardControl&&i(document,"keydown",P),t.autoplay&&d.stopAutoplay(),e){d.wrapper.removeAttribute("style");for(var r=0;r<d.slides.length;r++)d.slides[r].removeAttribute("style")}d.callPlugins("onDestroy"),window.jQuery&&window.jQuery(d.container).data("swiper")&&window.jQuery(d.container).removeData("swiper"),window.Zepto&&window.Zepto(d.container).data("swiper")&&window.Zepto(d.container).removeData("swiper"),d=null},d.disableKeyboardControl=function(){t.keyboardControl=!1,d.h.removeEventListener(document,"keydown",P)},d.enableKeyboardControl=function(){t.keyboardControl=!0,d.h.addEventListener(document,"keydown",P)};var y=(new Date).getTime();if(d.disableMousewheelControl=function(){return!!d._wheelEvent&&(t.mousewheelControl=!1,d.h.removeEventListener(d.container,d._wheelEvent,D),!0)},d.enableMousewheelControl=function(){return!!d._wheelEvent&&(t.mousewheelControl=!0,d.h.addEventListener(d.container,d._wheelEvent,D),!0)},t.grabCursor){var T=d.container.style;T.cursor="move",T.cursor="grab",T.cursor="-moz-grab",T.cursor="-webkit-grab"}d.allowSlideClick=!0,d.allowLinks=!0;var C,b,x,E,I,L=!1,M=!0;d.swipeNext=function(e,i){void 0===e&&(e=!0),!i&&t.loop&&d.fixLoop(),!i&&t.autoplay&&d.stopAutoplay(!0),d.callPlugins("onSwipeNext");var n=d.getWrapperTranslate().toFixed(2),s=n;if("auto"===t.slidesPerView){for(var a=0;a<d.snapGrid.length;a++)if(-n>=d.snapGrid[a].toFixed(2)&&-n<d.snapGrid[a+1].toFixed(2)){s=-d.snapGrid[a+1];break}}else{var o=r*t.slidesPerGroup;s=-(Math.floor(Math.abs(n)/Math.floor(o))*o+o)}if(s<-W()&&(s=-W()),s===parseInt(n,10)){var l=jQuery(d.container);if("curtain"!==l.data("slider-type")||!l.data("continue"))return!1;SWIFTSLIDER.curtainAdvance(l)}return Z(s,"next",{runCallbacks:e}),!0},d.swipePrev=function(e,i){if(void 0===e&&(e=!0),!i&&t.loop&&d.fixLoop(),!i&&t.autoplay&&d.stopAutoplay(!0),d.callPlugins("onSwipePrev"),"curtain"===jQuery(d.container).data("slider-type")&&SWIFTSLIDER.curtainAnimating)return!1;var n,s=Math.ceil(d.getWrapperTranslate());if("auto"===t.slidesPerView){n=0;for(var a=1;a<d.snapGrid.length;a++){if(-s===d.snapGrid[a]){n=-d.snapGrid[a-1];break}if(-s>d.snapGrid[a]&&-s<d.snapGrid[a+1]){n=-d.snapGrid[a];break}}}else{var o=r*t.slidesPerGroup;n=-(Math.ceil(-s/o)-1)*o}return n>0&&(n=0),n!==s&&(Z(n,"prev",{runCallbacks:e}),!0)},d.swipeReset=function(e){void 0===e&&(e=!0),d.callPlugins("onSwipeReset");var i,n=d.getWrapperTranslate(),s=r*t.slidesPerGroup;W();if("auto"===t.slidesPerView){i=0;for(var a=0;a<d.snapGrid.length;a++){if(-n===d.snapGrid[a])return;if(-n>=d.snapGrid[a]&&-n<d.snapGrid[a+1]){i=d.positions.diff>0?-d.snapGrid[a+1]:-d.snapGrid[a];break}}-n>=d.snapGrid[d.snapGrid.length-1]&&(i=-d.snapGrid[d.snapGrid.length-1]),n<=-W()&&(i=-W())}else i=n<0?Math.round(n/s)*s:0,n<=-W()&&(i=-W());return t.scrollContainer&&(i=n<0?n:0),i<-W()&&(i=-W()),t.scrollContainer&&l>r&&(i=0),i!==n&&(Z(i,"reset",{runCallbacks:e}),!0)},d.swipeTo=function(e,i,n){e=parseInt(e,10),d.callPlugins("onSwipeTo",{index:e,speed:i}),t.loop&&(e+=d.loopedSlides);var s,a=d.getWrapperTranslate();if(!(e>d.slides.length-1||e<0))return(s="auto"===t.slidesPerView?-d.slidesGrid[e]:-e*r)<-W()&&(s=-W()),s!==a&&(void 0===n&&(n=!0),Z(s,"to",{index:e,speed:i,runCallbacks:n}),!0)},d._queueStartCallbacks=!1,d._queueEndCallbacks=!1,d.updateActiveSlide=function(e){if(d.initialized&&0!==d.slides.length){var i;if(d.previousIndex=d.activeIndex,void 0===e&&(e=d.getWrapperTranslate()),e>0&&(e=0),"auto"===t.slidesPerView){if(d.activeIndex=d.slidesGrid.indexOf(-e),d.activeIndex<0){for(i=0;i<d.slidesGrid.length-1&&!(-e>d.slidesGrid[i]&&-e<d.slidesGrid[i+1]);i++);var n=Math.abs(d.slidesGrid[i]+e),s=Math.abs(d.slidesGrid[i+1]+e);d.activeIndex=n<=s?i:i+1}}else d.activeIndex=Math[t.visibilityFullFit?"ceil":"round"](-e/r);if(d.activeIndex===d.slides.length&&(d.activeIndex=d.slides.length-1),d.activeIndex<0&&(d.activeIndex=0),d.slides[d.activeIndex]){if(d.calcVisibleSlides(e),d.support.classList){var a;for(i=0;i<d.slides.length;i++)(a=d.slides[i]).classList.remove(t.slideActiveClass),d.visibleSlides.indexOf(a)>=0?a.classList.add(t.slideVisibleClass):a.classList.remove(t.slideVisibleClass);d.slides[d.activeIndex].classList.add(t.slideActiveClass)}else{var o=new RegExp("\\s*"+t.slideActiveClass),l=new RegExp("\\s*"+t.slideVisibleClass);for(i=0;i<d.slides.length;i++)d.slides[i].className=d.slides[i].className.replace(o,"").replace(l,""),d.visibleSlides.indexOf(d.slides[i])>=0&&(d.slides[i].className+=" "+t.slideVisibleClass);d.slides[d.activeIndex].className+=" "+t.slideActiveClass}if(t.loop){var p=d.loopedSlides;d.activeLoopIndex=d.activeIndex-p,d.activeLoopIndex>=d.slides.length-2*p&&(d.activeLoopIndex=d.slides.length-2*p-d.activeLoopIndex),d.activeLoopIndex<0&&(d.activeLoopIndex=d.slides.length-2*p+d.activeLoopIndex),d.activeLoopIndex<0&&(d.activeLoopIndex=0)}else d.activeLoopIndex=d.activeIndex;t.pagination&&d.updatePagination(e)}}},d.createPagination=function(e){if(t.paginationClickable&&d.paginationButtons&&X(),d.paginationContainer=t.pagination.nodeType?t.pagination:k(t.pagination)[0],t.createPagination){var i="",n=d.slides.length;t.loop&&(n-=2*d.loopedSlides);for(var r=0;r<n;r++)i+="<"+t.paginationElement+' class="'+t.paginationElementClass+'"></'+t.paginationElement+">";d.paginationContainer.innerHTML=i}d.paginationButtons=k("."+t.paginationElementClass,d.paginationContainer),e||d.updatePagination(),d.callPlugins("onCreatePagination"),t.paginationClickable&&function(){var e=d.paginationButtons;if(e)for(var t=0;t<e.length;t++)d.h.addEventListener(e[t],"click",_)}()},d.updatePagination=function(e){if(t.pagination&&(!(d.slides.length<1)&&k("."+t.paginationActiveClass,d.paginationContainer))){var i=d.paginationButtons;if(0!==i.length){for(var n=0;n<i.length;n++)i[n].className=t.paginationElementClass;var r=t.loop?d.loopedSlides:0;if(t.paginationAsRange){d.visibleSlides||d.calcVisibleSlides(e);var s,a=[];for(s=0;s<d.visibleSlides.length;s++){var o=d.slides.indexOf(d.visibleSlides[s])-r;t.loop&&o<0&&(o=d.slides.length-2*d.loopedSlides+o),t.loop&&o>=d.slides.length-2*d.loopedSlides&&(o=d.slides.length-2*d.loopedSlides-o,o=Math.abs(o)),a.push(o)}for(s=0;s<a.length;s++)i[a[s]]&&(i[a[s]].className+=" "+t.paginationVisibleClass);t.loop?void 0!==i[d.activeLoopIndex]&&(i[d.activeLoopIndex].className+=" "+t.paginationActiveClass):i[d.activeIndex]&&(i[d.activeIndex].className+=" "+t.paginationActiveClass)}else t.loop?i[d.activeLoopIndex]&&(i[d.activeLoopIndex].className+=" "+t.paginationActiveClass+" "+t.paginationVisibleClass):i[d.activeIndex]&&(i[d.activeIndex].className+=" "+t.paginationActiveClass+" "+t.paginationVisibleClass)}}},d.calcVisibleSlides=function(e){var i=[],n=0,s=0,a=0;A&&d.wrapperLeft>0&&(e+=d.wrapperLeft),!A&&d.wrapperTop>0&&(e+=d.wrapperTop);for(var o=0;o<d.slides.length;o++){a=(n+=s)+(s="auto"===t.slidesPerView?A?d.h.getWidth(d.slides[o],!0,t.roundLengths):d.h.getHeight(d.slides[o],!0,t.roundLengths):r);var p=!1;t.visibilityFullFit?(n>=-e&&a<=-e+l&&(p=!0),n<=-e&&a>=-e+l&&(p=!0)):(a>-e&&a<=-e+l&&(p=!0),n>=-e&&n<-e+l&&(p=!0),n<-e&&a>-e+l&&(p=!0)),p&&i.push(d.slides[o])}0===i.length&&(i=[d.slides[d.activeIndex]]),d.visibleSlides=i},d.startAutoplay=function(){var e=t.autoplay;setTimeout(function(){if(d.support.transitions){if(void 0!==E)return!1;if(!t.autoplay)return;d.callPlugins("onAutoplayStart"),t.onAutoplayStart&&d.fireCallback(t.onAutoplayStart,d),q()}else{if(void 0!==I)return!1;if(!t.autoplay)return;d.callPlugins("onAutoplayStart"),t.onAutoplayStart&&d.fireCallback(t.onAutoplayStart,d),I=setInterval(function(){t.loop?(d.fixLoop(),d.swipeNext(!0,!0)):d.swipeNext(!0,!0)||(t.autoplayStopOnLast?(clearInterval(I),I=void 0):d.swipeTo(0))},e)}},2e3)},d.stopAutoplay=function(e){if(d.support.transitions){if(!E)return;E&&clearTimeout(E),E=void 0,e&&!t.autoplayDisableOnInteraction&&d.wrapperTransitionEnd(function(){q()}),d.callPlugins("onAutoplayStop"),t.onAutoplayStop&&d.fireCallback(t.onAutoplayStop,d)}else I&&clearInterval(I),I=void 0,d.callPlugins("onAutoplayStop"),t.onAutoplayStop&&d.fireCallback(t.onAutoplayStop,d)},d.loopCreated=!1,d.removeLoopedSlides=function(){if(d.loopCreated)for(var e=0;e<d.slides.length;e++)!0===d.slides[e].getData("looped")&&d.wrapper.removeChild(d.slides[e])},d.createLoop=function(){if(0!==d.slides.length){"auto"===t.slidesPerView?d.loopedSlides=t.loopedSlides||1:d.loopedSlides=Math.floor(t.slidesPerView)+t.loopAdditionalSlides,d.loopedSlides>d.slides.length&&(d.loopedSlides=d.slides.length);var e,i="",r="",s="",a=d.slides.length,o=Math.floor(d.loopedSlides/a),l=d.loopedSlides%a;for(e=0;e<o*a;e++){var p=e;if(e>=a)p=e-a*Math.floor(e/a);s+=d.slides[p].outerHTML}for(e=0;e<l;e++)r+=Y(t.slideDuplicateClass,d.slides[e].outerHTML);for(e=a-l;e<a;e++)i+=Y(t.slideDuplicateClass,d.slides[e].outerHTML);var c=i+s+n.innerHTML+s+r;for(n.innerHTML=c,d.loopCreated=!0,d.calcSlides(),e=0;e<d.slides.length;e++)(e<d.loopedSlides||e>=d.slides.length-d.loopedSlides)&&d.slides[e].setData("looped",!0);d.callPlugins("onCreateLoop")}},d.fixLoop=function(){var e;d.activeIndex<d.loopedSlides?(e=d.slides.length-3*d.loopedSlides+d.activeIndex,d.swipeTo(e,0,!1)):("auto"===t.slidesPerView&&d.activeIndex>=2*d.loopedSlides||d.activeIndex>d.slides.length-2*t.slidesPerView)&&(e=-d.slides.length+d.activeIndex+d.loopedSlides,d.swipeTo(e,0,!1))},d.loadSlides=function(){var e="";d.activeLoaderIndex=0;for(var i=t.loader.slides,n=t.loader.loadAllSlides?i.length:t.slidesPerView*(1+t.loader.surroundGroups),r=0;r<n;r++)"outer"===t.loader.slidesHTMLType?e+=i[r]:e+="<"+t.slideElement+' class="'+t.slideClass+'" data-swiperindex="'+r+'">'+i[r]+"</"+t.slideElement+">";d.wrapper.innerHTML=e,d.calcSlides(!0),t.loader.loadAllSlides||d.wrapperTransitionEnd(d.reloadSlides,!0)},d.reloadSlides=function(){var e=t.loader.slides,i=parseInt(d.activeSlide().data("swiperindex"),10);if(!(i<0||i>e.length-1)){d.activeLoaderIndex=i;var n,s=Math.max(0,i-t.slidesPerView*t.loader.surroundGroups),a=Math.min(i+t.slidesPerView*(1+t.loader.surroundGroups)-1,e.length-1);if(i>0){var o=-r*(i-s);d.setWrapperTranslate(o),d.setWrapperTransition(0)}if("reload"===t.loader.logic){d.wrapper.innerHTML="";var l="";for(n=s;n<=a;n++)l+="outer"===t.loader.slidesHTMLType?e[n]:"<"+t.slideElement+' class="'+t.slideClass+'" data-swiperindex="'+n+'">'+e[n]+"</"+t.slideElement+">";d.wrapper.innerHTML=l}else{var p=1e3,c=0;for(n=0;n<d.slides.length;n++){var u=d.slides[n].data("swiperindex");u<s||u>a?d.wrapper.removeChild(d.slides[n]):(p=Math.min(u,p),c=Math.max(u,c))}for(n=s;n<=a;n++){var A;n<p&&((A=document.createElement(t.slideElement)).className=t.slideClass,A.setAttribute("data-swiperindex",n),A.innerHTML=e[n],d.wrapper.insertBefore(A,d.wrapper.firstChild)),n>c&&((A=document.createElement(t.slideElement)).className=t.slideClass,A.setAttribute("data-swiperindex",n),A.innerHTML=e[n],d.wrapper.appendChild(A))}}d.reInit(!0)}},d.calcSlides(),t.loader.slides.length>0&&0===d.slides.length&&d.loadSlides(),t.loop&&d.createLoop(),d.init(),function(){var e,i,n,r,s=d.h.addEventListener,a="wrapper"===t.eventTarget?d.wrapper:d.container;if(d.browser.ie10||d.browser.ie11?(s(a,d.touchEvents.touchStart,z),s(document,d.touchEvents.touchMove,N),s(document,d.touchEvents.touchEnd,V)):(d.support.touch&&(s(a,"touchstart",z),s(a,"touchmove",N),s(a,"touchend",V)),t.simulateTouch&&(s(a,"mousedown",z),s(document,"mousemove",N),s(document,"mouseup",V))),t.autoResize&&s(window,"resize",d.resizeFix),F(),d._wheelEvent=!1,t.mousewheelControl){if(void 0!==document.onmousewheel&&(d._wheelEvent="mousewheel"),!d._wheelEvent)try{new WheelEvent("wheel"),d._wheelEvent="wheel"}catch(e){}d._wheelEvent||(d._wheelEvent="DOMMouseScroll"),d._wheelEvent&&s(d.container,d._wheelEvent,D)}if(t.keyboardControl&&s(document,"keydown",P),t.updateOnImagesReady){d.imagesToLoad=k("img",d.container);for(var o=0;o<d.imagesToLoad.length;o++)e=d.imagesToLoad[o],i=void 0,n=void 0,r=function(){null!=d&&(void 0!==d.imagesLoaded&&d.imagesLoaded++,d.imagesLoaded===d.imagesToLoad.length&&(d.reInit(),t.onImagesReady&&d.fireCallback(t.onImagesReady,d)))},e.complete?r():(n=e.currentSrc||e.getAttribute("src"))?((i=new Image).onload=r,i.onerror=r,i.src=n):r()}}(),t.pagination&&d.createPagination(!0),t.loop||t.initialSlide>0?d.swipeTo(t.initialSlide,0,!1):d.updateActiveSlide(0),t.autoplay&&d.startAutoplay(),d.centerIndex=d.activeIndex,t.onSwiperCreated&&d.fireCallback(t.onSwiperCreated,d),d.callPlugins("onSwiperCreated")}function k(e,t){return document.querySelectorAll?(t||document).querySelectorAll(e):jQuery(e,t)}function W(){var e=s-l;return t.freeMode&&(e=s-l),t.slidesPerView>d.slides.length&&!t.centeredSlides&&(e=0),e<0&&(e=0),e}function F(){var e,i=d.h.addEventListener;if(t.preventLinks){var n=k("a",d.container);for(e=0;e<n.length;e++)i(n[e],"click",j)}if(t.releaseFormElements){var r=k("input, textarea, select",d.container);for(e=0;e<r.length;e++)i(r[e],d.touchEvents.touchStart,H,!0),d.support.touch&&t.simulateTouch&&i(r[e],"mousedown",H,!0)}if(t.onSlideClick)for(e=0;e<d.slides.length;e++)i(d.slides[e],"click",Q);if(t.onSlideTouch)for(e=0;e<d.slides.length;e++)i(d.slides[e],d.touchEvents.touchStart,G)}function R(){var e,i=d.h.removeEventListener;if(t.onSlideClick)for(e=0;e<d.slides.length;e++)i(d.slides[e],"click",Q);if(t.onSlideTouch)for(e=0;e<d.slides.length;e++)i(d.slides[e],d.touchEvents.touchStart,G);if(t.releaseFormElements){var n=k("input, textarea, select",d.container);for(e=0;e<n.length;e++)i(n[e],d.touchEvents.touchStart,H,!0),d.support.touch&&t.simulateTouch&&i(n[e],"mousedown",H,!0)}if(t.preventLinks){var r=k("a",d.container);for(e=0;e<r.length;e++)i(r[e],"click",j)}}function P(e){var t=e.keyCode||e.charCode;if(!(e.shiftKey||e.altKey||e.ctrlKey||e.metaKey)){if(37===t||39===t||38===t||40===t){for(var i=!1,n=d.h.getOffset(d.container),r=d.h.windowScroll().left,s=d.h.windowScroll().top,a=d.h.windowWidth(),o=d.h.windowHeight(),l=[[n.left,n.top],[n.left+d.width,n.top],[n.left,n.top+d.height],[n.left+d.width,n.top+d.height]],p=0;p<l.length;p++){var c=l[p];c[0]>=r&&c[0]<=r+a&&c[1]>=s&&c[1]<=s+o&&(i=!0)}if(!i)return}A?(37!==t&&39!==t||(e.preventDefault?e.preventDefault():e.returnValue=!1),39===t&&d.swipeNext(),37===t&&d.swipePrev()):(38!==t&&40!==t||(e.preventDefault?e.preventDefault():e.returnValue=!1),40===t&&d.swipeNext(),38===t&&d.swipePrev())}}function D(e){var i=d._wheelEvent,n=0;if(e.detail)n=-e.detail;else if("mousewheel"===i)if(t.mousewheelControlForceToAxis)if(A){if(!(Math.abs(e.wheelDeltaX)>Math.abs(e.wheelDeltaY)))return;n=e.wheelDeltaX}else{if(!(Math.abs(e.wheelDeltaY)>Math.abs(e.wheelDeltaX)))return;n=e.wheelDeltaY}else n=e.wheelDelta;else if("DOMMouseScroll"===i)n=-e.detail;else if("wheel"===i)if(t.mousewheelControlForceToAxis)if(A){if(!(Math.abs(e.deltaX)>Math.abs(e.deltaY)))return;n=-e.deltaX}else{if(!(Math.abs(e.deltaY)>Math.abs(e.deltaX)))return;n=-e.deltaY}else n=Math.abs(e.deltaX)>Math.abs(e.deltaY)?-e.deltaX:-e.deltaY;if(t.freeMode){var r=d.getWrapperTranslate()+n;if(r>0&&(r=0),r<-W()&&(r=-W()),d.setWrapperTransition(0),d.setWrapperTranslate(r),d.updateActiveSlide(r),0===r||r===-W())return}else(new Date).getTime()-y>60&&(n<0?d.swipeNext():d.swipePrev()),y=(new Date).getTime();return t.autoplay&&d.stopAutoplay(!0),e.preventDefault?e.preventDefault():e.returnValue=!1,!1}function Q(e){d.allowSlideClick&&(B(e),d.fireCallback(t.onSlideClick,d,e))}function G(e){B(e),d.fireCallback(t.onSlideTouch,d,e)}function B(e){if(e.currentTarget)d.clickedSlide=e.currentTarget;else{var i=e.srcElement;do{if(i.className.indexOf(t.slideClass)>-1)break;i=i.parentNode}while(i);d.clickedSlide=i}d.clickedSlideIndex=d.slides.indexOf(d.clickedSlide),d.clickedSlideLoopIndex=d.clickedSlideIndex-(d.loopedSlides||0)}function j(e){if(!d.allowLinks)return e.preventDefault?e.preventDefault():e.returnValue=!1,t.preventLinksPropagation&&"stopPropagation"in e&&e.stopPropagation(),!1}function H(e){return e.stopPropagation?e.stopPropagation():e.returnValue=!1,!1}function z(e){if(t.preventLinks&&(d.allowLinks=!0),d.isTouched||t.onlyExternal)return!1;var i=e.target||e.srcElement;document.activeElement&&document.activeElement!==document.body&&document.activeElement!==i&&document.activeElement.blur();var n="input select textarea".split(" ");if(t.noSwiping&&i&&function(e){var i=!1;do{O(e,t.noSwipingClass)&&(i=!0),e=e.parentElement}while(!i&&e.parentElement&&!O(e,t.wrapperClass));!i&&O(e,t.wrapperClass)&&O(e,t.noSwipingClass)&&(i=!0);return i}(i))return!1;if(M=!1,d.isTouched=!0,!(L="touchstart"===e.type)&&"which"in e&&3===e.which)return d.isTouched=!1,!1;if(!L||1===e.targetTouches.length){d.callPlugins("onTouchStartBegin"),!L&&!d.isAndroid&&n.indexOf(i.tagName.toLowerCase())<0&&(e.preventDefault?e.preventDefault():e.returnValue=!1);var r=L?e.targetTouches[0].pageX:e.pageX||e.clientX,s=L?e.targetTouches[0].pageY:e.pageY||e.clientY;d.touches.startX=d.touches.currentX=r,d.touches.startY=d.touches.currentY=s,d.touches.start=d.touches.current=A?r:s,d.setWrapperTransition(0),d.positions.start=d.positions.current=d.getWrapperTranslate(),d.setWrapperTranslate(d.positions.start),d.times.start=(new Date).getTime(),o=void 0,t.moveStartThreshold>0&&(C=!1),t.onTouchStart&&d.fireCallback(t.onTouchStart,d,e),d.callPlugins("onTouchStartEnd")}}function N(e){if(d.isTouched&&!t.onlyExternal&&(!L||"mousemove"!==e.type)){var i=L?e.targetTouches[0].pageX:e.pageX||e.clientX,n=L?e.targetTouches[0].pageY:e.pageY||e.clientY;if(void 0===o&&A&&(o=!!(o||Math.abs(n-d.touches.startY)>Math.abs(i-d.touches.startX))),void 0!==o||A||(o=!!(o||Math.abs(n-d.touches.startY)<Math.abs(i-d.touches.startX))),o)d.isTouched=!1;else{if(A){if(!t.swipeToNext&&i<d.touches.startX||!t.swipeToPrev&&i>d.touches.startX)return}else if(!t.swipeToNext&&n<d.touches.startY||!t.swipeToPrev&&n>d.touches.startY)return;if(e.assignedToSwiper)d.isTouched=!1;else if(e.assignedToSwiper=!0,t.preventLinks&&(d.allowLinks=!1),t.onSlideClick&&(d.allowSlideClick=!1),t.autoplay&&d.stopAutoplay(!0),!L||1===e.touches.length){var r;if(d.isMoved||(d.callPlugins("onTouchMoveStart"),t.loop&&(d.fixLoop(),d.positions.start=d.getWrapperTranslate()),t.onTouchMoveStart&&d.fireCallback(t.onTouchMoveStart,d)),d.isMoved=!0,e.preventDefault?e.preventDefault():e.returnValue=!1,d.touches.current=A?i:n,d.positions.current=(d.touches.current-d.touches.start)*t.touchRatio+d.positions.start,d.positions.current>0&&t.onResistanceBefore&&d.fireCallback(t.onResistanceBefore,d,d.positions.current),d.positions.current<-W()&&t.onResistanceAfter&&d.fireCallback(t.onResistanceAfter,d,Math.abs(d.positions.current+W())),t.resistance&&"100%"!==t.resistance)if(d.positions.current>0&&(r=1-d.positions.current/l/2,d.positions.current=r<.5?l/2:d.positions.current*r),d.positions.current<-W()){var s=(d.touches.current-d.touches.start)*t.touchRatio+(W()+d.positions.start);r=(l+s)/l;var a=d.positions.current-s*(1-r)/2,p=-W()-l/2;d.positions.current=a<p||r<=0?p:a}if(t.resistance&&"100%"===t.resistance&&(d.positions.current>0&&(!t.freeMode||t.freeModeFluid)&&(d.positions.current=0),d.positions.current<-W()&&(!t.freeMode||t.freeModeFluid)&&(d.positions.current=-W())),!t.followFinger)return;if(t.moveStartThreshold)if(Math.abs(d.touches.current-d.touches.start)>t.moveStartThreshold||C){if(!C)return C=!0,void(d.touches.start=d.touches.current);d.setWrapperTranslate(d.positions.current)}else d.positions.current=d.positions.start;else d.setWrapperTranslate(d.positions.current);return(t.freeMode||t.watchActiveIndex)&&d.updateActiveSlide(d.positions.current),t.grabCursor&&(d.container.style.cursor="move",d.container.style.cursor="grabbing",d.container.style.cursor="-moz-grabbin",d.container.style.cursor="-webkit-grabbing"),b||(b=d.touches.current),x||(x=(new Date).getTime()),d.velocity=(d.touches.current-b)/((new Date).getTime()-x)/2,Math.abs(d.touches.current-b)<2&&(d.velocity=0),b=d.touches.current,x=(new Date).getTime(),d.callPlugins("onTouchMoveEnd"),t.onTouchMove&&d.fireCallback(t.onTouchMove,d,e),!1}}}}function V(e){if(o&&d.swipeReset(),!t.onlyExternal&&d.isTouched){d.isTouched=!1,t.grabCursor&&(d.container.style.cursor="move",d.container.style.cursor="grab",d.container.style.cursor="-moz-grab",d.container.style.cursor="-webkit-grab"),d.positions.current||0===d.positions.current||(d.positions.current=d.positions.start),t.followFinger&&d.setWrapperTranslate(d.positions.current),d.times.end=(new Date).getTime(),d.touches.diff=d.touches.current-d.touches.start,d.touches.abs=Math.abs(d.touches.diff),d.positions.diff=d.positions.current-d.positions.start,d.positions.abs=Math.abs(d.positions.diff);var i=d.positions.diff,n=d.positions.abs,s=d.times.end-d.times.start;n<5&&s<300&&!1===d.allowLinks&&(t.freeMode||0===n||d.swipeReset(),t.preventLinks&&(d.allowLinks=!0),t.onSlideClick&&(d.allowSlideClick=!0)),setTimeout(function(){null!=d&&(t.preventLinks&&(d.allowLinks=!0),t.onSlideClick&&(d.allowSlideClick=!0))},100);var p=W();if(!d.isMoved&&t.freeMode)return d.isMoved=!1,t.onTouchEnd&&d.fireCallback(t.onTouchEnd,d,e),void d.callPlugins("onTouchEnd");if(!d.isMoved||d.positions.current>0||d.positions.current<-p)return d.swipeReset(),t.onTouchEnd&&d.fireCallback(t.onTouchEnd,d,e),void d.callPlugins("onTouchEnd");if(d.isMoved=!1,t.freeMode){if(t.freeModeFluid){var c,u=1e3*t.momentumRatio,h=d.velocity*u,f=d.positions.current+h,g=!1,w=20*Math.abs(d.velocity)*t.momentumBounceRatio;f<-p&&(t.momentumBounce&&d.support.transitions?(f+p<-w&&(f=-p-w),c=-p,g=!0,M=!0):f=-p),f>0&&(t.momentumBounce&&d.support.transitions?(f>w&&(f=w),c=0,g=!0,M=!0):f=0),0!==d.velocity&&(u=Math.abs((f-d.positions.current)/d.velocity)),d.setWrapperTranslate(f),d.setWrapperTransition(u),t.momentumBounce&&g&&d.wrapperTransitionEnd(function(){M&&(t.onMomentumBounce&&d.fireCallback(t.onMomentumBounce,d),d.callPlugins("onMomentumBounce"),d.setWrapperTranslate(c),d.setWrapperTransition(300))}),d.updateActiveSlide(f)}return(!t.freeModeFluid||s>=300)&&d.updateActiveSlide(d.positions.current),t.onTouchEnd&&d.fireCallback(t.onTouchEnd,d,e),void d.callPlugins("onTouchEnd")}"toNext"===(a=i<0?"toNext":"toPrev")&&s<=300&&(n<30||!t.shortSwipes?d.swipeReset():d.swipeNext(!0,!0)),"toPrev"===a&&s<=300&&(n<30||!t.shortSwipes?d.swipeReset():d.swipePrev(!0,!0));var v=0;if("auto"===t.slidesPerView){for(var m,S=Math.abs(d.getWrapperTranslate()),y=0,T=0;T<d.slides.length;T++)if((y+=m=A?d.slides[T].getWidth(!0,t.roundLengths):d.slides[T].getHeight(!0,t.roundLengths))>S){v=m;break}v>l&&(v=l)}else v=r*t.slidesPerView;"toNext"===a&&s>300&&(n>=v*t.longSwipesRatio?d.swipeNext(!0,!0):d.swipeReset()),"toPrev"===a&&s>300&&(n>=v*t.longSwipesRatio?d.swipePrev(!0,!0):d.swipeReset()),t.onTouchEnd&&d.fireCallback(t.onTouchEnd,d,e),d.callPlugins("onTouchEnd")}}function O(e,t){return e&&e.getAttribute("class")&&e.getAttribute("class").indexOf(t)>-1}function Y(e,t){var i,n=document.createElement("div");return n.innerHTML=t,(i=n.firstChild).className+=" "+e,i.outerHTML}function Z(e,i,n){var r="to"===i&&n.speed>=0?n.speed:t.speed,s=+new Date;if(d.support.transitions||!t.DOMAnimation)d.setWrapperTranslate(e),d.setWrapperTransition(r);else{var a=d.getWrapperTranslate(),o=Math.ceil((e-a)/r*(1e3/60)),l=a>e?"toNext":"toPrev";if(d._DOMAnimating)return;!function r(){var p=+new Date;a+=o*(p-s)/(1e3/60),("toNext"===l?a>e:a<e)?(d.setWrapperTranslate(Math.ceil(a)),d._DOMAnimating=!0,window.setTimeout(function(){r()},1e3/60)):(t.onSlideChangeEnd&&("to"===i?!0===n.runCallbacks&&d.fireCallback(t.onSlideChangeEnd,d,l):d.fireCallback(t.onSlideChangeEnd,d,l)),d.setWrapperTranslate(e),d._DOMAnimating=!1)}()}d.updateActiveSlide(e),t.onSlideNext&&"next"===i&&!0===n.runCallbacks&&d.fireCallback(t.onSlideNext,d,e),t.onSlidePrev&&"prev"===i&&!0===n.runCallbacks&&d.fireCallback(t.onSlidePrev,d,e),t.onSlideReset&&"reset"===i&&!0===n.runCallbacks&&d.fireCallback(t.onSlideReset,d,e),"next"!==i&&"prev"!==i&&"to"!==i||!0!==n.runCallbacks||function(e){if(d.callPlugins("onSlideChangeStart"),t.onSlideChangeStart)if(t.queueStartCallbacks&&d.support.transitions){if(d._queueStartCallbacks)return;d._queueStartCallbacks=!0,d.fireCallback(t.onSlideChangeStart,d,e),d.wrapperTransitionEnd(function(){d._queueStartCallbacks=!1})}else d.fireCallback(t.onSlideChangeStart,d,e);if(t.onSlideChangeEnd)if(d.support.transitions)if(t.queueEndCallbacks){if(d._queueEndCallbacks)return;d._queueEndCallbacks=!0,"fade"===t.transition?setTimeout(function(){d.fireCallback(t.onSlideChangeEnd,d,e)},100):d.wrapperTransitionEnd(function(i){d.fireCallback(t.onSlideChangeEnd,d,e)})}else"fade"===t.transition?setTimeout(function(){d.fireCallback(t.onSlideChangeEnd,d,e)},100):d.wrapperTransitionEnd(function(i){d.fireCallback(t.onSlideChangeEnd,d,e)});else t.DOMAnimation||setTimeout(function(){d.fireCallback(t.onSlideChangeEnd,d,e)},10)}(i)}function X(){var e=d.paginationButtons;if(e)for(var t=0;t<e.length;t++)d.h.removeEventListener(e[t],"click",_)}function _(e){for(var i,n=e.target||e.srcElement,r=d.paginationButtons,s=0;s<r.length;s++)n===r[s]&&(i=s);t.autoplay&&d.stopAutoplay(!0),d.swipeTo(i)}function q(){E=setTimeout(function(){t.loop?(d.fixLoop(),d.swipeNext(!0,!0)):d.swipeNext(!0,!0)||(t.autoplayStopOnLast?(clearTimeout(E),E=void 0):d.swipeTo(0)),d.wrapperTransitionEnd(function(){void 0!==E&&q()}),"fade"===d.params.transition&&void 0!==E&&q()},t.autoplay)}};Swiper.prototype={plugins:{},wrapperTransitionEnd:function(e,t){"use strict";var i,n=this,r=n.wrapper,s=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"];function a(o){if(o.target===r&&(e(n),n.params.queueEndCallbacks&&(n._queueEndCallbacks=!1),!t))for(i=0;i<s.length;i++)n.h.removeEventListener(r,s[i],a)}if(e)for(i=0;i<s.length;i++)n.h.addEventListener(r,s[i],a)},getWrapperTranslate:function(e){"use strict";var t,i,n,r,s=this.wrapper;return void 0===e&&(e="horizontal"===this.params.mode?"x":"y"),this.support.transforms&&this.params.useCSS3Transforms?(n=window.getComputedStyle(s,null),window.WebKitCSSMatrix?r=new WebKitCSSMatrix("none"===n.webkitTransform?"":n.webkitTransform):t=(r=n.MozTransform||n.OTransform||n.MsTransform||n.msTransform||n.transform||n.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,")).toString().split(","),"x"===e&&(i=window.WebKitCSSMatrix?r.m41:16===t.length?parseFloat(t[12]):parseFloat(t[4])),"y"===e&&(i=window.WebKitCSSMatrix?r.m42:16===t.length?parseFloat(t[13]):parseFloat(t[5]))):("x"===e&&(i=parseFloat(s.style.left,10)||0),"y"===e&&(i=parseFloat(s.style.top,10)||0)),i||0},setWrapperTranslate:function(e,t,i){"use strict";var n,r=this.wrapper.style,s={x:0,y:0,z:0};3===arguments.length?(s.x=e,s.y=t,s.z=i):(void 0===t&&(t="horizontal"===this.params.mode?"x":"y"),s[t]=e),this.support.transforms&&this.params.useCSS3Transforms?(n=this.support.transforms3d?"translate3d("+s.x+"px, "+s.y+"px, "+s.z+"px)":"translate("+s.x+"px, "+s.y+"px)",r.webkitTransform=r.MsTransform=r.msTransform=r.MozTransform=r.OTransform=r.transform=n):(r.left=s.x+"px",r.top=s.y+"px"),this.callPlugins("onSetWrapperTransform",s),this.params.onSetWrapperTransform&&this.fireCallback(this.params.onSetWrapperTransform,this,s)},setWrapperTransition:function(e){"use strict";var t=this.wrapper.style;t.webkitTransitionDuration=t.MsTransitionDuration=t.msTransitionDuration=t.MozTransitionDuration=t.OTransitionDuration=t.transitionDuration=e/1e3+"s",this.callPlugins("onSetWrapperTransition",{duration:e}),this.params.onSetWrapperTransition&&this.fireCallback(this.params.onSetWrapperTransition,this,e)},h:{getWidth:function(e,t,i){"use strict";var n=window.getComputedStyle(e,null).getPropertyValue("width"),r=parseFloat(n);return(isNaN(r)||n.indexOf("%")>0||r<0)&&(r=e.offsetWidth-parseFloat(window.getComputedStyle(e,null).getPropertyValue("padding-left"))-parseFloat(window.getComputedStyle(e,null).getPropertyValue("padding-right"))),t&&(r+=parseFloat(window.getComputedStyle(e,null).getPropertyValue("padding-left"))+parseFloat(window.getComputedStyle(e,null).getPropertyValue("padding-right"))),i?Math.ceil(r):r},getHeight:function(e,t,i){"use strict";if(t)return e.offsetHeight;var n=window.getComputedStyle(e,null).getPropertyValue("height"),r=parseFloat(n);return(isNaN(r)||n.indexOf("%")>0||r<0)&&(r=e.offsetHeight-parseFloat(window.getComputedStyle(e,null).getPropertyValue("padding-top"))-parseFloat(window.getComputedStyle(e,null).getPropertyValue("padding-bottom"))),t&&(r+=parseFloat(window.getComputedStyle(e,null).getPropertyValue("padding-top"))+parseFloat(window.getComputedStyle(e,null).getPropertyValue("padding-bottom"))),i?Math.ceil(r):r},getOffset:function(e){"use strict";var t=e.getBoundingClientRect(),i=document.body,n=e.clientTop||i.clientTop||0,r=e.clientLeft||i.clientLeft||0,s=window.pageYOffset||e.scrollTop,a=window.pageXOffset||e.scrollLeft;return document.documentElement&&!window.pageYOffset&&(s=document.documentElement.scrollTop,a=document.documentElement.scrollLeft),{top:t.top+s-n,left:t.left+a-r}},windowWidth:function(){"use strict";return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth?document.documentElement.clientWidth:void 0},windowHeight:function(){"use strict";return window.innerHeight?window.innerHeight:document.documentElement&&document.documentElement.clientHeight?document.documentElement.clientHeight:void 0},windowScroll:function(){"use strict";return"undefined"!=typeof pageYOffset?{left:window.pageXOffset,top:window.pageYOffset}:document.documentElement?{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop}:void 0},addEventListener:function(e,t,i,n){"use strict";void 0===n&&(n=!1),e.addEventListener?e.addEventListener(t,i,n):e.attachEvent&&e.attachEvent("on"+t,i)},removeEventListener:function(e,t,i,n){"use strict";void 0===n&&(n=!1),e.removeEventListener?e.removeEventListener(t,i,n):e.detachEvent&&e.detachEvent("on"+t,i)}},setTransform:function(e,t){"use strict";var i=e.style;i.webkitTransform=i.MsTransform=i.msTransform=i.MozTransform=i.OTransform=i.transform=t},setTranslate:function(e,t){"use strict";var i=e.style,n=t.x||0,r=t.y||0,s=t.z||0,a=this.support.transforms3d?"translate3d("+n+"px,"+r+"px,"+s+"px)":"translate("+n+"px,"+r+"px)";i.webkitTransform=i.MsTransform=i.msTransform=i.MozTransform=i.OTransform=i.transform=a,this.support.transforms||(i.left=n+"px",i.top=r+"px")},setTransition:function(e,t){"use strict";var i=e.style;i.webkitTransitionDuration=i.MsTransitionDuration=i.msTransitionDuration=i.MozTransitionDuration=i.OTransitionDuration=i.transitionDuration=t+"ms"},support:{touch:window.Modernizr&&!0===Modernizr.touch||function(){"use strict";return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)}(),transforms3d:window.Modernizr&&!0===Modernizr.csstransforms3d||function(){"use strict";var e=document.createElement("div").style;return"webkitPerspective"in e||"MozPerspective"in e||"OPerspective"in e||"MsPerspective"in e||"perspective"in e}(),transforms:window.Modernizr&&!0===Modernizr.csstransforms||function(){"use strict";var e=document.createElement("div").style;return"transform"in e||"WebkitTransform"in e||"MozTransform"in e||"msTransform"in e||"MsTransform"in e||"OTransform"in e}(),transitions:window.Modernizr&&!0===Modernizr.csstransitions||function(){"use strict";var e=document.createElement("div").style;return"transition"in e||"WebkitTransition"in e||"MozTransition"in e||"msTransition"in e||"MsTransition"in e||"OTransition"in e}(),classList:function(){"use strict";return"classList"in document.createElement("div")}()},browser:{ie8:function(){"use strict";var e=-1;if("Microsoft Internet Explorer"===navigator.appName){var t=navigator.userAgent;null!==new RegExp(/MSIE ([0-9]{1,}[\.0-9]{0,})/).exec(t)&&(e=parseFloat(RegExp.$1))}return-1!==e&&e<9}(),ie10:window.navigator.msPointerEnabled,ie11:window.navigator.pointerEnabled}},(window.jQuery||window.Zepto)&&function(e){"use strict";e.fn.swiper=function(t){var i;return this.each(function(n){var r=e(this),s=new Swiper(r[0],t);n||(i=s),r.data("swiper",s)}),i}}(window.jQuery||window.Zepto),"undefined"!=typeof module?module.exports=Swiper:"function"==typeof define&&define.amd&&define([],function(){"use strict";return Swiper}),Swiper.prototype.plugins.progress=function(e){function t(){for(var t=0;t<e.slides.length;t++){var i=e.slides[t];i.progressSlideSize=r?e.h.getWidth(i):e.h.getHeight(i),i.progressSlideOffset="offsetLeft"in i?r?i.offsetLeft:i.offsetTop:r?i.getOffset().left-e.h.getOffset(e.container).left:i.getOffset().top-e.h.getOffset(e.container).top}n=r?e.h.getWidth(e.wrapper)+e.wrapperLeft+e.wrapperRight-e.width:e.h.getHeight(e.wrapper)+e.wrapperTop+e.wrapperBottom-e.height}function i(t){var i;t=t||{x:0,y:0,z:0};i=1==e.params.centeredSlides?r?-t.x+e.width/2:-t.y+e.height/2:r?-t.x:-t.y;for(var s=0;s<e.slides.length;s++){var a=e.slides[s],o=1==e.params.centeredSlides?a.progressSlideSize/2:0,l=(i-a.progressSlideOffset-o)/a.progressSlideSize;a.progress=l}e.progress=r?-t.x/n:-t.y/n,e.params.onProgressChange&&e.fireCallback(e.params.onProgressChange,e)}var n,r="horizontal"==e.params.mode;return{onFirstInit:function(){t(),i({x:e.getWrapperTranslate("x"),y:e.getWrapperTranslate("y")})},onInit:function(){t()},onSetWrapperTransform:function(e){i(e)}}},function(e){var t,i,n,r=e.event,s={_:0},a=0;t=r.special.throttledresize={setup:function(){e(this).on("resize",t.handler)},teardown:function(){e(this).off("resize",t.handler)},handler:function(o,l){var d=this,p=arguments;i=!0,n||(setInterval(function(){(++a>t.threshold&&i||l)&&(o.type="throttledresize",r.dispatch.apply(d,p),i=!1,a=0),a>9&&(e(s).stop(),n=!1,a=0)},30),n=!0)},threshold:0}}(jQuery),function(e){e.extend({canVideoautoplay:function(t){var i=!1;try{if(!(!navigator.userAgent.match(/(iPhone|iPod)/g)||"playsInline"in document.createElement("video")))return t(!1);var n=e('<video src="data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAAA7RtZGF0AAACrAYF//+o3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE1MiByMTkgYmEyNDg5OSAtIEguMjY0L01QRUctNCBBVkMgY29kZWMgLSBDb3B5bGVmdCAyMDAzLTIwMTcgLSBodHRwOi8vd3d3LnZpZGVvbGFuLm9yZy94MjY0Lmh0bWwgLSBvcHRpb25zOiBjYWJhYz0xIHJlZj0zIGRlYmxvY2s9MTowOjAgYW5hbHlzZT0weDM6MHgxMTMgbWU9aGV4IHN1Ym1lPTcgcHN5PTEgcHN5X3JkPTEuMDA6MC4wMCBtaXhlZF9yZWY9MSBtZV9yYW5nZT0xNiBjaHJvbWFfbWU9MSB0cmVsbGlzPTEgOHg4ZGN0PTEgY3FtPTAgZGVhZHpvbmU9MjEsMTEgZmFzdF9wc2tpcD0xIGNocm9tYV9xcF9vZmZzZXQ9LTIgdGhyZWFkcz0zIGxvb2thaGVhZF90aHJlYWRzPTEgc2xpY2VkX3RocmVhZHM9MCBucj0wIGRlY2ltYXRlPTEgaW50ZXJsYWNlZD0wIGJsdXJheV9jb21wYXQ9MCBjb25zdHJhaW5lZF9pbnRyYT0wIGJmcmFtZXM9MyBiX3B5cmFtaWQ9MiBiX2FkYXB0PTEgYl9iaWFzPTAgZGlyZWN0PTEgd2VpZ2h0Yj0xIG9wZW5fZ29wPTAgd2VpZ2h0cD0yIGtleWludD0yNTAga2V5aW50X21pbj0yNSBzY2VuZWN1dD00MCBpbnRyYV9yZWZyZXNoPTAgcmNfbG9va2FoZWFkPTQwIHJjPWNyZiBtYnRyZWU9MSBjcmY9MjguMCBxY29tcD0wLjYwIHFwbWluPTAgcXBtYXg9NjkgcXBzdGVwPTQgaXBfcmF0aW89MS40MCBhcT0xOjEuMDAAgAAAACpliIQAJ//+8dzwKZrlxoFv6nFTjrH/8I5IvpuR7wM+8DluLAAQcGNdwkEAAAAKQZokbEJ/8yAHLAAAAAhBnkJ4jf8JeQAAAAgBnmF0Rf8KSAAAAAgBnmNqRf8KSQAAABBBmmhJqEFomUwIR//kQBXxAAAACUGehkURLG8JeQAAAAgBnqV0Rf8KSQAAAAgBnqdqRf8KSAAAAA9BmqxJqEFsmUwI/4cAU8AAAAAJQZ7KRRUsbwl5AAAACAGe6XRF/wpIAAAACAGe62pF/wpIAAAADkGa70moQWyZTAi/AAJPAAAACUGfDUUVLG8JeQAAAAgBny5qRf8KSQAAA8ptb292AAAAbG12aGQAAAAAAAAAAAAAAAAAAAPoAAACFwABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAC9HRyYWsAAABcdGtoZAAAAAMAAAAAAAAAAAAAAAEAAAAAAAACFwAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAoAAAAFoAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAAhcAAAMAAAEAAAAAAmxtZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAACzgAAAYAFXEAAAAAAAtaGRscgAAAAAAAAAAdmlkZQAAAAAAAAAAAAAAAFZpZGVvSGFuZGxlcgAAAAIXbWluZgAAABR2bWhkAAAAAQAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAAB13N0YmwAAACXc3RzZAAAAAAAAAABAAAAh2F2YzEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAoABaAEgAAABIAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY//8AAAAxYXZjQwFkAAv/4QAYZ2QAC6zZQo35IQAAAwAMAAADAs4PFCmWAQAGaOviSyLAAAAAGHN0dHMAAAAAAAAAAQAAABAAAAGAAAAAFHN0c3MAAAAAAAAAAQAAAAEAAACIY3R0cwAAAAAAAAAPAAAAAQAAAwAAAAABAAAHgAAAAAEAAAMAAAAAAQAAAAAAAAABAAABgAAAAAEAAAeAAAAAAQAAAwAAAAABAAAAAAAAAAEAAAGAAAAAAQAAB4AAAAABAAADAAAAAAEAAAAAAAAAAQAAAYAAAAABAAAGAAAAAAIAAAGAAAAAHHN0c2MAAAAAAAAAAQAAAAEAAAAQAAAAAQAAAFRzdHN6AAAAAAAAAAAAAAAQAAAC3gAAAA4AAAAMAAAADAAAAAwAAAAUAAAADQAAAAwAAAAMAAAAEwAAAA0AAAAMAAAADAAAABIAAAANAAAADAAAABRzdGNvAAAAAAAAAAEAAAAwAAAAYnVkdGEAAABabWV0YQAAAAAAAAAhaGRscgAAAAAAAAAAbWRpcmFwcGwAAAAAAAAAAAAAAAAtaWxzdAAAACWpdG9vAAAAHWRhdGEAAAABAAAAAExhdmY1Ny43Ny4xMDA=" controls playsinline muted width="20" height="20" style="position:fixed;z-index:1000;top:0;left:0"></video>');e("body").prepend(n),i=!0,n[0].play(),n[0].onplay=function(){this.playing=!0},n[0].oncanplay=function(){n[0].playing?t(!0):t(!1),n[0].pause(),n.remove()}}catch(e){}i||t(!1)}})}(jQuery);
!function(t,r){"use strict";var i=function(t,r,i){var n;return function(){function e(){i||(t.apply(u,s),n=null)}var u=this,s=arguments;n?clearTimeout(n):i&&t.apply(u,s),n=setTimeout(e,r||100)}};jQuery.fn[r]=function(t){return t?this.bind("resize",i(t)):this.trigger(r)}}(jQuery,"smartresize");
;(function (factory){
var registeredInModuleLoader;
if(typeof define==='function'&&define.amd){
define(factory);
registeredInModuleLoader=true;
}
if(typeof exports==='object'){
module.exports=factory();
registeredInModuleLoader=true;
}
if(!registeredInModuleLoader){
var OldCookies=window.Cookies;
var api=window.Cookies=factory();
api.noConflict=function (){
window.Cookies=OldCookies;
return api;
};}}(function (){
function extend (){
var i=0;
var result={};
for (; i < arguments.length; i++){
var attributes=arguments[ i ];
for (var key in attributes){
result[key]=attributes[key];
}}
return result;
}
function decode (s){
return s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);
}
function init (converter){
function api(){}
function set (key, value, attributes){
if(typeof document==='undefined'){
return;
}
attributes=extend({
path: '/'
}, api.defaults, attributes);
if(typeof attributes.expires==='number'){
attributes.expires=new Date(new Date() * 1 + attributes.expires * 864e+5);
}
attributes.expires=attributes.expires ? attributes.expires.toUTCString():'';
try {
var result=JSON.stringify(value);
if(/^[\{\[]/.test(result)){
value=result;
}} catch (e){}
value=converter.write ?
converter.write(value, key) :
encodeURIComponent(String(value))
.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);
key=encodeURIComponent(String(key))
.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)
.replace(/[\(\)]/g, escape);
var stringifiedAttributes='';
for (var attributeName in attributes){
if(!attributes[attributeName]){
continue;
}
stringifiedAttributes +='; ' + attributeName;
if(attributes[attributeName]===true){
continue;
}
stringifiedAttributes +='=' + attributes[attributeName].split(';')[0];
}
return (document.cookie=key + '=' + value + stringifiedAttributes);
}
function get (key, json){
if(typeof document==='undefined'){
return;
}
var jar={};
var cookies=document.cookie ? document.cookie.split('; '):[];
var i=0;
for (; i < cookies.length; i++){
var parts=cookies[i].split('=');
var cookie=parts.slice(1).join('=');
if(!json&&cookie.charAt(0)==='"'){
cookie=cookie.slice(1, -1);
}
try {
var name=decode(parts[0]);
cookie=(converter.read||converter)(cookie, name) ||
decode(cookie);
if(json){
try {
cookie=JSON.parse(cookie);
} catch (e){}}
jar[name]=cookie;
if(key===name){
break;
}} catch (e){}}
return key ? jar[key]:jar;
}
api.set=set;
api.get=function (key){
return get(key, false );
};
api.getJSON=function (key){
return get(key, true );
};
api.remove=function (key, attributes){
set(key, '', extend(attributes, {
expires: -1
}));
};
api.defaults={};
api.withConverter=init;
return api;
}
return init(function (){});
}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery")):"function"==typeof define&&define.amd?define(["exports","jquery"],e):e(t.bootstrap={},t.jQuery)}(this,function(t,e){"use strict";function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function i(t,e,i){return e&&n(t.prototype,e),i&&n(t,i),t}function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}for(var o,s,a,l,c,h,f,u,d,p,g,m,_,v,E,y,b,T,C,w,I,A,D,S,O,N,k=function(t){var e=!1;function n(e){var n=this,r=!1;return t(this).one(i.TRANSITION_END,function(){r=!0}),setTimeout(function(){r||i.triggerTransitionEnd(n)},e),this}var i={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},getSelectorFromElement:function(e){var n,i=e.getAttribute("data-target");i&&"#"!==i||(i=e.getAttribute("href")||""),"#"===i.charAt(0)&&(n=i,i=n="function"==typeof t.escapeSelector?t.escapeSelector(n).substr(1):n.replace(/(:|\.|\[|\]|,|=|@)/g,"\\$1"));try{return t(document).find(i).length>0?i:null}catch(t){return null}},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(n){t(n).trigger(e.end)},supportsTransitionEnd:function(){return Boolean(e)},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,n){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var o=n[r],s=e[r],a=s&&i.isElement(s)?"element":(l=s,{}.toString.call(l).match(/\s([a-zA-Z]+)/)[1].toLowerCase());if(!new RegExp(o).test(a))throw new Error(t.toUpperCase()+': Option "'+r+'" provided type "'+a+'" but expected type "'+o+'".')}var l}};return e=("undefined"==typeof window||!window.QUnit)&&{end:"transitionend"},t.fn.emulateTransitionEnd=n,i.supportsTransitionEnd()&&(t.event.special[i.TRANSITION_END]={bindType:e.end,delegateType:e.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}}),i}(e=e&&e.hasOwnProperty("default")?e.default:e),L=(s="alert",l="."+(a="bs.alert"),c=(o=e).fn[s],h={CLOSE:"close"+l,CLOSED:"closed"+l,CLICK_DATA_API:"click"+l+".data-api"},f="alert",u="fade",d="show",p=function(){function t(t){this._element=t}var e=t.prototype;return e.close=function(t){t=t||this._element;var e=this._getRootElement(t);this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},e.dispose=function(){o.removeData(this._element,a),this._element=null},e._getRootElement=function(t){var e=k.getSelectorFromElement(t),n=!1;return e&&(n=o(e)[0]),n||(n=o(t).closest("."+f)[0]),n},e._triggerCloseEvent=function(t){var e=o.Event(h.CLOSE);return o(t).trigger(e),e},e._removeElement=function(t){var e=this;o(t).removeClass(d),k.supportsTransitionEnd()&&o(t).hasClass(u)?o(t).one(k.TRANSITION_END,function(n){return e._destroyElement(t,n)}).emulateTransitionEnd(150):this._destroyElement(t)},e._destroyElement=function(t){o(t).detach().trigger(h.CLOSED).remove()},t._jQueryInterface=function(e){return this.each(function(){var n=o(this),i=n.data(a);i||(i=new t(this),n.data(a,i)),"close"===e&&i[e](this)})},t._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},i(t,null,[{key:"VERSION",get:function(){return"4.0.0"}}]),t}(),o(document).on(h.CLICK_DATA_API,'[data-dismiss="alert"]',p._handleDismiss(new p)),o.fn[s]=p._jQueryInterface,o.fn[s].Constructor=p,o.fn[s].noConflict=function(){return o.fn[s]=c,p._jQueryInterface},p),P=(m="button",v="."+(_="bs.button"),E=".data-api",y=(g=e).fn[m],b="active",T="btn",C="focus",w='[data-toggle^="button"]',I='[data-toggle="buttons"]',A="input",D=".active",S=".btn",O={CLICK_DATA_API:"click"+v+E,FOCUS_BLUR_DATA_API:"focus"+v+E+" blur"+v+E},N=function(){function t(t){this._element=t}var e=t.prototype;return e.toggle=function(){var t=!0,e=!0,n=g(this._element).closest(I)[0];if(n){var i=g(this._element).find(A)[0];if(i){if("radio"===i.type)if(i.checked&&g(this._element).hasClass(b))t=!1;else{var r=g(n).find(D)[0];r&&g(r).removeClass(b)}if(t){if(i.hasAttribute("disabled")||n.hasAttribute("disabled")||i.classList.contains("disabled")||n.classList.contains("disabled"))return;i.checked=!g(this._element).hasClass(b),g(i).trigger("change")}i.focus(),e=!1}}e&&this._element.setAttribute("aria-pressed",!g(this._element).hasClass(b)),t&&g(this._element).toggleClass(b)},e.dispose=function(){g.removeData(this._element,_),this._element=null},t._jQueryInterface=function(e){return this.each(function(){var n=g(this).data(_);n||(n=new t(this),g(this).data(_,n)),"toggle"===e&&n[e]()})},i(t,null,[{key:"VERSION",get:function(){return"4.0.0"}}]),t}(),g(document).on(O.CLICK_DATA_API,w,function(t){t.preventDefault();var e=t.target;g(e).hasClass(T)||(e=g(e).closest(S)),N._jQueryInterface.call(g(e),"toggle")}).on(O.FOCUS_BLUR_DATA_API,w,function(t){var e=g(t.target).closest(S)[0];g(e).toggleClass(C,/^focus(in)?$/.test(t.type))}),g.fn[m]=N._jQueryInterface,g.fn[m].Constructor=N,g.fn[m].noConflict=function(){return g.fn[m]=y,N._jQueryInterface},N),x=function(t){var e="carousel",n="bs.carousel",o="."+n,s=t.fn[e],a={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0},l={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean"},c="next",h="prev",f="left",u="right",d={SLIDE:"slide"+o,SLID:"slid"+o,KEYDOWN:"keydown"+o,MOUSEENTER:"mouseenter"+o,MOUSELEAVE:"mouseleave"+o,TOUCHEND:"touchend"+o,LOAD_DATA_API:"load"+o+".data-api",CLICK_DATA_API:"click"+o+".data-api"},p="carousel",g="active",m="slide",_="carousel-item-right",v="carousel-item-left",E="carousel-item-next",y="carousel-item-prev",b={ACTIVE:".active",ACTIVE_ITEM:".active.carousel-item",ITEM:".carousel-item",NEXT_PREV:".carousel-item-next, .carousel-item-prev",INDICATORS:".carousel-indicators",DATA_SLIDE:"[data-slide], [data-slide-to]",DATA_RIDE:'[data-ride="carousel"]'},T=function(){function s(e,n){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this._config=this._getConfig(n),this._element=t(e)[0],this._indicatorsElement=t(this._element).find(b.INDICATORS)[0],this._addEventListeners()}var T=s.prototype;return T.next=function(){this._isSliding||this._slide(c)},T.nextWhenVisible=function(){!document.hidden&&t(this._element).is(":visible")&&"hidden"!==t(this._element).css("visibility")&&this.next()},T.prev=function(){this._isSliding||this._slide(h)},T.pause=function(e){e||(this._isPaused=!0),t(this._element).find(b.NEXT_PREV)[0]&&k.supportsTransitionEnd()&&(k.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},T.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},T.to=function(e){var n=this;this._activeElement=t(this._element).find(b.ACTIVE_ITEM)[0];var i=this._getItemIndex(this._activeElement);if(!(e>this._items.length-1||e<0))if(this._isSliding)t(this._element).one(d.SLID,function(){return n.to(e)});else{if(i===e)return this.pause(),void this.cycle();var r=e>i?c:h;this._slide(r,this._items[e])}},T.dispose=function(){t(this._element).off(o),t.removeData(this._element,n),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},T._getConfig=function(t){return t=r({},a,t),k.typeCheckConfig(e,t,l),t},T._addEventListeners=function(){var e=this;this._config.keyboard&&t(this._element).on(d.KEYDOWN,function(t){return e._keydown(t)}),"hover"===this._config.pause&&(t(this._element).on(d.MOUSEENTER,function(t){return e.pause(t)}).on(d.MOUSELEAVE,function(t){return e.cycle(t)}),"ontouchstart"in document.documentElement&&t(this._element).on(d.TOUCHEND,function(){e.pause(),e.touchTimeout&&clearTimeout(e.touchTimeout),e.touchTimeout=setTimeout(function(t){return e.cycle(t)},500+e._config.interval)}))},T._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},T._getItemIndex=function(e){return this._items=t.makeArray(t(e).parent().find(b.ITEM)),this._items.indexOf(e)},T._getItemByDirection=function(t,e){var n=t===c,i=t===h,r=this._getItemIndex(e),o=this._items.length-1;if((i&&0===r||n&&r===o)&&!this._config.wrap)return e;var s=(r+(t===h?-1:1))%this._items.length;return-1===s?this._items[this._items.length-1]:this._items[s]},T._triggerSlideEvent=function(e,n){var i=this._getItemIndex(e),r=this._getItemIndex(t(this._element).find(b.ACTIVE_ITEM)[0]),o=t.Event(d.SLIDE,{relatedTarget:e,direction:n,from:r,to:i});return t(this._element).trigger(o),o},T._setActiveIndicatorElement=function(e){if(this._indicatorsElement){t(this._indicatorsElement).find(b.ACTIVE).removeClass(g);var n=this._indicatorsElement.children[this._getItemIndex(e)];n&&t(n).addClass(g)}},T._slide=function(e,n){var i,r,o,s=this,a=t(this._element).find(b.ACTIVE_ITEM)[0],l=this._getItemIndex(a),h=n||a&&this._getItemByDirection(e,a),p=this._getItemIndex(h),T=Boolean(this._interval);if(e===c?(i=v,r=E,o=f):(i=_,r=y,o=u),h&&t(h).hasClass(g))this._isSliding=!1;else if(!this._triggerSlideEvent(h,o).isDefaultPrevented()&&a&&h){this._isSliding=!0,T&&this.pause(),this._setActiveIndicatorElement(h);var C=t.Event(d.SLID,{relatedTarget:h,direction:o,from:l,to:p});k.supportsTransitionEnd()&&t(this._element).hasClass(m)?(t(h).addClass(r),k.reflow(h),t(a).addClass(i),t(h).addClass(i),t(a).one(k.TRANSITION_END,function(){t(h).removeClass(i+" "+r).addClass(g),t(a).removeClass(g+" "+r+" "+i),s._isSliding=!1,setTimeout(function(){return t(s._element).trigger(C)},0)}).emulateTransitionEnd(600)):(t(a).removeClass(g),t(h).addClass(g),this._isSliding=!1,t(this._element).trigger(C)),T&&this.cycle()}},s._jQueryInterface=function(e){return this.each(function(){var i=t(this).data(n),o=r({},a,t(this).data());"object"==typeof e&&(o=r({},o,e));var l="string"==typeof e?e:o.slide;if(i||(i=new s(this,o),t(this).data(n,i)),"number"==typeof e)i.to(e);else if("string"==typeof l){if("undefined"==typeof i[l])throw new TypeError('No method named "'+l+'"');i[l]()}else o.interval&&(i.pause(),i.cycle())})},s._dataApiClickHandler=function(e){var i=k.getSelectorFromElement(this);if(i){var o=t(i)[0];if(o&&t(o).hasClass(p)){var a=r({},t(o).data(),t(this).data()),l=this.getAttribute("data-slide-to");l&&(a.interval=!1),s._jQueryInterface.call(t(o),a),l&&t(o).data(n).to(l),e.preventDefault()}}},i(s,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return a}}]),s}();return t(document).on(d.CLICK_DATA_API,b.DATA_SLIDE,T._dataApiClickHandler),t(window).on(d.LOAD_DATA_API,function(){t(b.DATA_RIDE).each(function(){var e=t(this);T._jQueryInterface.call(e,e.data())})}),t.fn[e]=T._jQueryInterface,t.fn[e].Constructor=T,t.fn[e].noConflict=function(){return t.fn[e]=s,T._jQueryInterface},T}(e),R=function(t){var e="collapse",n="bs.collapse",o="."+n,s=t.fn[e],a={toggle:!0,parent:""},l={toggle:"boolean",parent:"(string|element)"},c={SHOW:"show"+o,SHOWN:"shown"+o,HIDE:"hide"+o,HIDDEN:"hidden"+o,CLICK_DATA_API:"click"+o+".data-api"},h="show",f="collapse",u="collapsing",d="collapsed",p="width",g="height",m={ACTIVES:".show, .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},_=function(){function o(e,n){this._isTransitioning=!1,this._element=e,this._config=this._getConfig(n),this._triggerArray=t.makeArray(t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'));for(var i=t(m.DATA_TOGGLE),r=0;r<i.length;r++){var o=i[r],s=k.getSelectorFromElement(o);null!==s&&t(s).filter(e).length>0&&(this._selector=s,this._triggerArray.push(o))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var s=o.prototype;return s.toggle=function(){t(this._element).hasClass(h)?this.hide():this.show()},s.show=function(){var e,i,r=this;if(!this._isTransitioning&&!t(this._element).hasClass(h)&&(this._parent&&0===(e=t.makeArray(t(this._parent).find(m.ACTIVES).filter('[data-parent="'+this._config.parent+'"]'))).length&&(e=null),!(e&&(i=t(e).not(this._selector).data(n))&&i._isTransitioning))){var s=t.Event(c.SHOW);if(t(this._element).trigger(s),!s.isDefaultPrevented()){e&&(o._jQueryInterface.call(t(e).not(this._selector),"hide"),i||t(e).data(n,null));var a=this._getDimension();t(this._element).removeClass(f).addClass(u),this._element.style[a]=0,this._triggerArray.length>0&&t(this._triggerArray).removeClass(d).attr("aria-expanded",!0),this.setTransitioning(!0);var l=function(){t(r._element).removeClass(u).addClass(f).addClass(h),r._element.style[a]="",r.setTransitioning(!1),t(r._element).trigger(c.SHOWN)};if(k.supportsTransitionEnd()){var p="scroll"+(a[0].toUpperCase()+a.slice(1));t(this._element).one(k.TRANSITION_END,l).emulateTransitionEnd(600),this._element.style[a]=this._element[p]+"px"}else l()}}},s.hide=function(){var e=this;if(!this._isTransitioning&&t(this._element).hasClass(h)){var n=t.Event(c.HIDE);if(t(this._element).trigger(n),!n.isDefaultPrevented()){var i=this._getDimension();if(this._element.style[i]=this._element.getBoundingClientRect()[i]+"px",k.reflow(this._element),t(this._element).addClass(u).removeClass(f).removeClass(h),this._triggerArray.length>0)for(var r=0;r<this._triggerArray.length;r++){var o=this._triggerArray[r],s=k.getSelectorFromElement(o);if(null!==s)t(s).hasClass(h)||t(o).addClass(d).attr("aria-expanded",!1)}this.setTransitioning(!0);var a=function(){e.setTransitioning(!1),t(e._element).removeClass(u).addClass(f).trigger(c.HIDDEN)};this._element.style[i]="",k.supportsTransitionEnd()?t(this._element).one(k.TRANSITION_END,a).emulateTransitionEnd(600):a()}}},s.setTransitioning=function(t){this._isTransitioning=t},s.dispose=function(){t.removeData(this._element,n),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},s._getConfig=function(t){return(t=r({},a,t)).toggle=Boolean(t.toggle),k.typeCheckConfig(e,t,l),t},s._getDimension=function(){return t(this._element).hasClass(p)?p:g},s._getParent=function(){var e=this,n=null;k.isElement(this._config.parent)?(n=this._config.parent,"undefined"!=typeof this._config.parent.jquery&&(n=this._config.parent[0])):n=t(this._config.parent)[0];var i='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return t(n).find(i).each(function(t,n){e._addAriaAndCollapsedClass(o._getTargetFromElement(n),[n])}),n},s._addAriaAndCollapsedClass=function(e,n){if(e){var i=t(e).hasClass(h);n.length>0&&t(n).toggleClass(d,!i).attr("aria-expanded",i)}},o._getTargetFromElement=function(e){var n=k.getSelectorFromElement(e);return n?t(n)[0]:null},o._jQueryInterface=function(e){return this.each(function(){var i=t(this),s=i.data(n),l=r({},a,i.data(),"object"==typeof e&&e);if(!s&&l.toggle&&/show|hide/.test(e)&&(l.toggle=!1),s||(s=new o(this,l),i.data(n,s)),"string"==typeof e){if("undefined"==typeof s[e])throw new TypeError('No method named "'+e+'"');s[e]()}})},i(o,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return a}}]),o}();return t(document).on(c.CLICK_DATA_API,m.DATA_TOGGLE,function(e){"A"===e.currentTarget.tagName&&e.preventDefault();var i=t(this),r=k.getSelectorFromElement(this);t(r).each(function(){var e=t(this),r=e.data(n)?"toggle":i.data();_._jQueryInterface.call(e,r)})}),t.fn[e]=_._jQueryInterface,t.fn[e].Constructor=_,t.fn[e].noConflict=function(){return t.fn[e]=s,_._jQueryInterface},_}(e),j="undefined"!=typeof window&&"undefined"!=typeof document,H=["Edge","Trident","Firefox"],M=0,W=0;W<H.length;W+=1)if(j&&navigator.userAgent.indexOf(H[W])>=0){M=1;break}var U=j&&window.Promise?function(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then(function(){e=!1,t()}))}}:function(t){var e=!1;return function(){e||(e=!0,setTimeout(function(){e=!1,t()},M))}};function B(t){return t&&"[object Function]"==={}.toString.call(t)}function F(t,e){if(1!==t.nodeType)return[];var n=getComputedStyle(t,null);return e?n[e]:n}function K(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function V(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=F(t),n=e.overflow,i=e.overflowX,r=e.overflowY;return/(auto|scroll)/.test(n+r+i)?t:V(K(t))}function Q(t){var e=t&&t.offsetParent,n=e&&e.nodeName;return n&&"BODY"!==n&&"HTML"!==n?-1!==["TD","TABLE"].indexOf(e.nodeName)&&"static"===F(e,"position")?Q(e):e:t?t.ownerDocument.documentElement:document.documentElement}function Y(t){return null!==t.parentNode?Y(t.parentNode):t}function G(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,i=n?t:e,r=n?e:t,o=document.createRange();o.setStart(i,0),o.setEnd(r,0);var s,a,l=o.commonAncestorContainer;if(t!==l&&e!==l||i.contains(r))return"BODY"===(a=(s=l).nodeName)||"HTML"!==a&&Q(s.firstElementChild)!==s?Q(l):l;var c=Y(t);return c.host?G(c.host,e):G(t,Y(e).host)}function q(t){var e="top"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",n=t.nodeName;if("BODY"===n||"HTML"===n){var i=t.ownerDocument.documentElement;return(t.ownerDocument.scrollingElement||i)[e]}return t[e]}function z(t,e){var n="x"===e?"Left":"Top",i="Left"===n?"Right":"Bottom";return parseFloat(t["border"+n+"Width"],10)+parseFloat(t["border"+i+"Width"],10)}var X=void 0,Z=function(){return void 0===X&&(X=-1!==navigator.appVersion.indexOf("MSIE 10")),X};function J(t,e,n,i){return Math.max(e["offset"+t],e["scroll"+t],n["client"+t],n["offset"+t],n["scroll"+t],Z()?n["offset"+t]+i["margin"+("Height"===t?"Top":"Left")]+i["margin"+("Height"===t?"Bottom":"Right")]:0)}function $(){var t=document.body,e=document.documentElement,n=Z()&&getComputedStyle(e);return{height:J("Height",t,e,n),width:J("Width",t,e,n)}}var tt=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},et=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),nt=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},it=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};function rt(t){return it({},t,{right:t.left+t.width,bottom:t.top+t.height})}function ot(t){var e={};if(Z())try{e=t.getBoundingClientRect();var n=q(t,"top"),i=q(t,"left");e.top+=n,e.left+=i,e.bottom+=n,e.right+=i}catch(t){}else e=t.getBoundingClientRect();var r={left:e.left,top:e.top,width:e.right-e.left,height:e.bottom-e.top},o="HTML"===t.nodeName?$():{},s=o.width||t.clientWidth||r.right-r.left,a=o.height||t.clientHeight||r.bottom-r.top,l=t.offsetWidth-s,c=t.offsetHeight-a;if(l||c){var h=F(t);l-=z(h,"x"),c-=z(h,"y"),r.width-=l,r.height-=c}return rt(r)}function st(t,e){var n=Z(),i="HTML"===e.nodeName,r=ot(t),o=ot(e),s=V(t),a=F(e),l=parseFloat(a.borderTopWidth,10),c=parseFloat(a.borderLeftWidth,10),h=rt({top:r.top-o.top-l,left:r.left-o.left-c,width:r.width,height:r.height});if(h.marginTop=0,h.marginLeft=0,!n&&i){var f=parseFloat(a.marginTop,10),u=parseFloat(a.marginLeft,10);h.top-=l-f,h.bottom-=l-f,h.left-=c-u,h.right-=c-u,h.marginTop=f,h.marginLeft=u}return(n?e.contains(s):e===s&&"BODY"!==s.nodeName)&&(h=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=q(e,"top"),r=q(e,"left"),o=n?-1:1;return t.top+=i*o,t.bottom+=i*o,t.left+=r*o,t.right+=r*o,t}(h,e)),h}function at(t,e,n,i){var r,o,s,a,l,c,h,f={top:0,left:0},u=G(t,e);if("viewport"===i)o=(r=u).ownerDocument.documentElement,s=st(r,o),a=Math.max(o.clientWidth,window.innerWidth||0),l=Math.max(o.clientHeight,window.innerHeight||0),c=q(o),h=q(o,"left"),f=rt({top:c-s.top+s.marginTop,left:h-s.left+s.marginLeft,width:a,height:l});else{var d=void 0;"scrollParent"===i?"BODY"===(d=V(K(e))).nodeName&&(d=t.ownerDocument.documentElement):d="window"===i?t.ownerDocument.documentElement:i;var p=st(d,u);if("HTML"!==d.nodeName||function t(e){var n=e.nodeName;return"BODY"!==n&&"HTML"!==n&&("fixed"===F(e,"position")||t(K(e)))}(u))f=p;else{var g=$(),m=g.height,_=g.width;f.top+=p.top-p.marginTop,f.bottom=m+p.top,f.left+=p.left-p.marginLeft,f.right=_+p.left}}return f.left+=n,f.top+=n,f.right-=n,f.bottom-=n,f}function lt(t,e,n,i,r){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var s=at(n,i,o,r),a={top:{width:s.width,height:e.top-s.top},right:{width:s.right-e.right,height:s.height},bottom:{width:s.width,height:s.bottom-e.bottom},left:{width:e.left-s.left,height:s.height}},l=Object.keys(a).map(function(t){return it({key:t},a[t],{area:(e=a[t],e.width*e.height)});var e}).sort(function(t,e){return e.area-t.area}),c=l.filter(function(t){var e=t.width,i=t.height;return e>=n.clientWidth&&i>=n.clientHeight}),h=c.length>0?c[0].key:l[0].key,f=t.split("-")[1];return h+(f?"-"+f:"")}function ct(t,e,n){return st(n,G(e,n))}function ht(t){var e=getComputedStyle(t),n=parseFloat(e.marginTop)+parseFloat(e.marginBottom),i=parseFloat(e.marginLeft)+parseFloat(e.marginRight);return{width:t.offsetWidth+i,height:t.offsetHeight+n}}function ft(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,function(t){return e[t]})}function ut(t,e,n){n=n.split("-")[0];var i=ht(t),r={width:i.width,height:i.height},o=-1!==["right","left"].indexOf(n),s=o?"top":"left",a=o?"left":"top",l=o?"height":"width",c=o?"width":"height";return r[s]=e[s]+e[l]/2-i[l]/2,r[a]=n===a?e[a]-i[c]:e[ft(a)],r}function dt(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function pt(t,e,n){return(void 0===n?t:t.slice(0,function(t,e,n){if(Array.prototype.findIndex)return t.findIndex(function(t){return t[e]===n});var i=dt(t,function(t){return t[e]===n});return t.indexOf(i)}(t,"name",n))).forEach(function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=t.function||t.fn;t.enabled&&B(n)&&(e.offsets.popper=rt(e.offsets.popper),e.offsets.reference=rt(e.offsets.reference),e=n(e,t))}),e}function gt(t,e){return t.some(function(t){var n=t.name;return t.enabled&&n===e})}function mt(t){for(var e=[!1,"ms","Webkit","Moz","O"],n=t.charAt(0).toUpperCase()+t.slice(1),i=0;i<e.length-1;i++){var r=e[i],o=r?""+r+n:t;if("undefined"!=typeof document.body.style[o])return o}return null}function _t(t){var e=t.ownerDocument;return e?e.defaultView:window}function vt(t,e,n,i){n.updateBound=i,_t(t).addEventListener("resize",n.updateBound,{passive:!0});var r=V(t);return function t(e,n,i,r){var o="BODY"===e.nodeName,s=o?e.ownerDocument.defaultView:e;s.addEventListener(n,i,{passive:!0}),o||t(V(s.parentNode),n,i,r),r.push(s)}(r,"scroll",n.updateBound,n.scrollParents),n.scrollElement=r,n.eventsEnabled=!0,n}function Et(){var t,e;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(t=this.reference,e=this.state,_t(t).removeEventListener("resize",e.updateBound),e.scrollParents.forEach(function(t){t.removeEventListener("scroll",e.updateBound)}),e.updateBound=null,e.scrollParents=[],e.scrollElement=null,e.eventsEnabled=!1,e))}function yt(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(t)}function bt(t,e){Object.keys(e).forEach(function(n){var i="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&yt(e[n])&&(i="px"),t.style[n]=e[n]+i})}function Tt(t,e,n){var i=dt(t,function(t){return t.name===e}),r=!!i&&t.some(function(t){return t.name===n&&t.enabled&&t.order<i.order});if(!r){var o="`"+e+"`",s="`"+n+"`";console.warn(s+" modifier is required by "+o+" modifier in order to work, be sure to include it before "+o+"!")}return r}var Ct=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],wt=Ct.slice(3);function It(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=wt.indexOf(t),i=wt.slice(n+1).concat(wt.slice(0,n));return e?i.reverse():i}var At={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function Dt(t,e,n,i){var r=[0,0],o=-1!==["right","left"].indexOf(i),s=t.split(/(\+|\-)/).map(function(t){return t.trim()}),a=s.indexOf(dt(s,function(t){return-1!==t.search(/,|\s/)}));s[a]&&-1===s[a].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,c=-1!==a?[s.slice(0,a).concat([s[a].split(l)[0]]),[s[a].split(l)[1]].concat(s.slice(a+1))]:[s];return(c=c.map(function(t,i){var r=(1===i?!o:o)?"height":"width",s=!1;return t.reduce(function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,s=!0,t):s?(t[t.length-1]+=e,s=!1,t):t.concat(e)},[]).map(function(t){return function(t,e,n,i){var r=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+r[1],s=r[2];if(!o)return t;if(0===s.indexOf("%")){var a=void 0;switch(s){case"%p":a=n;break;case"%":case"%r":default:a=i}return rt(a)[e]/100*o}if("vh"===s||"vw"===s)return("vh"===s?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o;return o}(t,r,e,n)})})).forEach(function(t,e){t.forEach(function(n,i){yt(n)&&(r[e]+=n*("-"===t[i-1]?-1:1))})}),r}var St={placement:"bottom",eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var e=t.placement,n=e.split("-")[0],i=e.split("-")[1];if(i){var r=t.offsets,o=r.reference,s=r.popper,a=-1!==["bottom","top"].indexOf(n),l=a?"left":"top",c=a?"width":"height",h={start:nt({},l,o[l]),end:nt({},l,o[l]+o[c]-s[c])};t.offsets.popper=it({},s,h[i])}return t}},offset:{order:200,enabled:!0,fn:function(t,e){var n=e.offset,i=t.placement,r=t.offsets,o=r.popper,s=r.reference,a=i.split("-")[0],l=void 0;return l=yt(+n)?[+n,0]:Dt(n,o,s,a),"left"===a?(o.top+=l[0],o.left-=l[1]):"right"===a?(o.top+=l[0],o.left+=l[1]):"top"===a?(o.left+=l[0],o.top-=l[1]):"bottom"===a&&(o.left+=l[0],o.top+=l[1]),t.popper=o,t},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,e){var n=e.boundariesElement||Q(t.instance.popper);t.instance.reference===n&&(n=Q(n));var i=at(t.instance.popper,t.instance.reference,e.padding,n);e.boundaries=i;var r=e.priority,o=t.offsets.popper,s={primary:function(t){var n=o[t];return o[t]<i[t]&&!e.escapeWithReference&&(n=Math.max(o[t],i[t])),nt({},t,n)},secondary:function(t){var n="right"===t?"left":"top",r=o[n];return o[t]>i[t]&&!e.escapeWithReference&&(r=Math.min(o[n],i[t]-("right"===t?o.width:o.height))),nt({},n,r)}};return r.forEach(function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";o=it({},o,s[e](t))}),t.offsets.popper=o,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,n=e.popper,i=e.reference,r=t.placement.split("-")[0],o=Math.floor,s=-1!==["top","bottom"].indexOf(r),a=s?"right":"bottom",l=s?"left":"top",c=s?"width":"height";return n[a]<o(i[l])&&(t.offsets.popper[l]=o(i[l])-n[c]),n[l]>o(i[a])&&(t.offsets.popper[l]=o(i[a])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var n;if(!Tt(t.instance.modifiers,"arrow","keepTogether"))return t;var i=e.element;if("string"==typeof i){if(!(i=t.instance.popper.querySelector(i)))return t}else if(!t.instance.popper.contains(i))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var r=t.placement.split("-")[0],o=t.offsets,s=o.popper,a=o.reference,l=-1!==["left","right"].indexOf(r),c=l?"height":"width",h=l?"Top":"Left",f=h.toLowerCase(),u=l?"left":"top",d=l?"bottom":"right",p=ht(i)[c];a[d]-p<s[f]&&(t.offsets.popper[f]-=s[f]-(a[d]-p)),a[f]+p>s[d]&&(t.offsets.popper[f]+=a[f]+p-s[d]),t.offsets.popper=rt(t.offsets.popper);var g=a[f]+a[c]/2-p/2,m=F(t.instance.popper),_=parseFloat(m["margin"+h],10),v=parseFloat(m["border"+h+"Width"],10),E=g-t.offsets.popper[f]-_-v;return E=Math.max(Math.min(s[c]-p,E),0),t.arrowElement=i,t.offsets.arrow=(nt(n={},f,Math.round(E)),nt(n,u,""),n),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,e){if(gt(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var n=at(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement),i=t.placement.split("-")[0],r=ft(i),o=t.placement.split("-")[1]||"",s=[];switch(e.behavior){case At.FLIP:s=[i,r];break;case At.CLOCKWISE:s=It(i);break;case At.COUNTERCLOCKWISE:s=It(i,!0);break;default:s=e.behavior}return s.forEach(function(a,l){if(i!==a||s.length===l+1)return t;i=t.placement.split("-")[0],r=ft(i);var c,h=t.offsets.popper,f=t.offsets.reference,u=Math.floor,d="left"===i&&u(h.right)>u(f.left)||"right"===i&&u(h.left)<u(f.right)||"top"===i&&u(h.bottom)>u(f.top)||"bottom"===i&&u(h.top)<u(f.bottom),p=u(h.left)<u(n.left),g=u(h.right)>u(n.right),m=u(h.top)<u(n.top),_=u(h.bottom)>u(n.bottom),v="left"===i&&p||"right"===i&&g||"top"===i&&m||"bottom"===i&&_,E=-1!==["top","bottom"].indexOf(i),y=!!e.flipVariations&&(E&&"start"===o&&p||E&&"end"===o&&g||!E&&"start"===o&&m||!E&&"end"===o&&_);(d||v||y)&&(t.flipped=!0,(d||v)&&(i=s[l+1]),y&&(o="end"===(c=o)?"start":"start"===c?"end":c),t.placement=i+(o?"-"+o:""),t.offsets.popper=it({},t.offsets.popper,ut(t.instance.popper,t.offsets.reference,t.placement)),t=pt(t.instance.modifiers,t,"flip"))}),t},behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,n=e.split("-")[0],i=t.offsets,r=i.popper,o=i.reference,s=-1!==["left","right"].indexOf(n),a=-1===["top","left"].indexOf(n);return r[s?"left":"top"]=o[n]-(a?r[s?"width":"height"]:0),t.placement=ft(e),t.offsets.popper=rt(r),t}},hide:{order:800,enabled:!0,fn:function(t){if(!Tt(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=dt(t.instance.modifiers,function(t){return"preventOverflow"===t.name}).boundaries;if(e.bottom<n.top||e.left>n.right||e.top>n.bottom||e.right<n.left){if(!0===t.hide)return t;t.hide=!0,t.attributes["x-out-of-boundaries"]=""}else{if(!1===t.hide)return t;t.hide=!1,t.attributes["x-out-of-boundaries"]=!1}return t}},computeStyle:{order:850,enabled:!0,fn:function(t,e){var n=e.x,i=e.y,r=t.offsets.popper,o=dt(t.instance.modifiers,function(t){return"applyStyle"===t.name}).gpuAcceleration;void 0!==o&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var s=void 0!==o?o:e.gpuAcceleration,a=ot(Q(t.instance.popper)),l={position:r.position},c={left:Math.floor(r.left),top:Math.floor(r.top),bottom:Math.floor(r.bottom),right:Math.floor(r.right)},h="bottom"===n?"top":"bottom",f="right"===i?"left":"right",u=mt("transform"),d=void 0,p=void 0;if(p="bottom"===h?-a.height+c.bottom:c.top,d="right"===f?-a.width+c.right:c.left,s&&u)l[u]="translate3d("+d+"px, "+p+"px, 0)",l[h]=0,l[f]=0,l.willChange="transform";else{var g="bottom"===h?-1:1,m="right"===f?-1:1;l[h]=p*g,l[f]=d*m,l.willChange=h+", "+f}var _={"x-placement":t.placement};return t.attributes=it({},_,t.attributes),t.styles=it({},l,t.styles),t.arrowStyles=it({},t.offsets.arrow,t.arrowStyles),t},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(t){var e,n;return bt(t.instance.popper,t.styles),e=t.instance.popper,n=t.attributes,Object.keys(n).forEach(function(t){!1!==n[t]?e.setAttribute(t,n[t]):e.removeAttribute(t)}),t.arrowElement&&Object.keys(t.arrowStyles).length&&bt(t.arrowElement,t.arrowStyles),t},onLoad:function(t,e,n,i,r){var o=ct(0,e,t),s=lt(n.placement,o,e,t,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return e.setAttribute("x-placement",s),bt(e,{position:"absolute"}),n},gpuAcceleration:void 0}}},Ot=function(){function t(e,n){var i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};tt(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(i.update)},this.update=U(this.update.bind(this)),this.options=it({},t.Defaults,r),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(it({},t.Defaults.modifiers,r.modifiers)).forEach(function(e){i.options.modifiers[e]=it({},t.Defaults.modifiers[e]||{},r.modifiers?r.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(t){return it({name:t},i.options.modifiers[t])}).sort(function(t,e){return t.order-e.order}),this.modifiers.forEach(function(t){t.enabled&&B(t.onLoad)&&t.onLoad(i.reference,i.popper,i.options,t,i.state)}),this.update();var o=this.options.eventsEnabled;o&&this.enableEventListeners(),this.state.eventsEnabled=o}return et(t,[{key:"update",value:function(){return function(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=ct(this.state,this.popper,this.reference),t.placement=lt(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.offsets.popper=ut(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position="absolute",t=pt(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}.call(this)}},{key:"destroy",value:function(){return function(){return this.state.isDestroyed=!0,gt(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.left="",this.popper.style.position="",this.popper.style.top="",this.popper.style[mt("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}.call(this)}},{key:"enableEventListeners",value:function(){return function(){this.state.eventsEnabled||(this.state=vt(this.reference,this.options,this.state,this.scheduleUpdate))}.call(this)}},{key:"disableEventListeners",value:function(){return Et.call(this)}}]),t}();Ot.Utils=("undefined"!=typeof window?window:global).PopperUtils,Ot.placements=Ct,Ot.Defaults=St;var Nt=function(t){var e="dropdown",n="bs.dropdown",o="."+n,s=t.fn[e],a=new RegExp("38|40|27"),l={HIDE:"hide"+o,HIDDEN:"hidden"+o,SHOW:"show"+o,SHOWN:"shown"+o,CLICK:"click"+o,CLICK_DATA_API:"click"+o+".data-api",KEYDOWN_DATA_API:"keydown"+o+".data-api",KEYUP_DATA_API:"keyup"+o+".data-api"},c="disabled",h="show",f="dropup",u="dropright",d="dropleft",p="dropdown-menu-right",g="dropdown-menu-left",m="position-static",_='[data-toggle="dropdown"]',v=".dropdown form",E=".dropdown-menu",y=".navbar-nav",b=".dropdown-menu .dropdown-item:not(.disabled)",T="top-start",C="top-end",w="bottom-start",I="bottom-end",A="right-start",D="left-start",S={offset:0,flip:!0,boundary:"scrollParent"},O={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)"},N=function(){function s(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var v=s.prototype;return v.toggle=function(){if(!this._element.disabled&&!t(this._element).hasClass(c)){var e=s._getParentFromElement(this._element),n=t(this._menu).hasClass(h);if(s._clearMenus(),!n){var i={relatedTarget:this._element},r=t.Event(l.SHOW,i);if(t(e).trigger(r),!r.isDefaultPrevented()){if(!this._inNavbar){if("undefined"==typeof Ot)throw new TypeError("Bootstrap dropdown require Popper.js (https://popper.js.org)");var o=this._element;t(e).hasClass(f)&&(t(this._menu).hasClass(g)||t(this._menu).hasClass(p))&&(o=e),"scrollParent"!==this._config.boundary&&t(e).addClass(m),this._popper=new Ot(o,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===t(e).closest(y).length&&t("body").children().on("mouseover",null,t.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),t(this._menu).toggleClass(h),t(e).toggleClass(h).trigger(t.Event(l.SHOWN,i))}}}},v.dispose=function(){t.removeData(this._element,n),t(this._element).off(o),this._element=null,this._menu=null,null!==this._popper&&(this._popper.destroy(),this._popper=null)},v.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},v._addEventListeners=function(){var e=this;t(this._element).on(l.CLICK,function(t){t.preventDefault(),t.stopPropagation(),e.toggle()})},v._getConfig=function(n){return n=r({},this.constructor.Default,t(this._element).data(),n),k.typeCheckConfig(e,n,this.constructor.DefaultType),n},v._getMenuElement=function(){if(!this._menu){var e=s._getParentFromElement(this._element);this._menu=t(e).find(E)[0]}return this._menu},v._getPlacement=function(){var e=t(this._element).parent(),n=w;return e.hasClass(f)?(n=T,t(this._menu).hasClass(p)&&(n=C)):e.hasClass(u)?n=A:e.hasClass(d)?n=D:t(this._menu).hasClass(p)&&(n=I),n},v._detectNavbar=function(){return t(this._element).closest(".navbar").length>0},v._getPopperConfig=function(){var t=this,e={};return"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=r({},e.offsets,t._config.offset(e.offsets)||{}),e}:e.offset=this._config.offset,{placement:this._getPlacement(),modifiers:{offset:e,flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}}},s._jQueryInterface=function(e){return this.each(function(){var i=t(this).data(n);if(i||(i=new s(this,"object"==typeof e?e:null),t(this).data(n,i)),"string"==typeof e){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[e]()}})},s._clearMenus=function(e){if(!e||3!==e.which&&("keyup"!==e.type||9===e.which))for(var i=t.makeArray(t(_)),r=0;r<i.length;r++){var o=s._getParentFromElement(i[r]),a=t(i[r]).data(n),c={relatedTarget:i[r]};if(a){var f=a._menu;if(t(o).hasClass(h)&&!(e&&("click"===e.type&&/input|textarea/i.test(e.target.tagName)||"keyup"===e.type&&9===e.which)&&t.contains(o,e.target))){var u=t.Event(l.HIDE,c);t(o).trigger(u),u.isDefaultPrevented()||("ontouchstart"in document.documentElement&&t("body").children().off("mouseover",null,t.noop),i[r].setAttribute("aria-expanded","false"),t(f).removeClass(h),t(o).removeClass(h).trigger(t.Event(l.HIDDEN,c)))}}}},s._getParentFromElement=function(e){var n,i=k.getSelectorFromElement(e);return i&&(n=t(i)[0]),n||e.parentNode},s._dataApiKeydownHandler=function(e){if((/input|textarea/i.test(e.target.tagName)?!(32===e.which||27!==e.which&&(40!==e.which&&38!==e.which||t(e.target).closest(E).length)):a.test(e.which))&&(e.preventDefault(),e.stopPropagation(),!this.disabled&&!t(this).hasClass(c))){var n=s._getParentFromElement(this),i=t(n).hasClass(h);if((i||27===e.which&&32===e.which)&&(!i||27!==e.which&&32!==e.which)){var r=t(n).find(b).get();if(0!==r.length){var o=r.indexOf(e.target);38===e.which&&o>0&&o--,40===e.which&&o<r.length-1&&o++,o<0&&(o=0),r[o].focus()}}else{if(27===e.which){var l=t(n).find(_)[0];t(l).trigger("focus")}t(this).trigger("click")}}},i(s,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return S}},{key:"DefaultType",get:function(){return O}}]),s}();return t(document).on(l.KEYDOWN_DATA_API,_,N._dataApiKeydownHandler).on(l.KEYDOWN_DATA_API,E,N._dataApiKeydownHandler).on(l.CLICK_DATA_API+" "+l.KEYUP_DATA_API,N._clearMenus).on(l.CLICK_DATA_API,_,function(e){e.preventDefault(),e.stopPropagation(),N._jQueryInterface.call(t(this),"toggle")}).on(l.CLICK_DATA_API,v,function(t){t.stopPropagation()}),t.fn[e]=N._jQueryInterface,t.fn[e].Constructor=N,t.fn[e].noConflict=function(){return t.fn[e]=s,N._jQueryInterface},N}(e),kt=function(t){var e="bs.modal",n="."+e,o=t.fn.modal,s={backdrop:!0,keyboard:!0,focus:!0,show:!0},a={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},l={HIDE:"hide"+n,HIDDEN:"hidden"+n,SHOW:"show"+n,SHOWN:"shown"+n,FOCUSIN:"focusin"+n,RESIZE:"resize"+n,CLICK_DISMISS:"click.dismiss"+n,KEYDOWN_DISMISS:"keydown.dismiss"+n,MOUSEUP_DISMISS:"mouseup.dismiss"+n,MOUSEDOWN_DISMISS:"mousedown.dismiss"+n,CLICK_DATA_API:"click.bs.modal.data-api"},c="modal-scrollbar-measure",h="modal-backdrop",f="modal-open",u="fade",d="show",p={DIALOG:".modal-dialog",DATA_TOGGLE:'[data-toggle="modal"]',DATA_DISMISS:'[data-dismiss="modal"]',FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"},g=function(){function o(e,n){this._config=this._getConfig(n),this._element=e,this._dialog=t(e).find(p.DIALOG)[0],this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._originalBodyPadding=0,this._scrollbarWidth=0}var g=o.prototype;return g.toggle=function(t){return this._isShown?this.hide():this.show(t)},g.show=function(e){var n=this;if(!this._isTransitioning&&!this._isShown){k.supportsTransitionEnd()&&t(this._element).hasClass(u)&&(this._isTransitioning=!0);var i=t.Event(l.SHOW,{relatedTarget:e});t(this._element).trigger(i),this._isShown||i.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),t(document.body).addClass(f),this._setEscapeEvent(),this._setResizeEvent(),t(this._element).on(l.CLICK_DISMISS,p.DATA_DISMISS,function(t){return n.hide(t)}),t(this._dialog).on(l.MOUSEDOWN_DISMISS,function(){t(n._element).one(l.MOUSEUP_DISMISS,function(e){t(e.target).is(n._element)&&(n._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return n._showElement(e)}))}},g.hide=function(e){var n=this;if(e&&e.preventDefault(),!this._isTransitioning&&this._isShown){var i=t.Event(l.HIDE);if(t(this._element).trigger(i),this._isShown&&!i.isDefaultPrevented()){this._isShown=!1;var r=k.supportsTransitionEnd()&&t(this._element).hasClass(u);r&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),t(document).off(l.FOCUSIN),t(this._element).removeClass(d),t(this._element).off(l.CLICK_DISMISS),t(this._dialog).off(l.MOUSEDOWN_DISMISS),r?t(this._element).one(k.TRANSITION_END,function(t){return n._hideModal(t)}).emulateTransitionEnd(300):this._hideModal()}}},g.dispose=function(){t.removeData(this._element,e),t(window,document,this._element,this._backdrop).off(n),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._scrollbarWidth=null},g.handleUpdate=function(){this._adjustDialog()},g._getConfig=function(t){return t=r({},s,t),k.typeCheckConfig("modal",t,a),t},g._showElement=function(e){var n=this,i=k.supportsTransitionEnd()&&t(this._element).hasClass(u);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.scrollTop=0,i&&k.reflow(this._element),t(this._element).addClass(d),this._config.focus&&this._enforceFocus();var r=t.Event(l.SHOWN,{relatedTarget:e}),o=function(){n._config.focus&&n._element.focus(),n._isTransitioning=!1,t(n._element).trigger(r)};i?t(this._dialog).one(k.TRANSITION_END,o).emulateTransitionEnd(300):o()},g._enforceFocus=function(){var e=this;t(document).off(l.FOCUSIN).on(l.FOCUSIN,function(n){document!==n.target&&e._element!==n.target&&0===t(e._element).has(n.target).length&&e._element.focus()})},g._setEscapeEvent=function(){var e=this;this._isShown&&this._config.keyboard?t(this._element).on(l.KEYDOWN_DISMISS,function(t){27===t.which&&(t.preventDefault(),e.hide())}):this._isShown||t(this._element).off(l.KEYDOWN_DISMISS)},g._setResizeEvent=function(){var e=this;this._isShown?t(window).on(l.RESIZE,function(t){return e.handleUpdate(t)}):t(window).off(l.RESIZE)},g._hideModal=function(){var e=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._isTransitioning=!1,this._showBackdrop(function(){t(document.body).removeClass(f),e._resetAdjustments(),e._resetScrollbar(),t(e._element).trigger(l.HIDDEN)})},g._removeBackdrop=function(){this._backdrop&&(t(this._backdrop).remove(),this._backdrop=null)},g._showBackdrop=function(e){var n=this,i=t(this._element).hasClass(u)?u:"";if(this._isShown&&this._config.backdrop){var r=k.supportsTransitionEnd()&&i;if(this._backdrop=document.createElement("div"),this._backdrop.className=h,i&&t(this._backdrop).addClass(i),t(this._backdrop).appendTo(document.body),t(this._element).on(l.CLICK_DISMISS,function(t){n._ignoreBackdropClick?n._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===n._config.backdrop?n._element.focus():n.hide())}),r&&k.reflow(this._backdrop),t(this._backdrop).addClass(d),!e)return;if(!r)return void e();t(this._backdrop).one(k.TRANSITION_END,e).emulateTransitionEnd(150)}else if(!this._isShown&&this._backdrop){t(this._backdrop).removeClass(d);var o=function(){n._removeBackdrop(),e&&e()};k.supportsTransitionEnd()&&t(this._element).hasClass(u)?t(this._backdrop).one(k.TRANSITION_END,o).emulateTransitionEnd(150):o()}else e&&e()},g._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},g._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},g._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},g._setScrollbar=function(){var e=this;if(this._isBodyOverflowing){t(p.FIXED_CONTENT).each(function(n,i){var r=t(i)[0].style.paddingRight,o=t(i).css("padding-right");t(i).data("padding-right",r).css("padding-right",parseFloat(o)+e._scrollbarWidth+"px")}),t(p.STICKY_CONTENT).each(function(n,i){var r=t(i)[0].style.marginRight,o=t(i).css("margin-right");t(i).data("margin-right",r).css("margin-right",parseFloat(o)-e._scrollbarWidth+"px")}),t(p.NAVBAR_TOGGLER).each(function(n,i){var r=t(i)[0].style.marginRight,o=t(i).css("margin-right");t(i).data("margin-right",r).css("margin-right",parseFloat(o)+e._scrollbarWidth+"px")});var n=document.body.style.paddingRight,i=t("body").css("padding-right");t("body").data("padding-right",n).css("padding-right",parseFloat(i)+this._scrollbarWidth+"px")}},g._resetScrollbar=function(){t(p.FIXED_CONTENT).each(function(e,n){var i=t(n).data("padding-right");"undefined"!=typeof i&&t(n).css("padding-right",i).removeData("padding-right")}),t(p.STICKY_CONTENT+", "+p.NAVBAR_TOGGLER).each(function(e,n){var i=t(n).data("margin-right");"undefined"!=typeof i&&t(n).css("margin-right",i).removeData("margin-right")});var e=t("body").data("padding-right");"undefined"!=typeof e&&t("body").css("padding-right",e).removeData("padding-right")},g._getScrollbarWidth=function(){var t=document.createElement("div");t.className=c,document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},o._jQueryInterface=function(n,i){return this.each(function(){var s=t(this).data(e),a=r({},o.Default,t(this).data(),"object"==typeof n&&n);if(s||(s=new o(this,a),t(this).data(e,s)),"string"==typeof n){if("undefined"==typeof s[n])throw new TypeError('No method named "'+n+'"');s[n](i)}else a.show&&s.show(i)})},i(o,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return s}}]),o}();return t(document).on(l.CLICK_DATA_API,p.DATA_TOGGLE,function(n){var i,o=this,s=k.getSelectorFromElement(this);s&&(i=t(s)[0]);var a=t(i).data(e)?"toggle":r({},t(i).data(),t(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||n.preventDefault();var c=t(i).one(l.SHOW,function(e){e.isDefaultPrevented()||c.one(l.HIDDEN,function(){t(o).is(":visible")&&o.focus()})});g._jQueryInterface.call(t(i),a,this)}),t.fn.modal=g._jQueryInterface,t.fn.modal.Constructor=g,t.fn.modal.noConflict=function(){return t.fn.modal=o,g._jQueryInterface},g}(e),Lt=function(t){var e="tooltip",n="bs.tooltip",o="."+n,s=t.fn[e],a=new RegExp("(^|\\s)bs-tooltip\\S+","g"),l={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)"},c={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},h={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent"},f="show",u="out",d={HIDE:"hide"+o,HIDDEN:"hidden"+o,SHOW:"show"+o,SHOWN:"shown"+o,INSERTED:"inserted"+o,CLICK:"click"+o,FOCUSIN:"focusin"+o,FOCUSOUT:"focusout"+o,MOUSEENTER:"mouseenter"+o,MOUSELEAVE:"mouseleave"+o},p="fade",g="show",m=".tooltip-inner",_=".arrow",v="hover",E="focus",y="click",b="manual",T=function(){function s(t,e){if("undefined"==typeof Ot)throw new TypeError("Bootstrap tooltips require Popper.js (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var T=s.prototype;return T.enable=function(){this._isEnabled=!0},T.disable=function(){this._isEnabled=!1},T.toggleEnabled=function(){this._isEnabled=!this._isEnabled},T.toggle=function(e){if(this._isEnabled)if(e){var n=this.constructor.DATA_KEY,i=t(e.currentTarget).data(n);i||(i=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(t(this.getTipElement()).hasClass(g))return void this._leave(null,this);this._enter(null,this)}},T.dispose=function(){clearTimeout(this._timeout),t.removeData(this.element,this.constructor.DATA_KEY),t(this.element).off(this.constructor.EVENT_KEY),t(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&t(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,null!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},T.show=function(){var e=this;if("none"===t(this.element).css("display"))throw new Error("Please use show on visible elements");var n=t.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){t(this.element).trigger(n);var i=t.contains(this.element.ownerDocument.documentElement,this.element);if(n.isDefaultPrevented()||!i)return;var r=this.getTipElement(),o=k.getUID(this.constructor.NAME);r.setAttribute("id",o),this.element.setAttribute("aria-describedby",o),this.setContent(),this.config.animation&&t(r).addClass(p);var a="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,l=this._getAttachment(a);this.addAttachmentClass(l);var c=!1===this.config.container?document.body:t(this.config.container);t(r).data(this.constructor.DATA_KEY,this),t.contains(this.element.ownerDocument.documentElement,this.tip)||t(r).appendTo(c),t(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new Ot(this.element,r,{placement:l,modifiers:{offset:{offset:this.config.offset},flip:{behavior:this.config.fallbackPlacement},arrow:{element:_},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){e._handlePopperPlacementChange(t)}}),t(r).addClass(g),"ontouchstart"in document.documentElement&&t("body").children().on("mouseover",null,t.noop);var h=function(){e.config.animation&&e._fixTransition();var n=e._hoverState;e._hoverState=null,t(e.element).trigger(e.constructor.Event.SHOWN),n===u&&e._leave(null,e)};k.supportsTransitionEnd()&&t(this.tip).hasClass(p)?t(this.tip).one(k.TRANSITION_END,h).emulateTransitionEnd(s._TRANSITION_DURATION):h()}},T.hide=function(e){var n=this,i=this.getTipElement(),r=t.Event(this.constructor.Event.HIDE),o=function(){n._hoverState!==f&&i.parentNode&&i.parentNode.removeChild(i),n._cleanTipClass(),n.element.removeAttribute("aria-describedby"),t(n.element).trigger(n.constructor.Event.HIDDEN),null!==n._popper&&n._popper.destroy(),e&&e()};t(this.element).trigger(r),r.isDefaultPrevented()||(t(i).removeClass(g),"ontouchstart"in document.documentElement&&t("body").children().off("mouseover",null,t.noop),this._activeTrigger[y]=!1,this._activeTrigger[E]=!1,this._activeTrigger[v]=!1,k.supportsTransitionEnd()&&t(this.tip).hasClass(p)?t(i).one(k.TRANSITION_END,o).emulateTransitionEnd(150):o(),this._hoverState="")},T.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},T.isWithContent=function(){return Boolean(this.getTitle())},T.addAttachmentClass=function(e){t(this.getTipElement()).addClass("bs-tooltip-"+e)},T.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},T.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(m),this.getTitle()),e.removeClass(p+" "+g)},T.setElementContent=function(e,n){var i=this.config.html;"object"==typeof n&&(n.nodeType||n.jquery)?i?t(n).parent().is(e)||e.empty().append(n):e.text(t(n).text()):e[i?"html":"text"](n)},T.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},T._getAttachment=function(t){return c[t.toUpperCase()]},T._setListeners=function(){var e=this;this.config.trigger.split(" ").forEach(function(n){if("click"===n)t(e.element).on(e.constructor.Event.CLICK,e.config.selector,function(t){return e.toggle(t)});else if(n!==b){var i=n===v?e.constructor.Event.MOUSEENTER:e.constructor.Event.FOCUSIN,r=n===v?e.constructor.Event.MOUSELEAVE:e.constructor.Event.FOCUSOUT;t(e.element).on(i,e.config.selector,function(t){return e._enter(t)}).on(r,e.config.selector,function(t){return e._leave(t)})}t(e.element).closest(".modal").on("hide.bs.modal",function(){return e.hide()})}),this.config.selector?this.config=r({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},T._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},T._enter=function(e,n){var i=this.constructor.DATA_KEY;(n=n||t(e.currentTarget).data(i))||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusin"===e.type?E:v]=!0),t(n.getTipElement()).hasClass(g)||n._hoverState===f?n._hoverState=f:(clearTimeout(n._timeout),n._hoverState=f,n.config.delay&&n.config.delay.show?n._timeout=setTimeout(function(){n._hoverState===f&&n.show()},n.config.delay.show):n.show())},T._leave=function(e,n){var i=this.constructor.DATA_KEY;(n=n||t(e.currentTarget).data(i))||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusout"===e.type?E:v]=!1),n._isWithActiveTrigger()||(clearTimeout(n._timeout),n._hoverState=u,n.config.delay&&n.config.delay.hide?n._timeout=setTimeout(function(){n._hoverState===u&&n.hide()},n.config.delay.hide):n.hide())},T._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},T._getConfig=function(n){return"number"==typeof(n=r({},this.constructor.Default,t(this.element).data(),n)).delay&&(n.delay={show:n.delay,hide:n.delay}),"number"==typeof n.title&&(n.title=n.title.toString()),"number"==typeof n.content&&(n.content=n.content.toString()),k.typeCheckConfig(e,n,this.constructor.DefaultType),n},T._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},T._cleanTipClass=function(){var e=t(this.getTipElement()),n=e.attr("class").match(a);null!==n&&n.length>0&&e.removeClass(n.join(""))},T._handlePopperPlacementChange=function(t){this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},T._fixTransition=function(){var e=this.getTipElement(),n=this.config.animation;null===e.getAttribute("x-placement")&&(t(e).removeClass(p),this.config.animation=!1,this.hide(),this.show(),this.config.animation=n)},s._jQueryInterface=function(e){return this.each(function(){var i=t(this).data(n),r="object"==typeof e&&e;if((i||!/dispose|hide/.test(e))&&(i||(i=new s(this,r),t(this).data(n,i)),"string"==typeof e)){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[e]()}})},i(s,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return h}},{key:"NAME",get:function(){return e}},{key:"DATA_KEY",get:function(){return n}},{key:"Event",get:function(){return d}},{key:"EVENT_KEY",get:function(){return o}},{key:"DefaultType",get:function(){return l}}]),s}();return t.fn[e]=T._jQueryInterface,t.fn[e].Constructor=T,t.fn[e].noConflict=function(){return t.fn[e]=s,T._jQueryInterface},T}(e),Pt=function(t){var e="popover",n="bs.popover",o="."+n,s=t.fn[e],a=new RegExp("(^|\\s)bs-popover\\S+","g"),l=r({},Lt.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),c=r({},Lt.DefaultType,{content:"(string|element|function)"}),h="fade",f="show",u=".popover-header",d=".popover-body",p={HIDE:"hide"+o,HIDDEN:"hidden"+o,SHOW:"show"+o,SHOWN:"shown"+o,INSERTED:"inserted"+o,CLICK:"click"+o,FOCUSIN:"focusin"+o,FOCUSOUT:"focusout"+o,MOUSEENTER:"mouseenter"+o,MOUSELEAVE:"mouseleave"+o},g=function(r){var s,g;function m(){return r.apply(this,arguments)||this}g=r,(s=m).prototype=Object.create(g.prototype),s.prototype.constructor=s,s.__proto__=g;var _=m.prototype;return _.isWithContent=function(){return this.getTitle()||this._getContent()},_.addAttachmentClass=function(e){t(this.getTipElement()).addClass("bs-popover-"+e)},_.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},_.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(u),this.getTitle());var n=this._getContent();"function"==typeof n&&(n=n.call(this.element)),this.setElementContent(e.find(d),n),e.removeClass(h+" "+f)},_._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},_._cleanTipClass=function(){var e=t(this.getTipElement()),n=e.attr("class").match(a);null!==n&&n.length>0&&e.removeClass(n.join(""))},m._jQueryInterface=function(e){return this.each(function(){var i=t(this).data(n),r="object"==typeof e?e:null;if((i||!/destroy|hide/.test(e))&&(i||(i=new m(this,r),t(this).data(n,i)),"string"==typeof e)){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[e]()}})},i(m,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return l}},{key:"NAME",get:function(){return e}},{key:"DATA_KEY",get:function(){return n}},{key:"Event",get:function(){return p}},{key:"EVENT_KEY",get:function(){return o}},{key:"DefaultType",get:function(){return c}}]),m}(Lt);return t.fn[e]=g._jQueryInterface,t.fn[e].Constructor=g,t.fn[e].noConflict=function(){return t.fn[e]=s,g._jQueryInterface},g}(e),xt=function(t){var e="scrollspy",n="bs.scrollspy",o="."+n,s=t.fn[e],a={offset:10,method:"auto",target:""},l={offset:"number",method:"string",target:"(string|element)"},c={ACTIVATE:"activate"+o,SCROLL:"scroll"+o,LOAD_DATA_API:"load"+o+".data-api"},h="dropdown-item",f="active",u={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",NAV_LIST_GROUP:".nav, .list-group",NAV_LINKS:".nav-link",NAV_ITEMS:".nav-item",LIST_ITEMS:".list-group-item",DROPDOWN:".dropdown",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},d="offset",p="position",g=function(){function s(e,n){var i=this;this._element=e,this._scrollElement="BODY"===e.tagName?window:e,this._config=this._getConfig(n),this._selector=this._config.target+" "+u.NAV_LINKS+","+this._config.target+" "+u.LIST_ITEMS+","+this._config.target+" "+u.DROPDOWN_ITEMS,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,t(this._scrollElement).on(c.SCROLL,function(t){return i._process(t)}),this.refresh(),this._process()}var g=s.prototype;return g.refresh=function(){var e=this,n=this._scrollElement===this._scrollElement.window?d:p,i="auto"===this._config.method?n:this._config.method,r=i===p?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),t.makeArray(t(this._selector)).map(function(e){var n,o=k.getSelectorFromElement(e);if(o&&(n=t(o)[0]),n){var s=n.getBoundingClientRect();if(s.width||s.height)return[t(n)[i]().top+r,o]}return null}).filter(function(t){return t}).sort(function(t,e){return t[0]-e[0]}).forEach(function(t){e._offsets.push(t[0]),e._targets.push(t[1])})},g.dispose=function(){t.removeData(this._element,n),t(this._scrollElement).off(o),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},g._getConfig=function(n){if("string"!=typeof(n=r({},a,n)).target){var i=t(n.target).attr("id");i||(i=k.getUID(e),t(n.target).attr("id",i)),n.target="#"+i}return k.typeCheckConfig(e,n,l),n},g._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},g._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},g._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},g._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var r=this._offsets.length;r--;){this._activeTarget!==this._targets[r]&&t>=this._offsets[r]&&("undefined"==typeof this._offsets[r+1]||t<this._offsets[r+1])&&this._activate(this._targets[r])}}},g._activate=function(e){this._activeTarget=e,this._clear();var n=this._selector.split(",");n=n.map(function(t){return t+'[data-target="'+e+'"],'+t+'[href="'+e+'"]'});var i=t(n.join(","));i.hasClass(h)?(i.closest(u.DROPDOWN).find(u.DROPDOWN_TOGGLE).addClass(f),i.addClass(f)):(i.addClass(f),i.parents(u.NAV_LIST_GROUP).prev(u.NAV_LINKS+", "+u.LIST_ITEMS).addClass(f),i.parents(u.NAV_LIST_GROUP).prev(u.NAV_ITEMS).children(u.NAV_LINKS).addClass(f)),t(this._scrollElement).trigger(c.ACTIVATE,{relatedTarget:e})},g._clear=function(){t(this._selector).filter(u.ACTIVE).removeClass(f)},s._jQueryInterface=function(e){return this.each(function(){var i=t(this).data(n);if(i||(i=new s(this,"object"==typeof e&&e),t(this).data(n,i)),"string"==typeof e){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[e]()}})},i(s,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return a}}]),s}();return t(window).on(c.LOAD_DATA_API,function(){for(var e=t.makeArray(t(u.DATA_SPY)),n=e.length;n--;){var i=t(e[n]);g._jQueryInterface.call(i,i.data())}}),t.fn[e]=g._jQueryInterface,t.fn[e].Constructor=g,t.fn[e].noConflict=function(){return t.fn[e]=s,g._jQueryInterface},g}(e),Rt=function(t){var e=".bs.tab",n=t.fn.tab,r={HIDE:"hide"+e,HIDDEN:"hidden"+e,SHOW:"show"+e,SHOWN:"shown"+e,CLICK_DATA_API:"click.bs.tab.data-api"},o="dropdown-menu",s="active",a="disabled",l="fade",c="show",h=".dropdown",f=".nav, .list-group",u=".active",d="> li > .active",p='[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',g=".dropdown-toggle",m="> .dropdown-menu .active",_=function(){function e(t){this._element=t}var n=e.prototype;return n.show=function(){var e=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&t(this._element).hasClass(s)||t(this._element).hasClass(a))){var n,i,o=t(this._element).closest(f)[0],l=k.getSelectorFromElement(this._element);if(o){var c="UL"===o.nodeName?d:u;i=(i=t.makeArray(t(o).find(c)))[i.length-1]}var h=t.Event(r.HIDE,{relatedTarget:this._element}),p=t.Event(r.SHOW,{relatedTarget:i});if(i&&t(i).trigger(h),t(this._element).trigger(p),!p.isDefaultPrevented()&&!h.isDefaultPrevented()){l&&(n=t(l)[0]),this._activate(this._element,o);var g=function(){var n=t.Event(r.HIDDEN,{relatedTarget:e._element}),o=t.Event(r.SHOWN,{relatedTarget:i});t(i).trigger(n),t(e._element).trigger(o)};n?this._activate(n,n.parentNode,g):g()}}},n.dispose=function(){t.removeData(this._element,"bs.tab"),this._element=null},n._activate=function(e,n,i){var r=this,o=("UL"===n.nodeName?t(n).find(d):t(n).children(u))[0],s=i&&k.supportsTransitionEnd()&&o&&t(o).hasClass(l),a=function(){return r._transitionComplete(e,o,i)};o&&s?t(o).one(k.TRANSITION_END,a).emulateTransitionEnd(150):a()},n._transitionComplete=function(e,n,i){if(n){t(n).removeClass(c+" "+s);var r=t(n.parentNode).find(m)[0];r&&t(r).removeClass(s),"tab"===n.getAttribute("role")&&n.setAttribute("aria-selected",!1)}if(t(e).addClass(s),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!0),k.reflow(e),t(e).addClass(c),e.parentNode&&t(e.parentNode).hasClass(o)){var a=t(e).closest(h)[0];a&&t(a).find(g).addClass(s),e.setAttribute("aria-expanded",!0)}i&&i()},e._jQueryInterface=function(n){return this.each(function(){var i=t(this),r=i.data("bs.tab");if(r||(r=new e(this),i.data("bs.tab",r)),"string"==typeof n){if("undefined"==typeof r[n])throw new TypeError('No method named "'+n+'"');r[n]()}})},i(e,null,[{key:"VERSION",get:function(){return"4.0.0"}}]),e}();return t(document).on(r.CLICK_DATA_API,p,function(e){e.preventDefault(),_._jQueryInterface.call(t(this),"show")}),t.fn.tab=_._jQueryInterface,t.fn.tab.Constructor=_,t.fn.tab.noConflict=function(){return t.fn.tab=n,_._jQueryInterface},_}(e);!function(t){if("undefined"==typeof t)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1===e[0]&&9===e[1]&&e[2]<1||e[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(e),t.Util=k,t.Alert=L,t.Button=P,t.Carousel=x,t.Collapse=R,t.Dropdown=Nt,t.Modal=kt,t.Popover=Pt,t.Scrollspy=xt,t.Tab=Rt,t.Tooltip=Lt,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(x){"use strict";var t,e,i,n,W,C,o,s,r,l,a,h,u;function E(t,e,i){return[parseFloat(t[0])*(a.test(t[0])?e/100:1),parseFloat(t[1])*(a.test(t[1])?i/100:1)]}function L(t,e){return parseInt(x.css(t,e),10)||0}function N(t){return null!=t&&t===t.window}x.ui=x.ui||{},x.ui.version="1.13.3",
x.extend(x.expr.pseudos,{data:x.expr.createPseudo?x.expr.createPseudo(function(e){return function(t){return!!x.data(t,e)}}):function(t,e,i){return!!x.data(t,i[3])}}),
x.fn.extend({disableSelection:(t="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}}),
x.ui.focusable=function(t,e){var i,n,o,s=t.nodeName.toLowerCase();return"area"===s?(o=(i=t.parentNode).name,!(!t.href||!o||"map"!==i.nodeName.toLowerCase())&&0<(i=x("img[usemap='#"+o+"']")).length&&i.is(":visible")):(/^(input|select|textarea|button|object)$/.test(s)?(n=!t.disabled)&&(o=x(t).closest("fieldset")[0])&&(n=!o.disabled):n="a"===s&&t.href||e,n&&x(t).is(":visible")&&function(t){var e=t.css("visibility");for(;"inherit"===e;)t=t.parent(),e=t.css("visibility");return"visible"===e}(x(t)))},x.extend(x.expr.pseudos,{focusable:function(t){return x.ui.focusable(t,null!=x.attr(t,"tabindex"))}}),x.fn._form=function(){return"string"==typeof this[0].form?this.closest("form"):x(this[0].form)},
x.ui.formResetMixin={_formResetHandler:function(){var e=x(this);setTimeout(function(){var t=e.data("ui-form-reset-instances");x.each(t,function(){this.refresh()})})},_bindFormResetHandler:function(){var t;this.form=this.element._form(),this.form.length&&((t=this.form.data("ui-form-reset-instances")||[]).length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t))},_unbindFormResetHandler:function(){var t;this.form.length&&((t=this.form.data("ui-form-reset-instances")).splice(x.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset"))}},x.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),
x.expr.pseudos||(x.expr.pseudos=x.expr[":"]),x.uniqueSort||(x.uniqueSort=x.unique),x.escapeSelector||(e=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,i=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},x.escapeSelector=function(t){return(t+"").replace(e,i)}),x.fn.even&&x.fn.odd||x.fn.extend({even:function(){return this.filter(function(t){return t%2==0})},odd:function(){return this.filter(function(t){return t%2==1})}}),
x.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},
x.fn.labels=function(){var t,e,i;return this.length?this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(e=this.eq(0).parents("label"),(t=this.attr("id"))&&(i=(i=this.eq(0).parents().last()).add((i.length?i:this).siblings()),t="label[for='"+x.escapeSelector(t)+"']",e=e.add(i.find(t).addBack(t))),this.pushStack(e)):this.pushStack([])},x.ui.plugin={add:function(t,e,i){var n,o=x.ui[t].prototype;for(n in i)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([e,i[n]])},call:function(t,e,i,n){var o,s=t.plugins[e];if(s&&(n||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(o=0;o<s.length;o++)t.options[s[o][0]]&&s[o][1].apply(t.element,i)}},
W=Math.max,C=Math.abs,o=/left|center|right/,s=/top|center|bottom/,r=/[\+\-]\d+(\.[\d]+)?%?/,l=/^\w+/,a=/%$/,h=x.fn.position,x.position={scrollbarWidth:function(){var t,e,i;return void 0!==n?n:(i=(e=x("<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>")).children()[0],x("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),n=t-i)},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?x.position.scrollbarWidth():0,height:e?x.position.scrollbarWidth():0}},getWithinInfo:function(t){var e=x(t||window),i=N(e[0]),n=!!e[0]&&9===e[0].nodeType;return{element:e,isWindow:i,isDocument:n,offset:!i&&!n?x(t).offset():{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:e.outerWidth(),height:e.outerHeight()}}},x.fn.position=function(f){var c,d,p,g,m,v,y,w,b,_,t,e;return f&&f.of?(v="string"==typeof(f=x.extend({},f)).of?x(document).find(f.of):x(f.of),y=x.position.getWithinInfo(f.within),w=x.position.getScrollInfo(y),b=(f.collision||"flip").split(" "),_={},e=9===(e=(t=v)[0]).nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:N(e)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:e.preventDefault?{width:0,height:0,offset:{top:e.pageY,left:e.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()},v[0].preventDefault&&(f.at="left top"),d=e.width,p=e.height,m=x.extend({},g=e.offset),x.each(["my","at"],function(){var t,e,i=(f[this]||"").split(" ");(i=1===i.length?o.test(i[0])?i.concat(["center"]):s.test(i[0])?["center"].concat(i):["center","center"]:i)[0]=o.test(i[0])?i[0]:"center",i[1]=s.test(i[1])?i[1]:"center",t=r.exec(i[0]),e=r.exec(i[1]),_[this]=[t?t[0]:0,e?e[0]:0],f[this]=[l.exec(i[0])[0],l.exec(i[1])[0]]}),1===b.length&&(b[1]=b[0]),"right"===f.at[0]?m.left+=d:"center"===f.at[0]&&(m.left+=d/2),"bottom"===f.at[1]?m.top+=p:"center"===f.at[1]&&(m.top+=p/2),c=E(_.at,d,p),m.left+=c[0],m.top+=c[1],this.each(function(){var i,t,r=x(this),l=r.outerWidth(),a=r.outerHeight(),e=L(this,"marginLeft"),n=L(this,"marginTop"),o=l+e+L(this,"marginRight")+w.width,s=a+n+L(this,"marginBottom")+w.height,h=x.extend({},m),u=E(_.my,r.outerWidth(),r.outerHeight());"right"===f.my[0]?h.left-=l:"center"===f.my[0]&&(h.left-=l/2),"bottom"===f.my[1]?h.top-=a:"center"===f.my[1]&&(h.top-=a/2),h.left+=u[0],h.top+=u[1],i={marginLeft:e,marginTop:n},x.each(["left","top"],function(t,e){x.ui.position[b[t]]&&x.ui.position[b[t]][e](h,{targetWidth:d,targetHeight:p,elemWidth:l,elemHeight:a,collisionPosition:i,collisionWidth:o,collisionHeight:s,offset:[c[0]+u[0],c[1]+u[1]],my:f.my,at:f.at,within:y,elem:r})}),f.using&&(t=function(t){var e=g.left-h.left,i=e+d-l,n=g.top-h.top,o=n+p-a,s={target:{element:v,left:g.left,top:g.top,width:d,height:p},element:{element:r,left:h.left,top:h.top,width:l,height:a},horizontal:i<0?"left":0<e?"right":"center",vertical:o<0?"top":0<n?"bottom":"middle"};d<l&&C(e+i)<d&&(s.horizontal="center"),p<a&&C(n+o)<p&&(s.vertical="middle"),W(C(e),C(i))>W(C(n),C(o))?s.important="horizontal":s.important="vertical",f.using.call(this,t,s)}),r.offset(x.extend(h,{using:t}))})):h.apply(this,arguments)},x.ui.position={fit:{left:function(t,e){var i,n=e.within,o=n.isWindow?n.scrollLeft:n.offset.left,n=n.width,s=t.left-e.collisionPosition.marginLeft,r=o-s,l=s+e.collisionWidth-n-o;n<e.collisionWidth?0<r&&l<=0?(i=t.left+r+e.collisionWidth-n-o,t.left+=r-i):t.left=!(0<l&&r<=0)&&l<r?o+n-e.collisionWidth:o:0<r?t.left+=r:0<l?t.left-=l:t.left=W(t.left-s,t.left)},top:function(t,e){var i,n=e.within,n=n.isWindow?n.scrollTop:n.offset.top,o=e.within.height,s=t.top-e.collisionPosition.marginTop,r=n-s,l=s+e.collisionHeight-o-n;o<e.collisionHeight?0<r&&l<=0?(i=t.top+r+e.collisionHeight-o-n,t.top+=r-i):t.top=!(0<l&&r<=0)&&l<r?n+o-e.collisionHeight:n:0<r?t.top+=r:0<l?t.top-=l:t.top=W(t.top-s,t.top)}},flip:{left:function(t,e){var i=e.within,n=i.offset.left+i.scrollLeft,o=i.width,i=i.isWindow?i.scrollLeft:i.offset.left,s=t.left-e.collisionPosition.marginLeft,r=s-i,s=s+e.collisionWidth-o-i,l="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,a="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,h=-2*e.offset[0];r<0?((o=t.left+l+a+h+e.collisionWidth-o-n)<0||o<C(r))&&(t.left+=l+a+h):0<s&&(0<(n=t.left-e.collisionPosition.marginLeft+l+a+h-i)||C(n)<s)&&(t.left+=l+a+h)},top:function(t,e){var i=e.within,n=i.offset.top+i.scrollTop,o=i.height,i=i.isWindow?i.scrollTop:i.offset.top,s=t.top-e.collisionPosition.marginTop,r=s-i,s=s+e.collisionHeight-o-i,l="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,a="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,h=-2*e.offset[1];r<0?((o=t.top+l+a+h+e.collisionHeight-o-n)<0||o<C(r))&&(t.top+=l+a+h):0<s&&(0<(n=t.top-e.collisionPosition.marginTop+l+a+h-i)||C(n)<s)&&(t.top+=l+a+h)}},flipfit:{left:function(){x.ui.position.flip.left.apply(this,arguments),x.ui.position.fit.left.apply(this,arguments)},top:function(){x.ui.position.flip.top.apply(this,arguments),x.ui.position.fit.top.apply(this,arguments)}}},x.ui.safeActiveElement=function(e){var i;try{i=e.activeElement}catch(t){i=e.body}return i=(i=i||e.body).nodeName?i:e.body},x.ui.safeBlur=function(t){t&&"body"!==t.nodeName.toLowerCase()&&x(t).trigger("blur")},
x.fn.scrollParent=function(t){var e=this.css("position"),i="absolute"===e,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,t=this.parents().filter(function(){var t=x(this);return(!i||"static"!==t.css("position"))&&n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&t.length?t:x(this[0].ownerDocument||document)},
x.extend(x.expr.pseudos,{tabbable:function(t){var e=x.attr(t,"tabindex"),i=null!=e;return(!i||0<=e)&&x.ui.focusable(t,i)}}),
x.fn.extend({uniqueId:(u=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++u)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&x(this).removeAttr("id")})}});
var f,c=0,d=Array.prototype.hasOwnProperty,p=Array.prototype.slice;x.cleanData=(f=x.cleanData,function(t){for(var e,i,n=0;null!=(i=t[n]);n++)(e=x._data(i,"events"))&&e.remove&&x(i).triggerHandler("remove");f(t)}),x.widget=function(t,i,e){var n,o,s,r={},l=t.split(".")[0],a=l+"-"+(t=t.split(".")[1]);return e||(e=i,i=x.Widget),Array.isArray(e)&&(e=x.extend.apply(null,[{}].concat(e))),x.expr.pseudos[a.toLowerCase()]=function(t){return!!x.data(t,a)},x[l]=x[l]||{},n=x[l][t],o=x[l][t]=function(t,e){if(!this||!this._createWidget)return new o(t,e);arguments.length&&this._createWidget(t,e)},x.extend(o,n,{version:e.version,_proto:x.extend({},e),_childConstructors:[]}),(s=new i).options=x.widget.extend({},s.options),x.each(e,function(e,n){function o(){return i.prototype[e].apply(this,arguments)}function s(t){return i.prototype[e].apply(this,t)}r[e]="function"!=typeof n?n:function(){var t,e=this._super,i=this._superApply;return this._super=o,this._superApply=s,t=n.apply(this,arguments),this._super=e,this._superApply=i,t}}),o.prototype=x.widget.extend(s,{widgetEventPrefix:n&&s.widgetEventPrefix||t},r,{constructor:o,namespace:l,widgetName:t,widgetFullName:a}),n?(x.each(n._childConstructors,function(t,e){var i=e.prototype;x.widget(i.namespace+"."+i.widgetName,o,e._proto)}),delete n._childConstructors):i._childConstructors.push(o),x.widget.bridge(t,o),o},x.widget.extend=function(t){for(var e,i,n=p.call(arguments,1),o=0,s=n.length;o<s;o++)for(e in n[o])i=n[o][e],d.call(n[o],e)&&void 0!==i&&(x.isPlainObject(i)?t[e]=x.isPlainObject(t[e])?x.widget.extend({},t[e],i):x.widget.extend({},i):t[e]=i);return t},x.widget.bridge=function(s,e){var r=e.prototype.widgetFullName||s;x.fn[s]=function(i){var t="string"==typeof i,n=p.call(arguments,1),o=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=x.data(this,r);return"instance"===i?(o=e,!1):e?"function"!=typeof e[i]||"_"===i.charAt(0)?x.error("no such method '"+i+"' for "+s+" widget instance"):(t=e[i].apply(e,n))!==e&&void 0!==t?(o=t&&t.jquery?o.pushStack(t.get()):t,!1):void 0:x.error("cannot call methods on "+s+" prior to initialization; attempted to call method '"+i+"'")}):o=void 0:(n.length&&(i=x.widget.extend.apply(null,[i].concat(n))),this.each(function(){var t=x.data(this,r);t?(t.option(i||{}),t._init&&t._init()):x.data(this,r,new e(i,this))})),o}},x.Widget=function(){},x.Widget._childConstructors=[],x.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=x(e||this.defaultElement||this)[0],this.element=x(e),this.uuid=c++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=x(),this.hoverable=x(),this.focusable=x(),this.classesElementLookup={},e!==this&&(x.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=x(e.style?e.ownerDocument:e.document||e),this.window=x(this.document[0].defaultView||this.document[0].parentWindow)),this.options=x.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:x.noop,_create:x.noop,_init:x.noop,destroy:function(){var i=this;this._destroy(),x.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:x.noop,widget:function(){return this.element},option:function(t,e){var i,n,o,s=t;if(0===arguments.length)return x.widget.extend({},this.options);if("string"==typeof t)if(s={},t=(i=t.split(".")).shift(),i.length){for(n=s[t]=x.widget.extend({},this.options[t]),o=0;o<i.length-1;o++)n[i[o]]=n[i[o]]||{},n=n[i[o]];if(t=i.pop(),1===arguments.length)return void 0===n[t]?null:n[t];n[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];s[t]=e}return this._setOptions(s),this},_setOptions:function(t){for(var e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,i,n;for(e in t)n=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&n&&n.length&&(i=x(n.get()),this._removeClass(n,e),i.addClass(this._classes({element:i,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(o){var s=[],r=this;function t(t,e){for(var i,n=0;n<t.length;n++)i=r.classesElementLookup[t[n]]||x(),i=o.add?(function(){var i=[];o.element.each(function(t,e){x.map(r.classesElementLookup,function(t){return t}).some(function(t){return t.is(e)})||i.push(e)}),r._on(x(i),{remove:"_untrackClassesElement"})}(),x(x.uniqueSort(i.get().concat(o.element.get())))):x(i.not(o.element).get()),r.classesElementLookup[t[n]]=i,s.push(t[n]),e&&o.classes[t[n]]&&s.push(o.classes[t[n]])}return(o=x.extend({element:this.element,classes:this.options.classes||{}},o)).keys&&t(o.keys.match(/\S+/g)||[],!0),o.extra&&t(o.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(i){var n=this;x.each(n.classesElementLookup,function(t,e){-1!==x.inArray(i.target,e)&&(n.classesElementLookup[t]=x(e.not(i.target).get()))}),this._off(x(i.target))},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,n){var o="string"==typeof t||null===t,e={extra:o?e:i,keys:o?t:e,element:o?this.element:t,add:n="boolean"==typeof n?n:i};return e.element.toggleClass(this._classes(e),n),this},_on:function(o,s,t){var r,l=this;"boolean"!=typeof o&&(t=s,s=o,o=!1),t?(s=r=x(s),this.bindings=this.bindings.add(s)):(t=s,s=this.element,r=this.widget()),x.each(t,function(t,e){function i(){if(o||!0!==l.options.disabled&&!x(this).hasClass("ui-state-disabled"))return("string"==typeof e?l[e]:e).apply(l,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||x.guid++);var t=t.match(/^([\w:-]*)\s*(.*)$/),n=t[1]+l.eventNamespace,t=t[2];t?r.on(n,t,i):s.on(n,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e),this.bindings=x(this.bindings.not(t).get()),this.focusable=x(this.focusable.not(t).get()),this.hoverable=x(this.hoverable.not(t).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(x(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(x(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(x(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(x(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var n,o,s=this.options[t];if(i=i||{},(e=x.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],o=e.originalEvent)for(n in o)n in e||(e[n]=o[n]);return this.element.trigger(e,i),!("function"==typeof s&&!1===s.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},x.each({show:"fadeIn",hide:"fadeOut"},function(s,r){x.Widget.prototype["_"+s]=function(e,t,i){var n,o=(t="string"==typeof t?{effect:t}:t)?!0!==t&&"number"!=typeof t&&t.effect||r:s;"number"==typeof(t=t||{})?t={duration:t}:!0===t&&(t={}),n=!x.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),n&&x.effects&&x.effects.effect[o]?e[s](t):o!==s&&e[o]?e[o](t.duration,t.easing,i):e.queue(function(t){x(this)[s](),i&&i.call(e[0]),t()})}})});
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../version","../keycode","../unique-id","../widget"],e):e(jQuery)}(function(o){"use strict";return o.widget("ui.accordion",{version:"1.13.3",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:function(e){return e.find("> li > :first-child").add(e.find("> :not(li)").even())},heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=o(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),e.collapsible||!1!==e.active&&null!=e.active||(e.active=0),this._processPanels(),e.active<0&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():o()}},_createIcons:function(){var e,t=this.options.icons;t&&(e=o("<span>"),this._addClass(e,"ui-accordion-header-icon","ui-icon "+t.header),e.prependTo(this.headers),e=this.active.children(".ui-accordion-header-icon"),this._removeClass(e,t.header)._addClass(e,null,t.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),e=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){"active"===e?this._activate(t):("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||!1!==this.options.active||this._activate(0),"icons"===e&&(this._destroyIcons(),t)&&this._createIcons())},_setOptionDisabled:function(e){this._super(e),this.element.attr("aria-disabled",e),this._toggleClass(null,"ui-state-disabled",!!e),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!e)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var t=o.ui.keyCode,i=this.headers.length,a=this.headers.index(e.target),s=!1;switch(e.keyCode){case t.RIGHT:case t.DOWN:s=this.headers[(a+1)%i];break;case t.LEFT:case t.UP:s=this.headers[(a-1+i)%i];break;case t.SPACE:case t.ENTER:this._eventHandler(e);break;case t.HOME:s=this.headers[0];break;case t.END:s=this.headers[i-1]}s&&(o(e.target).attr("tabIndex",-1),o(s).attr("tabIndex",0),o(s).trigger("focus"),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===o.ui.keyCode.UP&&e.ctrlKey&&o(e.currentTarget).prev().trigger("focus")},refresh:function(){var e=this.options;this._processPanels(),!1===e.active&&!0===e.collapsible||!this.headers.length?(e.active=!1,this.active=o()):!1===e.active?this._activate(0):this.active.length&&!o.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=o()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var e=this.headers,t=this.panels;"function"==typeof this.options.header?this.headers=this.options.header(this.element):this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),t&&(this._off(e.not(this.headers)),this._off(t.not(this.panels)))},_refresh:function(){var i,e=this.options,t=e.heightStyle,a=this.element.parent();this.active=this._findActive(e.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var e=o(this),t=e.uniqueId().attr("id"),i=e.next(),a=i.uniqueId().attr("id");e.attr("aria-controls",a),i.attr("aria-labelledby",t)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(e.event),"fill"===t?(i=a.height(),this.element.siblings(":visible").each(function(){var e=o(this),t=e.css("position");"absolute"!==t&&"fixed"!==t&&(i-=e.outerHeight(!0))}),this.headers.each(function(){i-=o(this).outerHeight(!0)}),this.headers.next().each(function(){o(this).height(Math.max(0,i-o(this).innerHeight()+o(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.headers.next().each(function(){var e=o(this).is(":visible");e||o(this).show(),i=Math.max(i,o(this).css("height","").height()),e||o(this).hide()}).height(i))},_activate:function(e){e=this._findActive(e)[0];e!==this.active[0]&&(e=e||this.active[0],this._eventHandler({target:e,currentTarget:e,preventDefault:o.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):o()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&o.each(e.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var t=this.options,i=this.active,a=o(e.currentTarget),s=a[0]===i[0],n=s&&t.collapsible,h=n?o():a.next(),r=i.next(),r={oldHeader:i,oldPanel:r,newHeader:n?o():a,newPanel:h};e.preventDefault(),s&&!t.collapsible||!1===this._trigger("beforeActivate",e,r)||(t.active=!n&&this.headers.index(a),this.active=s?o():a,this._toggle(r),this._removeClass(i,"ui-accordion-header-active","ui-state-active"),t.icons&&(h=i.children(".ui-accordion-header-icon"),this._removeClass(h,null,t.icons.activeHeader)._addClass(h,null,t.icons.header)),s)||(this._removeClass(a,"ui-accordion-header-collapsed")._addClass(a,"ui-accordion-header-active","ui-state-active"),t.icons&&(e=a.children(".ui-accordion-header-icon"),this._removeClass(e,null,t.icons.header)._addClass(e,null,t.icons.activeHeader)),this._addClass(a.next(),"ui-accordion-content-active"))},_toggle:function(e){var t=e.newPanel,i=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=t,this.prevHide=i,this.options.animate?this._animate(t,i,e):(i.hide(),t.show(),this._toggleComplete(e)),i.attr({"aria-hidden":"true"}),i.prev().attr({"aria-selected":"false","aria-expanded":"false"}),t.length&&i.length?i.prev().attr({tabIndex:-1,"aria-expanded":"false"}):t.length&&this.headers.filter(function(){return 0===parseInt(o(this).attr("tabIndex"),10)}).attr("tabIndex",-1),t.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(e,i,t){function a(){n._toggleComplete(t)}var s,n=this,h=0,r=e.css("box-sizing"),o=e.length&&(!i.length||e.index()<i.index()),d=this.options.animate||{},o=o&&d.down||d,c=(c="string"==typeof o?o:c)||o.easing||d.easing,l=(l="number"==typeof o?o:l)||o.duration||d.duration;return i.length?e.length?(s=e.show().outerHeight(),i.animate(this.hideProps,{duration:l,easing:c,step:function(e,t){t.now=Math.round(e)}}),void e.hide().animate(this.showProps,{duration:l,easing:c,complete:a,step:function(e,t){t.now=Math.round(e),"height"!==t.prop?"content-box"===r&&(h+=t.now):"content"!==n.options.heightStyle&&(t.now=Math.round(s-i.outerHeight()-h),h=0)}})):i.animate(this.hideProps,l,c,a):e.animate(this.showProps,l,c,a)},_toggleComplete:function(e){var t=e.oldPanel,i=t.prev();this._removeClass(t,"ui-accordion-content-active"),this._removeClass(i,"ui-accordion-header-active")._addClass(i,"ui-accordion-header-collapsed"),t.length&&(t.parent()[0].className=t.parent()[0].className),this._trigger("activate",null,e)}})});
!function(a,b){"use strict";var c={item:3,autoWidth:!1,slideMove:1,slideMargin:10,addClass:"",mode:"slide",useCSS:!0,cssEasing:"ease",easing:"linear",speed:400,auto:!1,pauseOnHover:!1,loop:!1,slideEndAnimation:!0,pause:2e3,keyPress:!1,controls:!0,prevHtml:"",nextHtml:"",rtl:!1,adaptiveHeight:!1,vertical:!1,verticalHeight:500,vThumbWidth:100,thumbItem:10,pager:!0,gallery:!1,galleryMargin:5,thumbMargin:5,currentPagerPosition:"middle",enableTouch:!0,enableDrag:!0,freeMove:!0,swipeThreshold:40,responsive:[],onBeforeStart:function(a){},onSliderLoad:function(a){},onBeforeSlide:function(a,b){},onAfterSlide:function(a,b){},onBeforeNextSlide:function(a,b){},onBeforePrevSlide:function(a,b){}};a.fn.lightSlider=function(b){if(0===this.length)return this;if(this.length>1)return this.each(function(){a(this).lightSlider(b)}),this;var d={},e=a.extend(!0,{},c,b),f={},g=this;d.$el=this,"fade"===e.mode&&(e.vertical=!1);var h=g.children(),i=a(window).width(),j=null,k=null,l=0,m=0,n=!1,o=0,p="",q=0,r=e.vertical===!0?"height":"width",s=e.vertical===!0?"margin-bottom":"margin-right",t=0,u=0,v=0,w=0,x=null,y="ontouchstart"in document.documentElement,z={};return z.chbreakpoint=function(){if(i=a(window).width(),e.responsive.length){var b;if(e.autoWidth===!1&&(b=e.item),i<e.responsive[0].breakpoint)for(var c=0;c<e.responsive.length;c++)i<e.responsive[c].breakpoint&&(j=e.responsive[c].breakpoint,k=e.responsive[c]);if("undefined"!=typeof k&&null!==k)for(var d in k.settings)k.settings.hasOwnProperty(d)&&(("undefined"==typeof f[d]||null===f[d])&&(f[d]=e[d]),e[d]=k.settings[d]);if(!a.isEmptyObject(f)&&i>e.responsive[0].breakpoint)for(var g in f)f.hasOwnProperty(g)&&(e[g]=f[g]);e.autoWidth===!1&&t>0&&v>0&&b!==e.item&&(q=Math.round(t/((v+e.slideMargin)*e.slideMove)))}},z.calSW=function(){e.autoWidth===!1&&(v=(o-(e.item*e.slideMargin-e.slideMargin))/e.item)},z.calWidth=function(a){var b=a===!0?p.find(".lslide").length:h.length;if(e.autoWidth===!1)m=b*(v+e.slideMargin);else{m=0;for(var c=0;b>c;c++)m+=parseInt(h.eq(c).width())+e.slideMargin}return m},d={doCss:function(){var a=function(){for(var a=["transition","MozTransition","WebkitTransition","OTransition","msTransition","KhtmlTransition"],b=document.documentElement,c=0;c<a.length;c++)if(a[c]in b.style)return!0};return e.useCSS&&a()?!0:!1},keyPress:function(){e.keyPress&&a(document).on("keyup.lightslider",function(b){a(":focus").is("input, textarea")||(b.preventDefault?b.preventDefault():b.returnValue=!1,37===b.keyCode?g.goToPrevSlide():39===b.keyCode&&g.goToNextSlide())})},controls:function(){e.controls&&(g.after('<div class="lSAction"><a class="lSPrev">'+e.prevHtml+'</a><a class="lSNext">'+e.nextHtml+"</a></div>"),e.autoWidth?z.calWidth(!1)<o&&p.find(".lSAction").hide():l<=e.item&&p.find(".lSAction").hide(),p.find(".lSAction a").on("click",function(b){return b.preventDefault?b.preventDefault():b.returnValue=!1,"lSPrev"===a(this).attr("class")?g.goToPrevSlide():g.goToNextSlide(),!1}))},initialStyle:function(){var a=this;"fade"===e.mode&&(e.autoWidth=!1,e.slideEndAnimation=!1),e.auto&&(e.slideEndAnimation=!1),e.autoWidth&&(e.slideMove=1,e.item=1),e.loop&&(e.slideMove=1,e.freeMove=!1),e.onBeforeStart.call(this,g),z.chbreakpoint(),g.addClass("lightSlider").wrap('<div class="lSSlideOuter '+e.addClass+'"><div class="lSSlideWrapper"></div></div>'),p=g.parent(".lSSlideWrapper"),e.rtl===!0&&p.parent().addClass("lSrtl"),e.vertical?(p.parent().addClass("vertical"),o=e.verticalHeight,p.css("height",o+"px")):o=g.outerWidth(),h.addClass("lslide"),e.loop===!0&&"slide"===e.mode&&(z.calSW(),z.clone=function(){if(z.calWidth(!0)>o){for(var b=0,c=0,d=0;d<h.length&&(b+=parseInt(g.find(".lslide").eq(d).width())+e.slideMargin,c++,!(b>=o+e.slideMargin));d++);var f=e.autoWidth===!0?c:e.item;if(f<g.find(".clone.left").length)for(var i=0;i<g.find(".clone.left").length-f;i++)h.eq(i).remove();if(f<g.find(".clone.right").length)for(var j=h.length-1;j>h.length-1-g.find(".clone.right").length;j--)q--,h.eq(j).remove();for(var k=g.find(".clone.right").length;f>k;k++)g.find(".lslide").eq(k).clone().removeClass("lslide").addClass("clone right").appendTo(g),q++;for(var l=g.find(".lslide").length-g.find(".clone.left").length;l>g.find(".lslide").length-f;l--)g.find(".lslide").eq(l-1).clone().removeClass("lslide").addClass("clone left").prependTo(g);h=g.children()}else h.hasClass("clone")&&(g.find(".clone").remove(),a.move(g,0))},z.clone()),z.sSW=function(){l=h.length,e.rtl===!0&&e.vertical===!1&&(s="margin-left"),e.autoWidth===!1&&h.css(r,v+"px"),h.css(s,e.slideMargin+"px"),m=z.calWidth(!1),g.css(r,m+"px"),e.loop===!0&&"slide"===e.mode&&n===!1&&(q=g.find(".clone.left").length)},z.calL=function(){h=g.children(),l=h.length},this.doCss()&&p.addClass("usingCss"),z.calL(),"slide"===e.mode?(z.calSW(),z.sSW(),e.loop===!0&&(t=a.slideValue(),this.move(g,t)),e.vertical===!1&&this.setHeight(g,!1)):(this.setHeight(g,!0),g.addClass("lSFade"),this.doCss()||(h.fadeOut(0),h.eq(q).fadeIn(0))),e.loop===!0&&"slide"===e.mode?h.eq(q).addClass("active"):h.first().addClass("active")},pager:function(){var a=this;if(z.createPager=function(){w=(o-(e.thumbItem*e.thumbMargin-e.thumbMargin))/e.thumbItem;var b=p.find(".lslide"),c=p.find(".lslide").length,d=0,f="",h=0;for(d=0;c>d;d++){"slide"===e.mode&&(e.autoWidth?h+=(parseInt(b.eq(d).width())+e.slideMargin)*e.slideMove:h=d*(v+e.slideMargin)*e.slideMove);var i=b.eq(d*e.slideMove).attr("data-thumb");if(f+=e.gallery===!0?'<li style="width:100%;'+r+":"+w+"px;"+s+":"+e.thumbMargin+'px"><a href="#"><img src="'+i+'" /></a></li>':'<li><a href="#">'+(d+1)+"</a></li>","slide"===e.mode&&h>=m-o-e.slideMargin){d+=1;var j=2;e.autoWidth&&(f+='<li><a href="#">'+(d+1)+"</a></li>",j=1),j>d?(f=null,p.parent().addClass("noPager")):p.parent().removeClass("noPager");break}}var k=p.parent();k.find(".lSPager").html(f),e.gallery===!0&&(e.vertical===!0&&k.find(".lSPager").css("width",e.vThumbWidth+"px"),u=d*(e.thumbMargin+w)+.5,k.find(".lSPager").css({property:u+"px","transition-duration":e.speed+"ms"}),e.vertical===!0&&p.parent().css("padding-right",e.vThumbWidth+e.galleryMargin+"px"),k.find(".lSPager").css(r,u+"px"));var l=k.find(".lSPager").find("li");l.first().addClass("active"),l.on("click",function(){return e.loop===!0&&"slide"===e.mode?q+=l.index(this)-k.find(".lSPager").find("li.active").index():q=l.index(this),g.mode(!1),e.gallery===!0&&a.slideThumb(),!1})},e.pager){var b="lSpg";e.gallery&&(b="lSGallery"),p.after('<ul class="lSPager '+b+'"></ul>');var c=e.vertical?"margin-left":"margin-top";p.parent().find(".lSPager").css(c,e.galleryMargin+"px"),z.createPager()}setTimeout(function(){z.init()},0)},setHeight:function(a,b){var c=null,d=this;c=e.loop?a.children(".lslide ").first():a.children().first();var f=function(){var d=c.outerHeight(),e=0,f=d;b&&(d=0,e=100*f/o),a.css({height:d+"px","padding-bottom":e+"%"})};f(),c.find("img").length?c.find("img")[0].complete?(f(),x||d.auto()):c.find("img").on("load",function(){setTimeout(function(){f(),x||d.auto()},100)}):x||d.auto()},active:function(a,b){this.doCss()&&"fade"===e.mode&&p.addClass("on");var c=0;if(q*e.slideMove<l){a.removeClass("active"),this.doCss()||"fade"!==e.mode||b!==!1||a.fadeOut(e.speed),c=b===!0?q:q*e.slideMove;var d,f;b===!0&&(d=a.length,f=d-1,c+1>=d&&(c=f)),e.loop===!0&&"slide"===e.mode&&(c=b===!0?q-g.find(".clone.left").length:q*e.slideMove,b===!0&&(d=a.length,f=d-1,c+1===d?c=f:c+1>d&&(c=0))),this.doCss()||"fade"!==e.mode||b!==!1||a.eq(c).fadeIn(e.speed),a.eq(c).addClass("active")}else a.removeClass("active"),a.eq(a.length-1).addClass("active"),this.doCss()||"fade"!==e.mode||b!==!1||(a.fadeOut(e.speed),a.eq(c).fadeIn(e.speed))},move:function(a,b){e.rtl===!0&&(b=-b),this.doCss()?a.css(e.vertical===!0?{transform:"translate3d(0px, "+-b+"px, 0px)","-webkit-transform":"translate3d(0px, "+-b+"px, 0px)"}:{transform:"translate3d("+-b+"px, 0px, 0px)","-webkit-transform":"translate3d("+-b+"px, 0px, 0px)"}):e.vertical===!0?a.css("position","relative").animate({top:-b+"px"},e.speed,e.easing):a.css("position","relative").animate({left:-b+"px"},e.speed,e.easing);var c=p.parent().find(".lSPager").find("li");this.active(c,!0)},fade:function(){this.active(h,!1);var a=p.parent().find(".lSPager").find("li");this.active(a,!0)},slide:function(){var a=this;z.calSlide=function(){m>o&&(t=a.slideValue(),a.active(h,!1),t>m-o-e.slideMargin?t=m-o-e.slideMargin:0>t&&(t=0),a.move(g,t),e.loop===!0&&"slide"===e.mode&&(q>=l-g.find(".clone.left").length/e.slideMove&&a.resetSlide(g.find(".clone.left").length),0===q&&a.resetSlide(p.find(".lslide").length)))},z.calSlide()},resetSlide:function(a){var b=this;p.find(".lSAction a").addClass("disabled"),setTimeout(function(){q=a,p.css("transition-duration","0ms"),t=b.slideValue(),b.active(h,!1),d.move(g,t),setTimeout(function(){p.css("transition-duration",e.speed+"ms"),p.find(".lSAction a").removeClass("disabled")},50)},e.speed+100)},slideValue:function(){var a=0;if(e.autoWidth===!1)a=q*(v+e.slideMargin)*e.slideMove;else{a=0;for(var b=0;q>b;b++)a+=parseInt(h.eq(b).width())+e.slideMargin}return a},slideThumb:function(){var a;switch(e.currentPagerPosition){case"left":a=0;break;case"middle":a=o/2-w/2;break;case"right":a=o-w}var b=q-g.find(".clone.left").length,c=p.parent().find(".lSPager");"slide"===e.mode&&e.loop===!0&&(b>=c.children().length?b=0:0>b&&(b=c.children().length));var d=b*(w+e.thumbMargin)-a;d+o>u&&(d=u-o-e.thumbMargin),0>d&&(d=0),this.move(c,d)},auto:function(){e.auto&&(clearInterval(x),x=setInterval(function(){g.goToNextSlide()},e.pause))},pauseOnHover:function(){var b=this;e.auto&&e.pauseOnHover&&(p.on("mouseenter",function(){a(this).addClass("ls-hover"),g.pause(),e.auto=!0}),p.on("mouseleave",function(){a(this).removeClass("ls-hover"),p.find(".lightSlider").hasClass("lsGrabbing")||b.auto()}))},touchMove:function(a,b){if(p.css("transition-duration","0ms"),"slide"===e.mode){var c=a-b,d=t-c;if(d>=m-o-e.slideMargin)if(e.freeMove===!1)d=m-o-e.slideMargin;else{var f=m-o-e.slideMargin;d=f+(d-f)/5}else 0>d&&(e.freeMove===!1?d=0:d/=5);this.move(g,d)}},touchEnd:function(a){if(p.css("transition-duration",e.speed+"ms"),"slide"===e.mode){var b=!1,c=!0;t-=a,t>m-o-e.slideMargin?(t=m-o-e.slideMargin,e.autoWidth===!1&&(b=!0)):0>t&&(t=0);var d=function(a){var c=0;if(b||a&&(c=1),e.autoWidth)for(var d=0,f=0;f<h.length&&(d+=parseInt(h.eq(f).width())+e.slideMargin,q=f+c,!(d>=t));f++);else{var g=t/((v+e.slideMargin)*e.slideMove);q=parseInt(g)+c,t>=m-o-e.slideMargin&&g%1!==0&&q++}};a>=e.swipeThreshold?(d(!1),c=!1):a<=-e.swipeThreshold&&(d(!0),c=!1),g.mode(c),this.slideThumb()}else a>=e.swipeThreshold?g.goToPrevSlide():a<=-e.swipeThreshold&&g.goToNextSlide()},enableDrag:function(){var b=this;if(!y){var c=0,d=0,f=!1;p.find(".lightSlider").addClass("lsGrab"),p.on("mousedown",function(b){return o>m&&0!==m?!1:void("lSPrev"!==a(b.target).attr("class")&&"lSNext"!==a(b.target).attr("class")&&(c=e.vertical===!0?b.pageY:b.pageX,f=!0,b.preventDefault?b.preventDefault():b.returnValue=!1,p.scrollLeft+=1,p.scrollLeft-=1,p.find(".lightSlider").removeClass("lsGrab").addClass("lsGrabbing"),clearInterval(x)))}),a(window).on("mousemove",function(a){f&&(d=e.vertical===!0?a.pageY:a.pageX,b.touchMove(d,c))}),a(window).on("mouseup",function(g){if(f){p.find(".lightSlider").removeClass("lsGrabbing").addClass("lsGrab"),f=!1,d=e.vertical===!0?g.pageY:g.pageX;var h=d-c;Math.abs(h)>=e.swipeThreshold&&a(window).on("click.ls",function(b){b.preventDefault?b.preventDefault():b.returnValue=!1,b.stopImmediatePropagation(),b.stopPropagation(),a(window).off("click.ls")}),b.touchEnd(h)}})}},enableTouch:function(){var a=this;if(y){var b={},c={};p.on("touchstart",function(a){c=a.originalEvent.targetTouches[0],b.pageX=a.originalEvent.targetTouches[0].pageX,b.pageY=a.originalEvent.targetTouches[0].pageY,clearInterval(x)}),p.on("touchmove",function(d){if(o>m&&0!==m)return!1;var f=d.originalEvent;c=f.targetTouches[0];var g=Math.abs(c.pageX-b.pageX),h=Math.abs(c.pageY-b.pageY);e.vertical===!0?(3*h>g&&d.preventDefault(),a.touchMove(c.pageY,b.pageY)):(3*g>h&&d.preventDefault(),a.touchMove(c.pageX,b.pageX))}),p.on("touchend",function(){if(o>m&&0!==m)return!1;var d;d=e.vertical===!0?c.pageY-b.pageY:c.pageX-b.pageX,a.touchEnd(d)})}},build:function(){var b=this;b.initialStyle(),this.doCss()&&(e.enableTouch===!0&&b.enableTouch(),e.enableDrag===!0&&b.enableDrag()),a(window).on("focus",function(){b.auto()}),a(window).on("blur",function(){clearInterval(x)}),b.pager(),b.pauseOnHover(),b.controls(),b.keyPress()}},d.build(),z.init=function(){z.chbreakpoint(),e.vertical===!0?(o=e.item>1?e.verticalHeight:h.outerHeight(),p.css("height",o+"px")):o=p.outerWidth(),e.loop===!0&&"slide"===e.mode&&z.clone(),z.calL(),"slide"===e.mode&&g.removeClass("lSSlide"),"slide"===e.mode&&(z.calSW(),z.sSW()),setTimeout(function(){"slide"===e.mode&&g.addClass("lSSlide")},1e3),e.pager&&z.createPager(),e.adaptiveHeight===!0&&e.vertical===!1&&g.css("height",h.eq(q).outerHeight(!0)),e.adaptiveHeight===!1&&("slide"===e.mode?e.vertical===!1?d.setHeight(g,!1):d.auto():d.setHeight(g,!0)),e.gallery===!0&&d.slideThumb(),"slide"===e.mode&&d.slide(),e.autoWidth===!1?h.length<=e.item?p.find(".lSAction").hide():p.find(".lSAction").show():z.calWidth(!1)<o&&0!==m?p.find(".lSAction").hide():p.find(".lSAction").show()},g.goToPrevSlide=function(){if(q>0)e.onBeforePrevSlide.call(this,g,q),q--,g.mode(!1),e.gallery===!0&&d.slideThumb();else if(e.loop===!0){if(e.onBeforePrevSlide.call(this,g,q),"fade"===e.mode){var a=l-1;q=parseInt(a/e.slideMove)}g.mode(!1),e.gallery===!0&&d.slideThumb()}else e.slideEndAnimation===!0&&(g.addClass("leftEnd"),setTimeout(function(){g.removeClass("leftEnd")},400))},g.goToNextSlide=function(){var a=!0;if("slide"===e.mode){var b=d.slideValue();a=b<m-o-e.slideMargin}q*e.slideMove<l-e.slideMove&&a?(e.onBeforeNextSlide.call(this,g,q),q++,g.mode(!1),e.gallery===!0&&d.slideThumb()):e.loop===!0?(e.onBeforeNextSlide.call(this,g,q),q=0,g.mode(!1),e.gallery===!0&&d.slideThumb()):e.slideEndAnimation===!0&&(g.addClass("rightEnd"),setTimeout(function(){g.removeClass("rightEnd")},400))},g.mode=function(a){e.adaptiveHeight===!0&&e.vertical===!1&&g.css("height",h.eq(q).outerHeight(!0)),n===!1&&("slide"===e.mode?d.doCss()&&(g.addClass("lSSlide"),""!==e.speed&&p.css("transition-duration",e.speed+"ms"),""!==e.cssEasing&&p.css("transition-timing-function",e.cssEasing)):d.doCss()&&(""!==e.speed&&g.css("transition-duration",e.speed+"ms"),""!==e.cssEasing&&g.css("transition-timing-function",e.cssEasing))),a||e.onBeforeSlide.call(this,g,q),"slide"===e.mode?d.slide():d.fade(),p.hasClass("ls-hover")||d.auto(),setTimeout(function(){a||e.onAfterSlide.call(this,g,q)},e.speed),n=!0},g.play=function(){g.goToNextSlide(),e.auto=!0,d.auto()},g.pause=function(){e.auto=!1,clearInterval(x)},g.refresh=function(){z.init()},g.getCurrentSlideCount=function(){var a=q;if(e.loop){var b=p.find(".lslide").length,c=g.find(".clone.left").length;a=c-1>=q?b+(q-c):q>=b+c?q-b-c:q-c}return a+1},g.getTotalSlideCount=function(){return p.find(".lslide").length},g.goToSlide=function(a){q=e.loop?a+g.find(".clone.left").length-1:a,g.mode(!1),e.gallery===!0&&d.slideThumb()},g.destroy=function(){g.lightSlider&&(g.goToPrevSlide=function(){},g.goToNextSlide=function(){},g.mode=function(){},g.play=function(){},g.pause=function(){},g.refresh=function(){},g.getCurrentSlideCount=function(){},g.getTotalSlideCount=function(){},g.goToSlide=function(){},g.lightSlider=null,z={init:function(){}},g.parent().parent().find(".lSAction, .lSPager").remove(),g.removeClass("lightSlider lSFade lSSlide lsGrab lsGrabbing leftEnd right").removeAttr("style").unwrap().unwrap(),g.children().removeAttr("style"),h.removeClass("lslide active"),g.find(".clone").remove(),h=null,x=null,n=!1,q=0)},setTimeout(function(){e.onSliderLoad.call(this,g)},10),a(window).on("resize orientationchange",function(a){setTimeout(function(){a.preventDefault?a.preventDefault():a.returnValue=!1,z.init()},200)}),this}}(jQuery);
!function(t,e){"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,(function(){function t(){}let e=t.prototype;return e.on=function(t,e){if(!t||!e)return this;let i=this._events=this._events||{},s=i[t]=i[t]||[];return s.includes(e)||s.push(e),this},e.once=function(t,e){if(!t||!e)return this;this.on(t,e);let i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this},e.off=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;let s=i.indexOf(e);return-1!=s&&i.splice(s,1),this},e.emitEvent=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;i=i.slice(0),e=e||[];let s=this._onceEvents&&this._onceEvents[t];for(let n of i){s&&s[n]&&(this.off(t,n),delete s[n]),n.apply(this,e)}return this},e.allOff=function(){return delete this._events,delete this._onceEvents,this},t})),
function(t,e){"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}("undefined"!=typeof window?window:this,(function(t,e){let i=t.jQuery,s=t.console;function n(t,e,o){if(!(this instanceof n))return new n(t,e,o);let r=t;var h;("string"==typeof t&&(r=document.querySelectorAll(t)),r)?(this.elements=(h=r,Array.isArray(h)?h:"object"==typeof h&&"number"==typeof h.length?[...h]:[h]),this.options={},"function"==typeof e?o=e:Object.assign(this.options,e),o&&this.on("always",o),this.getImages(),i&&(this.jqDeferred=new i.Deferred),setTimeout(this.check.bind(this))):s.error(`Bad element for imagesLoaded ${r||t}`)}n.prototype=Object.create(e.prototype),n.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)};const o=[1,9,11];n.prototype.addElementImages=function(t){"IMG"===t.nodeName&&this.addImage(t),!0===this.options.background&&this.addElementBackgroundImages(t);let{nodeType:e}=t;if(!e||!o.includes(e))return;let i=t.querySelectorAll("img");for(let t of i)this.addImage(t);if("string"==typeof this.options.background){let e=t.querySelectorAll(this.options.background);for(let t of e)this.addElementBackgroundImages(t)}};const r=/url\((['"])?(.*?)\1\)/gi;function h(t){this.img=t}function d(t,e){this.url=t,this.element=e,this.img=new Image}return n.prototype.addElementBackgroundImages=function(t){let e=getComputedStyle(t);if(!e)return;let i=r.exec(e.backgroundImage);for(;null!==i;){let s=i&&i[2];s&&this.addBackground(s,t),i=r.exec(e.backgroundImage)}},n.prototype.addImage=function(t){let e=new h(t);this.images.push(e)},n.prototype.addBackground=function(t,e){let i=new d(t,e);this.images.push(i)},n.prototype.check=function(){if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length)return void this.complete();let t=(t,e,i)=>{setTimeout((()=>{this.progress(t,e,i)}))};this.images.forEach((function(e){e.once("progress",t),e.check()}))},n.prototype.progress=function(t,e,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&s&&s.log(`progress: ${i}`,t,e)},n.prototype.complete=function(){let t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){let t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},h.prototype=Object.create(e.prototype),h.prototype.check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.currentSrc||this.img.src)},h.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},h.prototype.confirm=function(t,e){this.isLoaded=t;let{parentNode:i}=this.img,s="PICTURE"===i.nodeName?i:this.img;this.emitEvent("progress",[this,s,e])},h.prototype.handleEvent=function(t){let e="on"+t.type;this[e]&&this[e](t)},h.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},h.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},h.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype=Object.create(h.prototype),d.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},d.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},n.makeJQueryPlugin=function(e){(e=e||t.jQuery)&&(i=e,i.fn.imagesLoaded=function(t,e){return new n(this,t,e).jqDeferred.promise(i(this))})},n.makeJQueryPlugin(),n}));
/////////////////////////////////////////////
(function($){
"use strict";
$.fn.equalHeights=function(px){
$(this).each(function(){
var currentTallest=0;
$(this).children().each(function(){
if($(this).height() > currentTallest){ currentTallest=$(this).height(); }});
if(!px&&Number.prototype.pxToEm){
currentTallest=currentTallest.pxToEm();
}
$(this).children().css({'min-height': currentTallest});
});
return this;
};})(jQuery);
(function(e, t, n){
"use strict";
t.infinitescroll=function(n, r, i){
this.element=t(i);
if(!this._create(n, r)){
this.failed=true
}};
t.infinitescroll.defaults={
loading: {
finished: n,
loaderHTML: '',
finishedMsg: "<em>Congratulations, you've reached the end of the internet.</em>",
img: "data:image/gif;base64,R0lGODlh3AATAPQeAPDy+MnQ6LW/4N3h8MzT6rjC4sTM5r/I5NHX7N7j8c7U6tvg8OLl8uXo9Ojr9b3G5MfP6Ovu9tPZ7PT1+vX2+tbb7vf4+8/W69jd7rC73vn5/O/x+K243ai02////wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQECgD/ACwAAAAA3AATAAAF/6AnjmRpnmiqrmzrvnAsz3Rt33iu73zv/8CgcEj0BAScpHLJbDqf0Kh0Sq1ar9isdioItAKGw+MAKYMFhbF63CW438f0mg1R2O8EuXj/aOPtaHx7fn96goR4hmuId4qDdX95c4+RBIGCB4yAjpmQhZN0YGYGXitdZBIVGAsLoq4BBKQDswm1CQRkcG6ytrYKubq8vbfAcMK9v7q7EMO1ycrHvsW6zcTKsczNz8HZw9vG3cjTsMIYqQkCLBwHCgsMDQ4RDAYIqfYSFxDxEfz88/X38Onr16+Bp4ADCco7eC8hQYMAEe57yNCew4IVBU7EGNDiRn8Z831cGLHhSIgdFf9chIeBg7oA7gjaWUWTVQAGE3LqBDCTlc9WOHfm7PkTqNCh54rePDqB6M+lR536hCpUqs2gVZM+xbrTqtGoWqdy1emValeXKzggYBBB5y1acFNZmEvXAoN2cGfJrTv3bl69Ffj2xZt3L1+/fw3XRVw4sGDGcR0fJhxZsF3KtBTThZxZ8mLMgC3fRatCbYMNFCzwLEqLgE4NsDWs/tvqdezZf13Hvk2A9Szdu2X3pg18N+68xXn7rh1c+PLksI/Dhe6cuO3ow3NfV92bdArTqC2Ebd3A8vjf5QWfH6Bg7Nz17c2fj69+fnq+8N2Lty+fuP78/eV2X13neIcCeBRwxorbZrA1ANoCDGrgoG8RTshahQ9iSKEEzUmYIYfNWViUhheCGJyIP5E4oom7WWjgCeBFAJNv1DVV01MAdJhhjdkplWNzO/5oXI846njjVEIqR2OS2B1pE5PVscajkxhMycqLJghQSwT40PgfAl4GqNSXYdZXJn5gSkmmmmJu1aZYb14V51do+pTOCmA40AqVCIhG5IJ9PvYnhIFOxmdqhpaI6GeHCtpooisuutmg+Eg62KOMKuqoTaXgicQWoIYq6qiklmoqFV0UoeqqrLbq6quwxirrrLTWauutJ4QAACH5BAUKABwALAcABADOAAsAAAX/IPd0D2dyRCoUp/k8gpHOKtseR9yiSmGbuBykler9XLAhkbDavXTL5k2oqFqNOxzUZPU5YYZd1XsD72rZpBjbeh52mSNnMSC8lwblKZGwi+0QfIJ8CncnCoCDgoVnBHmKfByGJimPkIwtiAeBkH6ZHJaKmCeVnKKTHIihg5KNq4uoqmEtcRUtEREMBggtEr4QDrjCuRC8h7/BwxENeicSF8DKy82pyNLMOxzWygzFmdvD2L3P0dze4+Xh1Arkyepi7dfFvvTtLQkZBC0T/FX3CRgCMOBHsJ+EHYQY7OinAGECgQsB+Lu3AOK+CewcWjwxQeJBihtNGHSoQOE+iQ3//4XkwBBhRZMcUS6YSXOAwIL8PGqEaSJCiYt9SNoCmnJPAgUVLChdaoFBURN8MAzl2PQphwQLfDFd6lTowglHve6rKpbjhK7/pG5VinZP1qkiz1rl4+tr2LRwWU64cFEihwEtZgbgR1UiHaMVvxpOSwBA37kzGz9e8G+B5MIEKLutOGEsAH2ATQwYfTmuX8aETWdGPZmiZcccNSzeTCA1Sw0bdiitC7LBWgu8jQr8HRzqgpK6gX88QbrB14z/kF+ELpwB8eVQj/JkqdylAudji/+ts3039vEEfK8Vz2dlvxZKG0CmbkKDBvllRd6fCzDvBLKBDSCeffhRJEFebFk1k/Mv9jVIoIJZSeBggwUaNeB+Qk34IE0cXlihcfRxkOAJFFhwGmKlmWDiakZhUJtnLBpnWWcnKaAZcxI0piFGGLBm1mc90kajSCveeBVWKeYEoU2wqeaQi0PetoE+rr14EpVC7oAbAUHqhYExbn2XHHsVqbcVew9tx8+XJKk5AZsqqdlddGpqAKdbAYBn1pcczmSTdWvdmZ17c1b3FZ99vnTdCRFM8OEcAhLwm1NdXnWcBBSMRWmfkWZqVlsmLIiAp/o1gGV2vpS4lalGYsUOqXrddcKCmK61aZ8SjEpUpVFVoCpTj4r661Km7kBHjrDyc1RAIQAAIfkEBQoAGwAsBwAEAM4ACwAABf/gtmUCd4goQQgFKj6PYKi0yrrbc8i4ohQt12EHcal+MNSQiCP8gigdz7iCioaCIvUmZLp8QBzW0EN2vSlCuDtFKaq4RyHzQLEKZNdiQDhRDVooCwkbfm59EAmKi4SGIm+AjIsKjhsqB4mSjT2IOIOUnICeCaB/mZKFNTSRmqVpmJqklSqskq6PfYYCDwYHDC4REQwGCBLGxxIQDsHMwhAIX8bKzcENgSLGF9PU1j3Sy9zX2NrgzQziChLk1BHWxcjf7N046tvN82715czn9Pryz6Ilc4ACj4EBOCZM8KEnAYYADBRKnACAYUMFv1wotIhCEcaJCisqwJFgAUSQGyX/kCSVUUTIdKMwJlyo0oXHlhskwrTJciZHEXsgaqS4s6PJiCAr1uzYU8kBBSgnWFqpoMJMUjGtDmUwkmfVmVypakWhEKvXsS4nhLW5wNjVroJIoc05wSzTr0PtiigpYe4EC2vj4iWrFu5euWIMRBhacaVJhYQBEFjA9jHjyQ0xEABwGceGAZYjY0YBOrRLCxUp29QM+bRkx5s7ZyYgVbTqwwti2ybJ+vLtDYpycyZbYOlptxdx0kV+V7lC5iJAyyRrwYKxAdiz82ng0/jnAdMJFz0cPi104Ec1Vj9/M6F173vKL/feXv156dw11tlqeMMnv4V5Ap53GmjQQH97nFfg+IFiucfgRX5Z8KAgbUlQ4IULIlghhhdOSB6AgX0IVn8eReghen3NRIBsRgnH4l4LuEidZBjwRpt6NM5WGwoW0KSjCwX6yJSMab2GwwAPDXfaBCtWpluRTQqC5JM5oUZAjUNS+VeOLWpJEQ7VYQANW0INJSZVDFSnZphjSikfmzE5N4EEbQI1QJmnWXCmHulRp2edwDXF43txukenJwvI9xyg9Q26Z3MzGUcBYFEChZh6DVTq34AU8Iflh51Sd+CnKFYQ6mmZkhqfBKfSxZWqA9DZanWjxmhrWwi0qtCrt/43K6WqVjjpmhIqgEGvculaGKklKstAACEAACH5BAUKABwALAcABADOAAsAAAX/ICdyQmaMYyAUqPgIBiHPxNpy79kqRXH8wAPsRmDdXpAWgWdEIYm2llCHqjVHU+jjJkwqBTecwItShMXkEfNWSh8e1NGAcLgpDGlRgk7EJ/6Ae3VKfoF/fDuFhohVeDeCfXkcCQqDVQcQhn+VNDOYmpSWaoqBlUSfmowjEA+iEAEGDRGztAwGCDcXEA60tXEiCrq8vREMEBLIyRLCxMWSHMzExnbRvQ2Sy7vN0zvVtNfU2tLY3rPgLdnDvca4VQS/Cpk3ABwSLQkYAQwT/P309vcI7OvXr94jBQMJ/nskkGA/BQBRLNDncAIAiDcG6LsxAWOLiQzmeURBKWSLCQbv/1F0eDGinJUKR47YY1IEgQASKk7Yc7ACRwZm7mHweRJoz59BJUogisKCUaFMR0x4SlJBVBFTk8pZivTR0K73rN5wqlXEAq5Fy3IYgHbEzQ0nLy4QSoCjXLoom96VOJEeCosK5n4kkFfqXjl94wa+l1gvAcGICbewAOAxY8l/Ky/QhAGz4cUkGxu2HNozhwMGBnCUqUdBg9UuW9eUynqSwLHIBujePef1ZGQZXcM+OFuEBeBhi3OYgLyqcuaxbT9vLkf4SeqyWxSQpKGB2gQpm1KdWbu72rPRzR9Ne2Nu9Kzr/1Jqj0yD/fvqP4aXOt5sW/5qsXXVcv1Nsp8IBUAmgswGF3llGgeU1YVXXKTN1FlhWFXW3gIE+DVChApysACHHo7Q4A35lLichh+ROBmLKAzgYmYEYDAhCgxKGOOMn4WR4kkDaoBBOxJtdNKQxFmg5JIWIBnQc07GaORfUY4AEkdV6jHlCEISSZ5yTXpp1pbGZbkWmcuZmQCaE6iJ0FhjMaDjTMsgZaNEHFRAQVp3bqXnZED1qYcECOz5V6BhSWCoVJQIKuKQi2KFKEkEFAqoAo7uYSmO3jk61wUUMKmknJ4SGimBmAa0qVQBhAAAIfkEBQoAGwAsBwAEAM4ACwAABf/gJm5FmRlEqhJC+bywgK5pO4rHI0D3pii22+Mg6/0Ej96weCMAk7cDkXf7lZTTnrMl7eaYoy10JN0ZFdco0XAuvKI6qkgVFJXYNwjkIBcNBgR8TQoGfRsJCRuCYYQQiI+ICosiCoGOkIiKfSl8mJkHZ4U9kZMbKaI3pKGXmJKrngmug4WwkhA0lrCBWgYFCCMQFwoQDRHGxwwGCBLMzRLEx8iGzMMO0cYNeCMKzBDW19lnF9DXDIY/48Xg093f0Q3s1dcR8OLe8+Y91OTv5wrj7o7B+7VNQqABIoRVCMBggsOHE36kSoCBIcSH3EbFangxogJYFi8CkJhqQciLJEf/LDDJEeJIBT0GsOwYUYJGBS0fjpQAMidGmyVP6sx4Y6VQhzs9VUwkwqaCCh0tmKoFtSMDmBOf9phg4SrVrROuasRQAaxXpVUhdsU6IsECZlvX3kwLUWzRt0BHOLTbNlbZG3vZinArge5Dvn7wbqtQkSYAAgtKmnSsYKVKo2AfW048uaPmG386i4Q8EQMBAIAnfB7xBxBqvapJ9zX9WgRS2YMpnvYMGdPK3aMjt/3dUcNI4blpj7iwkMFWDXDvSmgAlijrt9RTR78+PS6z1uAJZIe93Q8g5zcsWCi/4Y+C8bah5zUv3vv89uft30QP23punGCx5954oBBwnwYaNCDY/wYrsYeggnM9B2Fpf8GG2CEUVWhbWAtGouEGDy7Y4IEJVrbSiXghqGKIo7z1IVcXIkKWWR361QOLWWnIhwERpLaaCCee5iMBGJQmJGyPFTnbkfHVZGRtIGrg5HALEJAZbu39BuUEUmq1JJQIPtZilY5hGeSWsSk52G9XqsmgljdIcABytq13HyIM6RcUA+r1qZ4EBF3WHWB29tBgAzRhEGhig8KmqKFv8SeCeo+mgsF7YFXa1qWSbkDpom/mqR1PmHCqJ3fwNRVXjC7S6CZhFVCQ2lWvZiirhQq42SACt25IK2hv8TprriUV1usGgeka7LFcNmCldMLi6qZMgFLgpw16Cipb7bC1knXsBiEAACH5BAUKABsALAcABADOAAsAAAX/4FZsJPkUmUGsLCEUTywXglFuSg7fW1xAvNWLF6sFFcPb42C8EZCj24EJdCp2yoegWsolS0Uu6fmamg8n8YYcLU2bXSiRaXMGvqV6/KAeJAh8VgZqCX+BexCFioWAYgqNi4qAR4ORhRuHY408jAeUhAmYYiuVlpiflqGZa5CWkzc5fKmbbhIpsAoQDRG8vQwQCBLCwxK6vb5qwhfGxxENahvCEA7NzskSy7vNzzzK09W/PNHF1NvX2dXcN8K55cfh69Luveol3vO8zwi4Yhj+AQwmCBw4IYclDAAJDlQggVOChAoLKkgFkSCAHDwWLKhIEOONARsDKryogFPIiAUb/95gJNIiw4wnI778GFPhzBKFOAq8qLJEhQpiNArjMcHCmlTCUDIouTKBhApELSxFWiGiVKY4E2CAekPgUphDu0742nRrVLJZnyrFSqKQ2ohoSYAMW6IoDpNJ4bLdILTnAj8KUF7UeENjAKuDyxIgOuGiOI0EBBMgLNew5AUrDTMGsFixwBIaNCQuAXJB57qNJ2OWm2Aj4skwCQCIyNkhhtMkdsIuodE0AN4LJDRgfLPtn5YDLdBlraAByuUbBgxQwICxMOnYpVOPej074OFdlfc0TqC62OIbcppHjV4o+LrieWhfT8JC/I/T6W8oCl29vQ0XjLdBaA3s1RcPBO7lFvpX8BVoG4O5jTXRQRDuJ6FDTzEWF1/BCZhgbyAKE9qICYLloQYOFtahVRsWYlZ4KQJHlwHS/IYaZ6sZd9tmu5HQm2xi1UaTbzxYwJk/wBF5g5EEYOBZeEfGZmNdFyFZmZIR4jikbLThlh5kUUVJGmRT7sekkziRWUIACABk3T4qCsedgO4xhgGcY7q5pHJ4klBBTQRJ0CeHcoYHHUh6wgfdn9uJdSdMiebGJ0zUPTcoS286FCkrZxnYoYYKWLkBowhQoBeaOlZAgVhLidrXqg2GiqpQpZ4apwSwRtjqrB3muoF9BboaXKmshlqWqsWiGt2wphJkQbAU5hoCACH5BAUKABsALAcABADOAAsAAAX/oGFw2WZuT5oZROsSQnGaKjRvilI893MItlNOJ5v5gDcFrHhKIWcEYu/xFEqNv6B1N62aclysF7fsZYe5aOx2yL5aAUGSaT1oTYMBwQ5VGCAJgYIJCnx1gIOBhXdwiIl7d0p2iYGQUAQBjoOFSQR/lIQHnZ+Ue6OagqYzSqSJi5eTpTxGcjcSChANEbu8DBAIEsHBChe5vL13G7fFuscRDcnKuM3H0La3EA7Oz8kKEsXazr7Cw9/Gztar5uHHvte47MjktznZ2w0G1+D3BgirAqJmJMAQgMGEgwgn5Ei0gKDBhBMALGRYEOJBb5QcWlQo4cbAihZz3GgIMqFEBSM1/4ZEOWPAgpIIJXYU+PIhRG8ja1qU6VHlzZknJNQ6UanCjQkWCIGSUGEjAwVLjc44+DTqUQtPPS5gejUrTa5TJ3g9sWCr1BNUWZI161StiQUDmLYdGfesibQ3XMq1OPYthrwuA2yU2LBs2cBHIypYQPPlYAKFD5cVvNPtW8eVGbdcQADATsiNO4cFAPkvHpedPzc8kUcPgNGgZ5RNDZG05reoE9s2vSEP79MEGiQGy1qP8LA4ZcdtsJE48ONoLTBtTV0B9LsTnPceoIDBDQvS7W7vfjVY3q3eZ4A339J4eaAmKqU/sV58HvJh2RcnIBsDUw0ABqhBA5aV5V9XUFGiHfVeAiWwoFgJJrIXRH1tEMiDFV4oHoAEGlaWhgIGSGBO2nFomYY3mKjVglidaNYJGJDkWW2xxTfbjCbVaOGNqoX2GloR8ZeTaECS9pthRGJH2g0b3Agbk6hNANtteHD2GJUucfajCQBy5OOTQ25ZgUPvaVVQmbKh9510/qQpwXx3SQdfk8tZJOd5b6JJFplT3ZnmmX3qd5l1eg5q00HrtUkUn0AKaiGjClSAgKLYZcgWXwocGRcCFGCKwSB6ceqphwmYRUFYT/1WKlOdUpipmxW0mlCqHjYkAaeoZlqrqZ4qd+upQKaapn/AmgAegZ8KUtYtFAQQAgAh+QQFCgAbACwHAAQAzgALAAAF/+C2PUcmiCiZGUTrEkKBis8jQEquKwU5HyXIbEPgyX7BYa5wTNmEMwWsSXsqFbEh8DYs9mrgGjdK6GkPY5GOeU6ryz7UFopSQEzygOGhJBjoIgMDBAcBM0V/CYqLCQqFOwobiYyKjn2TlI6GKC2YjJZknouaZAcQlJUHl6eooJwKooobqoewrJSEmyKdt59NhRKFMxLEEA4RyMkMEAjDEhfGycqAG8TQx9IRDRDE3d3R2ctD1RLg0ttKEnbY5wZD3+zJ6M7X2RHi9Oby7u/r9g38UFjTh2xZJBEBMDAboogAgwkQI07IMUORwocSJwCgWDFBAIwZOaJIsOBjRogKJP8wTODw5ESVHVtm3AhzpEeQElOuNDlTZ0ycEUWKWFASqEahGwYUPbnxoAgEdlYSqDBkgoUNClAlIHbSAoOsqCRQnQHxq1axVb06FWFxLIqyaze0Tft1JVqyE+pWXMD1pF6bYl3+HTqAWNW8cRUFzmih0ZAAB2oGKukSAAGGRHWJgLiR6AylBLpuHKKUMlMCngMpDSAa9QIUggZVVvDaJobLeC3XZpvgNgCmtPcuwP3WgmXSq4do0DC6o2/guzcseECtUoO0hmcsGKDgOt7ssBd07wqesAIGZC1YIBa7PQHvb1+SFo+++HrJSQfB33xfav3i5eX3Hnb4CTJgegEq8tH/YQEOcIJzbm2G2EoYRLgBXFpVmFYDcREV4HIcnmUhiGBRouEMJGJGzHIspqgdXxK0yCKHRNXoIX4uorCdTyjkyNtdPWrA4Up82EbAbzMRxxZRR54WXVLDIRmRcag5d2R6ugl3ZXzNhTecchpMhIGVAKAYpgJjjsSklBEd99maZoo535ZvdamjBEpusJyctg3h4X8XqodBMx0tiNeg/oGJaKGABpogS40KSqiaEgBqlQWLUtqoVQnytekEjzo0hHqhRorppOZt2p923M2AAV+oBtpAnnPNoB6HaU6mAAIU+IXmi3j2mtFXuUoHKwXpzVrsjcgGOauKEjQrwq157hitGq2NoWmjh7z6Wmxb0m5w66+2VRAuXN/yFUAIACH5BAUKABsALAcABADOAAsAAAX/4CZuRiaM45MZqBgIRbs9AqTcuFLE7VHLOh7KB5ERdjJaEaU4ClO/lgKWjKKcMiJQ8KgumcieVdQMD8cbBeuAkkC6LYLhOxoQ2PF5Ys9PKPBMen17f0CCg4VSh32JV4t8jSNqEIOEgJKPlkYBlJWRInKdiJdkmQlvKAsLBxdABA4RsbIMBggtEhcQsLKxDBC2TAS6vLENdJLDxMZAubu8vjIbzcQRtMzJz79S08oQEt/guNiyy7fcvMbh4OezdAvGrakLAQwyABsELQkY9BP+//ckyPDD4J9BfAMh1GsBoImMeQUN+lMgUJ9CiRMa5msxoB9Gh/o8GmxYMZXIgxtR/yQ46S/gQAURR0pDwYDfywoyLPip5AdnCwsMFPBU4BPFhKBDi444quCmDKZOfwZ9KEGpCKgcN1jdALSpPqIYsabS+nSqvqplvYqQYAeDPgwKwjaMtiDl0oaqUAyo+3TuWwUAMPpVCfee0cEjVBGQq2ABx7oTWmQk4FglZMGN9fGVDMCuiH2AOVOu/PmyxM630gwM0CCn6q8LjVJ8GXvpa5Uwn95OTC/nNxkda1/dLSK475IjCD6dHbK1ZOa4hXP9DXs5chJ00UpVm5xo2qRpoxptwF2E4/IbJpB/SDz9+q9b1aNfQH08+p4a8uvX8B53fLP+ycAfemjsRUBgp1H20K+BghHgVgt1GXZXZpZ5lt4ECjxYR4ScUWiShEtZqBiIInRGWnERNnjiBglw+JyGnxUmGowsyiiZg189lNtPGACjV2+S9UjbU0JWF6SPvEk3QZEqsZYTk3UAaRSUnznJI5LmESCdBVSyaOWUWLK4I5gDUYVeV1T9l+FZClCAUVA09uSmRHBCKAECFEhW51ht6rnmWBXkaR+NjuHpJ40D3DmnQXt2F+ihZxlqVKOfQRACACH5BAUKABwALAcABADOAAsAAAX/ICdyUCkUo/g8mUG8MCGkKgspeC6j6XEIEBpBUeCNfECaglBcOVfJFK7YQwZHQ6JRZBUqTrSuVEuD3nI45pYjFuWKvjjSkCoRaBUMWxkwBGgJCXspQ36Bh4EEB0oKhoiBgyNLjo8Ki4QElIiWfJqHnISNEI+Ql5J9o6SgkqKkgqYihamPkW6oNBgSfiMMDQkGCBLCwxIQDhHIyQwQCGMKxsnKVyPCF9DREQ3MxMPX0cu4wt7J2uHWx9jlKd3o39MiuefYEcvNkuLt5O8c1ePI2tyELXGQwoGDAQf+iEC2xByDCRAjTlAgIUWCBRgCPJQ4AQBFXAs0coT40WLIjRxL/47AcHLkxIomRXL0CHPERZkpa4q4iVKiyp0tR/7kwHMkTUBBJR5dOCEBAVcKKtCAyOHpowXCpk7goABqBZdcvWploACpBKkpIJI1q5OD2rIWE0R1uTZu1LFwbWL9OlKuWb4c6+o9i3dEgw0RCGDUG9KlRw56gDY2qmCByZBaASi+TACA0TucAaTteCcy0ZuOK3N2vJlx58+LRQyY3Xm0ZsgjZg+oPQLi7dUcNXi0LOJw1pgNtB7XG6CBy+U75SYfPTSQAgZTNUDnQHt67wnbZyvwLgKiMN3oCZB3C76tdewpLFgIP2C88rbi4Y+QT3+8S5USMICZXWj1pkEDeUU3lOYGB3alSoEiMIjgX4WlgNF2EibIwQIXauWXSRg2SAOHIU5IIIMoZkhhWiJaiFVbKo6AQEgQXrTAazO1JhkBrBG3Y2Y6EsUhaGn95hprSN0oWpFE7rhkeaQBchGOEWnwEmc0uKWZj0LeuNV3W4Y2lZHFlQCSRjTIl8uZ+kG5HU/3sRlnTG2ytyadytnD3HrmuRcSn+0h1dycexIK1KCjYaCnjCCVqOFFJTZ5GkUUjESWaUIKU2lgCmAKKQIUjHapXRKE+t2og1VgankNYnohqKJ2CmKplso6GKz7WYCgqxeuyoF8u9IQAgA7",
msg: null,
msgText: "<em>Loading the next set of posts...</em>",
selector: null,
speed: "fast",
start: n
},
state: {
isDuringAjax: false,
isInvalidPage: false,
isDestroyed: false,
isDone: false,
isPaused: false,
isBeyondMaxPage: false,
currPage: 1
},
debug: false,
behavior: n,
binder: t(e),
nextSelector: "div.navigation a:first",
navSelector: "div.navigation",
contentSelector: null,
extraScrollPx: 150,
itemSelector: "div.post",
animate: false,
pathParse: n,
dataType: "html",
appendCallback: true,
bufferPx: 40,
errorCallback: function(){},
infid: 0,
pixelsFromNavToBottom: n,
path: n,
prefill: false,
maxPage: n
};
t.infinitescroll.prototype={
_binding: function(t){
var r=this,
i=r.options;
i.v="2.0b2.120520";
if(!!i.behavior&&this["_binding_" + i.behavior]!==n){
this["_binding_" + i.behavior].call(this);
return
}
if(t!=="bind"&&t!=="unbind"){
this._debug("Binding value  " + t + " not valid");
return false
}
if(t==="unbind"){
this.options.binder.unbind("smartscroll.infscr." + r.options.infid)
}else{
this.options.binder[t]("smartscroll.infscr." + r.options.infid, function(){
r.scroll()
})
}
this._debug("Binding", t)
},
_create: function(i, s){
var o=t.extend(true, {}, t.infinitescroll.defaults, i);
this.options=o;
var u=t(e);
var a=this;
if(!a._validate(i)){
return false
}
var f=t(o.nextSelector).attr("href");
if(!f){
this._debug("Navigation selector not found");
return false
}
o.path=o.path||this._determinepath(f);
o.contentSelector=o.contentSelector||this.element;
o.loading.selector=o.loading.selector||o.contentSelector;
o.loading.msg=o.loading.msg||t('<div id="infscr-loading"><div class="spinner">' + o.loading.loaderHTML + '</div><div class="text">' + o.loading.msgText + "</div></div>");
(new Image).src=o.loading.img;
if(o.pixelsFromNavToBottom===n){
o.pixelsFromNavToBottom=t(document).height() - t(o.navSelector).offset().top;
this._debug("pixelsFromNavToBottom: " + o.pixelsFromNavToBottom)
}
var l=this;
o.loading.start=o.loading.start||function(){
t(o.navSelector).hide();
o.loading.msg.appendTo(o.loading.selector).fadeIn(o.loading.speed, t.proxy(function(){
this.beginAjax(o)
}, l))
};
o.loading.finished=o.loading.finished||function(){
if(!o.state.isBeyondMaxPage) o.loading.msg.fadeOut(o.loading.speed)
};
o.callback=function(e, r, i){
if(!!o.behavior&&e["_callback_" + o.behavior]!==n){
e["_callback_" + o.behavior].call(t(o.contentSelector)[0], r, i)
}
if(s){
s.call(t(o.contentSelector)[0], r, o, i)
}
if(o.prefill){
u.bind("resize.infinite-scroll", e._prefill)
}};
if(i.debug){
if(Function.prototype.bind&&(typeof console==="object"||typeof console==="function")&&typeof console.log==="object"){
["log", "info", "warn", "error", "assert", "dir", "clear", "profile", "profileEnd"].forEach(function(e){
console[e]=this.call(console[e], console)
}, Function.prototype.bind)
}}
this._setup();
if(o.prefill){
this._prefill()
}
return true
},
_prefill: function(){
function s(){
return r.options.contentSelector.height() <=i.height()
}
var r=this;
var i=t(e);
this._prefill=function(){
if(s()){
r.scroll()
}
i.bind("resize.infinite-scroll", function(){
if(s()){
i.unbind("resize.infinite-scroll");
r.scroll()
}})
};
this._prefill()
},
_debug: function(){
if(true!==this.options.debug){
return
}
if(typeof console!=="undefined"&&typeof console.log==="function"){
if(Array.prototype.slice.call(arguments).length===1&&typeof Array.prototype.slice.call(arguments)[0]==="string"){
console.log(Array.prototype.slice.call(arguments).toString())
}else{
console.log(Array.prototype.slice.call(arguments))
}}else if(!Function.prototype.bind&&typeof console!=="undefined"&&typeof console.log==="object"){
Function.prototype.call.call(console.log, console, Array.prototype.slice.call(arguments))
}},
_determinepath: function(t){
var r=this.options;
if(!!r.behavior&&this["_determinepath_" + r.behavior]!==n){
return this["_determinepath_" + r.behavior].call(this, t)
}
if(!!r.pathParse){
this._debug("pathParse manual");
return r.pathParse(t, this.options.state.currPage + 1)
}else if(t.match(/^(.*?)\b2\b(.*?$)/)){
t=t.match(/^(.*?)\b2\b(.*?$)/).slice(1)
}else if(t.match(/^(.*?)2(.*?$)/)){
if(t.match(/^(.*?page=)2(\/.*|$)/)){
t=t.match(/^(.*?page=)2(\/.*|$)/).slice(1);
return t
}
t=t.match(/^(.*?)2(.*?$)/).slice(1)
}else{
if(t.match(/^(.*?page=)1(\/.*|$)/)){
t=t.match(/^(.*?page=)1(\/.*|$)/).slice(1);
return t
}else{
this._debug("Sorry, we couldn't parse your Next (Previous Posts) URL. Verify your the css selector points to the correct A tag. If you still get this error: yell, scream, and kindly ask for help at infinite-scroll.com.");
r.state.isInvalidPage=true
}}
this._debug("determinePath", t);
return t
},
_error: function(t){
var r=this.options;
if(!!r.behavior&&this["_error_" + r.behavior]!==n){
this["_error_" + r.behavior].call(this, t);
return
}
if(t!=="destroy"&&t!=="end"){
t="unknown"
}
this._debug("Error", t);
if(t==="end"||r.state.isBeyondMaxPage){
this._showdonemsg()
}
r.state.isDone=true;
r.state.currPage=1;
r.state.isPaused=false;
r.state.isBeyondMaxPage=false;
this._binding("unbind")
},
_loadcallback: function(i, s, o){
var u=this.options,
a=this.options.callback,
f=u.state.isDone ? "done":!u.appendCallback ? "no-append":"append",
l;
if(!!u.behavior&&this["_loadcallback_" + u.behavior]!==n){
this["_loadcallback_" + u.behavior].call(this, i, s);
return
}
switch (f){
case "done":
this._showdonemsg();
return false;
case "no-append":
if(u.dataType==="html"){
s="<div>" + s + "</div>";
s=t(s).find(u.itemSelector)
}
break;
case "append":
var c=i.children();
if(c.length===0){
return this._error("end")
}
l=document.createDocumentFragment();
while (i[0].firstChild){
l.appendChild(i[0].firstChild)
}
this._debug("contentSelector", t(u.contentSelector)[0]);
t(u.contentSelector)[0].appendChild(l);
s=c.get();
break
}
u.loading.finished.call(t(u.contentSelector)[0], u);
if(u.animate){
var h=t(e).scrollTop() + t(u.loading.msg).height() + u.extraScrollPx + "px";
t("html,body").animate({
scrollTop: h
}, 800, function(){
u.state.isDuringAjax=false
})
}
if(!u.animate){
u.state.isDuringAjax=false
}
a(this, s, o);
if(u.prefill){
this._prefill()
}},
_nearbottom: function(){
var i=this.options,
s=0 + t(document).height() - i.binder.scrollTop() - t(e).height();
if(!!i.behavior&&this["_nearbottom_" + i.behavior]!==n){
return this["_nearbottom_" + i.behavior].call(this)
}
this._debug("math:", s, i.pixelsFromNavToBottom);
return s - i.bufferPx < i.pixelsFromNavToBottom
},
_pausing: function(t){
var r=this.options;
if(!!r.behavior&&this["_pausing_" + r.behavior]!==n){
this["_pausing_" + r.behavior].call(this, t);
return
}
if(t!=="pause"&&t!=="resume"&&t!==null){
this._debug("Invalid argument. Toggling pause value instead")
}
t=t&&(t==="pause"||t==="resume") ? t:"toggle";
switch (t){
case "pause":
r.state.isPaused=true;
break;
case "resume":
r.state.isPaused=false;
break;
case "toggle":
r.state.isPaused = !r.state.isPaused;
break
}
this._debug("Paused", r.state.isPaused);
return false
},
_setup: function(){
var t=this.options;
if(!!t.behavior&&this["_setup_" + t.behavior]!==n){
this["_setup_" + t.behavior].call(this);
return
}
this._binding("bind");
return false
},
_showdonemsg: function(){
var r=this.options;
if(!!r.behavior&&this["_showdonemsg_" + r.behavior]!==n){
this["_showdonemsg_" + r.behavior].call(this);
return
}
r.loading.msg.find(".spinner").animate({
'opacity': 0
}, 500).parent().find("div.text").addClass('all-loaded').html(r.loading.finishedMsg).animate({
opacity: 0.8
}, 2e3, function(){});
r.errorCallback.call(t(r.contentSelector)[0], "done")
},
_validate: function(n){
for (var r in n){
if(r.indexOf&&r.indexOf("Selector") > -1&&t(n[r]).length===0){
this._debug("Your " + r + " found no elements.");
return false
}}
return true
},
bind: function(){
this._binding("bind")
},
destroy: function(){
this.options.state.isDestroyed=true;
this.options.loading.finished();
return this._error("destroy")
},
pause: function(){
this._pausing("pause")
},
resume: function(){
this._pausing("resume")
},
beginAjax: function(r){
var i=this,
s=r.path,
o, u, a, f;
r.state.currPage++;
if(r.maxPage!=n&&r.state.currPage > r.maxPage){
r.state.isBeyondMaxPage=true;
this.destroy();
return
}
o=t(r.contentSelector).is("table, tbody") ? t("<tbody/>"):t("<div/>");
u=typeof s==="function" ? s(r.state.currPage):s.join(r.state.currPage);
i._debug("heading into ajax", u);
a=r.dataType==="html"||r.dataType==="json" ? r.dataType:"html+callback";
if(r.appendCallback&&r.dataType==="html"){
a +="+callback"
}
switch (a){
case "html+callback":
i._debug("Using HTML via .load() method");
o.load(u + " " + r.itemSelector, n, function(t){
i._loadcallback(o, t, u)
});
break;
case "html":
i._debug("Using " + a.toUpperCase() + " via $.ajax() method");
t.ajax({
url: u,
dataType: r.dataType,
complete: function(t, n){
f=typeof t.isResolved!=="undefined" ? t.isResolved():n==="success"||n==="notmodified";
if(f){
i._loadcallback(o, t.responseText, u)
}else{
i._error("end")
}}
});
break;
case "json":
i._debug("Using " + a.toUpperCase() + " via $.ajax() method");
t.ajax({
dataType: "json",
type: "GET",
url: u,
success: function(e, t, s){
f=typeof s.isResolved!=="undefined" ? s.isResolved():t==="success"||t==="notmodified";
if(r.appendCallback){
if(r.template!==n){
var a=r.template(e);
o.append(a);
if(f){
i._loadcallback(o, a)
}else{
i._error("end")
}}else{
i._debug("template must be defined.");
i._error("end")
}}else{
if(f){
i._loadcallback(o, e, u)
}else{
i._error("end")
}}
},
error: function(){
i._debug("JSON ajax request failed.");
i._error("end")
}});
break
}},
retrieve: function(r){
r=r||null;
var i=this,
s=i.options;
if(!!s.behavior&&this["retrieve_" + s.behavior]!==n){
this["retrieve_" + s.behavior].call(this, r);
return
}
if(s.state.isDestroyed){
this._debug("Instance is destroyed");
return false
}
s.state.isDuringAjax=true;
s.loading.start.call(t(s.contentSelector)[0], s)
},
scroll: function(){
var t=this.options,
r=t.state;
if(!!t.behavior&&this["scroll_" + t.behavior]!==n){
this["scroll_" + t.behavior].call(this);
return
}
if(r.isDuringAjax||r.isInvalidPage||r.isDone||r.isDestroyed||r.isPaused){
return
}
if(!this._nearbottom()){
return
}
this.retrieve()
},
toggle: function(){
this._pausing()
},
unbind: function(){
this._binding("unbind")
},
update: function(n){
if(t.isPlainObject(n)){
this.options=t.extend(true, this.options, n)
}}
};
t.fn.infinitescroll=function(n, r){
var i=typeof n;
switch (i){
case "string":
var s=Array.prototype.slice.call(arguments, 1);
this.each(function(){
var e=t.data(this, "infinitescroll");
if(!e){
return false
}
if(!t.isFunction(e[n])||n.charAt(0)==="_"){
return false
}
e[n].apply(e, s)
});
break;
case "object":
this.each(function(){
var e=t.data(this, "infinitescroll");
if(e){
e.update(n)
}else{
e=new t.infinitescroll(n, r, this);
if(!e.failed){
t.data(this, "infinitescroll", e)
}}
});
break
}
return this
};
var r=t.event,
i;
r.special.smartscroll={
setup: function(){
t(this).bind("scroll", r.special.smartscroll.handler)
},
teardown: function(){
t(this).unbind("scroll", r.special.smartscroll.handler)
},
handler: function(e, n){
var r=this,
s=arguments;
e.type="smartscroll";
if(i){
clearTimeout(i)
}
i=setTimeout(function(){
t(r).trigger("smartscroll", s)
}, n==="execAsap" ? 0:100)
}};
t.fn.smartscroll=function(e){
return e ? this.bind("smartscroll", e):this.trigger("smartscroll", ["execAsap"])
}})(window, jQuery);
/////////////////////////////////////////////
(function($){
var defaults={
topSpacing: 0,
bottomSpacing: 0,
className: 'is-sticky',
wrapperClassName: 'sticky-wrapper',
center: false,
getWidthFrom: '',
responsiveWidth: false
},
$window=$(window),
$document=$(document),
sticked=[],
windowHeight=$window.height(),
scroller=function(){
var scrollTop=$window.scrollTop(),
documentHeight=$document.height(),
dwh=documentHeight - windowHeight,
extra=(scrollTop > dwh) ? dwh - scrollTop:0;
for (var i=0; i < sticked.length; i++){
var s=sticked[i],
elementTop=s.stickyWrapper.offset().top,
etse=elementTop - s.topSpacing - extra;
if(scrollTop <=etse){
if(s.currentTop!==null){
s.stickyElement
.css('position', '')
.css('top', '');
s.stickyElement.trigger('sticky-end', [s]).parent().removeClass(s.className);
s.currentTop=null;
}}else{
var newTop=documentHeight - s.stickyElement.outerHeight()
- s.topSpacing - s.bottomSpacing - scrollTop - extra;
if(newTop < 0){
newTop=newTop + s.topSpacing;
}else{
newTop=s.topSpacing;
}
if(s.currentTop!=newTop){
s.stickyElement
.css('position', 'fixed')
.css('top', newTop);
if(typeof s.getWidthFrom!=='undefined'){
s.stickyElement.css('width', $(s.getWidthFrom).width());
}
s.stickyElement.trigger('sticky-start', [s]).parent().addClass(s.className);
s.currentTop=newTop;
}}
}},
resizer=function(){
windowHeight=$window.height();
for (var i=0; i < sticked.length; i++){
var s=sticked[i];
if(typeof s.getWidthFrom!=='undefined'&&s.responsiveWidth===true){
s.stickyElement.css('width', $(s.getWidthFrom).width());
}}
},
methods={
init: function(options){
var o=$.extend({}, defaults, options);
return this.each(function(){
var stickyElement=$(this);
var stickyId=stickyElement.attr('id');
var wrapperId=stickyId ? stickyId + '-' + defaults.wrapperClassName:defaults.wrapperClassName
var wrapper=$('<div></div>')
.attr('id', stickyId + '-sticky-wrapper')
.addClass(o.wrapperClassName);
stickyElement.wrapAll(wrapper);
if(o.center){
stickyElement.parent().css({width:stickyElement.outerWidth(),marginLeft:"auto",marginRight:"auto"});
}
if(stickyElement.css("float")=="right"){
stickyElement.css({"float":"none"}).parent().css({"float":"right"});
}
var stickyWrapper=stickyElement.parent();
var stickyHeight=stickyElement.outerHeight(true);
if(stickyHeight > 0){
stickyWrapper.css('height', stickyElement.outerHeight(true));
}
sticked.push({
topSpacing: o.topSpacing,
bottomSpacing: o.bottomSpacing,
stickyElement: stickyElement,
currentTop: null,
stickyWrapper: stickyWrapper,
className: o.className,
getWidthFrom: o.getWidthFrom,
responsiveWidth: o.responsiveWidth
});
});
},
update: scroller,
unstick: function(options){
return this.each(function(){
var unstickyElement=$(this);
var removeIdx=-1;
for (var i=0; i < sticked.length; i++){
if(sticked[i].stickyElement.get(0)==unstickyElement.get(0)){
removeIdx=i;
}}
if(removeIdx!=-1){
sticked.splice(removeIdx,1);
unstickyElement.unwrap();
unstickyElement.removeAttr('style');
}});
}};
if(window.addEventListener){
window.addEventListener('scroll', scroller, false);
window.addEventListener('resize', resizer, false);
}else if(window.attachEvent){
window.attachEvent('onscroll', scroller);
window.attachEvent('onresize', resizer);
}
$.fn.sticky=function(method){
if(methods[method]){
return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
}else if(typeof method==='object'||!method){
return methods.init.apply(this, arguments);
}else{
$.error('Method ' + method + ' does not exist on jQuery.sticky');
}};
$.fn.unstick=function(method){
if(methods[method]){
return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
}else if(typeof method==='object'||!method){
return methods.unstick.apply(this, arguments);
}else{
$.error('Method ' + method + ' does not exist on jQuery.sticky');
}};
$(function(){
setTimeout(scroller, 0);
});
})(jQuery);
!function(factory){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],factory):factory("undefined"!=typeof module&&module.exports?require("jquery"):jQuery)}(function($){"use strict";function init(options){return!options||void 0!==options.allowPageScroll||void 0===options.swipe&&void 0===options.swipeStatus||(options.allowPageScroll=NONE),void 0!==options.click&&void 0===options.tap&&(options.tap=options.click),options||(options={}),options=$.extend({},$.fn.swipe.defaults,options),this.each(function(){var $this=$(this),plugin=$this.data(PLUGIN_NS);plugin||(plugin=new TouchSwipe(this,options),$this.data(PLUGIN_NS,plugin))})}function TouchSwipe(element,options){function touchStart(jqEvent){if(!(getTouchInProgress()||$(jqEvent.target).closest(options.excludedElements,$element).length>0)){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent;if(!event.pointerType||"mouse"!=event.pointerType||0!=options.fallbackToMouseEvents){var ret,touches=event.touches,evt=touches?touches[0]:event;return phase=PHASE_START,touches?fingerCount=touches.length:options.preventDefaultEvents!==!1&&jqEvent.preventDefault(),distance=0,direction=null,currentDirection=null,pinchDirection=null,duration=0,startTouchesDistance=0,endTouchesDistance=0,pinchZoom=1,pinchDistance=0,maximumsMap=createMaximumsData(),cancelMultiFingerRelease(),createFingerData(0,evt),!touches||fingerCount===options.fingers||options.fingers===ALL_FINGERS||hasPinches()?(startTime=getTimeStamp(),2==fingerCount&&(createFingerData(1,touches[1]),startTouchesDistance=endTouchesDistance=calculateTouchesDistance(fingerData[0].start,fingerData[1].start)),(options.swipeStatus||options.pinchStatus)&&(ret=triggerHandler(event,phase))):ret=!1,ret===!1?(phase=PHASE_CANCEL,triggerHandler(event,phase),ret):(options.hold&&(holdTimeout=setTimeout($.proxy(function(){$element.trigger("hold",[event.target]),options.hold&&(ret=options.hold.call($element,event,event.target))},this),options.longTapThreshold)),setTouchInProgress(!0),null)}}}function touchMove(jqEvent){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent;if(phase!==PHASE_END&&phase!==PHASE_CANCEL&&!inMultiFingerRelease()){var ret,touches=event.touches,evt=touches?touches[0]:event,currentFinger=updateFingerData(evt);if(endTime=getTimeStamp(),touches&&(fingerCount=touches.length),options.hold&&clearTimeout(holdTimeout),phase=PHASE_MOVE,2==fingerCount&&(0==startTouchesDistance?(createFingerData(1,touches[1]),startTouchesDistance=endTouchesDistance=calculateTouchesDistance(fingerData[0].start,fingerData[1].start)):(updateFingerData(touches[1]),endTouchesDistance=calculateTouchesDistance(fingerData[0].end,fingerData[1].end),pinchDirection=calculatePinchDirection(fingerData[0].end,fingerData[1].end)),pinchZoom=calculatePinchZoom(startTouchesDistance,endTouchesDistance),pinchDistance=Math.abs(startTouchesDistance-endTouchesDistance)),fingerCount===options.fingers||options.fingers===ALL_FINGERS||!touches||hasPinches()){if(direction=calculateDirection(currentFinger.start,currentFinger.end),currentDirection=calculateDirection(currentFinger.last,currentFinger.end),validateDefaultEvent(jqEvent,currentDirection),distance=calculateDistance(currentFinger.start,currentFinger.end),duration=calculateDuration(),setMaxDistance(direction,distance),ret=triggerHandler(event,phase),!options.triggerOnTouchEnd||options.triggerOnTouchLeave){var inBounds=!0;if(options.triggerOnTouchLeave){var bounds=getbounds(this);inBounds=isInBounds(currentFinger.end,bounds)}!options.triggerOnTouchEnd&&inBounds?phase=getNextPhase(PHASE_MOVE):options.triggerOnTouchLeave&&!inBounds&&(phase=getNextPhase(PHASE_END)),phase!=PHASE_CANCEL&&phase!=PHASE_END||triggerHandler(event,phase)}}else phase=PHASE_CANCEL,triggerHandler(event,phase);ret===!1&&(phase=PHASE_CANCEL,triggerHandler(event,phase))}}function touchEnd(jqEvent){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent,touches=event.touches;if(touches){if(touches.length&&!inMultiFingerRelease())return startMultiFingerRelease(event),!0;if(touches.length&&inMultiFingerRelease())return!0}return inMultiFingerRelease()&&(fingerCount=fingerCountAtRelease),endTime=getTimeStamp(),duration=calculateDuration(),didSwipeBackToCancel()||!validateSwipeDistance()?(phase=PHASE_CANCEL,triggerHandler(event,phase)):options.triggerOnTouchEnd||options.triggerOnTouchEnd===!1&&phase===PHASE_MOVE?(options.preventDefaultEvents!==!1&&jqEvent.preventDefault(),phase=PHASE_END,triggerHandler(event,phase)):!options.triggerOnTouchEnd&&hasTap()?(phase=PHASE_END,triggerHandlerForGesture(event,phase,TAP)):phase===PHASE_MOVE&&(phase=PHASE_CANCEL,triggerHandler(event,phase)),setTouchInProgress(!1),null}function touchCancel(){fingerCount=0,endTime=0,startTime=0,startTouchesDistance=0,endTouchesDistance=0,pinchZoom=1,cancelMultiFingerRelease(),setTouchInProgress(!1)}function touchLeave(jqEvent){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent;options.triggerOnTouchLeave&&(phase=getNextPhase(PHASE_END),triggerHandler(event,phase))}function removeListeners(){$element.unbind(START_EV,touchStart),$element.unbind(CANCEL_EV,touchCancel),$element.unbind(MOVE_EV,touchMove),$element.unbind(END_EV,touchEnd),LEAVE_EV&&$element.unbind(LEAVE_EV,touchLeave),setTouchInProgress(!1)}function getNextPhase(currentPhase){var nextPhase=currentPhase,validTime=validateSwipeTime(),validDistance=validateSwipeDistance(),didCancel=didSwipeBackToCancel();return!validTime||didCancel?nextPhase=PHASE_CANCEL:!validDistance||currentPhase!=PHASE_MOVE||options.triggerOnTouchEnd&&!options.triggerOnTouchLeave?!validDistance&&currentPhase==PHASE_END&&options.triggerOnTouchLeave&&(nextPhase=PHASE_CANCEL):nextPhase=PHASE_END,nextPhase}function triggerHandler(event,phase){var ret,touches=event.touches;return(didSwipe()||hasSwipes())&&(ret=triggerHandlerForGesture(event,phase,SWIPE)),(didPinch()||hasPinches())&&ret!==!1&&(ret=triggerHandlerForGesture(event,phase,PINCH)),didDoubleTap()&&ret!==!1?ret=triggerHandlerForGesture(event,phase,DOUBLE_TAP):didLongTap()&&ret!==!1?ret=triggerHandlerForGesture(event,phase,LONG_TAP):didTap()&&ret!==!1&&(ret=triggerHandlerForGesture(event,phase,TAP)),phase===PHASE_CANCEL&&touchCancel(event),phase===PHASE_END&&(touches?touches.length||touchCancel(event):touchCancel(event)),ret}function triggerHandlerForGesture(event,phase,gesture){var ret;if(gesture==SWIPE){if($element.trigger("swipeStatus",[phase,direction||null,distance||0,duration||0,fingerCount,fingerData,currentDirection]),options.swipeStatus&&(ret=options.swipeStatus.call($element,event,phase,direction||null,distance||0,duration||0,fingerCount,fingerData,currentDirection),ret===!1))return!1;if(phase==PHASE_END&&validateSwipe()){if(clearTimeout(singleTapTimeout),clearTimeout(holdTimeout),$element.trigger("swipe",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipe&&(ret=options.swipe.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection),ret===!1))return!1;switch(direction){case LEFT:$element.trigger("swipeLeft",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeLeft&&(ret=options.swipeLeft.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection));break;case RIGHT:$element.trigger("swipeRight",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeRight&&(ret=options.swipeRight.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection));break;case UP:$element.trigger("swipeUp",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeUp&&(ret=options.swipeUp.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection));break;case DOWN:$element.trigger("swipeDown",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeDown&&(ret=options.swipeDown.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection))}}}if(gesture==PINCH){if($element.trigger("pinchStatus",[phase,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData]),options.pinchStatus&&(ret=options.pinchStatus.call($element,event,phase,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData),ret===!1))return!1;if(phase==PHASE_END&&validatePinch())switch(pinchDirection){case IN:$element.trigger("pinchIn",[pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData]),options.pinchIn&&(ret=options.pinchIn.call($element,event,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData));break;case OUT:$element.trigger("pinchOut",[pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData]),options.pinchOut&&(ret=options.pinchOut.call($element,event,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData))}}return gesture==TAP?phase!==PHASE_CANCEL&&phase!==PHASE_END||(clearTimeout(singleTapTimeout),clearTimeout(holdTimeout),hasDoubleTap()&&!inDoubleTap()?(doubleTapStartTime=getTimeStamp(),singleTapTimeout=setTimeout($.proxy(function(){doubleTapStartTime=null,$element.trigger("tap",[event.target]),options.tap&&(ret=options.tap.call($element,event,event.target))},this),options.doubleTapThreshold)):(doubleTapStartTime=null,$element.trigger("tap",[event.target]),options.tap&&(ret=options.tap.call($element,event,event.target)))):gesture==DOUBLE_TAP?phase!==PHASE_CANCEL&&phase!==PHASE_END||(clearTimeout(singleTapTimeout),clearTimeout(holdTimeout),doubleTapStartTime=null,$element.trigger("doubletap",[event.target]),options.doubleTap&&(ret=options.doubleTap.call($element,event,event.target))):gesture==LONG_TAP&&(phase!==PHASE_CANCEL&&phase!==PHASE_END||(clearTimeout(singleTapTimeout),doubleTapStartTime=null,$element.trigger("longtap",[event.target]),options.longTap&&(ret=options.longTap.call($element,event,event.target)))),ret}function validateSwipeDistance(){var valid=!0;return null!==options.threshold&&(valid=distance>=options.threshold),valid}function didSwipeBackToCancel(){var cancelled=!1;return null!==options.cancelThreshold&&null!==direction&&(cancelled=getMaxDistance(direction)-distance>=options.cancelThreshold),cancelled}function validatePinchDistance(){return null===options.pinchThreshold||pinchDistance>=options.pinchThreshold}function validateSwipeTime(){var result;return result=!options.maxTimeThreshold||!(duration>=options.maxTimeThreshold)}function validateDefaultEvent(jqEvent,direction){if(options.preventDefaultEvents!==!1)if(options.allowPageScroll===NONE)jqEvent.preventDefault();else{var auto=options.allowPageScroll===AUTO;switch(direction){case LEFT:(options.swipeLeft&&auto||!auto&&options.allowPageScroll!=HORIZONTAL)&&jqEvent.preventDefault();break;case RIGHT:(options.swipeRight&&auto||!auto&&options.allowPageScroll!=HORIZONTAL)&&jqEvent.preventDefault();break;case UP:(options.swipeUp&&auto||!auto&&options.allowPageScroll!=VERTICAL)&&jqEvent.preventDefault();break;case DOWN:(options.swipeDown&&auto||!auto&&options.allowPageScroll!=VERTICAL)&&jqEvent.preventDefault();break;case NONE:}}}function validatePinch(){var hasCorrectFingerCount=validateFingers(),hasEndPoint=validateEndPoint(),hasCorrectDistance=validatePinchDistance();return hasCorrectFingerCount&&hasEndPoint&&hasCorrectDistance}function hasPinches(){return!!(options.pinchStatus||options.pinchIn||options.pinchOut)}function didPinch(){return!(!validatePinch()||!hasPinches())}function validateSwipe(){var hasValidTime=validateSwipeTime(),hasValidDistance=validateSwipeDistance(),hasCorrectFingerCount=validateFingers(),hasEndPoint=validateEndPoint(),didCancel=didSwipeBackToCancel(),valid=!didCancel&&hasEndPoint&&hasCorrectFingerCount&&hasValidDistance&&hasValidTime;return valid}function hasSwipes(){return!!(options.swipe||options.swipeStatus||options.swipeLeft||options.swipeRight||options.swipeUp||options.swipeDown)}function didSwipe(){return!(!validateSwipe()||!hasSwipes())}function validateFingers(){return fingerCount===options.fingers||options.fingers===ALL_FINGERS||!SUPPORTS_TOUCH}function validateEndPoint(){return 0!==fingerData[0].end.x}function hasTap(){return!!options.tap}function hasDoubleTap(){return!!options.doubleTap}function hasLongTap(){return!!options.longTap}function validateDoubleTap(){if(null==doubleTapStartTime)return!1;var now=getTimeStamp();return hasDoubleTap()&&now-doubleTapStartTime<=options.doubleTapThreshold}function inDoubleTap(){return validateDoubleTap()}function validateTap(){return(1===fingerCount||!SUPPORTS_TOUCH)&&(isNaN(distance)||distance<options.threshold)}function validateLongTap(){return duration>options.longTapThreshold&&distance<DOUBLE_TAP_THRESHOLD}function didTap(){return!(!validateTap()||!hasTap())}function didDoubleTap(){return!(!validateDoubleTap()||!hasDoubleTap())}function didLongTap(){return!(!validateLongTap()||!hasLongTap())}function startMultiFingerRelease(event){previousTouchEndTime=getTimeStamp(),fingerCountAtRelease=event.touches.length+1}function cancelMultiFingerRelease(){previousTouchEndTime=0,fingerCountAtRelease=0}function inMultiFingerRelease(){var withinThreshold=!1;if(previousTouchEndTime){var diff=getTimeStamp()-previousTouchEndTime;diff<=options.fingerReleaseThreshold&&(withinThreshold=!0)}return withinThreshold}function getTouchInProgress(){return!($element.data(PLUGIN_NS+"_intouch")!==!0)}function setTouchInProgress(val){$element&&(val===!0?($element.bind(MOVE_EV,touchMove),$element.bind(END_EV,touchEnd),LEAVE_EV&&$element.bind(LEAVE_EV,touchLeave)):($element.unbind(MOVE_EV,touchMove,!1),$element.unbind(END_EV,touchEnd,!1),LEAVE_EV&&$element.unbind(LEAVE_EV,touchLeave,!1)),$element.data(PLUGIN_NS+"_intouch",val===!0))}function createFingerData(id,evt){var f={start:{x:0,y:0},last:{x:0,y:0},end:{x:0,y:0}};return f.start.x=f.last.x=f.end.x=evt.pageX||evt.clientX,f.start.y=f.last.y=f.end.y=evt.pageY||evt.clientY,fingerData[id]=f,f}function updateFingerData(evt){var id=void 0!==evt.identifier?evt.identifier:0,f=getFingerData(id);return null===f&&(f=createFingerData(id,evt)),f.last.x=f.end.x,f.last.y=f.end.y,f.end.x=evt.pageX||evt.clientX,f.end.y=evt.pageY||evt.clientY,f}function getFingerData(id){return fingerData[id]||null}function setMaxDistance(direction,distance){direction!=NONE&&(distance=Math.max(distance,getMaxDistance(direction)),maximumsMap[direction].distance=distance)}function getMaxDistance(direction){if(maximumsMap[direction])return maximumsMap[direction].distance}function createMaximumsData(){var maxData={};return maxData[LEFT]=createMaximumVO(LEFT),maxData[RIGHT]=createMaximumVO(RIGHT),maxData[UP]=createMaximumVO(UP),maxData[DOWN]=createMaximumVO(DOWN),maxData}function createMaximumVO(dir){return{direction:dir,distance:0}}function calculateDuration(){return endTime-startTime}function calculateTouchesDistance(startPoint,endPoint){var diffX=Math.abs(startPoint.x-endPoint.x),diffY=Math.abs(startPoint.y-endPoint.y);return Math.round(Math.sqrt(diffX*diffX+diffY*diffY))}function calculatePinchZoom(startDistance,endDistance){var percent=endDistance/startDistance*1;return percent.toFixed(2)}function calculatePinchDirection(){return pinchZoom<1?OUT:IN}function calculateDistance(startPoint,endPoint){return Math.round(Math.sqrt(Math.pow(endPoint.x-startPoint.x,2)+Math.pow(endPoint.y-startPoint.y,2)))}function calculateAngle(startPoint,endPoint){var x=startPoint.x-endPoint.x,y=endPoint.y-startPoint.y,r=Math.atan2(y,x),angle=Math.round(180*r/Math.PI);return angle<0&&(angle=360-Math.abs(angle)),angle}function calculateDirection(startPoint,endPoint){if(comparePoints(startPoint,endPoint))return NONE;var angle=calculateAngle(startPoint,endPoint);return angle<=45&&angle>=0?LEFT:angle<=360&&angle>=315?LEFT:angle>=135&&angle<=225?RIGHT:angle>45&&angle<135?DOWN:UP}function getTimeStamp(){var now=new Date;return now.getTime()}function getbounds(el){el=$(el);var offset=el.offset(),bounds={left:offset.left,right:offset.left+el.outerWidth(),top:offset.top,bottom:offset.top+el.outerHeight()};return bounds}function isInBounds(point,bounds){return point.x>bounds.left&&point.x<bounds.right&&point.y>bounds.top&&point.y<bounds.bottom}function comparePoints(pointA,pointB){return pointA.x==pointB.x&&pointA.y==pointB.y}var options=$.extend({},options),useTouchEvents=SUPPORTS_TOUCH||SUPPORTS_POINTER||!options.fallbackToMouseEvents,START_EV=useTouchEvents?SUPPORTS_POINTER?SUPPORTS_POINTER_IE10?"MSPointerDown":"pointerdown":"touchstart":"mousedown",MOVE_EV=useTouchEvents?SUPPORTS_POINTER?SUPPORTS_POINTER_IE10?"MSPointerMove":"pointermove":"touchmove":"mousemove",END_EV=useTouchEvents?SUPPORTS_POINTER?SUPPORTS_POINTER_IE10?"MSPointerUp":"pointerup":"touchend":"mouseup",LEAVE_EV=useTouchEvents?SUPPORTS_POINTER?"mouseleave":null:"mouseleave",CANCEL_EV=SUPPORTS_POINTER?SUPPORTS_POINTER_IE10?"MSPointerCancel":"pointercancel":"touchcancel",distance=0,direction=null,currentDirection=null,duration=0,startTouchesDistance=0,endTouchesDistance=0,pinchZoom=1,pinchDistance=0,pinchDirection=0,maximumsMap=null,$element=$(element),phase="start",fingerCount=0,fingerData={},startTime=0,endTime=0,previousTouchEndTime=0,fingerCountAtRelease=0,doubleTapStartTime=0,singleTapTimeout=null,holdTimeout=null;try{$element.bind(START_EV,touchStart),$element.bind(CANCEL_EV,touchCancel)}catch(e){$.error("events not supported "+START_EV+","+CANCEL_EV+" on jQuery.swipe")}this.enable=function(){return this.disable(),$element.bind(START_EV,touchStart),$element.bind(CANCEL_EV,touchCancel),$element},this.disable=function(){return removeListeners(),$element},this.destroy=function(){removeListeners(),$element.data(PLUGIN_NS,null),$element=null},this.option=function(property,value){if("object"==typeof property)options=$.extend(options,property);else if(void 0!==options[property]){if(void 0===value)return options[property];options[property]=value}else{if(!property)return options;$.error("Option "+property+" does not exist on jQuery.swipe.options")}return null}}var VERSION="1.6.18",LEFT="left",RIGHT="right",UP="up",DOWN="down",IN="in",OUT="out",NONE="none",AUTO="auto",SWIPE="swipe",PINCH="pinch",TAP="tap",DOUBLE_TAP="doubletap",LONG_TAP="longtap",HORIZONTAL="horizontal",VERTICAL="vertical",ALL_FINGERS="all",DOUBLE_TAP_THRESHOLD=10,PHASE_START="start",PHASE_MOVE="move",PHASE_END="end",PHASE_CANCEL="cancel",SUPPORTS_TOUCH="ontouchstart"in window,SUPPORTS_POINTER_IE10=window.navigator.msPointerEnabled&&!window.PointerEvent&&!SUPPORTS_TOUCH,SUPPORTS_POINTER=(window.PointerEvent||window.navigator.msPointerEnabled)&&!SUPPORTS_TOUCH,PLUGIN_NS="TouchSwipe",defaults={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:".noSwipe",preventDefaultEvents:!0};$.fn.swipe=function(method){var $this=$(this),plugin=$this.data(PLUGIN_NS);if(plugin&&"string"==typeof method){if(plugin[method])return plugin[method].apply(plugin,Array.prototype.slice.call(arguments,1));$.error("Method "+method+" does not exist on jQuery.swipe")}else if(plugin&&"object"==typeof method)plugin.option.apply(plugin,arguments);else if(!(plugin||"object"!=typeof method&&method))return init.apply(this,arguments);return $this},$.fn.swipe.version=VERSION,$.fn.swipe.defaults=defaults,$.fn.swipe.phases={PHASE_START:PHASE_START,PHASE_MOVE:PHASE_MOVE,PHASE_END:PHASE_END,PHASE_CANCEL:PHASE_CANCEL},$.fn.swipe.directions={LEFT:LEFT,RIGHT:RIGHT,UP:UP,DOWN:DOWN,IN:IN,OUT:OUT},$.fn.swipe.pageScroll={NONE:NONE,HORIZONTAL:HORIZONTAL,VERTICAL:VERTICAL,AUTO:AUTO},$.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,FOUR:4,FIVE:5,ALL:ALL_FINGERS}});
(function(t,e){if(typeof define==="function"&&define.amd){define(["jquery"],e)}else if(typeof exports==="object"){module.exports=e(require("jquery"))}else{e(t.jQuery)}})(this,function(t){t.transit={version:"0.9.12",propertyMap:{marginLeft:"margin",marginRight:"margin",marginBottom:"margin",marginTop:"margin",paddingLeft:"padding",paddingRight:"padding",paddingBottom:"padding",paddingTop:"padding"},enabled:true,useTransitionEnd:false};var e=document.createElement("div");var n={};function i(t){if(t in e.style)return t;var n=["Moz","Webkit","O","ms"];var i=t.charAt(0).toUpperCase()+t.substr(1);for(var r=0;r<n.length;++r){var s=n[r]+i;if(s in e.style){return s}}}function r(){e.style[n.transform]="";e.style[n.transform]="rotateY(90deg)";return e.style[n.transform]!==""}var s=navigator.userAgent.toLowerCase().indexOf("chrome")>-1;n.transition=i("transition");n.transitionDelay=i("transitionDelay");n.transform=i("transform");n.transformOrigin=i("transformOrigin");n.filter=i("Filter");n.transform3d=r();var a={transition:"transitionend",MozTransition:"transitionend",OTransition:"oTransitionEnd",WebkitTransition:"webkitTransitionEnd",msTransition:"MSTransitionEnd"};var o=n.transitionEnd=a[n.transition]||null;for(var u in n){if(n.hasOwnProperty(u)&&typeof t.support[u]==="undefined"){t.support[u]=n[u]}}e=null;t.cssEase={_default:"ease","in":"ease-in",out:"ease-out","in-out":"ease-in-out",snap:"cubic-bezier(0,1,.5,1)",easeInCubic:"cubic-bezier(.550,.055,.675,.190)",easeOutCubic:"cubic-bezier(.215,.61,.355,1)",easeInOutCubic:"cubic-bezier(.645,.045,.355,1)",easeInCirc:"cubic-bezier(.6,.04,.98,.335)",easeOutCirc:"cubic-bezier(.075,.82,.165,1)",easeInOutCirc:"cubic-bezier(.785,.135,.15,.86)",easeInExpo:"cubic-bezier(.95,.05,.795,.035)",easeOutExpo:"cubic-bezier(.19,1,.22,1)",easeInOutExpo:"cubic-bezier(1,0,0,1)",easeInQuad:"cubic-bezier(.55,.085,.68,.53)",easeOutQuad:"cubic-bezier(.25,.46,.45,.94)",easeInOutQuad:"cubic-bezier(.455,.03,.515,.955)",easeInQuart:"cubic-bezier(.895,.03,.685,.22)",easeOutQuart:"cubic-bezier(.165,.84,.44,1)",easeInOutQuart:"cubic-bezier(.77,0,.175,1)",easeInQuint:"cubic-bezier(.755,.05,.855,.06)",easeOutQuint:"cubic-bezier(.23,1,.32,1)",easeInOutQuint:"cubic-bezier(.86,0,.07,1)",easeInSine:"cubic-bezier(.47,0,.745,.715)",easeOutSine:"cubic-bezier(.39,.575,.565,1)",easeInOutSine:"cubic-bezier(.445,.05,.55,.95)",easeInBack:"cubic-bezier(.6,-.28,.735,.045)",easeOutBack:"cubic-bezier(.175, .885,.32,1.275)",easeInOutBack:"cubic-bezier(.68,-.55,.265,1.55)"};t.cssHooks["transit:transform"]={get:function(e){return t(e).data("transform")||new f},set:function(e,i){var r=i;if(!(r instanceof f)){r=new f(r)}if(n.transform==="WebkitTransform"&&!s){e.style[n.transform]=r.toString(true)}else{e.style[n.transform]=r.toString()}t(e).data("transform",r)}};t.cssHooks.transform={set:t.cssHooks["transit:transform"].set};t.cssHooks.filter={get:function(t){return t.style[n.filter]},set:function(t,e){t.style[n.filter]=e}};if(t.fn.jquery<"1.8"){t.cssHooks.transformOrigin={get:function(t){return t.style[n.transformOrigin]},set:function(t,e){t.style[n.transformOrigin]=e}};t.cssHooks.transition={get:function(t){return t.style[n.transition]},set:function(t,e){t.style[n.transition]=e}}}p("scale");p("scaleX");p("scaleY");p("translate");p("rotate");p("rotateX");p("rotateY");p("rotate3d");p("perspective");p("skewX");p("skewY");p("x",true);p("y",true);function f(t){if(typeof t==="string"){this.parse(t)}return this}f.prototype={setFromString:function(t,e){var n=typeof e==="string"?e.split(","):e.constructor===Array?e:[e];n.unshift(t);f.prototype.set.apply(this,n)},set:function(t){var e=Array.prototype.slice.apply(arguments,[1]);if(this.setter[t]){this.setter[t].apply(this,e)}else{this[t]=e.join(",")}},get:function(t){if(this.getter[t]){return this.getter[t].apply(this)}else{return this[t]||0}},setter:{rotate:function(t){this.rotate=b(t,"deg")},rotateX:function(t){this.rotateX=b(t,"deg")},rotateY:function(t){this.rotateY=b(t,"deg")},scale:function(t,e){if(e===undefined){e=t}this.scale=t+","+e},skewX:function(t){this.skewX=b(t,"deg")},skewY:function(t){this.skewY=b(t,"deg")},perspective:function(t){this.perspective=b(t,"px")},x:function(t){this.set("translate",t,null)},y:function(t){this.set("translate",null,t)},translate:function(t,e){if(this._translateX===undefined){this._translateX=0}if(this._translateY===undefined){this._translateY=0}if(t!==null&&t!==undefined){this._translateX=b(t,"px")}if(e!==null&&e!==undefined){this._translateY=b(e,"px")}this.translate=this._translateX+","+this._translateY}},getter:{x:function(){return this._translateX||0},y:function(){return this._translateY||0},scale:function(){var t=(this.scale||"1,1").split(",");if(t[0]){t[0]=parseFloat(t[0])}if(t[1]){t[1]=parseFloat(t[1])}return t[0]===t[1]?t[0]:t},rotate3d:function(){var t=(this.rotate3d||"0,0,0,0deg").split(",");for(var e=0;e<=3;++e){if(t[e]){t[e]=parseFloat(t[e])}}if(t[3]){t[3]=b(t[3],"deg")}return t}},parse:function(t){var e=this;t.replace(/([a-zA-Z0-9]+)\((.*?)\)/g,function(t,n,i){e.setFromString(n,i)})},toString:function(t){var e=[];for(var i in this){if(this.hasOwnProperty(i)){if(!n.transform3d&&(i==="rotateX"||i==="rotateY"||i==="perspective"||i==="transformOrigin")){continue}if(i[0]!=="_"){if(t&&i==="scale"){e.push(i+"3d("+this[i]+",1)")}else if(t&&i==="translate"){e.push(i+"3d("+this[i]+",0)")}else{e.push(i+"("+this[i]+")")}}}}return e.join(" ")}};function c(t,e,n){if(e===true){t.queue(n)}else if(e){t.queue(e,n)}else{t.each(function(){n.call(this)})}}function l(e){var i=[];t.each(e,function(e){e=t.camelCase(e);e=t.transit.propertyMap[e]||t.cssProps[e]||e;e=h(e);if(n[e])e=h(n[e]);if(t.inArray(e,i)===-1){i.push(e)}});return i}function d(e,n,i,r){var s=l(e);if(t.cssEase[i]){i=t.cssEase[i]}var a=""+y(n)+" "+i;if(parseInt(r,10)>0){a+=" "+y(r)}var o=[];t.each(s,function(t,e){o.push(e+" "+a)});return o.join(", ")}t.fn.transition=t.fn.transit=function(e,i,r,s){var a=this;var u=0;var f=true;var l=t.extend(true,{},e);if(typeof i==="function"){s=i;i=undefined}if(typeof i==="object"){r=i.easing;u=i.delay||0;f=typeof i.queue==="undefined"?true:i.queue;s=i.complete;i=i.duration}if(typeof r==="function"){s=r;r=undefined}if(typeof l.easing!=="undefined"){r=l.easing;delete l.easing}if(typeof l.duration!=="undefined"){i=l.duration;delete l.duration}if(typeof l.complete!=="undefined"){s=l.complete;delete l.complete}if(typeof l.queue!=="undefined"){f=l.queue;delete l.queue}if(typeof l.delay!=="undefined"){u=l.delay;delete l.delay}if(typeof i==="undefined"){i=t.fx.speeds._default}if(typeof r==="undefined"){r=t.cssEase._default}i=y(i);var p=d(l,i,r,u);var h=t.transit.enabled&&n.transition;var b=h?parseInt(i,10)+parseInt(u,10):0;if(b===0){var g=function(t){a.css(l);if(s){s.apply(a)}if(t){t()}};c(a,f,g);return a}var m={};var v=function(e){var i=false;var r=function(){if(i){a.unbind(o,r)}if(b>0){a.each(function(){this.style[n.transition]=m[this]||null})}if(typeof s==="function"){s.apply(a)}if(typeof e==="function"){e()}};if(b>0&&o&&t.transit.useTransitionEnd){i=true;a.bind(o,r)}else{window.setTimeout(r,b)}a.each(function(){if(b>0){this.style[n.transition]=p}t(this).css(l)})};var z=function(t){this.offsetWidth;v(t)};c(a,f,z);return this};function p(e,i){if(!i){t.cssNumber[e]=true}t.transit.propertyMap[e]=n.transform;t.cssHooks[e]={get:function(n){var i=t(n).css("transit:transform");return i.get(e)},set:function(n,i){var r=t(n).css("transit:transform");r.setFromString(e,i);t(n).css({"transit:transform":r})}}}function h(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}function b(t,e){if(typeof t==="string"&&!t.match(/^[\-0-9\.]+$/)){return t}else{return""+t+e}}function y(e){var n=e;if(typeof n==="string"&&!n.match(/^[\-0-9\.]+/)){n=t.fx.speeds[n]||t.fx.speeds._default}return b(n,"ms")}t.transit.getTransitionValue=d;return t});
(function($){
$.fn.appear=function(fn, options){
var settings=$.extend({
data: undefined,
one: true,
accX: 0,
accY: 0
}, options);
return this.each(function(){
var t=$(this);
t.appeared=false;
if(!fn){
t.trigger('appear', settings.data);
return;
}
var w=$(window);
var check=function(){
if(!t.is(':visible')){
t.appeared=false;
return;
}
var a=w.scrollLeft();
var b=w.scrollTop();
var o=t.offset();
var x=o.left;
var y=o.top;
var ax=settings.accX;
var ay=settings.accY;
var th=t.height();
var wh=w.height();
var tw=t.width();
var ww=w.width();
if(y + th + ay >=b &&
y <=b + wh + ay &&
x + tw + ax >=a &&
x <=a + ww + ax){
if(!t.appeared) t.trigger('appear', settings.data);
}else{
t.appeared=false;
}};
var modifiedFn=function(){
t.appeared=true;
if(settings.one){
w.unbind('scroll', check);
var i=$.inArray(check, $.fn.appear.checks);
if(i >=0) $.fn.appear.checks.splice(i, 1);
}
fn.apply(this, arguments);
};
if(settings.one) t.one('appear', settings.data, modifiedFn);
else t.bind('appear', settings.data, modifiedFn);
w.scroll(check);
$.fn.appear.checks.push(check);
(check)();
});
};
$.extend($.fn.appear, {
checks: [],
timeout: null,
checkAll: function(){
var length=$.fn.appear.checks.length;
if(length > 0) while (length--) ($.fn.appear.checks[length])();
},
run: function(){
if($.fn.appear.timeout) clearTimeout($.fn.appear.timeout);
$.fn.appear.timeout=setTimeout($.fn.appear.checkAll, 20);
}});
$.each(['append', 'prepend', 'after', 'before', 'attr',
'removeAttr', 'addClass', 'removeClass', 'toggleClass',
'remove', 'css', 'show', 'hide'], function(i, n){
var old=$.fn[n];
if(old){
$.fn[n]=function(){
var r=old.apply(this, arguments);
$.fn.appear.run();
return r;
}}
});
})(jQuery);
!function(t){var n="oninput"in document.createElement("input")?"input":"keydown";t.fn.autoGrowInput=function(o){var e=t.extend({maxWidth:500,minWidth:20,comfortZone:0},o);return this.each(function(){var i=t(this),a=" ",r=o&&"comfortZone"in o?e.comfortZone:parseInt(i.css("fontSize")),c=t("<span/>").css({position:"absolute",top:-9999,left:-9999,width:"auto",fontSize:i.css("fontSize"),fontFamily:i.css("fontFamily"),fontWeight:i.css("fontWeight"),letterSpacing:i.css("letterSpacing"),textTransform:i.css("textTransform"),whiteSpace:"nowrap",ariaHidden:!0}).appendTo("body"),s=function(t){if(a!==(a=i.val())||"autogrow"===t.type){a||(a=i.attr("placeholder")||""),c.html(a.replace(/&/g,"&amp;").replace(/\s/g,"&nbsp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"));var n=c.width()+r,o="function"==typeof e.maxWidth?e.maxWidth():e.maxWidth;n>o?n=o:n<e.minWidth&&(n=e.minWidth),n!=i.width()&&i.width(n)}};i.on(n+".autogrow autogrow",s),s()}),this}}(jQuery);
!function(){"use strict";function t(o){if(!o)throw new Error("No options passed to Waypoint constructor");if(!o.element)throw new Error("No element option passed to Waypoint constructor");if(!o.handler)throw new Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+e,this.options=t.Adapter.extend({},t.defaults,o),this.element=this.options.element,this.adapter=new t.Adapter(this.element),this.callback=o.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=t.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=t.Context.findOrCreateByElement(this.options.context),t.offsetAliases[this.options.offset]&&(this.options.offset=t.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),i[this.key]=this,e+=1}var e=0,i={};t.prototype.queueTrigger=function(t){this.group.queueTrigger(this,t)},t.prototype.trigger=function(t){this.enabled&&this.callback&&this.callback.apply(this,t)},t.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete i[this.key]},t.prototype.disable=function(){return this.enabled=!1,this},t.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},t.prototype.next=function(){return this.group.next(this)},t.prototype.previous=function(){return this.group.previous(this)},t.invokeAll=function(t){var e=[];for(var o in i)e.push(i[o]);for(var n=0,r=e.length;r>n;n++)e[n][t]()},t.destroyAll=function(){t.invokeAll("destroy")},t.disableAll=function(){t.invokeAll("disable")},t.enableAll=function(){t.Context.refreshAll();for(var e in i)i[e].enabled=!0;return this},t.refreshAll=function(){t.Context.refreshAll()},t.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},t.viewportWidth=function(){return document.documentElement.clientWidth},t.adapters=[],t.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},t.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.Waypoint=t}(),function(){"use strict";function t(t){window.setTimeout(t,1e3/60)}function e(t){this.element=t,this.Adapter=n.Adapter,this.adapter=new this.Adapter(t),this.key="waypoint-context-"+i,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},t.waypointContextKey=this.key,o[t.waypointContextKey]=this,i+=1,n.windowContext||(n.windowContext=!0,n.windowContext=new e(window)),this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}var i=0,o={},n=window.Waypoint,r=window.onload;e.prototype.add=function(t){var e=t.options.horizontal?"horizontal":"vertical";this.waypoints[e][t.key]=t,this.refresh()},e.prototype.checkEmpty=function(){var t=this.Adapter.isEmptyObject(this.waypoints.horizontal),e=this.Adapter.isEmptyObject(this.waypoints.vertical),i=this.element==this.element.window;t&&e&&!i&&(this.adapter.off(".waypoints"),delete o[this.key])},e.prototype.createThrottledResizeHandler=function(){function t(){e.handleResize(),e.didResize=!1}var e=this;this.adapter.on("resize.waypoints",function(){e.didResize||(e.didResize=!0,n.requestAnimationFrame(t))})},e.prototype.createThrottledScrollHandler=function(){function t(){e.handleScroll(),e.didScroll=!1}var e=this;this.adapter.on("scroll.waypoints",function(){(!e.didScroll||n.isTouch)&&(e.didScroll=!0,n.requestAnimationFrame(t))})},e.prototype.handleResize=function(){n.Context.refreshAll()},e.prototype.handleScroll=function(){var t={},e={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(var i in e){var o=e[i],n=o.newScroll>o.oldScroll,r=n?o.forward:o.backward;for(var s in this.waypoints[i]){var a=this.waypoints[i][s];if(null!==a.triggerPoint){var l=o.oldScroll<a.triggerPoint,h=o.newScroll>=a.triggerPoint,p=l&&h,u=!l&&!h;(p||u)&&(a.queueTrigger(r),t[a.group.id]=a.group)}}}for(var c in t)t[c].flushTriggers();this.oldScroll={x:e.horizontal.newScroll,y:e.vertical.newScroll}},e.prototype.innerHeight=function(){return this.element==this.element.window?n.viewportHeight():this.adapter.innerHeight()},e.prototype.remove=function(t){delete this.waypoints[t.axis][t.key],this.checkEmpty()},e.prototype.innerWidth=function(){return this.element==this.element.window?n.viewportWidth():this.adapter.innerWidth()},e.prototype.destroy=function(){var t=[];for(var e in this.waypoints)for(var i in this.waypoints[e])t.push(this.waypoints[e][i]);for(var o=0,n=t.length;n>o;o++)t[o].destroy()},e.prototype.refresh=function(){var t,e=this.element==this.element.window,i=e?void 0:this.adapter.offset(),o={};this.handleScroll(),t={horizontal:{contextOffset:e?0:i.left,contextScroll:e?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:e?0:i.top,contextScroll:e?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};for(var r in t){var s=t[r];for(var a in this.waypoints[r]){var l,h,p,u,c,d=this.waypoints[r][a],f=d.options.offset,w=d.triggerPoint,y=0,g=null==w;d.element!==d.element.window&&(y=d.adapter.offset()[s.offsetProp]),"function"==typeof f?f=f.apply(d):"string"==typeof f&&(f=parseFloat(f),d.options.offset.indexOf("%")>-1&&(f=Math.ceil(s.contextDimension*f/100))),l=s.contextScroll-s.contextOffset,d.triggerPoint=Math.floor(y+l-f),h=w<s.oldScroll,p=d.triggerPoint>=s.oldScroll,u=h&&p,c=!h&&!p,!g&&u?(d.queueTrigger(s.backward),o[d.group.id]=d.group):!g&&c?(d.queueTrigger(s.forward),o[d.group.id]=d.group):g&&s.oldScroll>=d.triggerPoint&&(d.queueTrigger(s.forward),o[d.group.id]=d.group)}}return n.requestAnimationFrame(function(){for(var t in o)o[t].flushTriggers()}),this},e.findOrCreateByElement=function(t){return e.findByElement(t)||new e(t)},e.refreshAll=function(){for(var t in o)o[t].refresh()},e.findByElement=function(t){return o[t.waypointContextKey]},window.onload=function(){r&&r(),e.refreshAll()},n.requestAnimationFrame=function(e){var i=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||t;i.call(window,e)},n.Context=e}(),function(){"use strict";function t(t,e){return t.triggerPoint-e.triggerPoint}function e(t,e){return e.triggerPoint-t.triggerPoint}function i(t){this.name=t.name,this.axis=t.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.clearTriggerQueues(),o[this.axis][this.name]=this}var o={vertical:{},horizontal:{}},n=window.Waypoint;i.prototype.add=function(t){this.waypoints.push(t)},i.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}},i.prototype.flushTriggers=function(){for(var i in this.triggerQueues){var o=this.triggerQueues[i],n="up"===i||"left"===i;o.sort(n?e:t);for(var r=0,s=o.length;s>r;r+=1){var a=o[r];(a.options.continuous||r===o.length-1)&&a.trigger([i])}}this.clearTriggerQueues()},i.prototype.next=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints),o=i===this.waypoints.length-1;return o?null:this.waypoints[i+1]},i.prototype.previous=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints);return i?this.waypoints[i-1]:null},i.prototype.queueTrigger=function(t,e){this.triggerQueues[e].push(t)},i.prototype.remove=function(t){var e=n.Adapter.inArray(t,this.waypoints);e>-1&&this.waypoints.splice(e,1)},i.prototype.first=function(){return this.waypoints[0]},i.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},i.findOrCreate=function(t){return o[t.axis][t.name]||new i(t)},n.Group=i}(),function(){"use strict";function t(t){this.$element=e(t)}var e=window.jQuery,i=window.Waypoint;e.each(["innerHeight","innerWidth","off","offset","on","outerHeight","outerWidth","scrollLeft","scrollTop"],function(e,i){t.prototype[i]=function(){var t=Array.prototype.slice.call(arguments);return this.$element[i].apply(this.$element,t)}}),e.each(["extend","inArray","isEmptyObject"],function(i,o){t[o]=e[o]}),i.adapters.push({name:"jquery",Adapter:t}),i.Adapter=t}(),function(){"use strict";function t(t){return function(){var i=[],o=arguments[0];return t.isFunction(arguments[0])&&(o=t.extend({},arguments[1]),o.handler=arguments[0]),this.each(function(){var n=t.extend({},o,{element:this});"string"==typeof n.context&&(n.context=t(this).closest(n.context)[0]),i.push(new e(n))}),i}}var e=window.Waypoint;window.jQuery&&(window.jQuery.fn.waypoint=t(window.jQuery)),window.Zepto&&(window.Zepto.fn.waypoint=t(window.Zepto))}();
(function($, window, undefined){
var extensions={
flash: ['swf'],
image: ['bmp', 'gif', 'jpeg', 'jpg', 'png', 'tiff', 'tif', 'jfif', 'jpe'],
iframe: ['asp', 'aspx', 'cgi', 'cfm', 'htm', 'html', 'jsp', 'php', 'pl', 'php3', 'php4', 'php5', 'phtml', 'rb', 'rhtml', 'shtml', 'txt'],
video: ['avi', 'mov', 'mpg', 'mpeg', 'movie', 'mp4', 'webm', 'ogv', 'ogg', '3gp', 'm4v']
},
$win=$(window),
$doc=$(document),
browser,
transform,
gpuAcceleration,
fullScreenApi='',
userAgent=navigator.userAgent||navigator.vendor||window.opera,
supportTouch = !!('ontouchstart' in window)&&(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(userAgent)),
isMobile=/(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(userAgent)||/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(userAgent.substr(0, 4)),
clickEvent=supportTouch ? "itap.iLightBox":"click.iLightBox",
touchStartEvent=supportTouch ? "touchstart.iLightBox":"mousedown.iLightBox",
touchStopEvent=supportTouch ? "touchend.iLightBox":"mouseup.iLightBox",
touchMoveEvent=supportTouch ? "touchmove.iLightBox":"mousemove.iLightBox",
abs=Math.abs,
sqrt=Math.sqrt,
round=Math.round,
max=Math.max,
min=Math.min,
floor=Math.floor,
random=Math.random,
pluginspages={
quicktime: 'http://www.apple.com/quicktime/download',
flash: 'http://www.adobe.com/go/getflash'
},
iLightBox=function(el, options, items, instant){
var iL=this;
iL.options=options,
iL.selector=el.selector||el,
iL.context=el.context,
iL.instant=instant;
if(items.length < 1) iL.attachItems();
else iL.items=items;
iL.vars={
total: iL.items.length,
start: 0,
current: null,
next: null,
prev: null,
BODY: $('body'),
loadRequests: 0,
overlay: $('<div class="ilightbox-overlay"></div>'),
loader: $('<div class="ilightbox-loader"><div></div></div>'),
toolbar: $('<div class="ilightbox-toolbar"></div>'),
innerToolbar: $('<div class="ilightbox-inner-toolbar"></div>'),
title: $('<div class="ilightbox-title"></div>'),
closeButton: $('<a class="ilightbox-close" title="' + iL.options.text.close + '"></a>'),
fullScreenButton: $('<a class="ilightbox-fullscreen" title="' + iL.options.text.enterFullscreen + '"></a>'),
innerPlayButton: $('<a class="ilightbox-play" title="' + iL.options.text.slideShow + '"></a>'),
innerNextButton: $('<a class="ilightbox-next-button" title="' + iL.options.text.next + '"></a>'),
innerPrevButton: $('<a class="ilightbox-prev-button" title="' + iL.options.text.previous + '"></a>'),
holder: $('<div class="ilightbox-holder' + (supportTouch ? ' supportTouch':'') + '" ondragstart="return false;"><div class="ilightbox-container"></div></div>'),
nextPhoto: $('<div class="ilightbox-holder' + (supportTouch ? ' supportTouch':'') + ' ilightbox-next" ondragstart="return false;"><div class="ilightbox-container"></div></div>'),
prevPhoto: $('<div class="ilightbox-holder' + (supportTouch ? ' supportTouch':'') + ' ilightbox-prev" ondragstart="return false;"><div class="ilightbox-container"></div></div>'),
nextButton: $('<a class="ilightbox-button ilightbox-next-button" ondragstart="return false;" title="' + iL.options.text.next + '"><span></span></a>'),
prevButton: $('<a class="ilightbox-button ilightbox-prev-button" ondragstart="return false;" title="' + iL.options.text.previous + '"><span></span></a>'),
thumbnails: $('<div class="ilightbox-thumbnails" ondragstart="return false;"><div class="ilightbox-thumbnails-container"><a class="ilightbox-thumbnails-dragger"></a><div class="ilightbox-thumbnails-grid"></div></div></div>'),
thumbs: false,
nextLock: false,
prevLock: false,
hashLock: false,
isMobile: false,
mobileMaxWidth: 980,
isInFullScreen: false,
isSwipe: false,
mouseID: 0,
cycleID: 0,
isPaused: 0
};
iL.vars.hideableElements=iL.vars.nextButton.add(iL.vars.prevButton);
iL.normalizeItems();
iL.availPlugins();
iL.options.startFrom=(iL.options.startFrom > 0&&iL.options.startFrom >=iL.vars.total) ? iL.vars.total - 1:iL.options.startFrom;
iL.options.startFrom=(iL.options.randomStart) ? floor(random() * iL.vars.total):iL.options.startFrom;
iL.vars.start=iL.options.startFrom;
if(instant) iL.instantCall();
else iL.patchItemsEvents();
if(iL.options.linkId){
iL.hashChangeHandler();
$win.iLightBoxHashChange(function(){
iL.hashChangeHandler();
});
}
if(supportTouch){
var RegExp=/(click|mouseenter|mouseleave|mouseover|mouseout)/ig,
replace="itap";
iL.options.caption.show=iL.options.caption.show.replace(RegExp, replace),
iL.options.caption.hide=iL.options.caption.hide.replace(RegExp, replace),
iL.options.social.show=iL.options.social.show.replace(RegExp, replace),
iL.options.social.hide=iL.options.social.hide.replace(RegExp, replace);
}
if(iL.options.controls.arrows){
$.extend(iL.options.styles, {
nextOffsetX: 0,
prevOffsetX: 0,
nextOpacity: 0,
prevOpacity: 0
});
}};
iLightBox.prototype={
showLoader: function(){
var iL=this;
iL.vars.loadRequests +=1;
if(iL.options.path.toLowerCase()=="horizontal") iL.vars.loader.addClass('ilightbox-show').stop().animate({
top: '-30px'
}, iL.options.show.speed, 'easeOutCirc');
else iL.vars.loader.addClass('ilightbox-show').stop().animate({
left: '-30px'
}, iL.options.show.speed, 'easeOutCirc');
},
hideLoader: function(){
var iL=this;
iL.vars.loadRequests -=1;
iL.vars.loadRequests=(iL.vars.loadRequests < 0) ? 0:iL.vars.loadRequests;
if(iL.options.path.toLowerCase()=="horizontal"){
if(iL.vars.loadRequests <=0) iL.vars.loader.removeClass('ilightbox-show').stop().animate({
top: '-192px'
}, iL.options.show.speed, 'easeInCirc');
}else{
if(iL.vars.loadRequests <=0) iL.vars.loader.removeClass('ilightbox-show').stop().animate({
left: '-192px'
}, iL.options.show.speed, 'easeInCirc');
}},
createUI: function(){
var iL=this;
iL.ui={
currentElement: iL.vars.holder,
nextElement: iL.vars.nextPhoto,
prevElement: iL.vars.prevPhoto,
currentItem: iL.vars.current,
nextItem: iL.vars.next,
prevItem: iL.vars.prev,
hide: function(){
iL.closeAction();
},
refresh: function(){
(arguments.length > 0) ? iL.repositionPhoto(true): iL.repositionPhoto();
},
fullscreen: function(){
iL.fullScreenAction();
}};},
attachItems: function(){
var iL=this,
itemsObject=new Array(),
items=new Array();
$(iL.selector, iL.context).each(function(){
var t=$(this),
URL=t.attr(iL.options.attr)||null,
options=t.data("options")&&eval("({" + t.data("options") + "})")||{},
caption=t.data('caption'),
title=t.data('title'),
type=t.data('type')||getTypeByExtension(URL);
items.push({
URL: URL,
caption: caption,
title: title,
type: type,
options: options
});
if(!iL.instant) itemsObject.push(t);
});
iL.items=items,
iL.itemsObject=itemsObject;
},
normalizeItems: function(){
var iL=this,
newItems=new Array();
$.each(iL.items, function(key, val){
if(typeof val=="string") val={
url: val
};
var URL=val.url||val.URL||null,
options=val.options||{},
caption=val.caption||null,
title=val.title||null,
type=(val.type) ? val.type.toLowerCase():getTypeByExtension(URL),
ext=(typeof URL!='object') ? getExtension(URL):'';
options.thumbnail=options.thumbnail||((type=="image") ? URL:null),
options.videoType=options.videoType||null,
options.skin=options.skin||iL.options.skin,
options.width=options.width||null,
options.height=options.height||null,
options.mousewheel=(typeof options.mousewheel!='undefined') ? options.mousewheel:true,
options.swipe=(typeof options.swipe!='undefined') ? options.swipe:true,
options.social=(typeof options.social!='undefined') ? options.social:iL.options.social.buttons&&$.extend({}, {}, iL.options.social.buttons);
if(type=="video"){
options.html5video=(typeof options.html5video!='undefined') ? options.html5video:{};
options.html5video.webm=options.html5video.webm||options.html5video.WEBM||null;
options.html5video.controls=(typeof options.html5video.controls!='undefined') ? options.html5video.controls:"controls";
options.html5video.preload=options.html5video.preload||"metadata";
options.html5video.autoplay=(typeof options.html5video.autoplay!='undefined') ? options.html5video.autoplay:false;
}
if(!options.width||!options.height){
if(type=="video") options.width=1280, options.height=720;
else if(type=="iframe") options.width='100%', options.height='90%';
else if(type=="flash") options.width=1280, options.height=720;
}
delete val.url;
val.index=key;
val.URL=URL;
val.caption=caption;
val.title=title;
val.type=type;
val.options=options;
val.ext=ext;
newItems.push(val);
});
iL.items=newItems;
},
instantCall: function(){
var iL=this,
key=iL.vars.start;
iL.vars.current=key;
iL.vars.next=(iL.items[key + 1]) ? key + 1:null;
iL.vars.prev=(iL.items[key - 1]) ? key - 1:null;
iL.addContents();
iL.patchEvents();
},
addContents: function(){
var iL=this,
vars=iL.vars,
opts=iL.options,
viewport=getViewport(),
path=opts.path.toLowerCase(),
recognizingItems=vars.total > 0&&iL.items.filter(function(e, i, arr){
return ['image', 'flash', 'video'].indexOf(e.type)===-1&&typeof e.recognized==='undefined'&&(opts.smartRecognition||e.options.smartRecognition);
}),
needRecognition=recognizingItems.length > 0;
if(opts.mobileOptimizer&&!opts.innerToolbar)
vars.isMobile=viewport.width <=vars.mobileMaxWidth;
vars.overlay.addClass(opts.skin).hide().css('opacity', opts.overlay.opacity);
if(opts.linkId)
vars.overlay[0].setAttribute('linkid', opts.linkId);
if(opts.controls.toolbar){
vars.toolbar.addClass(opts.skin).append(vars.closeButton);
if(opts.controls.fullscreen)
vars.toolbar.append(vars.fullScreenButton);
if(opts.controls.slideshow)
vars.toolbar.append(vars.innerPlayButton);
if(vars.total > 1)
vars.toolbar.append(vars.innerPrevButton).append(vars.innerNextButton);
}
vars.BODY.addClass('ilightbox-noscroll').append(vars.overlay).append(vars.loader).append(vars.holder).append(vars.nextPhoto).append(vars.prevPhoto);
if(!opts.innerToolbar)
vars.BODY.append(vars.toolbar);
if(opts.controls.arrows)
vars.BODY.append(vars.nextButton).append(vars.prevButton);
if(opts.controls.thumbnail&&vars.total > 1){
vars.BODY.append(vars.thumbnails);
vars.thumbnails.addClass(opts.skin).addClass('ilightbox-' + path);
$('div.ilightbox-thumbnails-grid', vars.thumbnails).empty();
vars.thumbs=true;
}
var loaderCss=(opts.path.toLowerCase()=="horizontal") ? {
left: parseInt((viewport.width / 2) - (vars.loader.outerWidth() / 2))
}:{
top: parseInt((viewport.height / 2) - (vars.loader.outerHeight() / 2))
};
vars.loader.addClass(opts.skin).css(loaderCss);
vars.nextButton.add(vars.prevButton).addClass(opts.skin);
if(path=="horizontal")
vars.loader.add(vars.nextButton).add(vars.prevButton).addClass('horizontal');
vars.BODY[vars.isMobile ? 'addClass':'removeClass']('isMobile');
if(!opts.infinite){
vars.prevButton.add(vars.prevButton).add(vars.innerPrevButton).add(vars.innerNextButton).removeClass('disabled');
if(vars.current==0)
vars.prevButton.add(vars.innerPrevButton).addClass('disabled');
if(vars.current >=vars.total - 1)
vars.nextButton.add(vars.innerNextButton).addClass('disabled');
}
if(opts.show.effect){
vars.overlay.stop().fadeIn(opts.show.speed);
vars.toolbar.stop().fadeIn(opts.show.speed);
}else{
vars.overlay.show();
vars.toolbar.show();
}
var length=recognizingItems.length;
if(needRecognition){
iL.showLoader();
$.each(recognizingItems, function(key, val){
var resultFnc=function(result){
console.log(result);
var key=-1,
filter=iL.items.filter(function(e, i, arr){
if(e.URL==result.url)
key=i;
return e.URL==result.url;
}),
self=iL.items[key];
if(result)
$.extend(true, self, {
URL: result.source,
type: result.type,
recognized: true,
options: {
html5video: result.html5video,
width: (result.type=="image") ? 0:(result.width||self.width),
height: (result.type=="image") ? 0:(result.height||self.height),
thumbnail: self.options.thumbnail||result.thumbnail
}});
length--;
if(length==0){
iL.hideLoader();
vars.dontGenerateThumbs=false;
iL.generateThumbnails();
if(opts.show.effect)
setTimeout(function(){
iL.generateBoxes();
}, opts.show.speed);
else
iL.generateBoxes();
}};
iL.ogpRecognition(this, resultFnc);
});
}else{
if(opts.show.effect)
setTimeout(function(){
iL.generateBoxes();
}, opts.show.speed);
else
iL.generateBoxes();
}
iL.createUI();
window.iLightBox={
close: function(){
iL.closeAction();
},
fullscreen: function(){
iL.fullScreenAction();
},
moveNext: function(){
iL.moveTo('next');
},
movePrev: function(){
iL.moveTo('prev');
},
goTo: function(index){
iL.goTo(index);
},
refresh: function(){
iL.refresh();
},
reposition: function(){
(arguments.length > 0) ? iL.repositionPhoto(true): iL.repositionPhoto();
},
setOption: function(options){
iL.setOption(options);
},
destroy: function(){
iL.closeAction();
iL.dispatchItemsEvents();
}};
if(opts.linkId){
vars.hashLock=true;
window.location.hash=opts.linkId + '/' + vars.current;
setTimeout(function(){
vars.hashLock=false;
}, 55);
}
if(!opts.slideshow.startPaused){
iL.resume();
vars.innerPlayButton.removeClass('ilightbox-play').addClass('ilightbox-pause');
}
if(typeof iL.options.callback.onOpen=='function') iL.options.callback.onOpen.call(iL);
},
loadContent: function(obj, opt, speed){
var iL=this,
holder, item;
iL.createUI();
obj.speed=speed||iL.options.effects.loadedFadeSpeed;
if(opt=='current'){
if(!obj.options.mousewheel) iL.vars.lockWheel=true;
else iL.vars.lockWheel=false;
if(!obj.options.swipe) iL.vars.lockSwipe=true;
else iL.vars.lockSwipe=false;
}
switch (opt){
case 'current':
holder=iL.vars.holder, item=iL.vars.current;
break;
case 'next':
holder=iL.vars.nextPhoto, item=iL.vars.next;
break;
case 'prev':
holder=iL.vars.prevPhoto, item=iL.vars.prev;
break;
}
holder.removeAttr('style class').addClass('ilightbox-holder' + (supportTouch ? ' supportTouch':'')).addClass(obj.options.skin);
$('div.ilightbox-inner-toolbar', holder).remove();
if(obj.title||iL.options.innerToolbar){
var innerToolbar=iL.vars.innerToolbar.clone();
if(obj.title&&iL.options.show.title){
var title=iL.vars.title.clone();
title.empty().html(obj.title);
innerToolbar.append(title);
}
if(iL.options.innerToolbar){
innerToolbar.append((iL.vars.total > 1) ? iL.vars.toolbar.clone():iL.vars.toolbar);
}
holder.prepend(innerToolbar);
}
console.warn('loadContent', arguments);
iL.loadSwitcher(obj, holder, item, opt);
},
loadSwitcher: function(obj, holder, item, opt){
var iL=this,
opts=iL.options,
api={
element: holder,
position: item
};
switch (obj.type){
case 'image':
if(typeof opts.callback.onBeforeLoad=='function') opts.callback.onBeforeLoad.call(iL, iL.ui, item);
if(typeof obj.options.onBeforeLoad=='function') obj.options.onBeforeLoad.call(iL, api);
iL.loadImage(obj.URL, function(img){
if(typeof opts.callback.onAfterLoad=='function') opts.callback.onAfterLoad.call(iL, iL.ui, item);
if(typeof obj.options.onAfterLoad=='function') obj.options.onAfterLoad.call(iL, api);
var width=(img) ? img.width:400,
height=(img) ? img.height:200;
holder.data({
naturalWidth: width,
naturalHeight: height
});
$('div.ilightbox-container', holder).empty().append((img) ? '<img src="' + obj.URL + '" class="ilightbox-image" />':'<span class="ilightbox-alert">' + opts.errors.loadImage + '</span>');
if(typeof opts.callback.onRender=='function') opts.callback.onRender.call(iL, iL.ui, item);
if(typeof obj.options.onRender=='function') obj.options.onRender.call(iL, api);
iL.configureHolder(obj, opt, holder);
});
break;
case 'video':
holder.data({
naturalWidth: obj.options.width,
naturalHeight: obj.options.height
});
if(opt==='current'){
iL.addContent(holder, obj);
if(typeof opts.callback.onRender=='function') opts.callback.onRender.call(iL, iL.ui, item);
if(typeof obj.options.onRender=='function') obj.options.onRender.call(iL, api);
}else{
$('div.ilightbox-container', holder).empty();
}
iL.configureHolder(obj, opt, holder);
break;
case 'iframe':
holder.data({
naturalWidth: obj.options.width,
naturalHeight: obj.options.height
});
iL.configureHolder(obj, opt, holder);
if(opt==='current'){
var el=iL.addContent(holder, obj);
if(typeof opts.callback.onRender=='function') opts.callback.onRender.call(iL, iL.ui, item);
if(typeof obj.options.onRender=='function') obj.options.onRender.call(iL, api);
if(typeof opts.callback.onBeforeLoad=='function') opts.callback.onBeforeLoad.call(iL, iL.ui, item);
if(typeof obj.options.onBeforeLoad=='function') obj.options.onBeforeLoad.call(iL, api);
el.bind('load', function(){
if(typeof opts.callback.onAfterLoad=='function') opts.callback.onAfterLoad.call(iL, iL.ui, item);
if(typeof obj.options.onAfterLoad=='function') obj.options.onAfterLoad.call(iL, api);
el.unbind('load');
});
}else{
$('div.ilightbox-container', holder).empty();
}
break;
case 'inline':
var el=$(obj.URL),
content=iL.addContent(holder, obj),
images=findImageInElement(holder);
holder.data({
naturalWidth: (iL.items[item].options.width||el.outerWidth()),
naturalHeight: (iL.items[item].options.height||el.outerHeight())
});
content.children().eq(0).show();
if(typeof opts.callback.onRender=='function') opts.callback.onRender.call(iL, iL.ui, item);
if(typeof obj.options.onRender=='function') obj.options.onRender.call(iL, api);
if(typeof opts.callback.onBeforeLoad=='function') opts.callback.onBeforeLoad.call(iL, iL.ui, item);
if(typeof obj.options.onBeforeLoad=='function') obj.options.onBeforeLoad.call(iL, api);
iL.loadImage(images, function(){
if(typeof opts.callback.onAfterLoad=='function') opts.callback.onAfterLoad.call(iL, iL.ui, item);
if(typeof obj.options.onAfterLoad=='function') obj.options.onAfterLoad.call(iL, api);
iL.configureHolder(obj, opt, holder);
});
break;
case 'flash':
var el=iL.addContent(holder, obj);
holder.data({
naturalWidth: (iL.items[item].options.width||el.outerWidth()),
naturalHeight: (iL.items[item].options.height||el.outerHeight())
});
if(typeof opts.callback.onRender=='function') opts.callback.onRender.call(iL, iL.ui, item);
if(typeof obj.options.onRender=='function') obj.options.onRender.call(iL, api);
iL.configureHolder(obj, opt, holder);
break;
case 'ajax':
var ajax=obj.options.ajax||{};
if(typeof opts.callback.onBeforeLoad=='function') opts.callback.onBeforeLoad.call(iL, iL.ui, item);
if(typeof obj.options.onBeforeLoad=='function') obj.options.onBeforeLoad.call(iL, api);
iL.showLoader();
$.ajax({
url: obj.URL||opts.ajaxSetup.url,
data: ajax.data||null,
dataType: ajax.dataType||"html",
type: ajax.type||opts.ajaxSetup.type,
cache: ajax.cache||opts.ajaxSetup.cache,
crossDomain: ajax.crossDomain||opts.ajaxSetup.crossDomain,
global: ajax.global||opts.ajaxSetup.global,
ifModified: ajax.ifModified||opts.ajaxSetup.ifModified,
username: ajax.username||opts.ajaxSetup.username,
password: ajax.password||opts.ajaxSetup.password,
beforeSend: ajax.beforeSend||opts.ajaxSetup.beforeSend,
complete: ajax.complete||opts.ajaxSetup.complete,
success: function(data, textStatus, jqXHR){
iL.hideLoader();
var el=$(data),
container=$('div.ilightbox-container', holder),
elWidth=iL.items[item].options.width||parseInt(el[0].getAttribute('width')),
elHeight=iL.items[item].options.height||parseInt(el[0].getAttribute('height')),
css=(el[0].getAttribute('width')&&el[0].getAttribute('height')) ? {
'overflow': 'hidden'
}:{};
container.empty().append($('<div class="ilightbox-wrapper"></div>').css(css).html(el));
holder.show().data({
naturalWidth: (elWidth||container.outerWidth()),
naturalHeight: (elHeight||container.outerHeight())
}).hide();
if(typeof opts.callback.onRender=='function') opts.callback.onRender.call(iL, iL.ui, item);
if(typeof obj.options.onRender=='function') obj.options.onRender.call(iL, api);
var images=findImageInElement(holder);
iL.loadImage(images, function(){
if(typeof opts.callback.onAfterLoad=='function') opts.callback.onAfterLoad.call(iL, iL.ui, item);
if(typeof obj.options.onAfterLoad=='function') obj.options.onAfterLoad.call(iL, api);
iL.configureHolder(obj, opt, holder);
});
opts.ajaxSetup.success(data, textStatus, jqXHR);
if(typeof ajax.success=='function') ajax.success(data, textStatus, jqXHR);
},
error: function(jqXHR, textStatus, errorThrown){
if(typeof opts.callback.onAfterLoad=='function') opts.callback.onAfterLoad.call(iL, iL.ui, item);
if(typeof obj.options.onAfterLoad=='function') obj.options.onAfterLoad.call(iL, api);
iL.hideLoader();
$('div.ilightbox-container', holder).empty().append('<span class="ilightbox-alert">' + opts.errors.loadContents + '</span>');
iL.configureHolder(obj, opt, holder);
opts.ajaxSetup.error(jqXHR, textStatus, errorThrown);
if(typeof ajax.error=='function') ajax.error(jqXHR, textStatus, errorThrown);
}});
break;
case 'html':
var object=obj.URL,
el
container=$('div.ilightbox-container', holder);
if(object[0].nodeName) el=object.clone();
else {
var dom=$(object);
if(dom.selector) el=$('<div>' + dom + '</div>');
else el=dom;
}
var elWidth=iL.items[item].options.width||parseInt(el.attr('width')),
elHeight=iL.items[item].options.height||parseInt(el.attr('height'));
iL.addContent(holder, obj);
el.appendTo(document.documentElement).hide();
if(typeof opts.callback.onRender=='function') opts.callback.onRender.call(iL, iL.ui, item);
if(typeof obj.options.onRender=='function') obj.options.onRender.call(iL, api);
var images=findImageInElement(holder);
if(typeof opts.callback.onBeforeLoad=='function') opts.callback.onBeforeLoad.call(iL, iL.ui, item);
if(typeof obj.options.onBeforeLoad=='function') obj.options.onBeforeLoad.call(iL, api);
iL.loadImage(images, function(){
if(typeof opts.callback.onAfterLoad=='function') opts.callback.onAfterLoad.call(iL, iL.ui, item);
if(typeof obj.options.onAfterLoad=='function') obj.options.onAfterLoad.call(iL, api);
holder.show().data({
naturalWidth: (elWidth||container.outerWidth()),
naturalHeight: (elHeight||container.outerHeight())
}).hide();
el.remove();
iL.configureHolder(obj, opt, holder);
});
break;
}},
configureHolder: function(obj, opt, holder){
var iL=this,
vars=iL.vars,
opts=iL.options;
if(opt!="current")(opt=="next") ? holder.addClass('ilightbox-next'):holder.addClass('ilightbox-prev');
if(opt=="current")
var item=vars.current;
else if(opt=="next")
var opacity=opts.styles.nextOpacity,
item=vars.next;
else
var opacity=opts.styles.prevOpacity,
item=vars.prev;
var api={
element: holder,
position: item
};
iL.items[item].options.width=iL.items[item].options.width||0,
iL.items[item].options.height=iL.items[item].options.height||0;
if(opt=="current"){
if(opts.show.effect) holder.css(transform, gpuAcceleration).fadeIn(obj.speed, function(){
holder.css(transform, '');
if(obj.caption){
iL.setCaption(obj, holder);
var caption=$('div.ilightbox-caption', holder),
percent=parseInt((caption.outerHeight() / holder.outerHeight()) * 100);
if(opts.caption.start & percent <=50) caption.fadeIn(opts.effects.fadeSpeed);
}
var social=obj.options.social;
if(social){
iL.setSocial(social, obj.URL, holder);
if(opts.social.start) $('div.ilightbox-social', holder).fadeIn(opts.effects.fadeSpeed);
}
iL.generateThumbnails();
if(typeof opts.callback.onShow=='function') opts.callback.onShow.call(iL, iL.ui, item);
if(typeof obj.options.onShow=='function') obj.options.onShow.call(iL, api);
});
else {
holder.show();
iL.generateThumbnails();
if(typeof opts.callback.onShow=='function') opts.callback.onShow.call(iL, iL.ui, item);
if(typeof obj.options.onShow=='function') obj.options.onShow.call(iL, api);
}}else{
if(opts.show.effect) holder.fadeTo(obj.speed, opacity, function(){
if(opt=="next") vars.nextLock=false;
else vars.prevLock=false;
iL.generateThumbnails();
if(typeof opts.callback.onShow=='function') opts.callback.onShow.call(iL, iL.ui, item);
if(typeof obj.options.onShow=='function') obj.options.onShow.call(iL, api);
});
else {
holder.css({
opacity: opacity
}).show();
if(opt=="next") vars.nextLock=false;
else vars.prevLock=false;
iL.generateThumbnails();
if(typeof opts.callback.onShow=='function') opts.callback.onShow.call(iL, iL.ui, item);
if(typeof obj.options.onShow=='function') obj.options.onShow.call(iL, api);
}}
setTimeout(function(){
iL.repositionPhoto();
}, 0);
},
generateBoxes: function(){
var iL=this,
vars=iL.vars,
opts=iL.options;
if(opts.infinite&&vars.total >=3){
if(vars.current==vars.total - 1) vars.next=0;
if(vars.current==0) vars.prev=vars.total - 1;
} else opts.infinite=false;
iL.loadContent(iL.items[vars.current], 'current', opts.show.speed);
if(iL.items[vars.next]) iL.loadContent(iL.items[vars.next], 'next', opts.show.speed);
if(iL.items[vars.prev]) iL.loadContent(iL.items[vars.prev], 'prev', opts.show.speed);
},
generateThumbnails: function(){
var iL=this,
vars=iL.vars,
opts=iL.options,
timeOut=null;
if(vars.thumbs&&!iL.vars.dontGenerateThumbs){
var thumbnails=vars.thumbnails,
container=$('div.ilightbox-thumbnails-container', thumbnails),
grid=$('div.ilightbox-thumbnails-grid', container),
i=0;
grid.removeAttr('style').empty();
$.each(iL.items, function(key, val){
var isActive=(vars.current==key) ? 'ilightbox-active':'',
opacity=(vars.current==key) ? opts.thumbnails.activeOpacity:opts.thumbnails.normalOpacity,
thumb=val.options.thumbnail,
thumbnail=$('<div class="ilightbox-thumbnail"></div>'),
icon=$('<div class="ilightbox-thumbnail-icon"></div>');
thumbnail.css({
opacity: 0
}).addClass(isActive);
if((val.type=="video"||val.type=="flash")&&typeof val.options.icon=='undefined'){
icon.addClass('ilightbox-thumbnail-video');
thumbnail.append(icon);
}else if(val.options.icon){
icon.addClass('ilightbox-thumbnail-' + val.options.icon);
thumbnail.append(icon);
}
if(thumb) iL.loadImage(thumb, function(img){
i++;
if(img) thumbnail.data({
naturalWidth: img.width,
naturalHeight: img.height
}).append('<img src="' + thumb + '" border="0" />');
else thumbnail.data({
naturalWidth: opts.thumbnails.maxWidth,
naturalHeight: opts.thumbnails.maxHeight
});
clearTimeout(timeOut);
timeOut=setTimeout(function(){
iL.positionThumbnails(thumbnails, container, grid);
}, 20);
setTimeout(function(){
thumbnail.fadeTo(opts.effects.loadedFadeSpeed, opacity);
}, i * 20);
});
grid.append(thumbnail);
});
iL.vars.dontGenerateThumbs=true;
}},
positionThumbnails: function(thumbnails, container, grid){
var iL=this,
vars=iL.vars,
opts=iL.options,
viewport=getViewport(),
path=opts.path.toLowerCase();
if(!thumbnails) thumbnails=vars.thumbnails;
if(!container) container=$('div.ilightbox-thumbnails-container', thumbnails);
if(!grid) grid=$('div.ilightbox-thumbnails-grid', container);
var thumbs=$('.ilightbox-thumbnail', grid),
widthAvail=(path=='horizontal') ? viewport.width - opts.styles.pageOffsetX:thumbs.eq(0).outerWidth() - opts.styles.pageOffsetX,
heightAvail=(path=='horizontal') ? thumbs.eq(0).outerHeight() - opts.styles.pageOffsetY:viewport.height - opts.styles.pageOffsetY,
gridWidth=(path=='horizontal') ? 0:widthAvail,
gridHeight=(path=='horizontal') ? heightAvail:0,
active=$('.ilightbox-active', grid),
gridCss={},
css={};
if(arguments.length < 3){
thumbs.css({
opacity: opts.thumbnails.normalOpacity
});
active.css({
opacity: opts.thumbnails.activeOpacity
});
}
thumbs.each(function(i){
var t=$(this),
data=t.data(),
width=(path=='horizontal') ? 0:opts.thumbnails.maxWidth;
height=(path=='horizontal') ? opts.thumbnails.maxHeight:0;
dims=iL.getNewDimenstions(width, height, data.naturalWidth, data.naturalHeight, true);
t.css({
width: dims.width,
height: dims.height
});
if(path=='horizontal') t.css({
'float': 'left'
});
(path=='horizontal') ? (
gridWidth +=t.outerWidth()
):(
gridHeight +=t.outerHeight()
);
});
gridCss={
width: gridWidth,
height: gridHeight
};
grid.css(gridCss);
gridCss={};
var gridOffset=grid.offset(),
activeOffset=(active.length) ? active.offset():{
top: parseInt(heightAvail / 2),
left: parseInt(widthAvail / 2)
};
gridOffset.top=(gridOffset.top - $doc.scrollTop()),
gridOffset.left=(gridOffset.left - $doc.scrollLeft()),
activeOffset.top=(activeOffset.top - gridOffset.top - $doc.scrollTop()),
activeOffset.left=(activeOffset.left - gridOffset.left - $doc.scrollLeft());
(path=='horizontal') ? (
gridCss.top=0,
gridCss.left=parseInt((widthAvail / 2) - activeOffset.left - (active.outerWidth() / 2))
):(
gridCss.top=parseInt(((heightAvail / 2) - activeOffset.top - (active.outerHeight() / 2))),
gridCss.left=0
);
if(arguments.length < 3) grid.stop().animate(gridCss, opts.effects.repositionSpeed, 'easeOutCirc');
else grid.css(gridCss);
},
loadImage: function(image, callback){
if(!$.isArray(image)) image=[image];
var iL=this,
length=image.length;
if(length > 0){
iL.showLoader();
$.each(image, function(index, value){
var img=new Image();
img.onload=function(){
length -=1;
if(length==0){
iL.hideLoader();
callback(img);
}};
img.onerror=img.onabort=function(){
length -=1;
if(length==0){
iL.hideLoader();
callback(false);
}};
img.src=image[index];
});
} else callback(false);
},
patchItemsEvents: function(){
var iL=this,
vars=iL.vars,
clickEvent=supportTouch ? "itap.iL":"click.iL",
vEvent=supportTouch ? "click.iL":"itap.iL";
if(iL.context&&iL.selector){
var $items=$(iL.selector, iL.context);
$(iL.context).on(clickEvent, iL.selector, function(){
var $this=$(this),
key=$items.index($this);
if($('body').hasClass('mobile-browser')&&$('body').hasClass('mobile-two-click')){
if(!$this.hasClass('hovered')){
$this.addClass('hovered');
return false;
}}
vars.current=key;
vars.next=iL.items[key + 1] ? key + 1:null;
vars.prev=iL.items[key - 1] ? key - 1:null;
iL.addContents();
iL.patchEvents();
return false;
}).on(vEvent, iL.selector, function(){
return false;
});
} else
$.each(iL.itemsObject, function(key, val){
val.on(clickEvent, function(){
vars.current=key;
vars.next=iL.items[key + 1] ? key + 1:null;
vars.prev=iL.items[key - 1] ? key - 1:null;
iL.addContents();
iL.patchEvents();
return false;
}).on(vEvent, function(){
return false;
});
});
},
dispatchItemsEvents: function(){
var iL=this,
vars=iL.vars,
opts=iL.options;
if(iL.context&&iL.selector)
$(iL.context).off('.iL', iL.selector);
else
$.each(iL.itemsObject, function(key, val){
val.off('.iL');
});
},
refresh: function(){
var iL=this;
iL.dispatchItemsEvents();
iL.attachItems();
iL.normalizeItems();
iL.patchItemsEvents();
},
patchEvents: function(){
var iL=this,
vars=iL.vars,
opts=iL.options,
path=opts.path.toLowerCase(),
holders=$('.ilightbox-holder'),
fullscreenEvent=fullScreenApi.fullScreenEventName + '.iLightBox',
durationThreshold=1000,
horizontalDistanceThreshold =
verticalDistanceThreshold=100,
buttonsArray=[vars.nextButton[0], vars.prevButton[0], vars.nextButton[0].firstChild, vars.prevButton[0].firstChild];
$win.bind('resize.iLightBox', function(){
var viewport=getViewport();
if(opts.mobileOptimizer&&!opts.innerToolbar) vars.isMobile=viewport.width <=vars.mobileMaxWidth;
vars.BODY[vars.isMobile ? 'addClass':'removeClass']('isMobile');
iL.repositionPhoto(null);
if(supportTouch){
clearTimeout(vars.setTime);
vars.setTime=setTimeout(function(){
var scrollTop=getScrollXY().y;
window.scrollTo(0, scrollTop - 30);
window.scrollTo(0, scrollTop + 30);
window.scrollTo(0, scrollTop);
}, 2000);
}
if(vars.thumbs) iL.positionThumbnails();
}).bind('keydown.iLightBox', function(event){
if(opts.controls.keyboard){
switch (event.keyCode){
case 13:
if(event.shiftKey&&opts.keyboard.shift_enter) iL.fullScreenAction();
break;
case 27:
if(opts.keyboard.esc) iL.closeAction();
break;
case 37:
if(opts.keyboard.left&&!vars.lockKey) iL.moveTo('prev');
break;
case 38:
if(opts.keyboard.up&&!vars.lockKey) iL.moveTo('prev');
break;
case 39:
if(opts.keyboard.right&&!vars.lockKey) iL.moveTo('next');
break;
case 40:
if(opts.keyboard.down&&!vars.lockKey) iL.moveTo('next');
break;
}}
});
if(fullScreenApi.supportsFullScreen) $win.bind(fullscreenEvent, function(){
iL.doFullscreen();
});
var holderEventsArr=[opts.caption.show + '.iLightBox', opts.caption.hide + '.iLightBox', opts.social.show + '.iLightBox', opts.social.hide + '.iLightBox'].filter(function(e, i, arr){
return arr.lastIndexOf(e)===i;
}),
holderEvents="";
$.each(holderEventsArr, function(key, val){
if(key!=0) holderEvents +=' ';
holderEvents +=val;
});
$doc.on(clickEvent, '.ilightbox-overlay', function(){
if(opts.overlay.blur) iL.closeAction();
}).on(clickEvent, '.ilightbox-next, .ilightbox-next-button', function(){
iL.moveTo('next');
}).on(clickEvent, '.ilightbox-prev, .ilightbox-prev-button', function(){
iL.moveTo('prev');
}).on(clickEvent, '.ilightbox-thumbnail', function(){
var t=$(this),
thumbs=$('.ilightbox-thumbnail', vars.thumbnails),
index=thumbs.index(t);
if(index!=vars.current) iL.goTo(index);
}).on(holderEvents, '.ilightbox-holder:not(.ilightbox-next, .ilightbox-prev)', function(e){
var caption=$('div.ilightbox-caption', vars.holder),
social=$('div.ilightbox-social', vars.holder),
fadeSpeed=opts.effects.fadeSpeed;
if(vars.nextLock||vars.prevLock){
if(e.type==opts.caption.show&&!caption.is(':visible')) caption.fadeIn(fadeSpeed);
else if(e.type==opts.caption.hide&&caption.is(':visible')) caption.fadeOut(fadeSpeed);
if(e.type==opts.social.show&&!social.is(':visible')) social.fadeIn(fadeSpeed);
else if(e.type==opts.social.hide&&social.is(':visible')) social.fadeOut(fadeSpeed);
}else{
if(e.type==opts.caption.show&&!caption.is(':visible')) caption.stop().fadeIn(fadeSpeed);
else if(e.type==opts.caption.hide&&caption.is(':visible')) caption.stop().fadeOut(fadeSpeed);
if(e.type==opts.social.show&&!social.is(':visible')) social.stop().fadeIn(fadeSpeed);
else if(e.type==opts.social.hide&&social.is(':visible')) social.stop().fadeOut(fadeSpeed);
}}).on('mouseenter.iLightBox mouseleave.iLightBox', '.ilightbox-wrapper', function(e){
if(e.type=='mouseenter') vars.lockWheel=true;
else vars.lockWheel=false;
}).on(clickEvent, '.ilightbox-toolbar a.ilightbox-close, .ilightbox-toolbar a.ilightbox-fullscreen, .ilightbox-toolbar a.ilightbox-play, .ilightbox-toolbar a.ilightbox-pause', function(){
var t=$(this);
if(t.hasClass('ilightbox-fullscreen')) iL.fullScreenAction();
else if(t.hasClass('ilightbox-play')){
iL.resume();
t.addClass('ilightbox-pause').removeClass('ilightbox-play');
}else if(t.hasClass('ilightbox-pause')){
iL.pause();
t.addClass('ilightbox-play').removeClass('ilightbox-pause');
} else iL.closeAction();
}).on(touchMoveEvent, '.ilightbox-overlay, .ilightbox-thumbnails-container', function(e){
e.preventDefault();
});
function mouseMoveHandler(e){
if(!vars.isMobile){
if(!vars.mouseID){
vars.hideableElements.show();
}
vars.mouseID=clearTimeout(vars.mouseID);
if(buttonsArray.indexOf(e.target)===-1)
vars.mouseID=setTimeout(function(){
vars.hideableElements.hide();
vars.mouseID=clearTimeout(vars.mouseID);
}, 3000);
}}
if(opts.controls.arrows&&!supportTouch) $doc.on('mousemove.iLightBox', mouseMoveHandler);
if(opts.controls.slideshow&&opts.slideshow.pauseOnHover) $doc.on('mouseenter.iLightBox mouseleave.iLightBox', '.ilightbox-holder:not(.ilightbox-next, .ilightbox-prev)', function(e){
if(e.type=='mouseenter'&&vars.cycleID) iL.pause();
else if(e.type=='mouseleave'&&vars.isPaused) iL.resume();
});
var switchers=$('.ilightbox-overlay, .ilightbox-holder, .ilightbox-thumbnails');
if(opts.controls.mousewheel) switchers.on('mousewheel.iLightBox', function(event, delta){
if(!vars.lockWheel){
event.preventDefault();
if(delta < 0) iL.moveTo('next');
else if(delta > 0) iL.moveTo('prev');
}});
if(opts.controls.swipe) holders.on(touchStartEvent, function(event){
if(vars.nextLock||vars.prevLock||vars.total==1||vars.lockSwipe) return;
vars.BODY.addClass('ilightbox-closedhand');
var data=event.originalEvent.touches ? event.originalEvent.touches[0]:event,
scrollTop=$doc.scrollTop(),
scrollLeft=$doc.scrollLeft(),
offsets=[
holders.eq(0).offset(),
holders.eq(1).offset(),
holders.eq(2).offset()
],
offSet=[{
top: offsets[0].top - scrollTop,
left: offsets[0].left - scrollLeft
}, {
top: offsets[1].top - scrollTop,
left: offsets[1].left - scrollLeft
}, {
top: offsets[2].top - scrollTop,
left: offsets[2].left - scrollLeft
}],
start={
time: (new Date()).getTime(),
coords: [data.pageX - scrollLeft, data.pageY - scrollTop]
},
stop;
function moveEachHandler(i){
var t=$(this),
offset=offSet[i],
scroll=[(start.coords[0] - stop.coords[0]), (start.coords[1] - stop.coords[1])];
t[0].style[path=="horizontal" ? 'left':'top']=(path=="horizontal" ? offset.left - scroll[0]:offset.top - scroll[1]) + 'px';
}
function moveHandler(event){
if(!start) return;
var data=event.originalEvent.touches ? event.originalEvent.touches[0]:event;
stop={
time: (new Date()).getTime(),
coords: [data.pageX - scrollLeft, data.pageY - scrollTop]
};
holders.each(moveEachHandler);
event.preventDefault();
}
function repositionHolders(){
holders.each(function(){
var t=$(this),
offset=t.data('offset')||{
top: t.offset().top - scrollTop,
left: t.offset().left - scrollLeft
},
top=offset.top,
left=offset.left;
t.css(transform, gpuAcceleration).stop().animate({
top: top,
left: left
}, 500, 'easeOutCirc', function(){
t.css(transform, '');
});
});
}
holders.bind(touchMoveEvent, moveHandler);
$doc.one(touchStopEvent, function(event){
holders.unbind(touchMoveEvent, moveHandler);
vars.BODY.removeClass('ilightbox-closedhand');
if(start&&stop){
if(path=="horizontal"&&stop.time - start.time < durationThreshold&&abs(start.coords[0] - stop.coords[0]) > horizontalDistanceThreshold&&abs(start.coords[1] - stop.coords[1]) < verticalDistanceThreshold){
if(start.coords[0] > stop.coords[0]){
if(vars.current==vars.total - 1&&!opts.infinite) repositionHolders();
else {
vars.isSwipe=true;
iL.moveTo('next');
}}else{
if(vars.current==0&&!opts.infinite) repositionHolders();
else {
vars.isSwipe=true;
iL.moveTo('prev');
}}
}else if(path=="vertical"&&stop.time - start.time < durationThreshold&&abs(start.coords[1] - stop.coords[1]) > horizontalDistanceThreshold&&abs(start.coords[0] - stop.coords[0]) < verticalDistanceThreshold){
if(start.coords[1] > stop.coords[1]){
if(vars.current==vars.total - 1&&!opts.infinite) repositionHolders();
else {
vars.isSwipe=true;
iL.moveTo('next');
}}else{
if(vars.current==0&&!opts.infinite) repositionHolders();
else {
vars.isSwipe=true;
iL.moveTo('prev');
}}
} else repositionHolders();
}
start=stop=undefined;
});
});
},
goTo: function(index){
var iL=this,
vars=iL.vars,
opts=iL.options,
diff=(index - vars.current);
if(opts.infinite){
if(index==vars.total - 1&&vars.current==0) diff=-1;
if(vars.current==vars.total - 1&&index==0) diff=1;
}
if(diff==1) iL.moveTo('next');
else if(diff==-1) iL.moveTo('prev');
else {
if(vars.nextLock||vars.prevLock) return false;
if(typeof opts.callback.onBeforeChange=='function') opts.callback.onBeforeChange.call(iL, iL.ui);
if(opts.linkId){
vars.hashLock=true;
window.location.hash=opts.linkId + '/' + index;
}
if(iL.items[index]){
if(!iL.items[index].options.mousewheel) vars.lockWheel=true;
else iL.vars.lockWheel=false;
if(!iL.items[index].options.swipe) vars.lockSwipe=true;
else vars.lockSwipe=false;
}
$.each([vars.holder, vars.nextPhoto, vars.prevPhoto], function(key, val){
val.css(transform, gpuAcceleration).fadeOut(opts.effects.loadedFadeSpeed);
});
vars.current=index;
vars.next=index + 1;
vars.prev=index - 1;
iL.createUI();
setTimeout(function(){
iL.generateBoxes();
}, opts.effects.loadedFadeSpeed + 50);
$('.ilightbox-thumbnail', vars.thumbnails).removeClass('ilightbox-active').eq(index).addClass('ilightbox-active');
iL.positionThumbnails();
if(opts.linkId) setTimeout(function(){
vars.hashLock=false;
}, 55);
if(!opts.infinite){
vars.nextButton.add(vars.prevButton).add(vars.innerPrevButton).add(vars.innerNextButton).removeClass('disabled');
if(vars.current==0){
vars.prevButton.add(vars.innerPrevButton).addClass('disabled');
}
if(vars.current >=vars.total - 1){
vars.nextButton.add(vars.innerNextButton).addClass('disabled');
}}
iL.resetCycle();
if(typeof opts.callback.onAfterChange=='function') opts.callback.onAfterChange.call(iL, iL.ui);
}},
moveTo: function(side){
var iL=this,
vars=iL.vars,
opts=iL.options,
path=opts.path.toLowerCase(),
viewport=getViewport(),
switchSpeed=opts.effects.switchSpeed;
if(vars.nextLock||vars.prevLock) return false;
else {
var item=(side=="next") ? vars.next:vars.prev;
if(opts.linkId){
vars.hashLock=true;
window.location.hash=opts.linkId + '/' + item;
}
if(side=="next"){
if(!iL.items[item]) return false;
var firstHolder=vars.nextPhoto,
secondHolder=vars.holder,
lastHolder=vars.prevPhoto,
firstClass='ilightbox-prev',
secondClass='ilightbox-next';
}else if(side=="prev"){
if(!iL.items[item]) return false;
var firstHolder=vars.prevPhoto,
secondHolder=vars.holder,
lastHolder=vars.nextPhoto,
firstClass='ilightbox-next',
secondClass='ilightbox-prev';
}
if(typeof opts.callback.onBeforeChange=='function')
opts.callback.onBeforeChange.call(iL, iL.ui);
(side=="next") ? vars.nextLock=true: vars.prevLock=true;
var captionFirst=$('div.ilightbox-caption', secondHolder),
socialFirst=$('div.ilightbox-social', secondHolder);
if(captionFirst.length)
captionFirst.stop().fadeOut(switchSpeed, function(){
$(this).remove();
});
if(socialFirst.length)
socialFirst.stop().fadeOut(switchSpeed, function(){
$(this).remove();
});
if(iL.items[item].caption){
iL.setCaption(iL.items[item], firstHolder);
var caption=$('div.ilightbox-caption', firstHolder),
percent=parseInt((caption.outerHeight() / firstHolder.outerHeight()) * 100);
if(opts.caption.start&&percent <=50) caption.fadeIn(switchSpeed);
}
var social=iL.items[item].options.social;
if(social){
iL.setSocial(social, iL.items[item].URL, firstHolder);
if(opts.social.start) $('div.ilightbox-social', firstHolder).fadeIn(opts.effects.fadeSpeed);
}
$.each([firstHolder, secondHolder, lastHolder], function(key, val){
val.removeClass('ilightbox-next ilightbox-prev');
});
var firstOffset=firstHolder.data('offset'),
winW=(viewport.width - (opts.styles.pageOffsetX)),
winH=(viewport.height - (opts.styles.pageOffsetY)),
width=firstOffset.newDims.width,
height=firstOffset.newDims.height,
thumbsOffset=firstOffset.thumbsOffset,
diff=firstOffset.diff,
top=parseInt((winH / 2) - (height / 2) - diff.H - (thumbsOffset.H / 2)),
left=parseInt((winW / 2) - (width / 2) - diff.W - (thumbsOffset.W / 2));
firstHolder.css(transform, gpuAcceleration).animate({
top: top,
left: left,
opacity: 1
}, switchSpeed, (vars.isSwipe) ? 'easeOutCirc':'easeInOutCirc', function(){
firstHolder.css(transform, '');
});
$('div.ilightbox-container', firstHolder).animate({
width: width,
height: height
}, switchSpeed, (vars.isSwipe) ? 'easeOutCirc':'easeInOutCirc');
var secondOffset=secondHolder.data('offset'),
object=secondOffset.object;
diff=secondOffset.diff;
width=secondOffset.newDims.width,
height=secondOffset.newDims.height;
width=parseInt(width * opts.styles[side=='next' ? 'prevScale':'nextScale']),
height=parseInt(height * opts.styles[side=='next' ? 'prevScale':'nextScale']),
top=(path=='horizontal') ? parseInt((winH / 2) - object.offsetY - (height / 2) - diff.H - (thumbsOffset.H / 2)):parseInt(winH - object.offsetX - diff.H - (thumbsOffset.H / 2));
if(side=='prev')
left=(path=='horizontal') ? parseInt(winW - object.offsetX - diff.W - (thumbsOffset.W / 2)):parseInt((winW / 2) - (width / 2) - diff.W - object.offsetY - (thumbsOffset.W / 2));
else {
top=(path=='horizontal') ? top:parseInt(object.offsetX - diff.H - height - (thumbsOffset.H / 2)),
left=(path=='horizontal') ? parseInt(object.offsetX - diff.W - width - (thumbsOffset.W / 2)):parseInt((winW / 2) - object.offsetY - (width / 2) - diff.W - (thumbsOffset.W / 2));
}
$('div.ilightbox-container', secondHolder).animate({
width: width,
height: height
}, switchSpeed, (vars.isSwipe) ? 'easeOutCirc':'easeInOutCirc');
secondHolder.addClass(firstClass).css(transform, gpuAcceleration).animate({
top: top,
left: left,
opacity: opts.styles.prevOpacity
}, switchSpeed, (vars.isSwipe) ? 'easeOutCirc':'easeInOutCirc', function(){
secondHolder.css(transform, '');
$('.ilightbox-thumbnail', vars.thumbnails).removeClass('ilightbox-active').eq(item).addClass('ilightbox-active');
iL.positionThumbnails();
if(iL.items[item]){
if(!iL.items[item].options.mousewheel) vars.lockWheel=true;
else vars.lockWheel=false;
if(!iL.items[item].options.swipe) vars.lockSwipe=true;
else vars.lockSwipe=false;
}
vars.isSwipe=false;
if(['iframe', 'video'].indexOf(iL.items[vars.current].type)!==-1){
$('div.ilightbox-container', secondHolder).empty();
}
if(side=="next"){
vars.nextPhoto=lastHolder,
vars.prevPhoto=secondHolder,
vars.holder=firstHolder;
vars.nextPhoto.hide();
vars.next=vars.next + 1,
vars.prev=vars.current,
vars.current=vars.current + 1;
if(opts.infinite){
if(vars.current > vars.total - 1) vars.current=0;
if(vars.current==vars.total - 1) vars.next=0;
if(vars.current==0) vars.prev=vars.total - 1;
}
iL.createUI();
if(!iL.items[vars.next])
vars.nextLock=false;
else
iL.loadContent(iL.items[vars.next], 'next');
}else{
vars.prevPhoto=lastHolder;
vars.nextPhoto=secondHolder;
vars.holder=firstHolder;
vars.prevPhoto.hide();
vars.next=vars.current;
vars.current=vars.prev;
vars.prev=vars.current - 1;
if(opts.infinite){
if(vars.current==vars.total - 1) vars.next=0;
if(vars.current==0) vars.prev=vars.total - 1;
}
iL.createUI();
if(!iL.items[vars.prev])
vars.prevLock=false;
else
iL.loadContent(iL.items[vars.prev], 'prev');
}
if(['iframe', 'video'].indexOf(iL.items[vars.current].type)!==-1){
iL.loadContent(iL.items[vars.current], 'current');
}
if(opts.linkId) setTimeout(function(){
vars.hashLock=false;
}, 55);
if(!opts.infinite){
vars.nextButton.add(vars.prevButton).add(vars.innerPrevButton).add(vars.innerNextButton).removeClass('disabled');
if(vars.current==0)
vars.prevButton.add(vars.innerPrevButton).addClass('disabled');
if(vars.current >=vars.total - 1)
vars.nextButton.add(vars.innerNextButton).addClass('disabled');
}
iL.repositionPhoto();
iL.resetCycle();
if(typeof opts.callback.onAfterChange=='function')
opts.callback.onAfterChange.call(iL, iL.ui);
});
top=(path=='horizontal') ? getPixel(lastHolder, 'top'):((side=="next") ? parseInt(-(winH / 2) - lastHolder.outerHeight()):parseInt(top * 2)),
left=(path=='horizontal') ? ((side=="next") ? parseInt(-(winW / 2) - lastHolder.outerWidth()):parseInt(left * 2)):getPixel(lastHolder, 'left');
lastHolder.css(transform, gpuAcceleration).animate({
top: top,
left: left,
opacity: opts.styles.nextOpacity
}, switchSpeed, (vars.isSwipe) ? 'easeOutCirc':'easeInOutCirc', function(){
lastHolder.css(transform, '');
}).addClass(secondClass);
}},
setCaption: function(obj, target){
var iL=this,
caption=$('<div class="ilightbox-caption"></div>');
if(obj.caption){
caption.html(obj.caption);
$('div.ilightbox-container', target).append(caption);
}},
normalizeSocial: function(obj, url){
var iL=this,
vars=iL.vars,
opts=iL.options,
baseURL=window.location.href;
$.each(obj, function(key, value){
if(!value)
return true;
var item=key.toLowerCase(),
source, text;
switch (item){
case 'facebook':
source="http://www.facebook.com/share.php?v=4&src=bm&u={URL}",
text="Share on Facebook";
break;
case 'twitter':
source="http://twitter.com/home?status={URL}",
text="Share on Twitter";
break;
case 'googleplus':
source="https://plus.google.com/share?url={URL}",
text="Share on Google+";
break;
case 'delicious':
source="http://delicious.com/post?url={URL}",
text="Share on Delicious";
break;
case 'digg':
source="http://digg.com/submit?phase=2&url={URL}",
text="Share on Digg";
break;
case 'reddit':
source="http://reddit.com/submit?url={URL}",
text="Share on reddit";
break;
}
obj[key]={
URL: value.URL&&absolutizeURI(baseURL, value.URL)||opts.linkId&&window.location.href||typeof url!=='string'&&baseURL||url&&absolutizeURI(baseURL, url)||baseURL,
source: value.source||source||value.URL&&absolutizeURI(baseURL, value.URL)||url&&absolutizeURI(baseURL, url),
text: value.text||text||"Share on " + key,
width: (typeof(value.width)!='undefined'&&!isNaN(value.width)) ? parseInt(value.width):640,
height: value.height||360
};});
return obj;
},
setSocial: function(obj, url, target){
var iL=this,
socialBar=$('<div class="ilightbox-social"></div>'),
buttons='<ul>';
obj=iL.normalizeSocial(obj, url);
$.each(obj, function(key, value){
var item=key.toLowerCase(),
source=value.source.replace(/\{URL\}/g, encodeURIComponent(value.URL).replace(/!/g, '%21').replace(/'/g, '%27').replace(/\(/g, '%28').replace(/\)/g, '%29').replace(/\*/g, '%2A').replace(/%20/g, '+'));
buttons +='<li class="' + key + '"><a href="' + source + '" onclick="javascript:window.open(this.href' + ((value.width <=0||value.height <=0) ? '':', \'\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=' + value.height + ',width=' + value.width + ',left=40,top=40\'') + ');return false;" title="' + value.text + '" target="_blank"></a></li>';
});
buttons +='</ul>';
socialBar.html(buttons);
$('div.ilightbox-container', target).append(socialBar);
},
fullScreenAction: function(){
var iL=this,
vars=iL.vars;
if(fullScreenApi.supportsFullScreen){
if(fullScreenApi.isFullScreen()) fullScreenApi.cancelFullScreen(document.documentElement);
else fullScreenApi.requestFullScreen(document.documentElement);
}else{
iL.doFullscreen();
}},
doFullscreen: function(){
var iL=this,
vars=iL.vars,
viewport=getViewport(),
opts=iL.options;
if(opts.fullAlone){
var currentHolder=vars.holder,
current=iL.items[vars.current],
windowWidth=viewport.width,
windowHeight=viewport.height,
elements=[currentHolder, vars.nextPhoto, vars.prevPhoto, vars.nextButton, vars.prevButton, vars.overlay, vars.toolbar, vars.thumbnails, vars.loader],
hideElements=[vars.nextPhoto, vars.prevPhoto, vars.nextButton, vars.prevButton, vars.loader, vars.thumbnails];
if(!vars.isInFullScreen){
vars.isInFullScreen=vars.lockKey=vars.lockWheel=vars.lockSwipe=true;
vars.overlay.css({
opacity: 1
});
$.each(hideElements, function(i, element){
element.hide();
});
vars.fullScreenButton.attr('title', opts.text.exitFullscreen);
if(opts.fullStretchTypes.indexOf(current.type)!=-1) currentHolder.data({
naturalWidthOld: currentHolder.data('naturalWidth'),
naturalHeightOld: currentHolder.data('naturalHeight'),
naturalWidth: windowWidth,
naturalHeight: windowHeight
});
else {
var viewport=current.options.fullViewPort||opts.fullViewPort||'',
newWidth=windowWidth,
newHeight=windowHeight,
width=currentHolder.data('naturalWidth'),
height=currentHolder.data('naturalHeight');
if(viewport.toLowerCase()=='fill'){
newHeight=(newWidth / width) * height;
if(newHeight < windowHeight){
newWidth=(windowHeight / height) * width,
newHeight=windowHeight;
}}else if(viewport.toLowerCase()=='fit'){
var dims=iL.getNewDimenstions(newWidth, newHeight, width, height, true);
newWidth=dims.width,
newHeight=dims.height;
}else if(viewport.toLowerCase()=='stretch'){
newWidth=newWidth,
newHeight=newHeight;
}else{
var scale=(width > newWidth||height > newHeight) ? true:false,
dims=iL.getNewDimenstions(newWidth, newHeight, width, height, scale);
newWidth=dims.width,
newHeight=dims.height;
}
currentHolder.data({
naturalWidthOld: currentHolder.data('naturalWidth'),
naturalHeightOld: currentHolder.data('naturalHeight'),
naturalWidth: newWidth,
naturalHeight: newHeight
});
}
$.each(elements, function(key, val){
val.addClass('ilightbox-fullscreen');
});
if(typeof opts.callback.onEnterFullScreen=='function') opts.callback.onEnterFullScreen.call(iL, iL.ui);
}else{
vars.isInFullScreen=vars.lockKey=vars.lockWheel=vars.lockSwipe=false;
vars.overlay.css({
opacity: iL.options.overlay.opacity
});
$.each(hideElements, function(i, element){
element.show();
});
vars.fullScreenButton.attr('title', opts.text.enterFullscreen);
currentHolder.data({
naturalWidth: currentHolder.data('naturalWidthOld'),
naturalHeight: currentHolder.data('naturalHeightOld'),
naturalWidthOld: null,
naturalHeightOld: null
});
$.each(elements, function(key, val){
val.removeClass('ilightbox-fullscreen');
});
if(typeof opts.callback.onExitFullScreen=='function') opts.callback.onExitFullScreen.call(iL, iL.ui);
}}else{
if(!vars.isInFullScreen) vars.isInFullScreen=true;
else vars.isInFullScreen=false;
}
iL.repositionPhoto(true);
},
closeAction: function(){
var iL=this,
vars=iL.vars,
opts=iL.options;
$win.unbind('.iLightBox');
$doc.off('.iLightBox');
if(vars.isInFullScreen) fullScreenApi.cancelFullScreen(document.documentElement);
$('.ilightbox-overlay, .ilightbox-holder, .ilightbox-thumbnails').off('.iLightBox');
if(opts.hide.effect) vars.overlay.stop().fadeOut(opts.hide.speed, function(){
vars.overlay.remove();
vars.BODY.removeClass('ilightbox-noscroll').off('.iLightBox');
});
else {
vars.overlay.remove();
vars.BODY.removeClass('ilightbox-noscroll').off('.iLightBox');
}
var fadeOuts=[vars.toolbar, vars.holder, vars.nextPhoto, vars.prevPhoto, vars.nextButton, vars.prevButton, vars.loader, vars.thumbnails];
$.each(fadeOuts, function(i, element){
element.removeAttr('style').remove();
});
vars.dontGenerateThumbs=vars.isInFullScreen=false;
window.iLightBox=null;
if(opts.linkId){
vars.hashLock=true;
removeHash();
setTimeout(function(){
vars.hashLock=false;
}, 55);
}
if(typeof opts.callback.onHide=='function') opts.callback.onHide.call(iL, iL.ui);
},
repositionPhoto: function(){
var iL=this,
vars=iL.vars,
opts=iL.options,
path=opts.path.toLowerCase(),
viewport=getViewport(),
winWidth=viewport.width,
winHeight=viewport.height;
var thumbsOffsetW=(vars.isInFullScreen&&opts.fullAlone||vars.isMobile) ? 0:((path=='horizontal') ? 0:vars.thumbnails.outerWidth()),
thumbsOffsetH=vars.isMobile ? vars.toolbar.outerHeight():((vars.isInFullScreen&&opts.fullAlone) ? 0:((path=='horizontal') ? vars.thumbnails.outerHeight():0)),
width=(vars.isInFullScreen&&opts.fullAlone) ? winWidth:(winWidth - (opts.styles.pageOffsetX)),
height=(vars.isInFullScreen&&opts.fullAlone) ? winHeight:(winHeight - (opts.styles.pageOffsetY)),
offsetW=(path=='horizontal') ? parseInt((iL.items[vars.next]||iL.items[vars.prev]) ? ((opts.styles.nextOffsetX + opts.styles.prevOffsetX)) * 2:(((width / 10) <=30) ? 30:(width / 10))):parseInt(((width / 10) <=30) ? 30:(width / 10)) + thumbsOffsetW,
offsetH=(path=='horizontal') ? parseInt(((height / 10) <=30) ? 30:(height / 10)) + thumbsOffsetH:parseInt((iL.items[vars.next]||iL.items[vars.prev]) ? ((opts.styles.nextOffsetX + opts.styles.prevOffsetX)) * 2:(((height / 10) <=30) ? 30:(height / 10)));
var elObject={
type: 'current',
width: width,
height: height,
item: iL.items[vars.current],
offsetW: offsetW,
offsetH: offsetH,
thumbsOffsetW: thumbsOffsetW,
thumbsOffsetH: thumbsOffsetH,
animate: arguments.length,
holder: vars.holder
};
iL.repositionEl(elObject);
if(iL.items[vars.next]){
elObject=$.extend(elObject, {
type: 'next',
item: iL.items[vars.next],
offsetX: opts.styles.nextOffsetX,
offsetY: opts.styles.nextOffsetY,
holder: vars.nextPhoto
});
iL.repositionEl(elObject);
}
if(iL.items[vars.prev]){
elObject=$.extend(elObject, {
type: 'prev',
item: iL.items[vars.prev],
offsetX: opts.styles.prevOffsetX,
offsetY: opts.styles.prevOffsetY,
holder: vars.prevPhoto
});
iL.repositionEl(elObject);
}
var loaderCss=(path=="horizontal") ? {
left: parseInt((width / 2) - (vars.loader.outerWidth() / 2))
}:{
top: parseInt((height / 2) - (vars.loader.outerHeight() / 2))
};
vars.loader.css(loaderCss);
},
repositionEl: function(obj){
var iL=this,
vars=iL.vars,
opts=iL.options,
path=opts.path.toLowerCase(),
widthAvail=(obj.type=='current') ? ((vars.isInFullScreen&&opts.fullAlone) ? obj.width:(obj.width - obj.offsetW)):(obj.width - obj.offsetW),
heightAvail=(obj.type=='current') ? ((vars.isInFullScreen&&opts.fullAlone) ? obj.height:(obj.height - obj.offsetH)):(obj.height - obj.offsetH),
itemParent=obj.item,
item=obj.item.options,
holder=obj.holder,
offsetX=obj.offsetX||0,
offsetY=obj.offsetY||0,
thumbsOffsetW=obj.thumbsOffsetW,
thumbsOffsetH=obj.thumbsOffsetH;
if(obj.type=='current'){
if(typeof item.width=='number'&&item.width) widthAvail=((vars.isInFullScreen&&opts.fullAlone)&&(opts.fullStretchTypes.indexOf(itemParent.type)!=-1||item.fullViewPort||opts.fullViewPort)) ? widthAvail:((item.width > widthAvail) ? widthAvail:item.width);
if(typeof item.height=='number'&&item.height) heightAvail=((vars.isInFullScreen&&opts.fullAlone)&&(opts.fullStretchTypes.indexOf(itemParent.type)!=-1||item.fullViewPort||opts.fullViewPort)) ? heightAvail:((item.height > heightAvail) ? heightAvail:item.height);
}else{
if(typeof item.width=='number'&&item.width) widthAvail=(item.width > widthAvail) ? widthAvail:item.width;
if(typeof item.height=='number'&&item.height) heightAvail=(item.height > heightAvail) ? heightAvail:item.height;
}
if(opts.innerToolbar)
heightAvail=parseInt(heightAvail - $('.ilightbox-inner-toolbar', holder).outerHeight());
var width=(typeof item.width=='string'&&item.width.indexOf('%')!=-1) ? percentToValue(parseInt(item.width.replace('%', '')), obj.width):holder.data('naturalWidth'),
height=(typeof item.height=='string'&&item.height.indexOf('%')!=-1) ? percentToValue(parseInt(item.height.replace('%', '')), obj.height):holder.data('naturalHeight');
var dims=((typeof item.width=='string'&&item.width.indexOf('%')!=-1||typeof item.height=='string'&&item.height.indexOf('%')!=-1) ? {
width: width,
height: height
}:iL.getNewDimenstions(widthAvail, heightAvail, width, height)),
newDims=$.extend({}, dims, {});
if(obj.type=='prev'||obj.type=='next')
width=parseInt(dims.width * ((obj.type=='next') ? opts.styles.nextScale:opts.styles.prevScale)),
height=parseInt(dims.height * ((obj.type=='next') ? opts.styles.nextScale:opts.styles.prevScale));
else
width=dims.width,
height=dims.height;
var widthDiff=parseInt((getPixel(holder, 'padding-left') + getPixel(holder, 'padding-right') + getPixel(holder, 'border-left-width') + getPixel(holder, 'border-right-width')) / 2),
heightDiff=parseInt((getPixel(holder, 'padding-top') + getPixel(holder, 'padding-bottom') + getPixel(holder, 'border-top-width') + getPixel(holder, 'border-bottom-width') + ($('.ilightbox-inner-toolbar', holder).outerHeight()||0)) / 2);
switch (obj.type){
case 'current':
var top=parseInt((obj.height / 2) - (height / 2) - heightDiff - (thumbsOffsetH / 2)),
left=parseInt((obj.width / 2) - (width / 2) - widthDiff - (thumbsOffsetW / 2));
break;
case 'next':
var top=(path=='horizontal') ? parseInt((obj.height / 2) - offsetY - (height / 2) - heightDiff - (thumbsOffsetH / 2)):parseInt(obj.height - offsetX - heightDiff - (thumbsOffsetH / 2)),
left=(path=='horizontal') ? parseInt(obj.width - offsetX - widthDiff - (thumbsOffsetW / 2)):parseInt((obj.width / 2) - (width / 2) - widthDiff - offsetY - (thumbsOffsetW / 2));
break;
case 'prev':
var top=(path=='horizontal') ? parseInt((obj.height / 2) - offsetY - (height / 2) - heightDiff - (thumbsOffsetH / 2)):parseInt(offsetX - heightDiff - height - (thumbsOffsetH / 2)),
left=(path=='horizontal') ? parseInt(offsetX - widthDiff - width - (thumbsOffsetW / 2)):parseInt((obj.width / 2) - offsetY - (width / 2) - widthDiff - (thumbsOffsetW / 2));
break;
}
holder.data('offset', {
top: top,
left: left,
newDims: newDims,
diff: {
W: widthDiff,
H: heightDiff
},
thumbsOffset: {
W: thumbsOffsetW,
H: thumbsOffsetH
},
object: obj
});
if(obj.animate > 0&&opts.effects.reposition){
holder.css(transform, gpuAcceleration).stop().animate({
top: top,
left: left
}, opts.effects.repositionSpeed, 'easeOutCirc', function(){
holder.css(transform, '');
});
$('div.ilightbox-container', holder).stop().animate({
width: width,
height: height
}, opts.effects.repositionSpeed, 'easeOutCirc');
$('div.ilightbox-inner-toolbar', holder).stop().animate({
width: width
}, opts.effects.repositionSpeed, 'easeOutCirc', function(){
$(this).css('overflow', 'visible');
});
}else{
holder.css({
top: top,
left: left
});
$('div.ilightbox-container', holder).css({
width: width,
height: height
});
$('div.ilightbox-inner-toolbar', holder).css({
width: width
});
}},
resume: function(priority){
var iL=this,
vars=iL.vars,
opts=iL.options;
if(!opts.slideshow.pauseTime||opts.controls.slideshow&&vars.total <=1||priority < vars.isPaused){
return;
}
vars.isPaused=0;
if(vars.cycleID){
vars.cycleID=clearTimeout(vars.cycleID);
}
vars.cycleID=setTimeout(function(){
if(vars.current==vars.total - 1) iL.goTo(0);
else iL.moveTo('next');
}, opts.slideshow.pauseTime);
},
pause: function(priority){
var iL=this,
vars=iL.vars,
opts=iL.options;
if(priority < vars.isPaused){
return;
}
vars.isPaused=priority||100;
if(vars.cycleID){
vars.cycleID=clearTimeout(vars.cycleID);
}},
resetCycle: function(){
var iL=this,
vars=iL.vars,
opts=iL.options;
if(opts.controls.slideshow&&vars.cycleID&&!vars.isPaused){
iL.resume();
}},
getNewDimenstions: function(width, height, width_old, height_old, thumb){
var iL=this;
if(!width) factor=height / height_old;
else if(!height) factor=width / width_old;
else factor=min(width / width_old, height / height_old);
if(!thumb){
if(factor > iL.options.maxScale) factor=iL.options.maxScale;
else if(factor < iL.options.minScale) factor=iL.options.minScale;
}
var final_width=(iL.options.keepAspectRatio) ? round(width_old * factor):width,
final_height=(iL.options.keepAspectRatio) ? round(height_old * factor):height;
return {
width: final_width,
height: final_height,
ratio: factor
};},
setOption: function(options){
var iL=this;
iL.options=$.extend(true, iL.options, options||{});
iL.refresh();
},
availPlugins: function(){
var iL=this,
testEl=document.createElement("video");
iL.plugins={
flash: !isMobile,
quicktime: (parseInt(PluginDetect.getVersion("QuickTime")) >=0) ? true:false,
html5H264: !!(testEl.canPlayType&&testEl.canPlayType('video/mp4').replace(/no/, '')),
html5WebM: !!(testEl.canPlayType&&testEl.canPlayType('video/webm').replace(/no/, '')),
html5Vorbis: !!(testEl.canPlayType&&testEl.canPlayType('video/ogg').replace(/no/, '')),
html5QuickTime: !!(testEl.canPlayType&&testEl.canPlayType('video/quicktime').replace(/no/, ''))
};},
addContent: function(element, obj){
var iL=this,
el;
switch (obj.type){
case 'video':
var HTML5=false,
videoType=obj.videoType,
html5video=obj.options.html5video;
if(((videoType=='video/mp4'||obj.ext=='mp4'||obj.ext=='m4v')||html5video.h264)&&iL.plugins.html5H264)
obj.ext='mp4',
obj.URL=html5video.h264||obj.URL;
else if(html5video.webm&&iL.plugins.html5WebM)
obj.ext='webm',
obj.URL=html5video.webm||obj.URL;
else if(html5video.ogg&&iL.plugins.html5Vorbis)
obj.ext='ogv',
obj.URL=html5video.ogg||obj.URL;
if(iL.plugins.html5H264&&(videoType=='video/mp4'||obj.ext=='mp4'||obj.ext=='m4v')) HTML5=true, videoType="video/mp4";
else if(iL.plugins.html5WebM&&(videoType=='video/webm'||obj.ext=='webm')) HTML5=true, videoType="video/webm";
else if(iL.plugins.html5Vorbis&&(videoType=='video/ogg'||obj.ext=='ogv')) HTML5=true, videoType="video/ogg";
else if(iL.plugins.html5QuickTime&&(videoType=='video/quicktime'||obj.ext=='mov'||obj.ext=='qt')) HTML5=true, videoType="video/quicktime";
if(HTML5){
el=$('<video />', {
"width": "100%",
"height": "100%",
"preload": html5video.preload,
"autoplay": html5video.autoplay,
"poster": html5video.poster,
"controls": html5video.controls
}).append($('<source />', {
"src": obj.URL,
"type": videoType
}));
}else{
if(!iL.plugins.quicktime) el=$('<span />', {
"class": "ilightbox-alert",
html: iL.options.errors.missingPlugin.replace('{pluginspage}', pluginspages.quicktime).replace('{type}', 'QuickTime')
});
else {
el=$('<object />', {
"type": "video/quicktime",
"pluginspage": pluginspages.quicktime
}).attr({
"data": obj.URL,
"width": "100%",
"height": "100%"
}).append($('<param />', {
"name": "src",
"value": obj.URL
})).append($('<param />', {
"name": "autoplay",
"value": "false"
})).append($('<param />', {
"name": "loop",
"value": "false"
})).append($('<param />', {
"name": "scale",
"value": "tofit"
}));
if(browser.msie) el=QT_GenerateOBJECTText(obj.URL, '100%', '100%', '', 'SCALE', 'tofit', 'AUTOPLAY', 'false', 'LOOP', 'false');
}}
break;
case 'flash':
if(!iL.plugins.flash) el=$('<span />', {
"class": "ilightbox-alert",
html: iL.options.errors.missingPlugin.replace('{pluginspage}', pluginspages.flash).replace('{type}', 'Adobe Flash player')
});
else {
var flashvars="",
i=0;
if(obj.options.flashvars) $.each(obj.options.flashvars, function(k, v){
if(i!=0) flashvars +="&";
flashvars +=k + "=" + encodeURIComponent(v);
i++;
});
else flashvars=null;
el=$('<embed />').attr({
"type": "application/x-shockwave-flash",
"src": obj.URL,
"width": (typeof obj.options.width=='number'&&obj.options.width&&iL.options.minScale=='1'&&iL.options.maxScale=='1') ? obj.options.width:"100%",
"height": (typeof obj.options.height=='number'&&obj.options.height&&iL.options.minScale=='1'&&iL.options.maxScale=='1') ? obj.options.height:"100%",
"quality": "high",
"bgcolor": "#000000",
"play": "true",
"loop": "true",
"menu": "true",
"wmode": "transparent",
"scale": "showall",
"allowScriptAccess": "always",
"allowFullScreen": "true",
"flashvars": flashvars,
"fullscreen": "yes"
});
}
break;
case 'iframe':
el=$('<iframe />').attr({
"width": (typeof obj.options.width=='number'&&obj.options.width&&iL.options.minScale=='1'&&iL.options.maxScale=='1') ? obj.options.width:"100%",
"height": (typeof obj.options.height=='number'&&obj.options.height&&iL.options.minScale=='1'&&iL.options.maxScale=='1') ? obj.options.height:"100%",
src: obj.URL,
frameborder: 0,
'hspace': 0,
'vspace': 0,
'scrolling': supportTouch ? 'auto':'scroll',
'webkitAllowFullScreen': '',
'mozallowfullscreen': '',
'allowFullScreen': ''
});
break;
case 'inline':
el=$('<div class="ilightbox-wrapper"></div>').html($(obj.URL).clone(true));
break;
case 'html':
var object=obj.URL,
el;
if(object[0].nodeName){
el=$('<div class="ilightbox-wrapper"></div>').html(object);
}else{
var dom=$(obj.URL),
html=(dom.selector) ? $('<div>' + dom + '</div>'):dom;
el=$('<div class="ilightbox-wrapper"></div>').html(html);
}
break;
}
$('div.ilightbox-container', element).empty().html(el);
if(el[0].tagName.toLowerCase()==='video'&&browser.webkit) setTimeout(function(){
var src=el[0].currentSrc + '?' + floor(random() * 30000);
el[0].currentSrc=src;
el[0].src=src;
});
return el;
},
ogpRecognition: function(obj, callback){
var iL=this,
url=obj.URL;
iL.showLoader();
doAjax(url, function(data){
iL.hideLoader();
if(data){
var object=new Object();
object.length=false,
object.url=data.url;
if(data.status==200){
var result=data.results,
type=result.type,
source=result.source;
object.source=source.src,
object.width=source.width&&parseInt(source.width)||0,
object.height=source.height&&parseInt(source.height)||0,
object.type=type,
object.thumbnail=source.thumbnail||result.images&&result.images[0],
object.html5video=result.html5video||{},
object.length=true;
if(source.type=='application/x-shockwave-flash') object.type="flash";
else if(source.type.indexOf("video/")!=-1) object.type="video";
else if(source.type.indexOf("/html")!=-1) object.type="iframe";
else if(source.type.indexOf("image/")!=-1) object.type="image";
}else if(typeof data.response!='undefined')
throw data.response;
callback.call(this, object.length ? object:false);
}});
},
hashChangeHandler: function(url){
var iL=this,
vars=iL.vars,
opts=iL.options,
URL=url||window.location.href,
hash=parseURI(URL).hash,
split=hash.split('/'),
index=split[1];
if(vars.hashLock||('#' + opts.linkId!=split[0]&&hash.length > 1)) return;
if(index){
var target=split[1]||0;
if(iL.items[target]){
var overlay=$('.ilightbox-overlay');
if(overlay.length&&overlay.attr('linkid')==opts.linkId){
iL.goTo(target);
}else{
iL.itemsObject[target].trigger(supportTouch ? 'itap':'click');
}}else{
var overlay=$('.ilightbox-overlay');
if(overlay.length) iL.closeAction();
}}else{
var overlay=$('.ilightbox-overlay');
if(overlay.length) iL.closeAction();
}}
};
function getPixel($element, property){
return parseInt($element.css(property), 10)||0;
}
function within(number, min, max){
return number < min ? min:number > max ? max:number;
}
function getViewport(){
var e=window,
a='inner';
if(!('innerWidth' in window)){
a='client';
e=document.documentElement||document.body;
}
return {
width: e[a + 'Width'],
height: e[a + 'Height']
}}
function removeHash(){
var scroll=getScrollXY();
window.location.hash="";
window.scrollTo(scroll.x, scroll.y);
}
function doAjax(url, callback){
var url="//ilightbox.net/getSource/jsonp.php?url=" + encodeURIComponent(url).replace(/!/g, '%21').replace(/'/g, '%27').replace(/\(/g, '%28').replace(/\)/g, '%29').replace(/\*/g, '%2A');
$.ajax({
url: url,
dataType: 'jsonp'
});
iLCallback=function(data){
callback.call(this, data);
};}
function findImageInElement(element){
var elements=$('*', element),
imagesArr=new Array();
elements.each(function(){
var url="",
element=this;
if($(element).css("background-image")!="none"){
url=$(element).css("background-image");
}else if(typeof($(element).attr("src"))!="undefined"&&element.nodeName.toLowerCase()=="img"){
url=$(element).attr("src");
}
if(url.indexOf("gradient")==-1){
url=url.replace(/url\(\"/g, "");
url=url.replace(/url\(/g, "");
url=url.replace(/\"\)/g, "");
url=url.replace(/\)/g, "");
var urls=url.split(",");
for (var i=0; i < urls.length; i++){
if(urls[i].length > 0&&$.inArray(urls[i], imagesArr)==-1){
var extra="";
if(browser.msie&&browser.version < 9){
extra="?" + floor(random() * 3000);
}
imagesArr.push(urls[i] + extra);
}}
}});
return imagesArr;
}
function getExtension(URL){
var ext=URL.split('.').pop().toLowerCase(),
extra=ext.indexOf('?')!==-1 ? ext.split('?').pop():'';
return ext.replace(extra, '');
}
function getTypeByExtension(URL){
var type,
ext=getExtension(URL);
if(extensions.image.indexOf(ext)!==-1) type='image';
else if(extensions.flash.indexOf(ext)!==-1) type='flash';
else if(extensions.video.indexOf(ext)!==-1) type='video';
else type='iframe';
return type;
}
function percentToValue(percent, total){
return parseInt((total / 100) * percent);
}
function parseURI(url){
var m=String(url).replace(/^\s+|\s+$/g, '').match(/^([^:\/?#]+:)?(\/\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);
return (m ? {
href: m[0]||'',
protocol: m[1]||'',
authority: m[2]||'',
host: m[3]||'',
hostname: m[4]||'',
port: m[5]||'',
pathname: m[6]||'',
search: m[7]||'',
hash: m[8]||''
}:null);
}
function absolutizeURI(base, href){
var iL=this;
function removeDotSegments(input){
var output=[];
input.replace(/^(\.\.?(\/|$))+/, '')
.replace(/\/(\.(\/|$))+/g, '/')
.replace(/\/\.\.$/, '/../')
.replace(/\/?[^\/]*/g, function(p){
if(p==='/..'){
output.pop();
}else{
output.push(p);
}});
return output.join('').replace(/^\//, input.charAt(0)==='/' ? '/':'');
}
href=parseURI(href||'');
base=parseURI(base||'');
return !href||!base ? null:(href.protocol||base.protocol) +
(href.protocol||href.authority ? href.authority:base.authority) +
removeDotSegments(href.protocol||href.authority||href.pathname.charAt(0)==='/' ? href.pathname:(href.pathname ? ((base.authority&&!base.pathname ? '/':'') + base.pathname.slice(0, base.pathname.lastIndexOf('/') + 1) + href.pathname):base.pathname)) +
(href.protocol||href.authority||href.pathname ? href.search:(href.search||base.search)) +
href.hash;
}
function version_compare(v1, v2, operator){
this.php_js=this.php_js||{};
this.php_js.ENV=this.php_js.ENV||{};
var i=0,
x=0,
compare=0,
vm={
'dev': -6,
'alpha': -5,
'a': -5,
'beta': -4,
'b': -4,
'RC': -3,
'rc': -3,
'#': -2,
'p': 1,
'pl': 1
},
prepVersion=function(v){
v=('' + v).replace(/[_\-+]/g, '.');
v=v.replace(/([^.\d]+)/g, '.$1.').replace(/\.{2,}/g, '.');
return (!v.length ? [-8]:v.split('.'));
},
numVersion=function(v){
return !v ? 0:(isNaN(v) ? vm[v]||-7:parseInt(v, 10));
};
v1=prepVersion(v1);
v2=prepVersion(v2);
x=max(v1.length, v2.length);
for (i=0; i < x; i++){
if(v1[i]==v2[i]){
continue;
}
v1[i]=numVersion(v1[i]);
v2[i]=numVersion(v2[i]);
if(v1[i] < v2[i]){
compare=-1;
break;
}else if(v1[i] > v2[i]){
compare=1;
break;
}}
if(!operator){
return compare;
}
switch (operator){
case '>':
case 'gt':
return (compare > 0);
case '>=':
case 'ge':
return (compare >=0);
case '<=':
case 'le':
return (compare <=0);
case '==':
case '=':
case 'eq':
return (compare===0);
case '<>':
case '!=':
case 'ne':
return (compare!==0);
case '':
case '<':
case 'lt':
return (compare < 0);
default:
return null;
}}
$.fn.iLightBox=function(){
var args=arguments,
opt=($.isPlainObject(args[0])) ? args[0]:args[1],
items=($.isArray(args[0])||typeof args[0]=='string') ? args[0]:args[1];
if(!opt) opt={};
var options=$.extend(true, {
attr: 'href',
path: 'vertical',
skin: 'dark',
linkId: false,
infinite: false,
startFrom: 0,
randomStart: false,
keepAspectRatio: true,
maxScale: 1,
minScale: .2,
innerToolbar: false,
smartRecognition: false,
mobileOptimizer: true,
fullAlone: true,
fullViewPort: null,
fullStretchTypes: 'flash, video',
overlay: {
blur: true,
opacity: .85
},
controls: {
arrows: false,
slideshow: false,
toolbar: true,
fullscreen: true,
thumbnail: true,
keyboard: true,
mousewheel: true,
swipe: true
},
keyboard: {
left: true,
right: true,
up: true,
down: true,
esc: true,
shift_enter: true
},
show: {
effect: true,
speed: 300,
title: true
},
hide: {
effect: true,
speed: 300
},
caption: {
start: true,
show: 'mouseenter',
hide: 'mouseleave'
},
social: {
start: true,
show: 'mouseenter',
hide: 'mouseleave',
buttons: false
},
styles: {
pageOffsetX: 0,
pageOffsetY: 0,
nextOffsetX: 45,
nextOffsetY: 0,
nextOpacity: 1,
nextScale: 1,
prevOffsetX: 45,
prevOffsetY: 0,
prevOpacity: 1,
prevScale: 1
},
thumbnails: {
maxWidth: 120,
maxHeight: 80,
normalOpacity: 1,
activeOpacity: .6
},
effects: {
reposition: true,
repositionSpeed: 200,
switchSpeed: 500,
loadedFadeSpeed: 180,
fadeSpeed: 200
},
slideshow: {
pauseTime: 5000,
pauseOnHover: false,
startPaused: true
},
text: {
close: "Press Esc to close",
enterFullscreen: "Enter Fullscreen (Shift+Enter)",
exitFullscreen: "Exit Fullscreen (Shift+Enter)",
slideShow: "Slideshow",
next: "Next",
previous: "Previous"
},
errors: {
loadImage: "An error occurred when trying to load photo.",
loadContents: "An error occurred when trying to load contents.",
missingPlugin: "The content your are attempting to view requires the <a href='{pluginspage}' target='_blank'>{type} plugin<\/a>."
},
ajaxSetup: {
url: '',
beforeSend: function(jqXHR, settings){},
cache: false,
complete: function(jqXHR, textStatus){},
crossDomain: false,
error: function(jqXHR, textStatus, errorThrown){},
success: function(data, textStatus, jqXHR){},
global: true,
ifModified: false,
username: null,
password: null,
type: 'GET'
},
callback: {}}, opt);
var instant=($.isArray(items)||typeof items=='string') ? true:false;
items=$.isArray(items) ? items:new Array();
if(typeof args[0]=='string') items[0]=args[0];
if(version_compare($.fn.jquery, '1.8', '>=')){
var iLB=new iLightBox($(this), options, items, instant);
return {
close: function(){
iLB.closeAction();
},
fullscreen: function(){
iLB.fullScreenAction();
},
moveNext: function(){
iLB.moveTo('next');
},
movePrev: function(){
iLB.moveTo('prev');
},
goTo: function(index){
iLB.goTo(index);
},
refresh: function(){
iLB.refresh();
},
reposition: function(){
(arguments.length > 0) ? iLB.repositionPhoto(true): iLB.repositionPhoto();
},
setOption: function(options){
iLB.setOption(options);
},
destroy: function(){
iLB.closeAction();
iLB.dispatchItemsEvents();
}};}else{
throw "The jQuery version that was loaded is too old. iLightBox requires jQuery 1.8+";
}};
$.iLightBox=function(){
return $.fn.iLightBox(arguments[0], arguments[1]);
};
$.extend($.easing, {
easeInCirc: function(x, t, b, c, d){
return -c * (sqrt(1 - (t /=d) * t) - 1) + b;
},
easeOutCirc: function(x, t, b, c, d){
return c * sqrt(1 - (t=t / d - 1) * t) + b;
},
easeInOutCirc: function(x, t, b, c, d){
if((t /=d / 2) < 1) return -c / 2 * (sqrt(1 - t * t) - 1) + b;
return c / 2 * (sqrt(1 - (t -=2) * t) + 1) + b;
}});
function getScrollXY(){
var scrOfX=0,
scrOfY=0;
if(typeof(window.pageYOffset)=='number'){
scrOfY=window.pageYOffset;
scrOfX=window.pageXOffset;
}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){
scrOfY=document.body.scrollTop;
scrOfX=document.body.scrollLeft;
}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){
scrOfY=document.documentElement.scrollTop;
scrOfX=document.documentElement.scrollLeft;
}
return {
x: scrOfX,
y: scrOfY
};}
(function(){
$.each(("touchstart touchmove touchend " +
"tap taphold " +
"swipe swipeleft swiperight " +
"scrollstart scrollstop").split(" "), function(i, name){
$.fn[name]=function(fn){
return fn ? this.bind(name, fn):this.trigger(name);
};
if($.attrFn){
$.attrFn[name]=true;
}});
var tapSettings={
startEvent: 'touchstart.iTap',
endEvent: 'touchend.iTap'
};
$.event.special.itap={
setup: function(){
var self=this,
$self=$(this),
start, stop;
$self.bind(tapSettings.startEvent, function(event){
start=getScrollXY();
$self.one(tapSettings.endEvent, function(event){
stop=getScrollXY();
var orgEvent=event||window.event;
event=$.event.fix(orgEvent);
event.type="itap";
if((start&&stop)&&(start.x==stop.x&&start.y==stop.y))($.event.dispatch||$.event.handle).call(self, event);
start=stop=undefined;
});
});
},
teardown: function(){
$(this).unbind(tapSettings.startEvent);
}};}());
(function(){
fullScreenApi={
supportsFullScreen: false,
isFullScreen: function(){
return false;
},
requestFullScreen: function(){},
cancelFullScreen: function(){},
fullScreenEventName: '',
prefix: ''
},
browserPrefixes='webkit moz o ms khtml'.split(' ');
if(typeof document.cancelFullScreen!='undefined'){
fullScreenApi.supportsFullScreen=true;
}else{
for (var i=0, il=browserPrefixes.length; i < il; i++){
fullScreenApi.prefix=browserPrefixes[i];
if(typeof document[fullScreenApi.prefix + 'CancelFullScreen']!='undefined'){
fullScreenApi.supportsFullScreen=true;
break;
}}
}
if(fullScreenApi.supportsFullScreen){
fullScreenApi.fullScreenEventName=fullScreenApi.prefix + 'fullscreenchange';
fullScreenApi.isFullScreen=function(){
switch (this.prefix){
case '':
return document.fullScreen;
case 'webkit':
return document.webkitIsFullScreen;
default:
return document[this.prefix + 'FullScreen'];
}}
fullScreenApi.requestFullScreen=function(el){
return (this.prefix==='') ? el.requestFullScreen():el[this.prefix + 'RequestFullScreen']();
}
fullScreenApi.cancelFullScreen=function(el){
return (this.prefix==='') ? document.cancelFullScreen():document[this.prefix + 'CancelFullScreen']();
}}
}());
(function(){
function uaMatch(ua){
ua=ua.toLowerCase();
var match=/(chrome)[ \/]([\w.]+)/.exec(ua) ||
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
/(msie) ([\w.]+)/.exec(ua) ||
ua.indexOf("compatible") < 0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)||[];
return {
browser: match[1]||"",
version: match[2]||"0"
};}
var matched=uaMatch(navigator.userAgent);
browser={};
if(matched.browser){
browser[matched.browser]=true;
browser.version=matched.version;
}
if(browser.chrome){
browser.webkit=true;
}else if(browser.webkit){
browser.safari=true;
}}());
(function(){
var prefixes=['', 'webkit', 'moz', 'ms', 'o'];
var el=document.createElement('div');
function testProp(prop){
for (var p=0, pl=prefixes.length; p < pl; p++){
var prefixedProp=prefixes[p] ? prefixes[p] + prop.charAt(0).toUpperCase() + prop.slice(1):prop;
if(el.style[prefixedProp]!==undefined){
return prefixedProp;
}}
}
transform=testProp('transform')||'';
gpuAcceleration=testProp('perspective') ? 'translateZ(0) ':'';
}());
var PluginDetect={version:"0.7.9",name:"PluginDetect",handler:function(c,b,a){return function(){c(b,a)}},openTag:"<",isDefined:function(b){return typeof b!="undefined"},isArray:function(b){return(/array/i).test(Object.prototype.toString.call(b))},isFunc:function(b){return typeof b=="function"},isString:function(b){return typeof b=="string"},isNum:function(b){return typeof b=="number"},isStrNum:function(b){return(typeof b=="string"&&(/\d/).test(b))},getNumRegx:/[\d][\d\.\_,-]*/,splitNumRegx:/[\.\_,-]/g,getNum:function(b,c){var d=this,a=d.isStrNum(b)?(d.isDefined(c)?new RegExp(c):d.getNumRegx).exec(b):null;return a?a[0]:null},compareNums:function(h,f,d){var e=this,c,b,a,g=parseInt;if(e.isStrNum(h)&&e.isStrNum(f)){if(e.isDefined(d)&&d.compareNums){return d.compareNums(h,f)}c=h.split(e.splitNumRegx);b=f.split(e.splitNumRegx);for(a=0;a<min(c.length,b.length);a++){if(g(c[a],10)>g(b[a],10)){return 1}if(g(c[a],10)<g(b[a],10)){return -1}}}return 0},formatNum:function(b,c){var d=this,a,e;if(!d.isStrNum(b)){return null}if(!d.isNum(c)){c=4}c--;e=b.replace(/\s/g,"").split(d.splitNumRegx).concat(["0","0","0","0"]);for(a=0;a<4;a++){if(/^(0+)(.+)$/.test(e[a])){e[a]=RegExp.$2}if(a>c||!(/\d/).test(e[a])){e[a]="0"}}return e.slice(0,4).join(",")},$$hasMimeType:function(a){return function(c){if(!a.isIE&&c){var f,e,b,d=a.isArray(c)?c:(a.isString(c)?[c]:[]);for(b=0;b<d.length;b++){if(a.isString(d[b])&&/[^\s]/.test(d[b])){f=navigator.mimeTypes[d[b]];e=f?f.enabledPlugin:0;if(e&&(e.name||e.description)){return f}}}}return null}},findNavPlugin:function(l,e,c){var j=this,h=new RegExp(l,"i"),d=(!j.isDefined(e)||e)?/\d/:0,k=c?new RegExp(c,"i"):0,a=navigator.plugins,g="",f,b,m;for(f=0;f<a.length;f++){m=a[f].description||g;b=a[f].name||g;if((h.test(m)&&(!d||d.test(RegExp.leftContext+RegExp.rightContext)))||(h.test(b)&&(!d||d.test(RegExp.leftContext+RegExp.rightContext)))){if(!k||!(k.test(m)||k.test(b))){return a[f]}}}return null},getMimeEnabledPlugin:function(k,m,c){var e=this,f,b=new RegExp(m,"i"),h="",g=c?new RegExp(c,"i"):0,a,l,d,j=e.isString(k)?[k]:k;for(d=0;d<j.length;d++){if((f=e.hasMimeType(j[d]))&&(f=f.enabledPlugin)){l=f.description||h;a=f.name||h;if(b.test(l)||b.test(a)){if(!g||!(g.test(l)||g.test(a))){return f}}}}return 0},getPluginFileVersion:function(f,b){var h=this,e,d,g,a,c=-1;if(h.OS>2||!f||!f.version||!(e=h.getNum(f.version))){return b}if(!b){return e}e=h.formatNum(e);b=h.formatNum(b);d=b.split(h.splitNumRegx);g=e.split(h.splitNumRegx);for(a=0;a<d.length;a++){if(c>-1&&a>c&&d[a]!="0"){return b}if(g[a]!=d[a]){if(c==-1){c=a}if(d[a]!="0"){return b}}}return e},AXO:window.ActiveXObject,getAXO:function(a){var f=null,d,b=this,c={};try{f=new b.AXO(a)}catch(d){}return f},convertFuncs:function(f){var a,g,d,b=/^[\$][\$]/,c=this;for(a in f){if(b.test(a)){try{g=a.slice(2);if(g.length>0&&!f[g]){f[g]=f[a](f);delete f[a]}}catch(d){}}}},initObj:function(e,b,d){var a,c;if(e){if(e[b[0]]==1||d){for(a=0;a<b.length;a=a+2){e[b[a]]=b[a+1]}}for(a in e){c=e[a];if(c&&c[b[0]]==1){this.initObj(c,b)}}}},initScript:function(){var d=this,a=navigator,h,i=document,l=a.userAgent||"",j=a.vendor||"",b=a.platform||"",k=a.product||"";d.initObj(d,["$",d]);for(h in d.Plugins){if(d.Plugins[h]){d.initObj(d.Plugins[h],["$",d,"$$",d.Plugins[h]],1)}}d.convertFuncs(d);d.OS=100;if(b){var g=["Win",1,"Mac",2,"Linux",3,"FreeBSD",4,"iPhone",21.1,"iPod",21.2,"iPad",21.3,"Win.*CE",22.1,"Win.*Mobile",22.2,"Pocket\\s*PC",22.3,"",100];for(h=g.length-2;h>=0;h=h-2){if(g[h]&&new RegExp(g[h],"i").test(b)){d.OS=g[h+1];break}}};d.head=i.getElementsByTagName("head")[0]||i.getElementsByTagName("body")[0]||i.body||null;d.isIE=new Function("return/*@cc_on!@*/!1")();d.verIE=d.isIE&&(/MSIE\s*(\d+\.?\d*)/i).test(l)?parseFloat(RegExp.$1,10):null;d.verIEfull=null;d.docModeIE=null;if(d.isIE){var f,n,c=document.createElement("div");try{c.style.behavior="url(#default#clientcaps)";d.verIEfull=(c.getComponentVersion("{89820200-ECBD-11CF-8B85-00AA005B4383}","componentid")).replace(/,/g,".")}catch(f){}n=parseFloat(d.verIEfull||"0",10);d.docModeIE=i.documentMode||((/back/i).test(i.compatMode||"")?5:n)||d.verIE;d.verIE=n||d.docModeIE};d.ActiveXEnabled=false;if(d.isIE){var h,m=["Msxml2.XMLHTTP","Msxml2.DOMDocument","Microsoft.XMLDOM","ShockwaveFlash.ShockwaveFlash","TDCCtl.TDCCtl","Shell.UIHelper","Scripting.Dictionary","wmplayer.ocx"];for(h=0;h<m.length;h++){if(d.getAXO(m[h])){d.ActiveXEnabled=true;break}}};d.isGecko=(/Gecko/i).test(k)&&(/Gecko\s*\/\s*\d/i).test(l);d.verGecko=d.isGecko?d.formatNum((/rv\s*\:\s*([\.\,\d]+)/i).test(l)?RegExp.$1:"0.9"):null;d.isChrome=(/Chrome\s*\/\s*(\d[\d\.]*)/i).test(l);d.verChrome=d.isChrome?d.formatNum(RegExp.$1):null;d.isSafari=((/Apple/i).test(j)||(!j&&!d.isChrome))&&(/Safari\s*\/\s*(\d[\d\.]*)/i).test(l);d.verSafari=d.isSafari&&(/Version\s*\/\s*(\d[\d\.]*)/i).test(l)?d.formatNum(RegExp.$1):null;d.isOpera=(/Opera\s*[\/]?\s*(\d+\.?\d*)/i).test(l);d.verOpera=d.isOpera&&((/Version\s*\/\s*(\d+\.?\d*)/i).test(l)||1)?parseFloat(RegExp.$1,10):null;d.addWinEvent("load",d.handler(d.runWLfuncs,d))},init:function(d){var c=this,b,d,a={status:-3,plugin:0};if(!c.isString(d)){return a}if(d.length==1){c.getVersionDelimiter=d;return a}d=d.toLowerCase().replace(/\s/g,"");b=c.Plugins[d];if(!b||!b.getVersion){return a}a.plugin=b;if(!c.isDefined(b.installed)){b.installed=null;b.version=null;b.version0=null;b.getVersionDone=null;b.pluginName=d}c.garbage=false;if(c.isIE&&!c.ActiveXEnabled&&d!=="java"){a.status=-2;return a}a.status=1;return a},fPush:function(b,a){var c=this;if(c.isArray(a)&&(c.isFunc(b)||(c.isArray(b)&&b.length>0&&c.isFunc(b[0])))){a.push(b)}},callArray:function(b){var c=this,a;if(c.isArray(b)){for(a=0;a<b.length;a++){if(b[a]===null){return}c.call(b[a]);b[a]=null}}},call:function(c){var b=this,a=b.isArray(c)?c.length:-1;if(a>0&&b.isFunc(c[0])){c[0](b,a>1?c[1]:0,a>2?c[2]:0,a>3?c[3]:0)}else{if(b.isFunc(c)){c(b)}}},getVersionDelimiter:",",$$getVersion:function(a){return function(g,d,c){var e=a.init(g),f,b,h={};if(e.status<0){return null};f=e.plugin;if(f.getVersionDone!=1){f.getVersion(null,d,c);if(f.getVersionDone===null){f.getVersionDone=1}}a.cleanup();b=(f.version||f.version0);b=b?b.replace(a.splitNumRegx,a.getVersionDelimiter):b;return b}},cleanup:function(){var a=this;if(a.garbage&&a.isDefined(window.CollectGarbage)){window.CollectGarbage()}},isActiveXObject:function(d,b){var f=this,a=false,g,c='<object width="1" height="1" style="display:none" '+d.getCodeBaseVersion(b)+">"+d.HTML+f.openTag+"/object>";if(!f.head){return a}f.head.insertBefore(document.createElement("object"),f.head.firstChild);f.head.firstChild.outerHTML=c;try{f.head.firstChild.classid=d.classID}catch(g){}try{if(f.head.firstChild.object){a=true}}catch(g){}try{if(a&&f.head.firstChild.readyState<4){f.garbage=true}}catch(g){}f.head.removeChild(f.head.firstChild);return a},codebaseSearch:function(f,b){var c=this;if(!c.ActiveXEnabled||!f){return null}if(f.BIfuncs&&f.BIfuncs.length&&f.BIfuncs[f.BIfuncs.length-1]!==null){c.callArray(f.BIfuncs)}var d,o=f.SEARCH,k={};if(c.isStrNum(b)){if(o.match&&o.min&&c.compareNums(b,o.min)<=0){return true}if(o.match&&o.max&&c.compareNums(b,o.max)>=0){return false}d=c.isActiveXObject(f,b);if(d&&(!o.min||c.compareNums(b,o.min)>0)){o.min=b}if(!d&&(!o.max||c.compareNums(b,o.max)<0)){o.max=b}return d};var e=[0,0,0,0],l=[].concat(o.digits),a=o.min?1:0,j,i,h,g,m,n=function(p,r){var q=[].concat(e);q[p]=r;return c.isActiveXObject(f,q.join(","))};if(o.max){g=o.max.split(c.splitNumRegx);for(j=0;j<g.length;j++){g[j]=parseInt(g[j],10)}if(g[0]<l[0]){l[0]=g[0]}}if(o.min){m=o.min.split(c.splitNumRegx);for(j=0;j<m.length;j++){m[j]=parseInt(m[j],10)}if(m[0]>e[0]){e[0]=m[0]}}if(m&&g){for(j=1;j<m.length;j++){if(m[j-1]!=g[j-1]){break}if(g[j]<l[j]){l[j]=g[j]}if(m[j]>e[j]){e[j]=m[j]}}}if(o.max){for(j=1;j<l.length;j++){if(g[j]>0&&l[j]==0&&l[j-1]<o.digits[j-1]){l[j-1]+=1;break}}};for(j=0;j<l.length;j++){h={};for(i=0;i<20;i++){if(l[j]-e[j]<1){break}d=round((l[j]+e[j])/2);if(h["a"+d]){break}h["a"+d]=1;if(n(j,d)){e[j]=d;a=1}else{l[j]=d}}l[j]=e[j];if(!a&&n(j,e[j])){a=1};if(!a){break}};return a?e.join(","):null},addWinEvent:function(d,c){var e=this,a=window,b;if(e.isFunc(c)){if(a.addEventListener){a.addEventListener(d,c,false)}else{if(a.attachEvent){a.attachEvent("on"+d,c)}else{b=a["on"+d];a["on"+d]=e.winHandler(c,b)}}}},winHandler:function(d,c){return function(){d();if(typeof c=="function"){c()}}},WLfuncs0:[],WLfuncs:[],runWLfuncs:function(a){var b={};a.winLoaded=true;a.callArray(a.WLfuncs0);a.callArray(a.WLfuncs);if(a.onDoneEmptyDiv){a.onDoneEmptyDiv()}},winLoaded:false,$$onWindowLoaded:function(a){return function(b){if(a.winLoaded){a.call(b)}else{a.fPush(b,a.WLfuncs)}}},div:null,divID:"plugindetect",divWidth:50,pluginSize:1,emptyDiv:function(){var d=this,b,h,c,a,f,g;if(d.div&&d.div.childNodes){for(b=d.div.childNodes.length-1;b>=0;b--){c=d.div.childNodes[b];if(c&&c.childNodes){for(h=c.childNodes.length-1;h>=0;h--){g=c.childNodes[h];try{c.removeChild(g)}catch(f){}}}if(c){try{d.div.removeChild(c)}catch(f){}}}}if(!d.div){a=document.getElementById(d.divID);if(a){d.div=a}}if(d.div&&d.div.parentNode){try{d.div.parentNode.removeChild(d.div)}catch(f){}d.div=null}},DONEfuncs:[],onDoneEmptyDiv:function(){var c=this,a,b;if(!c.winLoaded){return}if(c.WLfuncs&&c.WLfuncs.length&&c.WLfuncs[c.WLfuncs.length-1]!==null){return}for(a in c){b=c[a];if(b&&b.funcs){if(b.OTF==3){return}if(b.funcs.length&&b.funcs[b.funcs.length-1]!==null){return}}}for(a=0;a<c.DONEfuncs.length;a++){c.callArray(c.DONEfuncs)}c.emptyDiv()},getWidth:function(c){if(c){var a=c.scrollWidth||c.offsetWidth,b=this;if(b.isNum(a)){return a}}return -1},getTagStatus:function(m,g,a,b){var c=this,f,k=m.span,l=c.getWidth(k),h=a.span,j=c.getWidth(h),d=g.span,i=c.getWidth(d);if(!k||!h||!d||!c.getDOMobj(m)){return -2}if(j<i||l<0||j<0||i<0||i<=c.pluginSize||c.pluginSize<1){return 0}if(l>=i){return -1}try{if(l==c.pluginSize&&(!c.isIE||c.getDOMobj(m).readyState==4)){if(!m.winLoaded&&c.winLoaded){return 1}if(m.winLoaded&&c.isNum(b)){if(!c.isNum(m.count)){m.count=b}if(b-m.count>=10){return 1}}}}catch(f){}return 0},getDOMobj:function(g,a){var f,d=this,c=g?g.span:0,b=c&&c.firstChild?1:0;try{if(b&&a){d.div.focus()}}catch(f){}return b?c.firstChild:null},setStyle:function(b,g){var f=b.style,a,d,c=this;if(f&&g){for(a=0;a<g.length;a=a+2){try{f[g[a]]=g[a+1]}catch(d){}}}},insertDivInBody:function(i,g){var f,c=this,h="pd33993399",b=null,d=g?window.top.document:window.document,a=d.getElementsByTagName("body")[0]||d.body;if(!a){try{d.write('<div id="'+h+'">.'+c.openTag+"/div>");b=d.getElementById(h)}catch(f){}}a=d.getElementsByTagName("body")[0]||d.body;if(a){a.insertBefore(i,a.firstChild);if(b){a.removeChild(b)}}},insertHTML:function(f,b,g,a,k){var l,m=document,j=this,p,o=m.createElement("span"),n,i;var c=["outlineStyle","none","borderStyle","none","padding","0px","margin","0px","visibility","visible"];var h="outline-style:none;border-style:none;padding:0px;margin:0px;visibility:visible;";if(!j.isDefined(a)){a=""}if(j.isString(f)&&(/[^\s]/).test(f)){f=f.toLowerCase().replace(/\s/g,"");p=j.openTag+f+' width="'+j.pluginSize+'" height="'+j.pluginSize+'" ';p+='style="'+h+'display:inline;" ';for(n=0;n<b.length;n=n+2){if(/[^\s]/.test(b[n+1])){p+=b[n]+'="'+b[n+1]+'" '}}p+=">";for(n=0;n<g.length;n=n+2){if(/[^\s]/.test(g[n+1])){p+=j.openTag+'param name="'+g[n]+'" value="'+g[n+1]+'" />'}}p+=a+j.openTag+"/"+f+">"}else{p=a}if(!j.div){i=m.getElementById(j.divID);if(i){j.div=i}else{j.div=m.createElement("div");j.div.id=j.divID}j.setStyle(j.div,c.concat(["width",j.divWidth+"px","height",(j.pluginSize+3)+"px","fontSize",(j.pluginSize+3)+"px","lineHeight",(j.pluginSize+3)+"px","verticalAlign","baseline","display","block"]));if(!i){j.setStyle(j.div,["position","absolute","right","0px","top","0px"]);j.insertDivInBody(j.div)}}if(j.div&&j.div.parentNode){j.setStyle(o,c.concat(["fontSize",(j.pluginSize+3)+"px","lineHeight",(j.pluginSize+3)+"px","verticalAlign","baseline","display","inline"]));try{o.innerHTML=p}catch(l){};try{j.div.appendChild(o)}catch(l){};return{span:o,winLoaded:j.winLoaded,tagName:f,outerHTML:p}}return{span:null,winLoaded:j.winLoaded,tagName:"",outerHTML:p}},Plugins:{quicktime:{mimeType:["video/quicktime","application/x-quicktimeplayer","image/x-macpaint","image/x-quicktime"],progID:"QuickTimeCheckObject.QuickTimeCheck.1",progID0:"QuickTime.QuickTime",classID:"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B",minIEver:7,HTML:'<param name="src" value="" /><param name="controller" value="false" />',getCodeBaseVersion:function(a){return'codebase="#version='+a+'"'},SEARCH:{min:0,max:0,match:0,digits:[16,128,128,0]},getVersion:function(c){var f=this,d=f.$,a=null,e=null,b;if(!d.isIE){if(d.hasMimeType(f.mimeType)){e=d.OS!=3?d.findNavPlugin("QuickTime.*Plug-?in",0):null;if(e&&e.name){a=d.getNum(e.name)}}}else{if(d.isStrNum(c)){b=c.split(d.splitNumRegx);if(b.length>3&&parseInt(b[3],10)>0){b[3]="9999"}c=b.join(",")}if(d.isStrNum(c)&&d.verIE>=f.minIEver&&f.canUseIsMin()>0){f.installed=f.isMin(c);f.getVersionDone=0;return}f.getVersionDone=1;if(!a&&d.verIE>=f.minIEver){a=f.CDBASE2VER(d.codebaseSearch(f))}if(!a){e=d.getAXO(f.progID);if(e&&e.QuickTimeVersion){a=e.QuickTimeVersion.toString(16);a=parseInt(a.charAt(0),16)+"."+parseInt(a.charAt(1),16)+"."+parseInt(a.charAt(2),16)}}}f.installed=a?1:(e?0:-1);f.version=d.formatNum(a,3)},cdbaseUpper:["7,60,0,0","0,0,0,0"],cdbaseLower:["7,50,0,0",null],cdbase2ver:[function(c,b){var a=b.split(c.$.splitNumRegx);return[a[0],a[1].charAt(0),a[1].charAt(1),a[2]].join(",")},null],CDBASE2VER:function(f){var e=this,c=e.$,b,a=e.cdbaseUpper,d=e.cdbaseLower;if(f){f=c.formatNum(f);for(b=0;b<a.length;b++){if(a[b]&&c.compareNums(f,a[b])<0&&d[b]&&c.compareNums(f,d[b])>=0&&e.cdbase2ver[b]){return e.cdbase2ver[b](e,f)}}}return f},canUseIsMin:function(){var f=this,d=f.$,b,c=f.canUseIsMin,a=f.cdbaseUpper,e=f.cdbaseLower;if(!c.value){c.value=-1;for(b=0;b<a.length;b++){if(a[b]&&d.codebaseSearch(f,a[b])){c.value=1;break}if(e[b]&&d.codebaseSearch(f,e[b])){c.value=-1;break}}}f.SEARCH.match=c.value==1?1:0;return c.value},isMin:function(c){var b=this,a=b.$;return a.codebaseSearch(b,c)?0.7:-1}},flash:{mimeType:"application/x-shockwave-flash",progID:"ShockwaveFlash.ShockwaveFlash",classID:"clsid:D27CDB6E-AE6D-11CF-96B8-444553540000",getVersion:function(){var b=function(i){if(!i){return null}var e=/[\d][\d\,\.\s]*[rRdD]{0,1}[\d\,]*/.exec(i);return e?e[0].replace(/[rRdD\.]/g,",").replace(/\s/g,""):null};var j=this,g=j.$,k,h,l=null,c=null,a=null,f,m,d;if(!g.isIE){m=g.hasMimeType(j.mimeType);if(m){f=g.getDOMobj(g.insertHTML("object",["type",j.mimeType],[],"",j));try{l=g.getNum(f.GetVariable("$version"))}catch(k){}}if(!l){d=m?m.enabledPlugin:null;if(d&&d.description){l=b(d.description)}if(l){l=g.getPluginFileVersion(d,l)}}}else{for(h=15;h>2;h--){c=g.getAXO(j.progID+"."+h);if(c){a=h.toString();break}}if(!c){c=g.getAXO(j.progID)}if(a=="6"){try{c.AllowScriptAccess="always"}catch(k){return"6,0,21,0"}}try{l=b(c.GetVariable("$version"))}catch(k){}if(!l&&a){l=a}}j.installed=l?1:-1;j.version=g.formatNum(l);return true}},shockwave:{mimeType:"application/x-director",progID:"SWCtl.SWCtl",classID:"clsid:166B1BCA-3F9C-11CF-8075-444553540000",getVersion:function(){var a=null,b=null,g,f,d=this,c=d.$;if(!c.isIE){f=c.findNavPlugin("Shockwave\\s*for\\s*Director");if(f&&f.description&&c.hasMimeType(d.mimeType)){a=c.getNum(f.description)}if(a){a=c.getPluginFileVersion(f,a)}}else{try{b=c.getAXO(d.progID).ShockwaveVersion("")}catch(g){}if(c.isString(b)&&b.length>0){a=c.getNum(b)}else{if(c.getAXO(d.progID+".8")){a="8"}else{if(c.getAXO(d.progID+".7")){a="7"}else{if(c.getAXO(d.progID+".1")){a="6"}}}}}d.installed=a?1:-1;d.version=c.formatNum(a)}},zz:0}};PluginDetect.initScript();
var gArgCountErr='The "%%" function requires an even number of arguments.\nArguments should be in the form "atttributeName", "attributeValue", ...',gTagAttrs=null,gQTGeneratorVersion=1;function AC_QuickTimeVersion(){return gQTGeneratorVersion}function _QTComplain(a,b){b=b.replace("%%",a);alert(b)}function _QTAddAttribute(a,b,c){var d;d=gTagAttrs[a+b];null==d&&(d=gTagAttrs[b]);return null!=d?(0==b.indexOf(a)&&null==c&&(c=b.substring(a.length)),null==c&&(c=b),c+'="'+d+'" '):""}function _QTAddObjectAttr(a,b){if(0==a.indexOf("emb#"))return"";0==a.indexOf("obj#")&&null==b&&(b=a.substring(4));return _QTAddAttribute("obj#",a,b)}function _QTAddEmbedAttr(a,b){if(0==a.indexOf("obj#"))return"";0==a.indexOf("emb#")&&null==b&&(b=a.substring(4));return _QTAddAttribute("emb#",a,b)}function _QTAddObjectParam(a,b){var c,d="",e=b?" />":">";-1==a.indexOf("emb#")&&(c=gTagAttrs["obj#"+a],null==c&&(c=gTagAttrs[a]),0==a.indexOf("obj#")&&(a=a.substring(4)),null!=c&&(d='  <param name="'+a+'" value="'+c+'"'+e+"\n"));return d}function _QTDeleteTagAttrs(){for(var a=0;a<arguments.length;a++){var b=arguments[a];delete gTagAttrs[b];delete gTagAttrs["emb#"+b];delete gTagAttrs["obj#"+b]}}function _QTGenerate(a,b,c){if(4>c.length||0!=c.length%2)return _QTComplain(a,gArgCountErr),"";gTagAttrs=[];gTagAttrs.src=c[0];gTagAttrs.width=c[1];gTagAttrs.height=c[2];gTagAttrs.classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B";gTagAttrs.pluginspage="http://www.apple.com/quicktime/download/";a=c[3];if(null==a||""==a)a="6,0,2,0";gTagAttrs.codebase="http://www.apple.com/qtactivex/qtplugin.cab#version="+a;for(var d,e=4;e<c.length;e+=2)d=c[e].toLowerCase(),a=c[e+1],"name"==d||"id"==d?gTagAttrs.name=a:gTagAttrs[d]=a;c="<object "+_QTAddObjectAttr("classid")+_QTAddObjectAttr("width")+_QTAddObjectAttr("height")+_QTAddObjectAttr("codebase")+_QTAddObjectAttr("name","id")+_QTAddObjectAttr("tabindex")+_QTAddObjectAttr("hspace")+_QTAddObjectAttr("vspace")+_QTAddObjectAttr("border")+_QTAddObjectAttr("align")+_QTAddObjectAttr("class")+_QTAddObjectAttr("title")+_QTAddObjectAttr("accesskey")+_QTAddObjectAttr("noexternaldata")+">\n"+_QTAddObjectParam("src",b);e="  <embed "+_QTAddEmbedAttr("src")+_QTAddEmbedAttr("width")+_QTAddEmbedAttr("height")+_QTAddEmbedAttr("pluginspage")+_QTAddEmbedAttr("name")+_QTAddEmbedAttr("align")+_QTAddEmbedAttr("tabindex");_QTDeleteTagAttrs("src","width","height","pluginspage","classid","codebase","name","tabindex","hspace","vspace","border","align","noexternaldata","class","title","accesskey");for(d in gTagAttrs)a=gTagAttrs[d],null!=a&&(e+=_QTAddEmbedAttr(d),c+=_QTAddObjectParam(d,b));return c+e+"> </embed>\n</object>"}function QT_GenerateOBJECTText(){return _QTGenerate("QT_GenerateOBJECTText",!1,arguments)};
(function(){function e(a){a=a||location.href;return"#"+a.replace(/^[^#]*#?(.*)$/,"$1")}var k=document,b,f=$.event.special,p=k.documentMode,m="oniLightBoxHashChange"in window&&(void 0===p||7<p);$.fn.iLightBoxHashChange=function(a){return a?this.bind("iLightBoxHashChange",a):this.trigger("iLightBoxHashChange")};$.fn.iLightBoxHashChange.delay=50;f.iLightBoxHashChange=$.extend(f.iLightBoxHashChange,{setup:function(){if(m)return!1;$(b.start)},teardown:function(){if(m)return!1;$(b.stop)}});b=function(){function a(){var c=
e(),d=f(l);c!==l?(n(l=c,d),$(window).trigger("iLightBoxHashChange")):d!==l&&(location.href=location.href.replace(/#.*/,"")+d);g=setTimeout(a,$.fn.iLightBoxHashChange.delay)}var h={},g,l=e(),b=function(c){return c},n=b,f=b;h.start=function(){g||a()};h.stop=function(){g&&clearTimeout(g);g=void 0};browser.msie&&!m&&function(){var c,d;h.start=function(){c||(d=(d=$.fn.iLightBoxHashChange.src)&&d+e(),c=$('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){d||n(e());a()}).attr("src",d||
"javascript:0").insertAfter("body")[0].contentWindow,k.onpropertychange=function(){try{"title"===event.propertyName&&(c.document.title=k.title)}catch(a){}})};h.stop=b;f=function(){return e(c.location.href)};n=function(a,d){var b=c.document,e=$.fn.iLightBoxHashChange.domain;a!==d&&(b.title=k.title,b.open(),e&&b.write('<script>document.domain="'+e+'"\x3c/script>'),b.close(),c.location.hash=a)}}();return h}()})();
if(!Array.prototype.filter){
Array.prototype.filter=function(fun ){
"use strict";
if(this==null)
throw new TypeError();
var t=Object(this);
var len=t.length >>> 0;
if(typeof fun!="function")
throw new TypeError();
var res=[];
var thisp=arguments[1];
for (var i=0; i < len; i++){
if(i in t){
var val=t[i];
if(fun.call(thisp, val, i, t))
res.push(val);
}}
return res;
};}
if(!Array.prototype.indexOf){
Array.prototype.indexOf=function(searchElement, fromIndex){
var k;
if(this==null){
throw new TypeError('"this" is null or not defined');
}
var O=Object(this);
var len=O.length >>> 0;
if(len===0){
return -1;
}
var n=+fromIndex||0;
if(abs(n)===Infinity){
n=0;
}
if(n >=len){
return -1;
}
k=max(n >=0 ? n:len - abs(n), 0);
while (k < len){
var kValue;
if(k in O&&O[k]===searchElement){
return k;
}
k++;
}
return -1;
};}
if(!Array.prototype.lastIndexOf){
Array.prototype.lastIndexOf=function(searchElement ){
"use strict";
if(this==null)
throw new TypeError();
var t=Object(this);
var len=t.length >>> 0;
if(len===0)
return -1;
var n=len;
if(arguments.length > 1){
n=Number(arguments[1]);
if(n!=n)
n=0;
else if(n!=0&&n!=(1 / 0)&&n!=-(1 / 0))
n=(n > 0||-1) * floor(abs(n));
}
var k=n >=0 ? min(n, len - 1):len - abs(n);
for (; k >=0; k--){
if(k in t&&t[k]===searchElement)
return k;
}
return -1;
};}})(jQuery, this);
"function"!=typeof Object.create&&(Object.create=function(t){function i(){}return i.prototype=t,new i}),function(t,i,s){var e={init:function(i,s){this.$elem=t(s),this.options=t.extend({},t.fn.owlCarousel.options,this.$elem.data(),i),this.userOptions=i,this.loadContent()},loadContent:function(){function i(t){var i,s="";if("function"==typeof e.options.jsonSuccess)e.options.jsonSuccess.apply(this,[t]);else{for(i in t.owl)t.owl.hasOwnProperty(i)&&(s+=t.owl[i].item);e.$elem.html(s)}e.logIn()}var s,e=this;"function"==typeof e.options.beforeInit&&e.options.beforeInit.apply(this,[e.$elem]),"string"==typeof e.options.jsonPath?(s=e.options.jsonPath,t.getJSON(s,i)):e.logIn()},logIn:function(){this.$elem.data("owl-originalStyles",this.$elem.attr("style")),this.$elem.data("owl-originalClasses",this.$elem.attr("class")),this.$elem.css({opacity:0}),this.orignalItems=this.options.items,this.checkBrowser(),this.wrapperWidth=0,this.checkVisible=null,this.setVars()},setVars:function(){return 0===this.$elem.children().length?!1:(this.baseClass(),this.eventTypes(),this.$userItems=this.$elem.children(),this.itemsAmount=this.$userItems.length,this.wrapItems(),this.$owlItems=this.$elem.find(".owl-item"),this.$owlWrapper=this.$elem.find(".owl-wrapper"),this.playDirection="next",this.prevItem=0,this.prevArr=[0],this.currentItem=0,this.customEvents(),void this.onStartup())},onStartup:function(){this.updateItems(),this.calculateAll(),this.buildControls(),this.updateControls(),this.response(),this.moveEvents(),this.stopOnHover(),this.owlStatus(),!1!==this.options.transitionStyle&&this.transitionTypes(this.options.transitionStyle),!0===this.options.autoPlay&&(this.options.autoPlay=5e3),this.play(),this.$elem.find(".owl-wrapper").css("display","block"),this.$elem.is(":visible")?this.$elem.css("opacity",1):this.watchVisibility(),this.onstartup=!1,this.eachMoveUpdate(),"function"==typeof this.options.afterInit&&this.options.afterInit.apply(this,[this.$elem])},eachMoveUpdate:function(){!0===this.options.lazyLoad&&this.lazyLoad(),!0===this.options.autoHeight&&this.autoHeight(),this.onVisibleItems(),"function"==typeof this.options.afterAction&&this.options.afterAction.apply(this,[this.$elem])},updateVars:function(){"function"==typeof this.options.beforeUpdate&&this.options.beforeUpdate.apply(this,[this.$elem]),this.watchVisibility(),this.updateItems(),this.calculateAll(),this.updatePosition(),this.updateControls(),this.eachMoveUpdate(),"function"==typeof this.options.afterUpdate&&this.options.afterUpdate.apply(this,[this.$elem])},reload:function(){var t=this;i.setTimeout(function(){t.updateVars()},0)},watchVisibility:function(){var t=this;return!1!==t.$elem.is(":visible")?!1:(t.$elem.css({opacity:0}),i.clearInterval(t.autoPlayInterval),i.clearInterval(t.checkVisible),void(t.checkVisible=i.setInterval(function(){t.$elem.is(":visible")&&(t.reload(),t.$elem.animate({opacity:1},200),i.clearInterval(t.checkVisible))},500)))},wrapItems:function(){this.$userItems.wrapAll('<div class="owl-wrapper">').wrap('<div class="owl-item"></div>'),this.$elem.find(".owl-wrapper").wrap('<div class="owl-wrapper-outer">'),this.wrapperOuter=this.$elem.find(".owl-wrapper-outer"),this.$elem.css("display","block")},baseClass:function(){var t=this.$elem.hasClass(this.options.baseClass),i=this.$elem.hasClass(this.options.theme);t||this.$elem.addClass(this.options.baseClass),i||this.$elem.addClass(this.options.theme)},updateItems:function(){var i,s;if(!1===this.options.responsive)return!1;if(!0===this.options.singleItem)return this.options.items=this.orignalItems=1,this.options.itemsCustom=!1,this.options.itemsDesktop=!1,this.options.itemsDesktopSmall=!1,this.options.itemsTablet=!1,this.options.itemsTabletSmall=!1,this.options.itemsMobile=!1;if(i=t(this.options.responsiveBaseWidth).width(),i>(this.options.itemsDesktop[0]||this.orignalItems)&&(this.options.items=this.orignalItems),!1!==this.options.itemsCustom)for(this.options.itemsCustom.sort(function(t,i){return t[0]-i[0]}),s=0;s<this.options.itemsCustom.length;s+=1)this.options.itemsCustom[s][0]<=i&&(this.options.items=this.options.itemsCustom[s][1]);else i<=this.options.itemsDesktop[0]&&!1!==this.options.itemsDesktop&&(this.options.items=this.options.itemsDesktop[1]),i<=this.options.itemsDesktopSmall[0]&&!1!==this.options.itemsDesktopSmall&&(this.options.items=this.options.itemsDesktopSmall[1]),i<=this.options.itemsTablet[0]&&!1!==this.options.itemsTablet&&(this.options.items=this.options.itemsTablet[1]),i<=this.options.itemsTabletSmall[0]&&!1!==this.options.itemsTabletSmall&&(this.options.items=this.options.itemsTabletSmall[1]),i<=this.options.itemsMobile[0]&&!1!==this.options.itemsMobile&&(this.options.items=this.options.itemsMobile[1]);this.options.items>this.itemsAmount&&!0===this.options.itemsScaleUp&&(this.options.items=this.itemsAmount)},response:function(){var s,e,o=this;return!0!==o.options.responsive?!1:(e=t(i).width(),o.resizer=function(){t(i).width()!==e&&(!1!==o.options.autoPlay&&i.clearInterval(o.autoPlayInterval),i.clearTimeout(s),s=i.setTimeout(function(){e=t(i).width(),o.updateVars()},o.options.responsiveRefreshRate))},void t(i).resize(o.resizer))},updatePosition:function(){this.jumpTo(this.currentItem),!1!==this.options.autoPlay&&this.checkAp()},appendItemsSizes:function(){var i=this,s=0,e=i.itemsAmount-i.options.items;i.$owlItems.each(function(o){var n=t(this);n.css({width:i.itemWidth}).data("owl-item",Number(o)),(0===o%i.options.items||o===e)&&(o>e||(s+=1)),n.data("owl-roundPages",s)})},appendWrapperSizes:function(){this.$owlWrapper.css({width:this.$owlItems.length*this.itemWidth*2,left:0}),this.appendItemsSizes()},calculateAll:function(){this.calculateWidth(),this.appendWrapperSizes(),this.loops(),this.max()},calculateWidth:function(){this.itemWidth=Math.round(this.$elem.width()/this.options.items)},max:function(){var t=-1*(this.itemsAmount*this.itemWidth-this.options.items*this.itemWidth);return this.options.items>this.itemsAmount?this.maximumPixels=t=this.maximumItem=0:(this.maximumItem=this.itemsAmount-this.options.items,this.maximumPixels=t),t},min:function(){return 0},loops:function(){var i,s,e=0,o=0;for(this.positionsInArray=[0],this.pagesInArray=[],i=0;i<this.itemsAmount;i+=1)o+=this.itemWidth,this.positionsInArray.push(-o),!0===this.options.scrollPerPage&&(s=t(this.$owlItems[i]),s=s.data("owl-roundPages"),s!==e&&(this.pagesInArray[e]=this.positionsInArray[i],e=s))},buildControls:function(){(!0===this.options.navigation||!0===this.options.pagination)&&(this.owlControls=t('<div class="owl-controls"/>').toggleClass("clickable",!this.browser.isTouch).appendTo(this.$elem)),!0===this.options.pagination&&this.buildPagination(),!0===this.options.navigation&&this.buildButtons()},buildButtons:function(){var i=this,s=t('<div class="owl-buttons"/>');i.owlControls.append(s),i.buttonPrev=t("<div/>",{"class":"owl-prev",html:i.options.navigationText[0]||""}),i.buttonNext=t("<div/>",{"class":"owl-next",html:i.options.navigationText[1]||""}),s.append(i.buttonPrev).append(i.buttonNext),s.on("touchstart.owlControls mousedown.owlControls",'div[class^="owl"]',function(t){t.preventDefault()}),s.on("touchend.owlControls mouseup.owlControls",'div[class^="owl"]',function(s){s.preventDefault(),t(this).hasClass("owl-next")?i.next():i.prev()})},buildPagination:function(){var i=this;i.paginationWrapper=t('<div class="owl-pagination"/>'),i.owlControls.append(i.paginationWrapper),i.paginationWrapper.on("touchend.owlControls mouseup.owlControls",".owl-page",function(s){s.preventDefault(),Number(t(this).data("owl-page"))!==i.currentItem&&i.goTo(Number(t(this).data("owl-page")),!0)})},updatePagination:function(){var i,s,e,o,n,a;if(!1===this.options.pagination)return!1;for(this.paginationWrapper.html(""),i=0,s=this.itemsAmount-this.itemsAmount%this.options.items,o=0;o<this.itemsAmount;o+=1)0===o%this.options.items&&(i+=1,s===o&&(e=this.itemsAmount-this.options.items),n=t("<div/>",{"class":"owl-page"}),a=t("<span></span>",{text:!0===this.options.paginationNumbers?i:"","class":!0===this.options.paginationNumbers?"owl-numbers":""}),n.append(a),n.data("owl-page",s===o?e:o),n.data("owl-roundPages",i),this.paginationWrapper.append(n));this.checkPagination()},checkPagination:function(){var i=this;return!1===i.options.pagination?!1:void i.paginationWrapper.find(".owl-page").each(function(){t(this).data("owl-roundPages")===t(i.$owlItems[i.currentItem]).data("owl-roundPages")&&(i.paginationWrapper.find(".owl-page").removeClass("active"),t(this).addClass("active"))})},checkNavigation:function(){return!1===this.options.navigation?!1:void(!1===this.options.rewindNav&&(0===this.currentItem&&0===this.maximumItem?(this.buttonPrev.addClass("disabled"),this.buttonNext.addClass("disabled")):0===this.currentItem&&0!==this.maximumItem?(this.buttonPrev.addClass("disabled"),this.buttonNext.removeClass("disabled")):this.currentItem===this.maximumItem?(this.buttonPrev.removeClass("disabled"),this.buttonNext.addClass("disabled")):0!==this.currentItem&&this.currentItem!==this.maximumItem&&(this.buttonPrev.removeClass("disabled"),this.buttonNext.removeClass("disabled"))))},updateControls:function(){this.updatePagination(),this.checkNavigation(),this.owlControls&&(this.options.items>=this.itemsAmount?this.owlControls.hide():this.owlControls.show())},destroyControls:function(){this.owlControls&&this.owlControls.remove()},next:function(t){if(this.isTransition)return!1;if(this.currentItem+=!0===this.options.scrollPerPage?this.options.items:1,this.currentItem>this.maximumItem+(!0===this.options.scrollPerPage?this.options.items-1:0)){if(!0!==this.options.rewindNav)return this.currentItem=this.maximumItem,!1;this.currentItem=0,t="rewind"}this.goTo(this.currentItem,t)},prev:function(t){if(this.isTransition)return!1;if(this.currentItem=!0===this.options.scrollPerPage&&0<this.currentItem&&this.currentItem<this.options.items?0:this.currentItem-(!0===this.options.scrollPerPage?this.options.items:1),0>this.currentItem){if(!0!==this.options.rewindNav)return this.currentItem=0,!1;this.currentItem=this.maximumItem,t="rewind"}this.goTo(this.currentItem,t)},goTo:function(t,s,e){var o=this;return o.isTransition?!1:("function"==typeof o.options.beforeMove&&o.options.beforeMove.apply(this,[o.$elem]),t>=o.maximumItem?t=o.maximumItem:0>=t&&(t=0),o.currentItem=o.owl.currentItem=t,!1!==o.options.transitionStyle&&"drag"!==e&&1===o.options.items&&!0===o.browser.support3d?(o.swapSpeed(0),!0===o.browser.support3d?o.transition3d(o.positionsInArray[t]):o.css2slide(o.positionsInArray[t],1),o.afterGo(),o.singleItemTransition(),!1):(t=o.positionsInArray[t],!0===o.browser.support3d?(o.isCss3Finish=!1,!0===s?(o.swapSpeed("paginationSpeed"),i.setTimeout(function(){o.isCss3Finish=!0},o.options.paginationSpeed)):"rewind"===s?(o.swapSpeed(o.options.rewindSpeed),i.setTimeout(function(){o.isCss3Finish=!0},o.options.rewindSpeed)):(o.swapSpeed("slideSpeed"),i.setTimeout(function(){o.isCss3Finish=!0},o.options.slideSpeed)),o.transition3d(t)):!0===s?o.css2slide(t,o.options.paginationSpeed):"rewind"===s?o.css2slide(t,o.options.rewindSpeed):o.css2slide(t,o.options.slideSpeed),void o.afterGo()))},jumpTo:function(t){"function"==typeof this.options.beforeMove&&this.options.beforeMove.apply(this,[this.$elem]),t>=this.maximumItem||-1===t?t=this.maximumItem:0>=t&&(t=0),this.swapSpeed(0),!0===this.browser.support3d?this.transition3d(this.positionsInArray[t]):this.css2slide(this.positionsInArray[t],1),this.currentItem=this.owl.currentItem=t,this.afterGo()},afterGo:function(){this.prevArr.push(this.currentItem),this.prevItem=this.owl.prevItem=this.prevArr[this.prevArr.length-2],this.prevArr.shift(0),this.prevItem!==this.currentItem&&(this.checkPagination(),this.checkNavigation(),this.eachMoveUpdate(),!1!==this.options.autoPlay&&this.checkAp()),"function"==typeof this.options.afterMove&&this.prevItem!==this.currentItem&&this.options.afterMove.apply(this,[this.$elem])},stop:function(){this.apStatus="stop",i.clearInterval(this.autoPlayInterval)},checkAp:function(){"stop"!==this.apStatus&&this.play()},play:function(){var t=this;return t.apStatus="play",!1===t.options.autoPlay?!1:(i.clearInterval(t.autoPlayInterval),void(t.autoPlayInterval=i.setInterval(function(){t.next(!0)},t.options.autoPlay)))},swapSpeed:function(t){"slideSpeed"===t?this.$owlWrapper.css(this.addCssSpeed(this.options.slideSpeed)):"paginationSpeed"===t?this.$owlWrapper.css(this.addCssSpeed(this.options.paginationSpeed)):"string"!=typeof t&&this.$owlWrapper.css(this.addCssSpeed(t))},addCssSpeed:function(t){return{"-webkit-transition":"all "+t+"ms ease","-moz-transition":"all "+t+"ms ease","-o-transition":"all "+t+"ms ease",transition:"all "+t+"ms ease"}},removeTransition:function(){return{"-webkit-transition":"","-moz-transition":"","-o-transition":"",transition:""}},doTranslate:function(t){return{"-webkit-transform":"translate3d("+t+"px, 0px, 0px)","-moz-transform":"translate3d("+t+"px, 0px, 0px)","-o-transform":"translate3d("+t+"px, 0px, 0px)","-ms-transform":"translate3d("+t+"px, 0px, 0px)",transform:"translate3d("+t+"px, 0px,0px)"}},transition3d:function(t){this.$owlWrapper.css(this.doTranslate(t))},css2move:function(t){this.$owlWrapper.css({left:t})},css2slide:function(t,i){var s=this;s.isCssFinish=!1,s.$owlWrapper.stop(!0,!0).animate({left:t},{duration:i||s.options.slideSpeed,complete:function(){s.isCssFinish=!0}})},checkBrowser:function(){var t=s.createElement("div");t.style.cssText="  -moz-transform:translate3d(0px, 0px, 0px); -ms-transform:translate3d(0px, 0px, 0px); -o-transform:translate3d(0px, 0px, 0px); -webkit-transform:translate3d(0px, 0px, 0px); transform:translate3d(0px, 0px, 0px)",t=t.style.cssText.match(/translate3d\(0px, 0px, 0px\)/g),this.browser={support3d:null!==t&&1<=t.length,isTouch:"ontouchstart"in i||i.navigator.msMaxTouchPoints}},moveEvents:function(){(!1!==this.options.mouseDrag||!1!==this.options.touchDrag)&&(this.gestures(),this.disabledEvents())},eventTypes:function(){var t=["s","e","x"];this.ev_types={},!0===this.options.mouseDrag&&!0===this.options.touchDrag?t=["touchstart.owl mousedown.owl","touchmove.owl mousemove.owl","touchend.owl touchcancel.owl mouseup.owl"]:!1===this.options.mouseDrag&&!0===this.options.touchDrag?t=["touchstart.owl","touchmove.owl","touchend.owl touchcancel.owl"]:!0===this.options.mouseDrag&&!1===this.options.touchDrag&&(t=["mousedown.owl","mousemove.owl","mouseup.owl"]),this.ev_types.start=t[0],this.ev_types.move=t[1],this.ev_types.end=t[2]},disabledEvents:function(){this.$elem.on("dragstart.owl",function(t){t.preventDefault()}),this.$elem.on("mousedown.disableTextSelect",function(i){return t(i.target).is("input, textarea, select, option")})},gestures:function(){function e(t){if(void 0!==t.touches)return{x:t.touches[0].pageX,y:t.touches[0].pageY};if(void 0===t.touches){if(void 0!==t.pageX)return{x:t.pageX,y:t.pageY};if(void 0===t.pageX)return{x:t.clientX,y:t.clientY}}}function o(i){"on"===i?(t(s).on(r.ev_types.move,n),t(s).on(r.ev_types.end,a)):"off"===i&&(t(s).off(r.ev_types.move),t(s).off(r.ev_types.end))}function n(o){o=o.originalEvent||o||i.event,r.newPosX=e(o).x-l.offsetX,r.newPosY=e(o).y-l.offsetY,r.newRelativeX=r.newPosX-l.relativePos,"function"==typeof r.options.startDragging&&!0!==l.dragging&&0!==r.newRelativeX&&(l.dragging=!0,r.options.startDragging.apply(r,[r.$elem])),(8<r.newRelativeX||-8>r.newRelativeX)&&!0===r.browser.isTouch&&(void 0!==o.preventDefault?o.preventDefault():o.returnValue=!1,l.sliding=!0),(10<r.newPosY||-10>r.newPosY)&&!1===l.sliding&&t(s).off("touchmove.owl"),r.newPosX=Math.max(Math.min(r.newPosX,r.newRelativeX/5),r.maximumPixels+r.newRelativeX/5),!0===r.browser.support3d?r.transition3d(r.newPosX):r.css2move(r.newPosX)}function a(s){s=s.originalEvent||s||i.event;var e;s.target=s.target||s.srcElement,l.dragging=!1,!0!==r.browser.isTouch&&r.$owlWrapper.removeClass("grabbing"),r.dragDirection=0>r.newRelativeX?r.owl.dragDirection="left":r.owl.dragDirection="right",0!==r.newRelativeX&&(e=r.getNewPosition(),r.goTo(e,!1,"drag"),l.targetElement===s.target&&!0!==r.browser.isTouch&&(t(s.target).on("click.disable",function(i){i.stopImmediatePropagation(),i.stopPropagation(),i.preventDefault(),t(i.target).off("click.disable")}),s=t._data(s.target,"events").click,e=s.pop(),s.splice(0,0,e))),o("off")}var r=this,l={offsetX:0,offsetY:0,baseElWidth:0,relativePos:0,position:null,minSwipe:null,maxSwipe:null,sliding:null,dargging:null,targetElement:null};r.isCssFinish=!0,r.$elem.on(r.ev_types.start,".owl-wrapper",function(s){s=s.originalEvent||s||i.event;var n;if(3===s.which)return!1;if(!(r.itemsAmount<=r.options.items)){if(!1===r.isCssFinish&&!r.options.dragBeforeAnimFinish||!1===r.isCss3Finish&&!r.options.dragBeforeAnimFinish)return!1;!1!==r.options.autoPlay&&i.clearInterval(r.autoPlayInterval),!0===r.browser.isTouch||r.$owlWrapper.hasClass("grabbing")||r.$owlWrapper.addClass("grabbing"),r.newPosX=0,r.newRelativeX=0,t(this).css(r.removeTransition()),n=t(this).position(),l.relativePos=n.left,l.offsetX=e(s).x-n.left,l.offsetY=e(s).y-n.top,o("on"),l.sliding=!1,l.targetElement=s.target||s.srcElement}})},getNewPosition:function(){var t=this.closestItem();return t>this.maximumItem?t=this.currentItem=this.maximumItem:0<=this.newPosX&&(this.currentItem=t=0),t},closestItem:function(){var i=this,s=!0===i.options.scrollPerPage?i.pagesInArray:i.positionsInArray,e=i.newPosX,o=null;return t.each(s,function(n,a){e-i.itemWidth/20>s[n+1]&&e-i.itemWidth/20<a&&"left"===i.moveDirection()?(o=a,i.currentItem=!0===i.options.scrollPerPage?t.inArray(o,i.positionsInArray):n):e+i.itemWidth/20<a&&e+i.itemWidth/20>(s[n+1]||s[n]-i.itemWidth)&&"right"===i.moveDirection()&&(!0===i.options.scrollPerPage?(o=s[n+1]||s[s.length-1],i.currentItem=t.inArray(o,i.positionsInArray)):(o=s[n+1],i.currentItem=n+1))}),i.currentItem},moveDirection:function(){var t;return 0>this.newRelativeX?(t="right",this.playDirection="next"):(t="left",this.playDirection="prev"),t},customEvents:function(){var t=this;t.$elem.on("owl.next",function(){t.next()}),t.$elem.on("owl.prev",function(){t.prev()}),t.$elem.on("owl.play",function(i,s){t.options.autoPlay=s,t.play(),t.hoverStatus="play"}),t.$elem.on("owl.stop",function(){t.stop(),t.hoverStatus="stop"}),t.$elem.on("owl.goTo",function(i,s){t.goTo(s)}),t.$elem.on("owl.jumpTo",function(i,s){t.jumpTo(s)})},stopOnHover:function(){var t=this;!0===t.options.stopOnHover&&!0!==t.browser.isTouch&&!1!==t.options.autoPlay&&(t.$elem.on("mouseover",function(){t.stop()}),t.$elem.on("mouseout",function(){"stop"!==t.hoverStatus&&t.play()}))},lazyLoad:function(){var i,s,e,o,n;if(!1===this.options.lazyLoad)return!1;for(i=0;i<this.itemsAmount;i+=1)s=t(this.$owlItems[i]),"loaded"!==s.data("owl-loaded")&&(e=s.data("owl-item"),o=s.find(".lazyOwl"),"string"!=typeof o.data("src")?s.data("owl-loaded","loaded"):(void 0===s.data("owl-loaded")&&(o.hide(),s.addClass("loading").data("owl-loaded","checked")),(n=!0===this.options.lazyFollow?e>=this.currentItem:!0)&&e<this.currentItem+this.options.items&&o.length&&this.lazyPreload(s,o)))},lazyPreload:function(t,s){function e(){t.data("owl-loaded","loaded").removeClass("loading"),s.removeAttr("data-src"),"fade"===a.options.lazyEffect?s.fadeIn(400):s.show(),"function"==typeof a.options.afterLazyLoad&&a.options.afterLazyLoad.apply(this,[a.$elem])}function o(){r+=1,a.completeImg(s.get(0))||!0===n?e():100>=r?i.setTimeout(o,100):e()}var n,a=this,r=0;"DIV"===s.prop("tagName")?(s.css("background-image","url("+s.data("src")+")"),n=!0):s[0].src=s.data("src"),o()},autoHeight:function(){function s(){var s=t(n.$owlItems[n.currentItem]).height();n.wrapperOuter.css("height",s+"px"),n.wrapperOuter.hasClass("autoHeight")||i.setTimeout(function(){n.wrapperOuter.addClass("autoHeight")},0)}function e(){o+=1,n.completeImg(a.get(0))?s():100>=o?i.setTimeout(e,100):n.wrapperOuter.css("height","")}var o,n=this,a=t(n.$owlItems[n.currentItem]).find("img");void 0!==a.get(0)?(o=0,e()):s()},completeImg:function(t){return!t.complete||"undefined"!=typeof t.naturalWidth&&0===t.naturalWidth?!1:!0},onVisibleItems:function(){var i;for(!0===this.options.addClassActive&&this.$owlItems.removeClass("active"),this.visibleItems=[],i=this.currentItem;i<this.currentItem+this.options.items;i+=1)this.visibleItems.push(i),!0===this.options.addClassActive&&t(this.$owlItems[i]).addClass("active");this.owl.visibleItems=this.visibleItems},transitionTypes:function(t){this.outClass="owl-"+t+"-out",this.inClass="owl-"+t+"-in"},singleItemTransition:function(){var t=this,i=t.outClass,s=t.inClass,e=t.$owlItems.eq(t.currentItem),o=t.$owlItems.eq(t.prevItem),n=Math.abs(t.positionsInArray[t.currentItem])+t.positionsInArray[t.prevItem],a=Math.abs(t.positionsInArray[t.currentItem])+t.itemWidth/2;t.isTransition=!0,t.$owlWrapper.addClass("owl-origin").css({"-webkit-transform-origin":a+"px","-moz-perspective-origin":a+"px","perspective-origin":a+"px"}),o.css({position:"relative",left:n+"px"}).addClass(i).on("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend",function(){t.endPrev=!0,o.off("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend"),t.clearTransStyle(o,i)}),e.addClass(s).on("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend",function(){t.endCurrent=!0,e.off("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend"),t.clearTransStyle(e,s)})},clearTransStyle:function(t,i){t.css({position:"",left:""}).removeClass(i),this.endPrev&&this.endCurrent&&(this.$owlWrapper.removeClass("owl-origin"),this.isTransition=this.endCurrent=this.endPrev=!1)},owlStatus:function(){this.owl={userOptions:this.userOptions,baseElement:this.$elem,userItems:this.$userItems,owlItems:this.$owlItems,currentItem:this.currentItem,prevItem:this.prevItem,visibleItems:this.visibleItems,isTouch:this.browser.isTouch,browser:this.browser,dragDirection:this.dragDirection}},clearEvents:function(){this.$elem.off(".owl owl mousedown.disableTextSelect"),t(s).off(".owl owl"),t(i).off("resize",this.resizer)},unWrap:function(){0!==this.$elem.children().length&&(this.$owlWrapper.unwrap(),this.$userItems.unwrap().unwrap(),this.owlControls&&this.owlControls.remove()),this.clearEvents(),this.$elem.attr("style",this.$elem.data("owl-originalStyles")||"").attr("class",this.$elem.data("owl-originalClasses"))},destroy:function(){this.stop(),i.clearInterval(this.checkVisible),this.unWrap(),this.$elem.removeData()},reinit:function(i){i=t.extend({},this.userOptions,i),this.unWrap(),this.init(i,this.$elem)},addItem:function(t,i){var s;return t?0===this.$elem.children().length?(this.$elem.append(t),this.setVars(),!1):(this.unWrap(),s=void 0===i||-1===i?-1:i,s>=this.$userItems.length||-1===s?this.$userItems.eq(-1).after(t):this.$userItems.eq(s).before(t),void this.setVars()):!1},removeItem:function(t){return 0===this.$elem.children().length?!1:(t=void 0===t||-1===t?-1:t,this.unWrap(),this.$userItems.eq(t).remove(),void this.setVars())}};t.fn.owlCarousel=function(i){return this.each(function(){if(!0===t(this).data("owl-init"))return!1;t(this).data("owl-init",!0);var s=Object.create(e);s.init(i,this),t.data(this,"owlCarousel",s)})},t.fn.owlCarousel.options={items:5,itemsCustom:!1,itemsDesktop:[1199,4],itemsDesktopSmall:[979,3],itemsTablet:[768,2],itemsTabletSmall:!1,itemsMobile:[479,1],singleItem:!1,itemsScaleUp:!1,slideSpeed:200,paginationSpeed:800,rewindSpeed:1e3,autoPlay:!1,stopOnHover:!1,navigation:!1,navigationText:["prev","next"],rewindNav:!0,scrollPerPage:!1,pagination:!0,paginationNumbers:!1,responsive:!0,responsiveRefreshRate:200,responsiveBaseWidth:i,baseClass:"owl-carousel",theme:"owl-theme",lazyLoad:!1,lazyFollow:!0,lazyEffect:"fade",autoHeight:!1,jsonPath:!1,jsonSuccess:!1,dragBeforeAnimFinish:!0,mouseDrag:!0,touchDrag:!0,addClassActive:!1,transitionStyle:!1,beforeUpdate:!1,afterUpdate:!1,beforeInit:!1,afterInit:!1,beforeMove:!1,afterMove:!1,afterAction:!1,startDragging:!1,afterLazyLoad:!1}}(jQuery,window,document);
!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,s,a){function u(t,e,o){var n,s="$()."+i+'("'+e+'")';return t.each(function(t,u){var h=a.data(u,i);if(!h)return void r(i+" not initialized. Cannot call methods, i.e. "+s);var d=h[e];if(!d||"_"==e.charAt(0))return void r(s+" is not a valid method");var l=d.apply(h,o);n=void 0===n?l:n}),void 0!==n?n:t}function h(t,e){t.each(function(t,o){var n=a.data(o,i);n?(n.option(e),n._init()):(n=new s(o,e),a.data(o,i,n))})}a=a||e||t.jQuery,a&&(s.prototype.option||(s.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=n.call(arguments,1);return u(this,t,e)}return h(this,t),this},o(a))}function o(t){!t||t&&t.bridget||(t.bridget=i)}var n=Array.prototype.slice,s=t.console,r="undefined"==typeof s?function(){}:function(t){s.error(t)};return o(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},o=i[t]=i[t]||[];return o.indexOf(e)==-1&&o.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},o=i[t]=i[t]||{};return o[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var o=i.indexOf(e);return o!=-1&&i.splice(o,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var o=this._onceEvents&&this._onceEvents[t],n=0;n<i.length;n++){var s=i[n],r=o&&o[s];r&&(this.off(t,s),delete o[s]),s.apply(this,e)}return this}},e.allOff=function(){delete this._events,delete this._onceEvents},t}),function(t,e){"function"==typeof define&&define.amd?define("get-size/get-size",e):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=t.indexOf("%")==-1&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;e<h;e++){var i=u[e];t[i]=0}return t}function o(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),e}function n(){if(!d){d=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var n=o(e);r=200==Math.round(t(n.width)),s.isBoxSizeOuter=r,i.removeChild(e)}}function s(e){if(n(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var s=o(e);if("none"==s.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==s.boxSizing,l=0;l<h;l++){var f=u[l],c=s[f],m=parseFloat(c);a[f]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,y=a.paddingTop+a.paddingBottom,g=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,z=a.borderTopWidth+a.borderBottomWidth,I=d&&r,x=t(s.width);x!==!1&&(a.width=x+(I?0:p+_));var S=t(s.height);return S!==!1&&(a.height=S+(I?0:y+z)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(y+z),a.outerWidth=a.width+g,a.outerHeight=a.height+v,a}}var r,a="undefined"==typeof console?e:function(t){console.error(t)},u=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],h=u.length,d=!1;return s}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var o=e[i],n=o+"MatchesSelector";if(t[n])return n}}();return function(e,i){return e[t](i)}}),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.matchesSelector)}(window,function(t,e){var i={};i.extend=function(t,e){for(var i in e)t[i]=e[i];return t},i.modulo=function(t,e){return(t%e+e)%e};var o=Array.prototype.slice;i.makeArray=function(t){if(Array.isArray(t))return t;if(null===t||void 0===t)return[];var e="object"==typeof t&&"number"==typeof t.length;return e?o.call(t):[t]},i.removeFrom=function(t,e){var i=t.indexOf(e);i!=-1&&t.splice(i,1)},i.getParent=function(t,i){for(;t.parentNode&&t!=document.body;)if(t=t.parentNode,e(t,i))return t},i.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},i.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},i.filterFindElements=function(t,o){t=i.makeArray(t);var n=[];return t.forEach(function(t){if(t instanceof HTMLElement){if(!o)return void n.push(t);e(t,o)&&n.push(t);for(var i=t.querySelectorAll(o),s=0;s<i.length;s++)n.push(i[s])}}),n},i.debounceMethod=function(t,e,i){i=i||100;var o=t.prototype[e],n=e+"Timeout";t.prototype[e]=function(){var t=this[n];clearTimeout(t);var e=arguments,s=this;this[n]=setTimeout(function(){o.apply(s,e),delete s[n]},i)}},i.docReady=function(t){var e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},i.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var n=t.console;return i.htmlInit=function(e,o){i.docReady(function(){var s=i.toDashed(o),r="data-"+s,a=document.querySelectorAll("["+r+"]"),u=document.querySelectorAll(".js-"+s),h=i.makeArray(a).concat(i.makeArray(u)),d=r+"-options",l=t.jQuery;h.forEach(function(t){var i,s=t.getAttribute(r)||t.getAttribute(d);try{i=s&&JSON.parse(s)}catch(a){return void(n&&n.error("Error parsing "+r+" on "+t.className+": "+a))}var u=new e(t,i);l&&l.data(t,o,u)})})},i}),function(t,e){"function"==typeof define&&define.amd?define("outlayer/item",["ev-emitter/ev-emitter","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("ev-emitter"),require("get-size")):(t.Outlayer={},t.Outlayer.Item=e(t.EvEmitter,t.getSize))}(window,function(t,e){"use strict";function i(t){for(var e in t)return!1;return e=null,!0}function o(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}function n(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}var s=document.documentElement.style,r="string"==typeof s.transition?"transition":"WebkitTransition",a="string"==typeof s.transform?"transform":"WebkitTransform",u={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[r],h={transform:a,transition:r,transitionDuration:r+"Duration",transitionProperty:r+"Property",transitionDelay:r+"Delay"},d=o.prototype=Object.create(t.prototype);d.constructor=o,d._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},d.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},d.getSize=function(){this.size=e(this.element)},d.css=function(t){var e=this.element.style;for(var i in t){var o=h[i]||i;e[o]=t[i]}},d.getPosition=function(){var t=getComputedStyle(this.element),e=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),o=t[e?"left":"right"],n=t[i?"top":"bottom"],s=parseFloat(o),r=parseFloat(n),a=this.layout.size;o.indexOf("%")!=-1&&(s=s/100*a.width),n.indexOf("%")!=-1&&(r=r/100*a.height),s=isNaN(s)?0:s,r=isNaN(r)?0:r,s-=e?a.paddingLeft:a.paddingRight,r-=i?a.paddingTop:a.paddingBottom,this.position.x=s,this.position.y=r},d.layoutPosition=function(){var t=this.layout.size,e={},i=this.layout._getOption("originLeft"),o=this.layout._getOption("originTop"),n=i?"paddingLeft":"paddingRight",s=i?"left":"right",r=i?"right":"left",a=this.position.x+t[n];e[s]=this.getXValue(a),e[r]="";var u=o?"paddingTop":"paddingBottom",h=o?"top":"bottom",d=o?"bottom":"top",l=this.position.y+t[u];e[h]=this.getYValue(l),e[d]="",this.css(e),this.emitEvent("layout",[this])},d.getXValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!e?t/this.layout.size.width*100+"%":t+"px"},d.getYValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&e?t/this.layout.size.height*100+"%":t+"px"},d._transitionTo=function(t,e){this.getPosition();var i=this.position.x,o=this.position.y,n=t==this.position.x&&e==this.position.y;if(this.setPosition(t,e),n&&!this.isTransitioning)return void this.layoutPosition();var s=t-i,r=e-o,a={};a.transform=this.getTranslate(s,r),this.transition({to:a,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},d.getTranslate=function(t,e){var i=this.layout._getOption("originLeft"),o=this.layout._getOption("originTop");return t=i?t:-t,e=o?e:-e,"translate3d("+t+"px, "+e+"px, 0)"},d.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},d.moveTo=d._transitionTo,d.setPosition=function(t,e){this.position.x=parseFloat(t),this.position.y=parseFloat(e)},d._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},d.transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(t);var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);var o=this.element.offsetHeight;o=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var l="opacity,"+n(a);d.enableTransition=function(){if(!this.isTransitioning){var t=this.layout.options.transitionDuration;t="number"==typeof t?t+"ms":t,this.css({transitionProperty:l,transitionDuration:t,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(u,this,!1)}},d.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},d.onotransitionend=function(t){this.ontransitionend(t)};var f={"-webkit-transform":"transform"};d.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,o=f[t.propertyName]||t.propertyName;if(delete e.ingProperties[o],i(e.ingProperties)&&this.disableTransition(),o in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[o]),o in e.onEnd){var n=e.onEnd[o];n.call(this),delete e.onEnd[o]}this.emitEvent("transitionEnd",[this])}},d.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(u,this,!1),this.isTransitioning=!1},d._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var c={transitionProperty:"",transitionDuration:"",transitionDelay:""};return d.removeTransitionStyles=function(){this.css(c)},d.stagger=function(t){t=isNaN(t)?0:t,this.staggerDelay=t+"ms"},d.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},d.remove=function(){return r&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),void this.hide()):void this.removeElem()},d.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("visibleStyle");e[i]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},d.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},d.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var i in e)return i},d.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("hiddenStyle");e[i]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},d.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},d.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},o}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("outlayer/outlayer",["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(i,o,n,s){return e(t,i,o,n,s)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):t.Outlayer=e(t,t.EvEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,function(t,e,i,o,n){"use strict";function s(t,e){var i=o.getQueryElement(t);if(!i)return void(u&&u.error("Bad element for "+this.constructor.namespace+": "+(i||t)));this.element=i,h&&(this.$element=h(this.element)),this.options=o.extend({},this.constructor.defaults),this.option(e);var n=++l;this.element.outlayerGUID=n,f[n]=this,this._create();var s=this._getOption("initLayout");s&&this.layout()}function r(t){function e(){t.apply(this,arguments)}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}function a(t){if("number"==typeof t)return t;var e=t.match(/(^\d*\.?\d*)(\w*)/),i=e&&e[1],o=e&&e[2];if(!i.length)return 0;i=parseFloat(i);var n=m[o]||1;return i*n}var u=t.console,h=t.jQuery,d=function(){},l=0,f={};s.namespace="outlayer",s.Item=n,s.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var c=s.prototype;o.extend(c,e.prototype),c.option=function(t){o.extend(this.options,t)},c._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},s.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},c._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),o.extend(this.element.style,this.options.containerStyle);var t=this._getOption("resize");t&&this.bindResize()},c.reloadItems=function(){this.items=this._itemize(this.element.children)},c._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,o=[],n=0;n<e.length;n++){var s=e[n],r=new i(s,this);o.push(r)}return o},c._filterFindItemElements=function(t){return o.filterFindElements(t,this.options.itemSelector)},c.getItemElements=function(){return this.items.map(function(t){return t.element})},c.layout=function(){this._resetLayout(),this._manageStamps();var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;this.layoutItems(this.items,e),this._isLayoutInited=!0},c._init=c.layout,c._resetLayout=function(){this.getSize()},c.getSize=function(){this.size=i(this.element)},c._getMeasurement=function(t,e){var o,n=this.options[t];n?("string"==typeof n?o=this.element.querySelector(n):n instanceof HTMLElement&&(o=n),this[t]=o?i(o)[e]:n):this[t]=0},c.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},c._getItemsForLayout=function(t){return t.filter(function(t){return!t.isIgnored})},c._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){var i=[];t.forEach(function(t){var o=this._getItemLayoutPosition(t);o.item=t,o.isInstant=e||t.isLayoutInstant,i.push(o)},this),this._processLayoutQueue(i)}},c._getItemLayoutPosition=function(){return{x:0,y:0}},c._processLayoutQueue=function(t){this.updateStagger(),t.forEach(function(t,e){this._positionItem(t.item,t.x,t.y,t.isInstant,e)},this)},c.updateStagger=function(){var t=this.options.stagger;return null===t||void 0===t?void(this.stagger=0):(this.stagger=a(t),this.stagger)},c._positionItem=function(t,e,i,o,n){o?t.goTo(e,i):(t.stagger(n*this.stagger),t.moveTo(e,i))},c._postLayout=function(){this.resizeContainer()},c.resizeContainer=function(){var t=this._getOption("resizeContainer");if(t){var e=this._getContainerSize();e&&(this._setContainerMeasure(e.width,!0),this._setContainerMeasure(e.height,!1))}},c._getContainerSize=d,c._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},c._emitCompleteOnItems=function(t,e){function i(){n.dispatchEvent(t+"Complete",null,[e])}function o(){r++,r==s&&i()}var n=this,s=e.length;if(!e||!s)return void i();var r=0;e.forEach(function(e){e.once(t,o)})},c.dispatchEvent=function(t,e,i){var o=e?[e].concat(i):i;if(this.emitEvent(t,o),h)if(this.$element=this.$element||h(this.element),e){var n=h.Event(e);n.type=t,this.$element.trigger(n,i)}else this.$element.trigger(t,i)},c.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},c.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},c.stamp=function(t){t=this._find(t),t&&(this.stamps=this.stamps.concat(t),t.forEach(this.ignore,this))},c.unstamp=function(t){t=this._find(t),t&&t.forEach(function(t){o.removeFrom(this.stamps,t),this.unignore(t)},this)},c._find=function(t){if(t)return"string"==typeof t&&(t=this.element.querySelectorAll(t)),t=o.makeArray(t)},c._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},c._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},c._manageStamp=d,c._getElementOffset=function(t){var e=t.getBoundingClientRect(),o=this._boundingRect,n=i(t),s={left:e.left-o.left-n.marginLeft,top:e.top-o.top-n.marginTop,right:o.right-e.right-n.marginRight,bottom:o.bottom-e.bottom-n.marginBottom};return s},c.handleEvent=o.handleEvent,c.bindResize=function(){t.addEventListener("resize",this),this.isResizeBound=!0},c.unbindResize=function(){t.removeEventListener("resize",this),this.isResizeBound=!1},c.onresize=function(){this.resize()},o.debounceMethod(s,"onresize",100),c.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},c.needsResizeLayout=function(){var t=i(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},c.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},c.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},c.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},c.reveal=function(t){if(this._emitCompleteOnItems("reveal",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.reveal()})}},c.hide=function(t){if(this._emitCompleteOnItems("hide",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.hide()})}},c.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},c.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},c.getItem=function(t){for(var e=0;e<this.items.length;e++){var i=this.items[e];if(i.element==t)return i}},c.getItems=function(t){t=o.makeArray(t);var e=[];return t.forEach(function(t){var i=this.getItem(t);i&&e.push(i)},this),e},c.remove=function(t){var e=this.getItems(t);this._emitCompleteOnItems("remove",e),e&&e.length&&e.forEach(function(t){t.remove(),o.removeFrom(this.items,t)},this)},c.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="",this.items.forEach(function(t){t.destroy()}),this.unbindResize();var e=this.element.outlayerGUID;delete f[e],delete this.element.outlayerGUID,h&&h.removeData(this.element,this.constructor.namespace)},s.data=function(t){t=o.getQueryElement(t);var e=t&&t.outlayerGUID;return e&&f[e]},s.create=function(t,e){var i=r(s);return i.defaults=o.extend({},s.defaults),o.extend(i.defaults,e),i.compatOptions=o.extend({},s.compatOptions),i.namespace=t,i.data=s.data,i.Item=r(n),o.htmlInit(i,t),h&&h.bridget&&h.bridget(t,i),i};var m={ms:1,s:1e3};return s.Item=n,s}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/item",["outlayer/outlayer"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer")):(t.Isotope=t.Isotope||{},t.Isotope.Item=e(t.Outlayer))}(window,function(t){"use strict";function e(){t.Item.apply(this,arguments)}var i=e.prototype=Object.create(t.Item.prototype),o=i._create;i._create=function(){this.id=this.layout.itemGUID++,o.call(this),this.sortData={}},i.updateSortData=function(){if(!this.isIgnored){this.sortData.id=this.id,this.sortData["original-order"]=this.id,this.sortData.random=Math.random();var t=this.layout.options.getSortData,e=this.layout._sorters;for(var i in t){var o=e[i];this.sortData[i]=o(this.element,this)}}};var n=i.destroy;return i.destroy=function(){n.apply(this,arguments),this.css({display:""})},e}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-mode",["get-size/get-size","outlayer/outlayer"],e):"object"==typeof module&&module.exports?module.exports=e(require("get-size"),require("outlayer")):(t.Isotope=t.Isotope||{},t.Isotope.LayoutMode=e(t.getSize,t.Outlayer))}(window,function(t,e){"use strict";function i(t){this.isotope=t,t&&(this.options=t.options[this.namespace],this.element=t.element,this.items=t.filteredItems,this.size=t.size)}var o=i.prototype,n=["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout","_getOption"];return n.forEach(function(t){o[t]=function(){return e.prototype[t].apply(this.isotope,arguments)}}),o.needsVerticalResizeLayout=function(){var e=t(this.isotope.element),i=this.isotope.size&&e;return i&&e.innerHeight!=this.isotope.size.innerHeight},o._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},o.getColumnWidth=function(){this.getSegmentSize("column","Width")},o.getRowHeight=function(){this.getSegmentSize("row","Height")},o.getSegmentSize=function(t,e){var i=t+e,o="outer"+e;if(this._getMeasurement(i,o),!this[i]){var n=this.getFirstItemSize();this[i]=n&&n[o]||this.isotope.size["inner"+e]}},o.getFirstItemSize=function(){var e=this.isotope.filteredItems[0];return e&&e.element&&t(e.element)},o.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},o.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},i.modes={},i.create=function(t,e){function n(){i.apply(this,arguments)}return n.prototype=Object.create(o),n.prototype.constructor=n,e&&(n.options=e),n.prototype.namespace=t,i.modes[t]=n,n},i}),function(t,e){"function"==typeof define&&define.amd?define("masonry-layout/masonry",["outlayer/outlayer","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer"),require("get-size")):t.Masonry=e(t.Outlayer,t.getSize)}(window,function(t,e){var i=t.create("masonry");i.compatOptions.fitWidth="isFitWidth";var o=i.prototype;return o._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t<this.cols;t++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},o.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}var o=this.columnWidth+=this.gutter,n=this.containerWidth+this.gutter,s=n/o,r=o-n%o,a=r&&r<1?"round":"floor";s=Math[a](s),this.cols=Math.max(s,1)},o.getContainerWidth=function(){var t=this._getOption("fitWidth"),i=t?this.element.parentNode:this.element,o=e(i);this.containerWidth=o&&o.innerWidth},o._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=e&&e<1?"round":"ceil",o=Math[i](t.size.outerWidth/this.columnWidth);o=Math.min(o,this.cols);for(var n=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",s=this[n](o,t),r={x:this.columnWidth*s.col,y:s.y},a=s.y+t.size.outerHeight,u=o+s.col,h=s.col;h<u;h++)this.colYs[h]=a;return r},o._getTopColPosition=function(t){var e=this._getTopColGroup(t),i=Math.min.apply(Math,e);return{col:e.indexOf(i),y:i}},o._getTopColGroup=function(t){if(t<2)return this.colYs;for(var e=[],i=this.cols+1-t,o=0;o<i;o++)e[o]=this._getColGroupY(o,t);return e},o._getColGroupY=function(t,e){if(e<2)return this.colYs[t];var i=this.colYs.slice(t,t+e);return Math.max.apply(Math,i)},o._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols,o=t>1&&i+t>this.cols;i=o?0:i;var n=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=n?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},o._manageStamp=function(t){var i=e(t),o=this._getElementOffset(t),n=this._getOption("originLeft"),s=n?o.left:o.right,r=s+i.outerWidth,a=Math.floor(s/this.columnWidth);a=Math.max(0,a);var u=Math.floor(r/this.columnWidth);u-=r%this.columnWidth?0:1,u=Math.min(this.cols-1,u);for(var h=this._getOption("originTop"),d=(h?o.top:o.bottom)+i.outerHeight,l=a;l<=u;l++)this.colYs[l]=Math.max(d,this.colYs[l])},o._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},o._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},o.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-modes/masonry",["../layout-mode","masonry-layout/masonry"],e):"object"==typeof module&&module.exports?module.exports=e(require("../layout-mode"),require("masonry-layout")):e(t.Isotope.LayoutMode,t.Masonry)}(window,function(t,e){"use strict";var i=t.create("masonry"),o=i.prototype,n={_getElementOffset:!0,layout:!0,_getMeasurement:!0};for(var s in e.prototype)n[s]||(o[s]=e.prototype[s]);var r=o.measureColumns;o.measureColumns=function(){this.items=this.isotope.filteredItems,r.call(this)};var a=o._getOption;return o._getOption=function(t){return"fitWidth"==t?void 0!==this.options.isFitWidth?this.options.isFitWidth:this.options.fitWidth:a.apply(this.isotope,arguments)},i}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-modes/fit-rows",["../layout-mode"],e):"object"==typeof exports?module.exports=e(require("../layout-mode")):e(t.Isotope.LayoutMode)}(window,function(t){"use strict";var e=t.create("fitRows"),i=e.prototype;return i._resetLayout=function(){this.x=0,this.y=0,this.maxY=0,this._getMeasurement("gutter","outerWidth")},i._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth+this.gutter,i=this.isotope.size.innerWidth+this.gutter;0!==this.x&&e+this.x>i&&(this.x=0,this.y=this.maxY);var o={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+t.size.outerHeight),this.x+=e,o},i._getContainerSize=function(){return{height:this.maxY}},e}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-modes/vertical",["../layout-mode"],e):"object"==typeof module&&module.exports?module.exports=e(require("../layout-mode")):e(t.Isotope.LayoutMode)}(window,function(t){"use strict";var e=t.create("vertical",{horizontalAlignment:0}),i=e.prototype;return i._resetLayout=function(){this.y=0},i._getItemLayoutPosition=function(t){t.getSize();var e=(this.isotope.size.innerWidth-t.size.outerWidth)*this.options.horizontalAlignment,i=this.y;return this.y+=t.size.outerHeight,{x:e,y:i}},i._getContainerSize=function(){return{height:this.y}},e}),function(t,e){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","desandro-matches-selector/matches-selector","fizzy-ui-utils/utils","isotope-layout/js/item","isotope-layout/js/layout-mode","isotope-layout/js/layout-modes/masonry","isotope-layout/js/layout-modes/fit-rows","isotope-layout/js/layout-modes/vertical"],function(i,o,n,s,r,a){return e(t,i,o,n,s,r,a)}):"object"==typeof module&&module.exports?module.exports=e(t,require("outlayer"),require("get-size"),require("desandro-matches-selector"),require("fizzy-ui-utils"),require("isotope-layout/js/item"),require("isotope-layout/js/layout-mode"),require("isotope-layout/js/layout-modes/masonry"),require("isotope-layout/js/layout-modes/fit-rows"),require("isotope-layout/js/layout-modes/vertical")):t.Isotope=e(t,t.Outlayer,t.getSize,t.matchesSelector,t.fizzyUIUtils,t.Isotope.Item,t.Isotope.LayoutMode)}(window,function(t,e,i,o,n,s,r){function a(t,e){return function(i,o){for(var n=0;n<t.length;n++){var s=t[n],r=i.sortData[s],a=o.sortData[s];if(r>a||r<a){var u=void 0!==e[s]?e[s]:e,h=u?1:-1;return(r>a?1:-1)*h}}return 0}}var u=t.jQuery,h=String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^\s+|\s+$/g,"")},d=e.create("isotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});d.Item=s,d.LayoutMode=r;var l=d.prototype;l._create=function(){this.itemGUID=0,this._sorters={},this._getSorters(),e.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"];for(var t in r.modes)this._initLayoutMode(t)},l.reloadItems=function(){this.itemGUID=0,e.prototype.reloadItems.call(this)},l._itemize=function(){for(var t=e.prototype._itemize.apply(this,arguments),i=0;i<t.length;i++){var o=t[i];o.id=this.itemGUID++}return this._updateItemsSortData(t),t},l._initLayoutMode=function(t){var e=r.modes[t],i=this.options[t]||{};this.options[t]=e.options?n.extend(e.options,i):i,this.modes[t]=new e(this)},l.layout=function(){return!this._isLayoutInited&&this._getOption("initLayout")?void this.arrange():void this._layout()},l._layout=function(){var t=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,t),this._isLayoutInited=!0},l.arrange=function(t){this.option(t),this._getIsInstant();var e=this._filter(this.items);this.filteredItems=e.matches,this._bindArrangeComplete(),this._isInstant?this._noTransition(this._hideReveal,[e]):this._hideReveal(e),this._sort(),this._layout()},l._init=l.arrange,l._hideReveal=function(t){this.reveal(t.needReveal),this.hide(t.needHide)},l._getIsInstant=function(){var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;return this._isInstant=e,e},l._bindArrangeComplete=function(){function t(){e&&i&&o&&n.dispatchEvent("arrangeComplete",null,[n.filteredItems])}var e,i,o,n=this;this.once("layoutComplete",function(){e=!0,t()}),this.once("hideComplete",function(){i=!0,t()}),this.once("revealComplete",function(){o=!0,t()})},l._filter=function(t){var e=this.options.filter;e=e||"*";for(var i=[],o=[],n=[],s=this._getFilterTest(e),r=0;r<t.length;r++){var a=t[r];if(!a.isIgnored){var u=s(a);u&&i.push(a),u&&a.isHidden?o.push(a):u||a.isHidden||n.push(a)}}return{matches:i,needReveal:o,needHide:n}},l._getFilterTest=function(t){return u&&this.options.isJQueryFiltering?function(e){return u(e.element).is(t);
}:"function"==typeof t?function(e){return t(e.element)}:function(e){return o(e.element,t)}},l.updateSortData=function(t){var e;t?(t=n.makeArray(t),e=this.getItems(t)):e=this.items,this._getSorters(),this._updateItemsSortData(e)},l._getSorters=function(){var t=this.options.getSortData;for(var e in t){var i=t[e];this._sorters[e]=f(i)}},l._updateItemsSortData=function(t){for(var e=t&&t.length,i=0;e&&i<e;i++){var o=t[i];o.updateSortData()}};var f=function(){function t(t){if("string"!=typeof t)return t;var i=h(t).split(" "),o=i[0],n=o.match(/^\[(.+)\]$/),s=n&&n[1],r=e(s,o),a=d.sortDataParsers[i[1]];return t=a?function(t){return t&&a(r(t))}:function(t){return t&&r(t)}}function e(t,e){return t?function(e){return e.getAttribute(t)}:function(t){var i=t.querySelector(e);return i&&i.textContent}}return t}();d.sortDataParsers={parseInt:function(t){return parseInt(t,10)},parseFloat:function(t){return parseFloat(t)}},l._sort=function(){if(this.options.sortBy){var t=n.makeArray(this.options.sortBy);this._getIsSameSortBy(t)||(this.sortHistory=t.concat(this.sortHistory));var e=a(this.sortHistory,this.options.sortAscending);this.filteredItems.sort(e)}},l._getIsSameSortBy=function(t){for(var e=0;e<t.length;e++)if(t[e]!=this.sortHistory[e])return!1;return!0},l._mode=function(){var t=this.options.layoutMode,e=this.modes[t];if(!e)throw new Error("No layout mode: "+t);return e.options=this.options[t],e},l._resetLayout=function(){e.prototype._resetLayout.call(this),this._mode()._resetLayout()},l._getItemLayoutPosition=function(t){return this._mode()._getItemLayoutPosition(t)},l._manageStamp=function(t){this._mode()._manageStamp(t)},l._getContainerSize=function(){return this._mode()._getContainerSize()},l.needsResizeLayout=function(){return this._mode().needsResizeLayout()},l.appended=function(t){var e=this.addItems(t);if(e.length){var i=this._filterRevealAdded(e);this.filteredItems=this.filteredItems.concat(i)}},l.prepended=function(t){var e=this._itemize(t);if(e.length){this._resetLayout(),this._manageStamps();var i=this._filterRevealAdded(e);this.layoutItems(this.filteredItems),this.filteredItems=i.concat(this.filteredItems),this.items=e.concat(this.items)}},l._filterRevealAdded=function(t){var e=this._filter(t);return this.hide(e.needHide),this.reveal(e.matches),this.layoutItems(e.matches,!0),e.matches},l.insert=function(t){var e=this.addItems(t);if(e.length){var i,o,n=e.length;for(i=0;i<n;i++)o=e[i],this.element.appendChild(o.element);var s=this._filter(e).matches;for(i=0;i<n;i++)e[i].isLayoutInstant=!0;for(this.arrange(),i=0;i<n;i++)delete e[i].isLayoutInstant;this.reveal(s)}};var c=l.remove;return l.remove=function(t){t=n.makeArray(t);var e=this.getItems(t);c.call(this,t);for(var i=e&&e.length,o=0;i&&o<i;o++){var s=e[o];n.removeFrom(this.filteredItems,s)}},l.shuffle=function(){for(var t=0;t<this.items.length;t++){var e=this.items[t];e.sortData.random=Math.random()}this.options.sortBy="random",this._sort(),this._layout()},l._noTransition=function(t,e){var i=this.options.transitionDuration;this.options.transitionDuration=0;var o=t.apply(this,e);return this.options.transitionDuration=i,o},l.getFilteredItemElements=function(){return this.filteredItems.map(function(t){return t.element})},d});
!function(a,b){"function"==typeof define&&define.amd?define("packery/js/rect",b):"object"==typeof module&&module.exports?module.exports=b():(a.Packery=a.Packery||{},a.Packery.Rect=b())}(window,function(){function a(b){for(var c in a.defaults)this[c]=a.defaults[c];for(c in b)this[c]=b[c]}a.defaults={x:0,y:0,width:0,height:0};var b=a.prototype;return b.contains=function(a){var b=a.width||0,c=a.height||0;return this.x<=a.x&&this.y<=a.y&&this.x+this.width>=a.x+b&&this.y+this.height>=a.y+c},b.overlaps=function(a){var b=this.x+this.width,c=this.y+this.height,d=a.x+a.width,e=a.y+a.height;return this.x<d&&b>a.x&&this.y<e&&c>a.y},b.getMaximalFreeRects=function(b){if(!this.overlaps(b))return!1;var c,d=[],e=this.x+this.width,f=this.y+this.height,g=b.x+b.width,h=b.y+b.height;return this.y<b.y&&(c=new a({x:this.x,y:this.y,width:this.width,height:b.y-this.y}),d.push(c)),e>g&&(c=new a({x:g,y:this.y,width:e-g,height:this.height}),d.push(c)),f>h&&(c=new a({x:this.x,y:h,width:this.width,height:f-h}),d.push(c)),this.x<b.x&&(c=new a({x:this.x,y:this.y,width:b.x-this.x,height:this.height}),d.push(c)),d},b.canFit=function(a){return this.width>=a.width&&this.height>=a.height},a}),function(a,b){if("function"==typeof define&&define.amd)define("packery/js/packer",["./rect"],b);else if("object"==typeof module&&module.exports)module.exports=b(require("./rect"));else{var c=a.Packery=a.Packery||{};c.Packer=b(c.Rect)}}(window,function(a){function b(a,b,c){this.width=a||0,this.height=b||0,this.sortDirection=c||"downwardLeftToRight",this.reset()}var c=b.prototype;c.reset=function(){this.spaces=[];var b=new a({x:0,y:0,width:this.width,height:this.height});this.spaces.push(b),this.sorter=d[this.sortDirection]||d.downwardLeftToRight},c.pack=function(a){for(var b=0;b<this.spaces.length;b++){var c=this.spaces[b];if(c.canFit(a)){this.placeInSpace(a,c);break}}},c.columnPack=function(a){for(var b=0;b<this.spaces.length;b++){var c=this.spaces[b],d=c.x<=a.x&&c.x+c.width>=a.x+a.width&&c.height>=a.height-.01;if(d){a.y=c.y,this.placed(a);break}}},c.rowPack=function(a){for(var b=0;b<this.spaces.length;b++){var c=this.spaces[b],d=c.y<=a.y&&c.y+c.height>=a.y+a.height&&c.width>=a.width-.01;if(d){a.x=c.x,this.placed(a);break}}},c.placeInSpace=function(a,b){a.x=b.x,a.y=b.y,this.placed(a)},c.placed=function(a){for(var b=[],c=0;c<this.spaces.length;c++){var d=this.spaces[c],e=d.getMaximalFreeRects(a);e?b.push.apply(b,e):b.push(d)}this.spaces=b,this.mergeSortSpaces()},c.mergeSortSpaces=function(){b.mergeRects(this.spaces),this.spaces.sort(this.sorter)},c.addSpace=function(a){this.spaces.push(a),this.mergeSortSpaces()},b.mergeRects=function(a){var b=0,c=a[b];a:for(;c;){for(var d=0,e=a[b+d];e;){if(e==c)d++;else{if(e.contains(c)){a.splice(b,1),c=a[b];continue a}c.contains(e)?a.splice(b+d,1):d++}e=a[b+d]}b++,c=a[b]}return a};var d={downwardLeftToRight:function(a,b){return a.y-b.y||a.x-b.x},rightwardTopToBottom:function(a,b){return a.x-b.x||a.y-b.y}};return b}),function(a,b){"function"==typeof define&&define.amd?define("packery/js/item",["outlayer/outlayer","./rect"],b):"object"==typeof module&&module.exports?module.exports=b(require("outlayer"),require("./rect")):a.Packery.Item=b(a.Outlayer,a.Packery.Rect)}(window,function(a,b){var c=document.documentElement.style,d="string"==typeof c.transform?"transform":"WebkitTransform",e=function(){a.Item.apply(this,arguments)},f=e.prototype=Object.create(a.Item.prototype),g=f._create;f._create=function(){g.call(this),this.rect=new b};var h=f.moveTo;return f.moveTo=function(a,b){var c=Math.abs(this.position.x-a),d=Math.abs(this.position.y-b),e=this.layout.dragItemCount&&!this.isPlacing&&!this.isTransitioning&&1>c&&1>d;return e?void this.goTo(a,b):void h.apply(this,arguments)},f.enablePlacing=function(){this.removeTransitionStyles(),this.isTransitioning&&d&&(this.element.style[d]="none"),this.isTransitioning=!1,this.getSize(),this.layout._setRectSize(this.element,this.rect),this.isPlacing=!0},f.disablePlacing=function(){this.isPlacing=!1},f.removeElem=function(){this.element.parentNode.removeChild(this.element),this.layout.packer.addSpace(this.rect),this.emitEvent("remove",[this])},f.showDropPlaceholder=function(){var a=this.dropPlaceholder;a||(a=this.dropPlaceholder=document.createElement("div"),a.className="packery-drop-placeholder",a.style.position="absolute"),a.style.width=this.size.width+"px",a.style.height=this.size.height+"px",this.positionDropPlaceholder(),this.layout.element.appendChild(a)},f.positionDropPlaceholder=function(){this.dropPlaceholder.style[d]="translate("+this.rect.x+"px, "+this.rect.y+"px)"},f.hideDropPlaceholder=function(){this.layout.element.removeChild(this.dropPlaceholder)},e}),function(a,b){"function"==typeof define&&define.amd?define("packery/js/packery",["get-size/get-size","outlayer/outlayer","./rect","./packer","./item"],b):"object"==typeof module&&module.exports?module.exports=b(require("get-size"),require("outlayer"),require("./rect"),require("./packer"),require("./item")):a.Packery=b(a.getSize,a.Outlayer,a.Packery.Rect,a.Packery.Packer,a.Packery.Item)}(window,function(a,b,c,d,e){function f(a,b){return a.position.y-b.position.y||a.position.x-b.position.x}function g(a,b){return a.position.x-b.position.x||a.position.y-b.position.y}function h(a,b){var c=b.x-a.x,d=b.y-a.y;return Math.sqrt(c*c+d*d)}c.prototype.canFit=function(a){return this.width>=a.width-1&&this.height>=a.height-1};var i=b.create("packery");i.Item=e;var j=i.prototype;j._create=function(){b.prototype._create.call(this),this.packer=new d,this.shiftPacker=new d,this.isEnabled=!0,this.dragItemCount=0;var a=this;this.handleDraggabilly={dragStart:function(){a.itemDragStart(this.element)},dragMove:function(){a.itemDragMove(this.element,this.position.x,this.position.y)},dragEnd:function(){a.itemDragEnd(this.element)}},this.handleUIDraggable={start:function(b,c){c&&a.itemDragStart(b.currentTarget)},drag:function(b,c){c&&a.itemDragMove(b.currentTarget,c.position.left,c.position.top)},stop:function(b,c){c&&a.itemDragEnd(b.currentTarget)}}},j._resetLayout=function(){this.getSize(),this._getMeasurements();var a,b,c;this._getOption("horizontal")?(a=1/0,b=this.size.innerHeight+this.gutter,c="rightwardTopToBottom"):(a=this.size.innerWidth+this.gutter,b=1/0,c="downwardLeftToRight"),this.packer.width=this.shiftPacker.width=a,this.packer.height=this.shiftPacker.height=b,this.packer.sortDirection=this.shiftPacker.sortDirection=c,this.packer.reset(),this.maxY=0,this.maxX=0},j._getMeasurements=function(){this._getMeasurement("columnWidth","width"),this._getMeasurement("rowHeight","height"),this._getMeasurement("gutter","width")},j._getItemLayoutPosition=function(a){if(this._setRectSize(a.element,a.rect),this.isShifting||this.dragItemCount>0){var b=this._getPackMethod();this.packer[b](a.rect)}else this.packer.pack(a.rect);return this._setMaxXY(a.rect),a.rect},j.shiftLayout=function(){this.isShifting=!0,this.layout(),delete this.isShifting},j._getPackMethod=function(){return this._getOption("horizontal")?"rowPack":"columnPack"},j._setMaxXY=function(a){this.maxX=Math.max(a.x+a.width,this.maxX),this.maxY=Math.max(a.y+a.height,this.maxY)},j._setRectSize=function(b,c){var d=a(b),e=d.outerWidth,f=d.outerHeight;(e||f)&&(e=this._applyGridGutter(e,this.columnWidth),f=this._applyGridGutter(f,this.rowHeight)),c.width=Math.min(e,this.packer.width),c.height=Math.min(f,this.packer.height)},j._applyGridGutter=function(a,b){if(!b)return a+this.gutter;b+=this.gutter;var c=a%b,d=c&&1>c?"round":"ceil";return a=Math[d](a/b)*b},j._getContainerSize=function(){return this._getOption("horizontal")?{width:this.maxX-this.gutter}:{height:this.maxY-this.gutter}},j._manageStamp=function(a){var b,d=this.getItem(a);if(d&&d.isPlacing)b=d.rect;else{var e=this._getElementOffset(a);b=new c({x:this._getOption("originLeft")?e.left:e.right,y:this._getOption("originTop")?e.top:e.bottom})}this._setRectSize(a,b),this.packer.placed(b),this._setMaxXY(b)},j.sortItemsByPosition=function(){var a=this._getOption("horizontal")?g:f;this.items.sort(a)},j.fit=function(a,b,c){var d=this.getItem(a);d&&(this.stamp(d.element),d.enablePlacing(),this.updateShiftTargets(d),b=void 0===b?d.rect.x:b,c=void 0===c?d.rect.y:c,this.shift(d,b,c),this._bindFitEvents(d),d.moveTo(d.rect.x,d.rect.y),this.shiftLayout(),this.unstamp(d.element),this.sortItemsByPosition(),d.disablePlacing())},j._bindFitEvents=function(a){function b(){d++,2==d&&c.dispatchEvent("fitComplete",null,[a])}var c=this,d=0;a.once("layout",b),this.once("layoutComplete",b)},j.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&(this.options.shiftPercentResize?this.resizeShiftPercentLayout():this.layout())},j.needsResizeLayout=function(){var b=a(this.element),c=this._getOption("horizontal")?"innerHeight":"innerWidth";return b[c]!=this.size[c]},j.resizeShiftPercentLayout=function(){var b=this._getItemsForLayout(this.items),c=this._getOption("horizontal"),d=c?"y":"x",e=c?"height":"width",f=c?"rowHeight":"columnWidth",g=c?"innerHeight":"innerWidth",h=this[f];if(h=h&&h+this.gutter){this._getMeasurements();var i=this[f]+this.gutter;b.forEach(function(a){var b=Math.round(a.rect[d]/h);a.rect[d]=b*i})}else{var j=a(this.element)[g]+this.gutter,k=this.packer[e];b.forEach(function(a){a.rect[d]=a.rect[d]/k*j})}this.shiftLayout()},j.itemDragStart=function(a){if(this.isEnabled){this.stamp(a);var b=this.getItem(a);b&&(b.enablePlacing(),b.showDropPlaceholder(),this.dragItemCount++,this.updateShiftTargets(b))}},j.updateShiftTargets=function(a){this.shiftPacker.reset(),this._getBoundingRect();var b=this._getOption("originLeft"),d=this._getOption("originTop");this.stamps.forEach(function(a){var e=this.getItem(a);if(!e||!e.isPlacing){var f=this._getElementOffset(a),g=new c({x:b?f.left:f.right,y:d?f.top:f.bottom});this._setRectSize(a,g),this.shiftPacker.placed(g)}},this);var e=this._getOption("horizontal"),f=e?"rowHeight":"columnWidth",g=e?"height":"width";this.shiftTargetKeys=[],this.shiftTargets=[];var h,i=this[f];if(i=i&&i+this.gutter){var j=Math.ceil(a.rect[g]/i),k=Math.floor((this.shiftPacker[g]+this.gutter)/i);h=(k-j)*i;for(var l=0;k>l;l++)this._addShiftTarget(l*i,0,h)}else h=this.shiftPacker[g]+this.gutter-a.rect[g],this._addShiftTarget(0,0,h);var m=this._getItemsForLayout(this.items),n=this._getPackMethod();m.forEach(function(a){var b=a.rect;this._setRectSize(a.element,b),this.shiftPacker[n](b),this._addShiftTarget(b.x,b.y,h);var c=e?b.x+b.width:b.x,d=e?b.y:b.y+b.height;if(this._addShiftTarget(c,d,h),i)for(var f=Math.round(b[g]/i),j=1;f>j;j++){var k=e?c:b.x+i*j,l=e?b.y+i*j:d;this._addShiftTarget(k,l,h)}},this)},j._addShiftTarget=function(a,b,c){var d=this._getOption("horizontal")?b:a;if(!(0!==d&&d>c)){var e=a+","+b,f=-1!=this.shiftTargetKeys.indexOf(e);f||(this.shiftTargetKeys.push(e),this.shiftTargets.push({x:a,y:b}))}},j.shift=function(a,b,c){var d,e=1/0,f={x:b,y:c};this.shiftTargets.forEach(function(a){var b=h(a,f);e>b&&(d=a,e=b)}),a.rect.x=d.x,a.rect.y=d.y};var k=120;j.itemDragMove=function(a,b,c){function d(){f.shift(e,b,c),e.positionDropPlaceholder(),f.layout()}var e=this.isEnabled&&this.getItem(a);if(e){b-=this.size.paddingLeft,c-=this.size.paddingTop;var f=this,g=new Date;this._itemDragTime&&g-this._itemDragTime<k?(clearTimeout(this.dragTimeout),this.dragTimeout=setTimeout(d,k)):(d(),this._itemDragTime=g)}},j.itemDragEnd=function(a){function b(){d++,2==d&&(c.element.classList.remove("is-positioning-post-drag"),c.hideDropPlaceholder(),e.dispatchEvent("dragItemPositioned",null,[c]))}var c=this.isEnabled&&this.getItem(a);if(c){clearTimeout(this.dragTimeout),c.element.classList.add("is-positioning-post-drag");var d=0,e=this;c.once("layout",b),this.once("layoutComplete",b),c.moveTo(c.rect.x,c.rect.y),this.layout(),this.dragItemCount=Math.max(0,this.dragItemCount-1),this.sortItemsByPosition(),c.disablePlacing(),this.unstamp(c.element)}},j.bindDraggabillyEvents=function(a){this._bindDraggabillyEvents(a,"on")},j.unbindDraggabillyEvents=function(a){this._bindDraggabillyEvents(a,"off")},j._bindDraggabillyEvents=function(a,b){var c=this.handleDraggabilly;a[b]("dragStart",c.dragStart),a[b]("dragMove",c.dragMove),a[b]("dragEnd",c.dragEnd)},j.bindUIDraggableEvents=function(a){this._bindUIDraggableEvents(a,"on")},j.unbindUIDraggableEvents=function(a){this._bindUIDraggableEvents(a,"off")},j._bindUIDraggableEvents=function(a,b){var c=this.handleUIDraggable;a[b]("dragstart",c.start)[b]("drag",c.drag)[b]("dragstop",c.stop)};var l=j.destroy;return j.destroy=function(){l.apply(this,arguments),this.isEnabled=!1},i.Rect=c,i.Packer=d,i}),function(a,b){"function"==typeof define&&define.amd?define(["isotope-layout/js/layout-mode","packery/js/packery"],b):"object"==typeof module&&module.exports?module.exports=b(require("isotope-layout/js/layout-mode"),require("packery")):b(a.Isotope.LayoutMode,a.Packery)}(window,function(a,b){var c=a.create("packery"),d=c.prototype,e={_getElementOffset:!0,_getMeasurement:!0};for(var f in b.prototype)e[f]||(d[f]=b.prototype[f]);var g=d._resetLayout;d._resetLayout=function(){this.packer=this.packer||new b.Packer,this.shiftPacker=this.shiftPacker||new b.Packer,g.apply(this,arguments)};var h=d._getItemLayoutPosition;d._getItemLayoutPosition=function(a){return a.rect=a.rect||new b.Rect,h.call(this,a)};var i=d.needsResizeLayout;d.needsResizeLayout=function(){return this._getOption("horizontal")?this.needsVerticalResizeLayout():i.call(this)};var j=d._getOption;return d._getOption=function(a){return"horizontal"==a?void 0!==this.options.isHorizontal?this.options.isHorizontal:this.options.horizontal:j.apply(this.isotope,arguments)},c});
!function(t,e){function n(t,e,n){var r=t.children(),o=!1;t.empty();for(var i=0,d=r.length;d>i;i++){var l=r.eq(i);if(t.append(l),n&&t.append(n),a(t,e)){l.remove(),o=!0;break}n&&n.detach()}return o}function r(e,n,i,d,l){var s=!1,c="table, thead, tbody, tfoot, tr, col, colgroup, object, embed, param, ol, ul, dl, blockquote, select, optgroup, option, textarea, script, style",u="script";return e.contents().detach().each(function(){var h=this,f=t(h);if("undefined"==typeof h||3==h.nodeType&&0==t.trim(h.data).length)return!0;if(f.is(u))e.append(f);else{if(s)return!0;e.append(f),l&&e[e.is(c)?"after":"append"](l),a(i,d)&&(s=3==h.nodeType?o(f,n,i,d,l):r(f,n,i,d,l),s||(f.detach(),s=!0)),s||l&&l.detach()}}),s}function o(e,n,r,o,d){var c=e[0];if(!c)return!1;var h=s(c),f=-1!==h.indexOf(" ")?" ":"ã€€",p="letter"==o.wrap?"":f,g=h.split(p),v=-1,w=-1,b=0,y=g.length-1;for(o.fallbackToLetter&&0==b&&0==y&&(p="",g=h.split(p),y=g.length-1);y>=b&&(0!=b||0!=y);){var m=Math.floor((b+y)/2);if(m==w)break;w=m,l(c,g.slice(0,w+1).join(p)+o.ellipsis),a(r,o)?(y=w,o.fallbackToLetter&&0==b&&0==y&&(p="",g=g[0].split(p),v=-1,w=-1,b=0,y=g.length-1)):(v=w,b=w)}if(-1==v||1==g.length&&0==g[0].length){var x=e.parent();e.detach();var T=d&&d.closest(x).length?d.length:0;x.contents().length>T?c=u(x.contents().eq(-1-T),n):(c=u(x,n,!0),T||x.detach()),c&&(h=i(s(c),o),l(c,h),T&&d&&t(c).parent().append(d))}else h=i(g.slice(0,v+1).join(p),o),l(c,h);return!0}function a(t,e){return t.innerHeight()>e.maxHeight}function i(e,n){for(;t.inArray(e.slice(-1),n.lastCharacter.remove)>-1;)e=e.slice(0,-1);return t.inArray(e.slice(-1),n.lastCharacter.noEllipsis)<0&&(e+=n.ellipsis),e}function d(t){return{width:t.innerWidth(),height:t.innerHeight()}}function l(t,e){t.innerText?t.innerText=e:t.nodeValue?t.nodeValue=e:t.textContent&&(t.textContent=e)}function s(t){return t.innerText?t.innerText:t.nodeValue?t.nodeValue:t.textContent?t.textContent:""}function c(t){do t=t.previousSibling;while(t&&1!==t.nodeType&&3!==t.nodeType);return t}function u(e,n,r){var o,a=e&&e[0];if(a){if(!r){if(3===a.nodeType)return a;if(t.trim(e.text()))return u(e.contents().last(),n)}for(o=c(a);!o;){if(e=e.parent(),e.is(n)||!e.length)return!1;o=c(e[0])}if(o)return u(t(o),n)}return!1}function h(e,n){return e?"string"==typeof e?(e=t(e,n),e.length?e:!1):e.jquery?e:!1:!1}function f(t){for(var e=t.innerHeight(),n=["paddingTop","paddingBottom"],r=0,o=n.length;o>r;r++){var a=parseInt(t.css(n[r]),10);isNaN(a)&&(a=0),e-=a}return e}if(!t.fn.dotdotdot){t.fn.dotdotdot=function(e){if(0==this.length)return t.fn.dotdotdot.debug('No element found for "'+this.selector+'".'),this;if(this.length>1)return this.each(function(){t(this).dotdotdot(e)});var o=this;o.data("dotdotdot")&&o.trigger("destroy.dot"),o.data("dotdotdot-style",o.attr("style")||""),o.css("word-wrap","break-word"),"nowrap"===o.css("white-space")&&o.css("white-space","normal"),o.bind_events=function(){return o.bind("update.dot",function(e,d){e.preventDefault(),e.stopPropagation(),l.maxHeight="number"==typeof l.height?l.height:f(o),l.maxHeight+=l.tolerance,"undefined"!=typeof d&&(("string"==typeof d||d instanceof HTMLElement)&&(d=t("<div />").append(d).contents()),d instanceof t&&(i=d)),g=o.wrapInner('<div class="dotdotdot" />').children(),g.contents().detach().end().append(i.clone(!0)).find("br").replaceWith("  <br />  ").end().css({height:"auto",width:"auto",border:"none",padding:0,margin:0});var c=!1,u=!1;return s.afterElement&&(c=s.afterElement.clone(!0),c.show(),s.afterElement.detach()),a(g,l)&&(u="children"==l.wrap?n(g,l,c):r(g,o,g,l,c)),g.replaceWith(g.contents()),g=null,t.isFunction(l.callback)&&l.callback.call(o[0],u,i),s.isTruncated=u,u}).bind("isTruncated.dot",function(t,e){return t.preventDefault(),t.stopPropagation(),"function"==typeof e&&e.call(o[0],s.isTruncated),s.isTruncated}).bind("originalContent.dot",function(t,e){return t.preventDefault(),t.stopPropagation(),"function"==typeof e&&e.call(o[0],i),i}).bind("destroy.dot",function(t){t.preventDefault(),t.stopPropagation(),o.unwatch().unbind_events().contents().detach().end().append(i).attr("style",o.data("dotdotdot-style")||"").data("dotdotdot",!1)}),o},o.unbind_events=function(){return o.unbind(".dot"),o},o.watch=function(){if(o.unwatch(),"window"==l.watch){var e=t(window),n=e.width(),r=e.height();e.bind("resize.dot"+s.dotId,function(){n==e.width()&&r==e.height()&&l.windowResizeFix||(n=e.width(),r=e.height(),u&&clearInterval(u),u=setTimeout(function(){o.trigger("update.dot")},10))})}else c=d(o),u=setInterval(function(){var t=d(o);(c.width!=t.width||c.height!=t.height)&&(o.trigger("update.dot"),c=d(o))},100);return o},o.unwatch=function(){return t(window).unbind("resize.dot"+s.dotId),u&&clearInterval(u),o};var i=o.contents(),l=t.extend(!0,{},t.fn.dotdotdot.defaults,e),s={},c={},u=null,g=null;return l.lastCharacter.remove instanceof Array||(l.lastCharacter.remove=t.fn.dotdotdot.defaultArrays.lastCharacter.remove),l.lastCharacter.noEllipsis instanceof Array||(l.lastCharacter.noEllipsis=t.fn.dotdotdot.defaultArrays.lastCharacter.noEllipsis),s.afterElement=h(l.after,o),s.isTruncated=!1,s.dotId=p++,o.data("dotdotdot",!0).bind_events().trigger("update.dot"),l.watch&&o.watch(),o},t.fn.dotdotdot.defaults={ellipsis:"... ",wrap:"word",fallbackToLetter:!0,lastCharacter:{},tolerance:0,callback:null,after:null,height:null,watch:!1,windowResizeFix:!0},t.fn.dotdotdot.defaultArrays={lastCharacter:{remove:[" ","ã€€",",",";",".","!","?"],noEllipsis:[]}},t.fn.dotdotdot.debug=function(){};var p=1,g=t.fn.html;t.fn.html=function(n){return n!=e&&!t.isFunction(n)&&this.data("dotdotdot")?this.trigger("update",[n]):g.apply(this,arguments)};var v=t.fn.text;t.fn.text=function(n){return n!=e&&!t.isFunction(n)&&this.data("dotdotdot")?(n=t("<div />").text(n).html(),this.trigger("update",[n])):v.apply(this,arguments)}}}(jQuery);
jQuery.easing['jswing']=jQuery.easing['swing'];
jQuery.extend(jQuery.easing,
{
def: 'easeOutQuad',
swing: function (x, t, b, c, d){
return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
},
easeInQuad: function (x, t, b, c, d){
return c*(t/=d)*t + b;
},
easeOutQuad: function (x, t, b, c, d){
return -c *(t/=d)*(t-2) + b;
},
easeInOutQuad: function (x, t, b, c, d){
if((t/=d/2) < 1) return c/2*t*t + b;
return -c/2 * ((--t)*(t-2) - 1) + b;
},
easeInCubic: function (x, t, b, c, d){
return c*(t/=d)*t*t + b;
},
easeOutCubic: function (x, t, b, c, d){
return c*((t=t/d-1)*t*t + 1) + b;
},
easeInOutCubic: function (x, t, b, c, d){
if((t/=d/2) < 1) return c/2*t*t*t + b;
return c/2*((t-=2)*t*t + 2) + b;
},
easeInQuart: function (x, t, b, c, d){
return c*(t/=d)*t*t*t + b;
},
easeOutQuart: function (x, t, b, c, d){
return -c * ((t=t/d-1)*t*t*t - 1) + b;
},
easeInOutQuart: function (x, t, b, c, d){
if((t/=d/2) < 1) return c/2*t*t*t*t + b;
return -c/2 * ((t-=2)*t*t*t - 2) + b;
},
easeInQuint: function (x, t, b, c, d){
return c*(t/=d)*t*t*t*t + b;
},
easeOutQuint: function (x, t, b, c, d){
return c*((t=t/d-1)*t*t*t*t + 1) + b;
},
easeInOutQuint: function (x, t, b, c, d){
if((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
return c/2*((t-=2)*t*t*t*t + 2) + b;
},
easeInSine: function (x, t, b, c, d){
return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
},
easeOutSine: function (x, t, b, c, d){
return c * Math.sin(t/d * (Math.PI/2)) + b;
},
easeInOutSine: function (x, t, b, c, d){
return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
},
easeInExpo: function (x, t, b, c, d){
return (t==0) ? b:c * Math.pow(2, 10 * (t/d - 1)) + b;
},
easeOutExpo: function (x, t, b, c, d){
return (t==d) ? b+c:c * (-Math.pow(2, -10 * t/d) + 1) + b;
},
easeInOutExpo: function (x, t, b, c, d){
if(t==0) return b;
if(t==d) return b+c;
if((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
},
easeInCirc: function (x, t, b, c, d){
return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
},
easeOutCirc: function (x, t, b, c, d){
return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
},
easeInOutCirc: function (x, t, b, c, d){
if((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
},
easeInElastic: function (x, t, b, c, d){
var s=1.70158;var p=0;var a=c;
if(t==0) return b;  if((t/=d)==1) return b+c;  if(!p) p=d*.3;
if(a < Math.abs(c)){ a=c; var s=p/4; }
else var s=p/(2*Math.PI) * Math.asin (c/a);
return -(a*Math.pow(2,10*(t-=1)) * Math.sin((t*d-s)*(2*Math.PI)/p)) + b;
},
easeOutElastic: function (x, t, b, c, d){
var s=1.70158;var p=0;var a=c;
if(t==0) return b;  if((t/=d)==1) return b+c;  if(!p) p=d*.3;
if(a < Math.abs(c)){ a=c; var s=p/4; }
else var s=p/(2*Math.PI) * Math.asin (c/a);
return a*Math.pow(2,-10*t) * Math.sin((t*d-s)*(2*Math.PI)/p) + c + b;
},
easeInOutElastic: function (x, t, b, c, d){
var s=1.70158;var p=0;var a=c;
if(t==0) return b;  if((t/=d/2)==2) return b+c;  if(!p) p=d*(.3*1.5);
if(a < Math.abs(c)){ a=c; var s=p/4; }
else var s=p/(2*Math.PI) * Math.asin (c/a);
if(t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin((t*d-s)*(2*Math.PI)/p)) + b;
return a*Math.pow(2,-10*(t-=1)) * Math.sin((t*d-s)*(2*Math.PI)/p)*.5 + c + b;
},
easeInBack: function (x, t, b, c, d, s){
if(s==undefined) s=1.70158;
return c*(t/=d)*t*((s+1)*t - s) + b;
},
easeOutBack: function (x, t, b, c, d, s){
if(s==undefined) s=1.70158;
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
},
easeInOutBack: function (x, t, b, c, d, s){
if(s==undefined) s=1.70158;
if((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
},
easeInBounce: function (x, t, b, c, d){
return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
},
easeOutBounce: function (x, t, b, c, d){
if((t/=d) < (1/2.75)){
return c*(7.5625*t*t) + b;
}else if(t < (2/2.75)){
return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
}else if(t < (2.5/2.75)){
return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
}else{
return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
}},
easeInOutBounce: function (x, t, b, c, d){
if(t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
}});
(function($){
$.fn.fitText=function(kompressor, options){
var compressor=kompressor||1,
settings=$.extend({
'minFontSize':Number.NEGATIVE_INFINITY,
'maxFontSize':Number.POSITIVE_INFINITY
}, options);
return this.each(function(){
var $this=$(this);
var resizer=function (){
$this.css('font-size', Math.max(Math.min($this.width() / (compressor*10), parseFloat(settings.maxFontSize)), parseFloat(settings.minFontSize)));
};
resizer();
$(window).on('resize.fittext orientationchange.fittext', resizer);
});
};})(jQuery);
!function(factory){"use strict";"function"==typeof define&&define.amd?define(["jquery"],factory):"object"==typeof module&&module.exports?module.exports=factory(require("jquery")):jQuery&&!jQuery.fn.hoverIntent&&factory(jQuery)}(function($){"use strict";var cX,cY,_cfg={interval:100,sensitivity:6,timeout:0},INSTANCE_COUNT=0,track=function(ev){cX=ev.pageX,cY=ev.pageY},compare=function(ev,$el,s,cfg){if(Math.sqrt((s.pX-cX)*(s.pX-cX)+(s.pY-cY)*(s.pY-cY))<cfg.sensitivity)return $el.off(s.event,track),delete s.timeoutId,s.isActive=!0,ev.pageX=cX,ev.pageY=cY,delete s.pX,delete s.pY,cfg.over.apply($el[0],[ev]);s.pX=cX,s.pY=cY,s.timeoutId=setTimeout(function(){compare(ev,$el,s,cfg)},cfg.interval)};$.fn.hoverIntent=function(handlerIn,handlerOut,selector){var instanceId=INSTANCE_COUNT++,cfg=$.extend({},_cfg);$.isPlainObject(handlerIn)?(cfg=$.extend(cfg,handlerIn),$.isFunction(cfg.out)||(cfg.out=cfg.over)):cfg=$.isFunction(handlerOut)?$.extend(cfg,{over:handlerIn,out:handlerOut,selector:selector}):$.extend(cfg,{over:handlerIn,out:handlerIn,selector:handlerOut});var handleHover=function(e){var ev=$.extend({},e),$el=$(this),hoverIntentData=$el.data("hoverIntent");hoverIntentData||$el.data("hoverIntent",hoverIntentData={});var state=hoverIntentData[instanceId];state||(hoverIntentData[instanceId]=state={id:instanceId}),state.timeoutId&&(state.timeoutId=clearTimeout(state.timeoutId));var mousemove=state.event="mousemove.hoverIntent.hoverIntent"+instanceId;if("mouseenter"===e.type){if(state.isActive)return;state.pX=ev.pageX,state.pY=ev.pageY,$el.off(mousemove,track).on(mousemove,track),state.timeoutId=setTimeout(function(){compare(ev,$el,state,cfg)},cfg.interval)}else{if(!state.isActive)return;$el.off(mousemove,track),state.timeoutId=setTimeout(function(){!function(ev,$el,s,out){delete $el.data("hoverIntent")[s.id],out.apply($el[0],[ev])}(ev,$el,state,cfg.out)},cfg.timeout)}};return this.on({"mouseenter.hoverIntent":handleHover,"mouseleave.hoverIntent":handleHover},cfg.selector)}});
!function(a,b,c,d){function e(b,c){this.element=b,this.options=a.extend({},g,c),this._defaults=g,this._name=f,this.init()}var f="stellar",g={scrollProperty:"scroll",positionProperty:"position",horizontalScrolling:!0,verticalScrolling:!0,horizontalOffset:0,verticalOffset:0,responsive:!1,parallaxBackgrounds:!0,parallaxElements:!0,hideDistantElements:!0,hideElement:function(a){a.hide()},showElement:function(a){a.show()}},h={scroll:{getLeft:function(a){return a.scrollLeft()},setLeft:function(a,b){a.scrollLeft(b)},getTop:function(a){return a.scrollTop()},setTop:function(a,b){a.scrollTop(b)}},position:{getLeft:function(a){return-1*parseInt(a.css("left"),10)},getTop:function(a){return-1*parseInt(a.css("top"),10)}},margin:{getLeft:function(a){return-1*parseInt(a.css("margin-left"),10)},getTop:function(a){return-1*parseInt(a.css("margin-top"),10)}},transform:{getLeft:function(a){var b=getComputedStyle(a[0])[k];return"none"!==b?-1*parseInt(b.match(/(-?[0-9]+)/g)[4],10):0},getTop:function(a){var b=getComputedStyle(a[0])[k];return"none"!==b?-1*parseInt(b.match(/(-?[0-9]+)/g)[5],10):0}}},i={position:{setLeft:function(a,b){a.css("left",b)},setTop:function(a,b){a.css("top",b)}},transform:{setPosition:function(a,b,c,d,e){a[0].style[k]="translate3d("+(b-c)+"px, "+(d-e)+"px, 0)"}}},j=function(){var b,c=/^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/,d=a("script")[0].style,e="";for(b in d)if(c.test(b)){e=b.match(c)[0];break}return"WebkitOpacity"in d&&(e="Webkit"),"KhtmlOpacity"in d&&(e="Khtml"),function(a){return e+(e.length>0?a.charAt(0).toUpperCase()+a.slice(1):a)}}(),k=j("transform"),l=a("<div />",{style:"background:#fff"}).css("background-position-x")!==d,m=l?function(a,b,c){a.css({"background-position-x":b,"background-position-y":c})}:function(a,b,c){a.css("background-position",b+" "+c)},n=l?function(a){return[a.css("background-position-x"),a.css("background-position-y")]}:function(a){return a.css("background-position").split(" ")},o=b.requestAnimationFrame||b.webkitRequestAnimationFrame||b.mozRequestAnimationFrame||b.oRequestAnimationFrame||b.msRequestAnimationFrame||function(a){setTimeout(a,1e3/60)};e.prototype={init:function(){this.options.name=f+"_"+Math.floor(1e9*Math.random()),this._defineElements(),this._defineGetters(),this._defineSetters(),this._handleWindowLoadAndResize(),this._detectViewport(),this.refresh({firstLoad:!0}),"scroll"===this.options.scrollProperty?this._handleScrollEvent():this._startAnimationLoop()},_defineElements:function(){this.element===c.body&&(this.element=b),this.$scrollElement=a(this.element),this.$element=this.element===b?a("body"):this.$scrollElement,this.$viewportElement=this.options.viewportElement!==d?a(this.options.viewportElement):this.$scrollElement[0]===b||"scroll"===this.options.scrollProperty?this.$scrollElement:this.$scrollElement.parent()},_defineGetters:function(){var a=this,b=h[a.options.scrollProperty];this._getScrollLeft=function(){return b.getLeft(a.$scrollElement)},this._getScrollTop=function(){return b.getTop(a.$scrollElement)}},_defineSetters:function(){var b=this,c=h[b.options.scrollProperty],d=i[b.options.positionProperty],e=c.setLeft,f=c.setTop;this._setScrollLeft="function"==typeof e?function(a){e(b.$scrollElement,a)}:a.noop,this._setScrollTop="function"==typeof f?function(a){f(b.$scrollElement,a)}:a.noop,this._setPosition=d.setPosition||function(a,c,e,f,g){b.options.horizontalScrolling&&d.setLeft(a,c,e),b.options.verticalScrolling&&d.setTop(a,f,g)}},_handleWindowLoadAndResize:function(){var c=this,d=a(b);c.options.responsive&&d.bind("load."+this.name,function(){c.refresh()}),d.bind("resize."+this.name,function(){c._detectViewport(),c.options.responsive&&c.refresh()})},refresh:function(c){var d=this,e=d._getScrollLeft(),f=d._getScrollTop();c&&c.firstLoad||this._reset(),this._setScrollLeft(0),this._setScrollTop(0),this._setOffsets(),this._findParticles(),this._findBackgrounds(),c&&c.firstLoad&&/WebKit/.test(navigator.userAgent)&&a(b).load(function(){var a=d._getScrollLeft(),b=d._getScrollTop();d._setScrollLeft(a+1),d._setScrollTop(b+1),d._setScrollLeft(a),d._setScrollTop(b)}),this._setScrollLeft(e),this._setScrollTop(f)},_detectViewport:function(){var a=this.$viewportElement.offset(),b=null!==a&&a!==d;this.viewportWidth=this.$viewportElement.width(),this.viewportHeight=this.$viewportElement.height(),this.viewportOffsetTop=b?a.top:0,this.viewportOffsetLeft=b?a.left:0},_findParticles:function(){{var b=this;this._getScrollLeft(),this._getScrollTop()}if(this.particles!==d)for(var c=this.particles.length-1;c>=0;c--)this.particles[c].$element.data("stellar-elementIsActive",d);this.particles=[],this.options.parallaxElements&&this.$element.find("[data-stellar-ratio]").each(function(){var c,e,f,g,h,i,j,k,l,m=a(this),n=0,o=0,p=0,q=0;if(m.data("stellar-elementIsActive")){if(m.data("stellar-elementIsActive")!==this)return}else m.data("stellar-elementIsActive",this);b.options.showElement(m),m.data("stellar-startingLeft")?(m.css("left",m.data("stellar-startingLeft")),m.css("top",m.data("stellar-startingTop"))):(m.data("stellar-startingLeft",m.css("left")),m.data("stellar-startingTop",m.css("top"))),f=m.position().left,g=m.position().top,h="auto"===m.css("margin-left")?0:parseInt(m.css("margin-left"),10),i="auto"===m.css("margin-top")?0:parseInt(m.css("margin-top"),10),k=m.offset().left-h,l=m.offset().top-i,m.parents().each(function(){var b=a(this);return b.data("stellar-offset-parent")===!0?(n=p,o=q,j=b,!1):(p+=b.position().left,void(q+=b.position().top))}),c=m.data("stellar-horizontal-offset")!==d?m.data("stellar-horizontal-offset"):j!==d&&j.data("stellar-horizontal-offset")!==d?j.data("stellar-horizontal-offset"):b.horizontalOffset,e=m.data("stellar-vertical-offset")!==d?m.data("stellar-vertical-offset"):j!==d&&j.data("stellar-vertical-offset")!==d?j.data("stellar-vertical-offset"):b.verticalOffset,b.particles.push({$element:m,$offsetParent:j,isFixed:"fixed"===m.css("position"),horizontalOffset:c,verticalOffset:e,startingPositionLeft:f,startingPositionTop:g,startingOffsetLeft:k,startingOffsetTop:l,parentOffsetLeft:n,parentOffsetTop:o,stellarRatio:m.data("stellar-ratio")!==d?m.data("stellar-ratio"):1,width:m.outerWidth(!0),height:m.outerHeight(!0),isHidden:!1})})},_findBackgrounds:function(){var b,c=this,e=this._getScrollLeft(),f=this._getScrollTop();this.backgrounds=[],this.options.parallaxBackgrounds&&(b=this.$element.find("[data-stellar-background-ratio]"),this.$element.data("stellar-background-ratio")&&(b=b.add(this.$element)),b.each(function(){var b,g,h,i,j,k,l,o=a(this),p=n(o),q=0,r=0,s=0,t=0;if(o.data("stellar-backgroundIsActive")){if(o.data("stellar-backgroundIsActive")!==this)return}else o.data("stellar-backgroundIsActive",this);o.data("stellar-backgroundStartingLeft")?m(o,o.data("stellar-backgroundStartingLeft"),o.data("stellar-backgroundStartingTop")):(o.data("stellar-backgroundStartingLeft",p[0]),o.data("stellar-backgroundStartingTop",p[1])),h="auto"===o.css("margin-left")?0:parseInt(o.css("margin-left"),10),i="auto"===o.css("margin-top")?0:parseInt(o.css("margin-top"),10),j=o.offset().left-h-e,k=o.offset().top-i-f,o.parents().each(function(){var b=a(this);return b.data("stellar-offset-parent")===!0?(q=s,r=t,l=b,!1):(s+=b.position().left,void(t+=b.position().top))}),b=o.data("stellar-horizontal-offset")!==d?o.data("stellar-horizontal-offset"):l!==d&&l.data("stellar-horizontal-offset")!==d?l.data("stellar-horizontal-offset"):c.horizontalOffset,g=o.data("stellar-vertical-offset")!==d?o.data("stellar-vertical-offset"):l!==d&&l.data("stellar-vertical-offset")!==d?l.data("stellar-vertical-offset"):c.verticalOffset,c.backgrounds.push({$element:o,$offsetParent:l,isFixed:"fixed"===o.css("background-attachment"),horizontalOffset:b,verticalOffset:g,startingValueLeft:p[0],startingValueTop:p[1],startingBackgroundPositionLeft:isNaN(parseInt(p[0],10))?0:parseInt(p[0],10),startingBackgroundPositionTop:isNaN(parseInt(p[1],10))?0:parseInt(p[1],10),startingPositionLeft:o.position().left,startingPositionTop:o.position().top,startingOffsetLeft:j,startingOffsetTop:k,parentOffsetLeft:q,parentOffsetTop:r,stellarRatio:o.data("stellar-background-ratio")===d?1:o.data("stellar-background-ratio")})}))},_reset:function(){var a,b,c,d,e;for(e=this.particles.length-1;e>=0;e--)a=this.particles[e],b=a.$element.data("stellar-startingLeft"),c=a.$element.data("stellar-startingTop"),this._setPosition(a.$element,b,b,c,c),this.options.showElement(a.$element),a.$element.data("stellar-startingLeft",null).data("stellar-elementIsActive",null).data("stellar-backgroundIsActive",null);for(e=this.backgrounds.length-1;e>=0;e--)d=this.backgrounds[e],d.$element.data("stellar-backgroundStartingLeft",null).data("stellar-backgroundStartingTop",null),m(d.$element,d.startingValueLeft,d.startingValueTop)},destroy:function(){this._reset(),this.$scrollElement.unbind("resize."+this.name).unbind("scroll."+this.name),this._animationLoop=a.noop,a(b).unbind("load."+this.name).unbind("resize."+this.name)},_setOffsets:function(){var c=this,d=a(b);d.unbind("resize.horizontal-"+this.name).unbind("resize.vertical-"+this.name),"function"==typeof this.options.horizontalOffset?(this.horizontalOffset=this.options.horizontalOffset(),d.bind("resize.horizontal-"+this.name,function(){c.horizontalOffset=c.options.horizontalOffset()})):this.horizontalOffset=this.options.horizontalOffset,"function"==typeof this.options.verticalOffset?(this.verticalOffset=this.options.verticalOffset(),d.bind("resize.vertical-"+this.name,function(){c.verticalOffset=c.options.verticalOffset()})):this.verticalOffset=this.options.verticalOffset},_repositionElements:function(){var a,b,c,d,e,f,g,h,i,j,k=this._getScrollLeft(),l=this._getScrollTop(),n=!0,o=!0;if(this.currentScrollLeft!==k||this.currentScrollTop!==l||this.currentWidth!==this.viewportWidth||this.currentHeight!==this.viewportHeight){for(this.currentScrollLeft=k,this.currentScrollTop=l,this.currentWidth=this.viewportWidth,this.currentHeight=this.viewportHeight,j=this.particles.length-1;j>=0;j--)a=this.particles[j],b=a.isFixed?1:0,this.options.horizontalScrolling?(f=(k+a.horizontalOffset+this.viewportOffsetLeft+a.startingPositionLeft-a.startingOffsetLeft+a.parentOffsetLeft)*-(a.stellarRatio+b-1)+a.startingPositionLeft,h=f-a.startingPositionLeft+a.startingOffsetLeft):(f=a.startingPositionLeft,h=a.startingOffsetLeft),this.options.verticalScrolling?(g=(l+a.verticalOffset+this.viewportOffsetTop+a.startingPositionTop-a.startingOffsetTop+a.parentOffsetTop)*-(a.stellarRatio+b-1)+a.startingPositionTop,i=g-a.startingPositionTop+a.startingOffsetTop):(g=a.startingPositionTop,i=a.startingOffsetTop),this.options.hideDistantElements&&(o=!this.options.horizontalScrolling||h+a.width>(a.isFixed?0:k)&&h<(a.isFixed?0:k)+this.viewportWidth+this.viewportOffsetLeft,n=!this.options.verticalScrolling||i+a.height>(a.isFixed?0:l)&&i<(a.isFixed?0:l)+this.viewportHeight+this.viewportOffsetTop),o&&n?(a.isHidden&&(this.options.showElement(a.$element),a.isHidden=!1),this._setPosition(a.$element,f,a.startingPositionLeft,g,a.startingPositionTop)):a.isHidden||(this.options.hideElement(a.$element),a.isHidden=!0);for(j=this.backgrounds.length-1;j>=0;j--)c=this.backgrounds[j],b=c.isFixed?0:1,d=this.options.horizontalScrolling?(k+c.horizontalOffset-this.viewportOffsetLeft-c.startingOffsetLeft+c.parentOffsetLeft-c.startingBackgroundPositionLeft)*(b-c.stellarRatio)+"px":c.startingValueLeft,e=this.options.verticalScrolling?(l+c.verticalOffset-this.viewportOffsetTop-c.startingOffsetTop+c.parentOffsetTop-c.startingBackgroundPositionTop)*(b-c.stellarRatio)+"px":c.startingValueTop,m(c.$element,d,e)}},_handleScrollEvent:function(){var a=this,b=!1,c=function(){a._repositionElements(),b=!1},d=function(){b||(o(c),b=!0)};this.$scrollElement.bind("scroll."+this.name,d),d()},_startAnimationLoop:function(){var a=this;this._animationLoop=function(){o(a._animationLoop),a._repositionElements()},this._animationLoop()}},a.fn[f]=function(b){var c=arguments;return b===d||"object"==typeof b?this.each(function(){a.data(this,"plugin_"+f)||a.data(this,"plugin_"+f,new e(this,b))}):"string"==typeof b&&"_"!==b[0]&&"init"!==b?this.each(function(){var d=a.data(this,"plugin_"+f);d instanceof e&&"function"==typeof d[b]&&d[b].apply(d,Array.prototype.slice.call(c,1)),"destroy"===b&&a.data(this,"plugin_"+f,null)}):void 0},a[f]=function(){var c=a(b);return c.stellar.apply(c,Array.prototype.slice.call(arguments,0))},a[f].scrollProperty=h,a[f].positionProperty=i,b.Stellar=e}(jQuery,this,document);
;(function($, window, document, undefined){
var Stickem=function(elem, options){
this.elem=elem;
this.$elem=$(elem);
this.options=options;
this.metadata=this.$elem.data("stickem-options");
this.$win=$(window);
};
Stickem.prototype={
defaults: {
item: '.stickem',
container: '.stickem-container',
stickClass: 'stickit',
endStickClass: 'stickit-end',
offset: 0,
start: 0,
onStick: null,
onUnstick: null
},
init: function(){
var _self=this;
_self.config=$.extend({}, _self.defaults, _self.options, _self.metadata);
_self.setWindowHeight();
_self.getItems();
_self.bindEvents();
return _self;
},
bindEvents: function(){
var _self=this;
_self.$win.on('scroll.stickem', $.proxy(_self.handleScroll, _self));
_self.$win.on('resize.stickem', $.proxy(_self.handleResize, _self));
},
destroy: function(){
var _self=this;
_self.$win.off('scroll.stickem');
_self.$win.off('resize.stickem');
},
getItem: function(index, element){
var _self=this;
var $this=$(element);
var item={
$elem: $this,
elemHeight: $this.height(),
$container: $this.parents(_self.config.container),
isStuck: false
};
if(_self.windowHeight > item.elemHeight){
item.containerHeight=item.$container.outerHeight();
item.containerInner={
border: {
bottom: parseInt(item.$container.css('border-bottom'), 10)||0,
top: parseInt(item.$container.css('border-top'), 10)||0
},
padding: {
bottom: parseInt(item.$container.css('padding-bottom'), 10)||0,
top: parseInt(item.$container.css('padding-top'), 10)||0
}};
item.containerInnerHeight=item.$container.height();
item.containerStart=item.$container.offset().top - _self.config.offset + _self.config.start + item.containerInner.padding.top + item.containerInner.border.top;
item.scrollFinish=item.containerStart - _self.config.start + (item.containerInnerHeight - item.elemHeight);
if(item.containerInnerHeight > item.elemHeight){
_self.items.push(item);
}}else{
item.$elem.removeClass(_self.config.stickClass + ' ' + _self.config.endStickClass);
}},
getItems: function(){
var _self=this;
_self.items=[];
_self.$elem.find(_self.config.item).each($.proxy(_self.getItem, _self));
},
handleResize: function(){
var _self=this;
_self.getItems();
_self.setWindowHeight();
},
handleScroll: function(){
var _self=this;
if(_self.items.length > 0){
var pos=_self.$win.scrollTop();
for(var i=0, len=_self.items.length; i < len; i++){
var item=_self.items[i];
if((item.isStuck&&(pos < item.containerStart||pos > item.scrollFinish))||pos > item.scrollFinish){
item.$elem.removeClass(_self.config.stickClass);
if(pos > item.scrollFinish){
item.$elem.addClass(_self.config.endStickClass);
}
item.isStuck=false;
if(_self.config.onUnstick){
_self.config.onUnstick(item);
}}else if(item.isStuck===false&&pos > item.containerStart&&pos < item.scrollFinish){
item.$elem.removeClass(_self.config.endStickClass).addClass(_self.config.stickClass);
item.isStuck=true;
if(_self.config.onStick){
_self.config.onStick(item);
}}
}}
},
setWindowHeight: function(){
var _self=this;
_self.windowHeight=_self.$win.height() - _self.config.offset;
}};
Stickem.defaults=Stickem.prototype.defaults;
$.fn.stickem=function(options){
this.destroy=function(){
this.each(function(){
new Stickem(this, options).destroy();
});
};
return this.each(function(){
new Stickem(this, options).init();
});
};})(jQuery, window , document);
(function (factory){
if(typeof define==='function'&&define.amd){
define(['jquery'], factory);
}else if(typeof module==='object'&&typeof module.exports==='object'){
factory(require('jquery'));
}else{
factory(jQuery);
}}(function ($){
$.timeago=function(timestamp){
if(timestamp instanceof Date){
return inWords(timestamp);
}else if(typeof timestamp==="string"){
return inWords($.timeago.parse(timestamp));
}else if(typeof timestamp==="number"){
return inWords(new Date(timestamp));
}else{
return inWords($.timeago.datetime(timestamp));
}};
var $t=$.timeago;
$.extend($.timeago, {
settings: {
refreshMillis: 60000,
allowPast: true,
allowFuture: false,
localeTitle: false,
cutoff: 0,
autoDispose: true,
strings: {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: "ago",
suffixFromNow: "from now",
inPast: 'any moment now',
seconds: "less than a minute",
minute: "about a minute",
minutes: "%d minutes",
hour: "about an hour",
hours: "about %d hours",
day: "a day",
days: "%d days",
month: "about a month",
months: "%d months",
year: "about a year",
years: "%d years",
wordSeparator: " ",
numbers: []
}},
inWords: function(distanceMillis){
if(!this.settings.allowPast&&! this.settings.allowFuture){
throw 'timeago allowPast and allowFuture settings can not both be set to false.';
}
var $l=this.settings.strings;
var prefix=$l.prefixAgo;
var suffix=$l.suffixAgo;
if(this.settings.allowFuture){
if(distanceMillis < 0){
prefix=$l.prefixFromNow;
suffix=$l.suffixFromNow;
}}
if(!this.settings.allowPast&&distanceMillis >=0){
return this.settings.strings.inPast;
}
var seconds=Math.abs(distanceMillis) / 1000;
var minutes=seconds / 60;
var hours=minutes / 60;
var days=hours / 24;
var years=days / 365;
function substitute(stringOrFunction, number){
var string=$.isFunction(stringOrFunction) ? stringOrFunction(number, distanceMillis):stringOrFunction;
var value=($l.numbers&&$l.numbers[number])||number;
return string.replace(/%d/i, value);
}
var words=seconds < 45&&substitute($l.seconds, Math.round(seconds)) ||
seconds < 90&&substitute($l.minute, 1) ||
minutes < 45&&substitute($l.minutes, Math.round(minutes)) ||
minutes < 90&&substitute($l.hour, 1) ||
hours < 24&&substitute($l.hours, Math.round(hours)) ||
hours < 42&&substitute($l.day, 1) ||
days < 30&&substitute($l.days, Math.round(days)) ||
days < 45&&substitute($l.month, 1) ||
days < 365&&substitute($l.months, Math.round(days / 30)) ||
years < 1.5&&substitute($l.year, 1) ||
substitute($l.years, Math.round(years));
var separator=$l.wordSeparator||"";
if($l.wordSeparator===undefined){ separator=" "; }
return $.trim([prefix, words, suffix].join(separator));
},
parse: function(iso8601){
var s=$.trim(iso8601);
s=s.replace(/\.\d+/,"");
s=s.replace(/-/,"/").replace(/-/,"/");
s=s.replace(/T/," ").replace(/Z/," UTC");
s=s.replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2");
s=s.replace(/([\+\-]\d\d)$/," $100");
return new Date(s);
},
datetime: function(elem){
var iso8601=$t.isTime(elem) ? $(elem).attr("datetime"):$(elem).attr("title");
return $t.parse(iso8601);
},
isTime: function(elem){
return $(elem).get(0).tagName.toLowerCase()==="time";
}});
var functions={
init: function(){
functions.dispose.call(this);
var refresh_el=$.proxy(refresh, this);
refresh_el();
var $s=$t.settings;
if($s.refreshMillis > 0){
this._timeagoInterval=setInterval(refresh_el, $s.refreshMillis);
}},
update: function(timestamp){
var date=(timestamp instanceof Date) ? timestamp:$t.parse(timestamp);
$(this).data('timeago', { datetime: date });
if($t.settings.localeTitle){
$(this).attr("title", date.toLocaleString());
}
refresh.apply(this);
},
updateFromDOM: function(){
$(this).data('timeago', { datetime: $t.parse($t.isTime(this) ? $(this).attr("datetime"):$(this).attr("title")) });
refresh.apply(this);
},
dispose: function (){
if(this._timeagoInterval){
window.clearInterval(this._timeagoInterval);
this._timeagoInterval=null;
}}
};
$.fn.timeago=function(action, options){
var fn=action ? functions[action]:functions.init;
if(!fn){
throw new Error("Unknown function name '"+ action +"' for timeago");
}
this.each(function(){
fn.call(this, options);
});
return this;
};
function refresh(){
var $s=$t.settings;
if($s.autoDispose&&!$.contains(document.documentElement,this)){
$(this).timeago("dispose");
return this;
}
var data=prepareData(this);
if(!isNaN(data.datetime)){
if($s.cutoff===0||Math.abs(distance(data.datetime)) < $s.cutoff){
$(this).text(inWords(data.datetime));
}else{
if($(this).attr('title').length > 0){
$(this).text($(this).attr('title'));
}}
}
return this;
}
function prepareData(element){
element=$(element);
if(!element.data("timeago")){
element.data("timeago", { datetime: $t.datetime(element) });
var text=$.trim(element.text());
if($t.settings.localeTitle){
element.attr("title", element.data('timeago').datetime.toLocaleString());
}else if(text.length > 0&&!($t.isTime(element)&&element.attr("title"))){
element.attr("title", text);
}}
return element.data("timeago");
}
function inWords(date){
return $t.inWords(distance(date));
}
function distance(date){
return (new Date().getTime() - date.getTime());
}
document.createElement("abbr");
document.createElement("time");
}));
(function($){
$.belowthefold=function(element, settings){
var fold=$(window).height() + $(window).scrollTop();
return fold <=$(element).offset().top - settings.threshold;
};
$.abovethetop=function(element, settings){
var top=$(window).scrollTop();
return top >=$(element).offset().top + $(element).height() - settings.threshold;
};
$.rightofscreen=function(element, settings){
var fold=$(window).width() + $(window).scrollLeft();
return fold <=$(element).offset().left - settings.threshold;
};
$.leftofscreen=function(element, settings){
var left=$(window).scrollLeft();
return left >=$(element).offset().left + $(element).width() - settings.threshold;
};
$.inviewport=function(element, settings){
return !$.rightofscreen(element, settings)&&!$.leftofscreen(element, settings)&&!$.belowthefold(element, settings)&&!$.abovethetop(element, settings);
};
$.extend($.expr[':'], {
"below-the-fold": function(a, i, m){
return $.belowthefold(a, {threshold:parseInt(m[3])||0});
},
"above-the-top": function(a, i, m){
return $.abovethetop(a, {threshold:parseInt(m[3])||0});
},
"left-of-screen": function(a, i, m){
return $.leftofscreen(a, {threshold:parseInt(m[3])||0});
},
"right-of-screen": function(a, i, m){
return $.rightofscreen(a, {threshold:parseInt(m[3])||0});
},
"in-viewport": function(a, i, m){
return $.inviewport(a, {threshold:parseInt(m[3])||0});
}});
})(jQuery);
!function(t){var i=t(window);t.fn.visible=function(t,e,o){if(!(this.length<1)){var r=this.length>1?this.eq(0):this,n=r.get(0),f=i.width(),h=i.height(),o=o?o:"both",l=e===!0?n.offsetWidth*n.offsetHeight:!0;if("function"==typeof n.getBoundingClientRect){var g=n.getBoundingClientRect(),u=g.top>=0&&g.top<h,s=g.bottom>0&&g.bottom<=h,c=g.left>=0&&g.left<f,a=g.right>0&&g.right<=f,v=t?u||s:u&&s,b=t?c||a:c&&a;if("both"===o)return l&&v&&b;if("vertical"===o)return l&&v;if("horizontal"===o)return l&&b}else{var d=i.scrollTop(),p=d+h,w=i.scrollLeft(),m=w+f,y=r.offset(),z=y.top,B=z+r.height(),C=y.left,R=C+r.width(),j=t===!0?B:z,q=t===!0?z:B,H=t===!0?R:C,L=t===!0?C:R;if("both"===o)return!!l&&p>=q&&j>=d&&m>=L&&H>=w;if("vertical"===o)return!!l&&p>=q&&j>=d;if("horizontal"===o)return!!l&&m>=L&&H>=w}}}}(jQuery);