(function(){function n(n){function t(t,r,e,u,i,o){for(;i>=0&&o>i;i+=n){var a=u?u[i]:i;e=r(e,t[a],a,t)}return e}return function(r,e,u,i){e=b(e,i,4);var o=!k(r)&&m.keys(r),a=(o||r).length,c=n>0?0:a-1;return arguments.length<3&&(u=r[o?o[c]:c],c+=n),t(r,e,u,o,c,a)}}function t(n){return function(t,r,e){r=x(r,e);for(var u=O(t),i=n>0?0:u-1;i>=0&&u>i;i+=n)if(r(t[i],i,t))return i;return-1}}function r(n,t,r){return function(e,u,i){var o=0,a=O(e);if("number"==typeof i)n>0?o=i>=0?i:Math.max(i+a,o):a=i>=0?Math.min(i+1,a):i+a+1;else if(r&&i&&a)return i=r(e,u),e[i]===u?i:-1;if(u!==u)return i=t(l.call(e,o,a),m.isNaN),i>=0?i+o:-1;for(i=n>0?o:a-1;i>=0&&a>i;i+=n)if(e[i]===u)return i;return-1}}function e(n,t){var r=I.length,e=n.constructor,u=m.isFunction(e)&&e.prototype||a,i="constructor";for(m.has(n,i)&&!m.contains(t,i)&&t.push(i);r--;)i=I[r],i in n&&n[i]!==u[i]&&!m.contains(t,i)&&t.push(i)}var u=this,i=u._,o=Array.prototype,a=Object.prototype,c=Function.prototype,f=o.push,l=o.slice,s=a.toString,p=a.hasOwnProperty,h=Array.isArray,v=Object.keys,g=c.bind,y=Object.create,d=function(){},m=function(n){return n instanceof m?n:this instanceof m?void(this._wrapped=n):new m(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=m),exports._=m):u._=m,m.VERSION="1.8.3";var b=function(n,t,r){if(t===void 0)return n;switch(null==r?3:r){case 1:return function(r){return n.call(t,r)};case 2:return function(r,e){return n.call(t,r,e)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,i){return n.call(t,r,e,u,i)}}return function(){return n.apply(t,arguments)}},x=function(n,t,r){return null==n?m.identity:m.isFunction(n)?b(n,t,r):m.isObject(n)?m.matcher(n):m.property(n)};m.iteratee=function(n,t){return x(n,t,1/0)};var _=function(n,t){return function(r){var e=arguments.length;if(2>e||null==r)return r;for(var u=1;e>u;u++)for(var i=arguments[u],o=n(i),a=o.length,c=0;a>c;c++){var f=o[c];t&&r[f]!==void 0||(r[f]=i[f])}return r}},j=function(n){if(!m.isObject(n))return{};if(y)return y(n);d.prototype=n;var t=new d;return d.prototype=null,t},w=function(n){return function(t){return null==t?void 0:t[n]}},A=Math.pow(2,53)-1,O=w("length"),k=function(n){var t=O(n);return"number"==typeof t&&t>=0&&A>=t};m.each=m.forEach=function(n,t,r){t=b(t,r);var e,u;if(k(n))for(e=0,u=n.length;u>e;e++)t(n[e],e,n);else{var i=m.keys(n);for(e=0,u=i.length;u>e;e++)t(n[i[e]],i[e],n)}return n},m.map=m.collect=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=Array(u),o=0;u>o;o++){var a=e?e[o]:o;i[o]=t(n[a],a,n)}return i},m.reduce=m.foldl=m.inject=n(1),m.reduceRight=m.foldr=n(-1),m.find=m.detect=function(n,t,r){var e;return e=k(n)?m.findIndex(n,t,r):m.findKey(n,t,r),e!==void 0&&e!==-1?n[e]:void 0},m.filter=m.select=function(n,t,r){var e=[];return t=x(t,r),m.each(n,function(n,r,u){t(n,r,u)&&e.push(n)}),e},m.reject=function(n,t,r){return m.filter(n,m.negate(x(t)),r)},m.every=m.all=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=0;u>i;i++){var o=e?e[i]:i;if(!t(n[o],o,n))return!1}return!0},m.some=m.any=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=0;u>i;i++){var o=e?e[i]:i;if(t(n[o],o,n))return!0}return!1},m.contains=m.includes=m.include=function(n,t,r,e){return k(n)||(n=m.values(n)),("number"!=typeof r||e)&&(r=0),m.indexOf(n,t,r)>=0},m.invoke=function(n,t){var r=l.call(arguments,2),e=m.isFunction(t);return m.map(n,function(n){var u=e?t:n[t];return null==u?u:u.apply(n,r)})},m.pluck=function(n,t){return m.map(n,m.property(t))},m.where=function(n,t){return m.filter(n,m.matcher(t))},m.findWhere=function(n,t){return m.find(n,m.matcher(t))},m.max=function(n,t,r){var e,u,i=-1/0,o=-1/0;if(null==t&&null!=n){n=k(n)?n:m.values(n);for(var a=0,c=n.length;c>a;a++)e=n[a],e>i&&(i=e)}else t=x(t,r),m.each(n,function(n,r,e){u=t(n,r,e),(u>o||u===-1/0&&i===-1/0)&&(i=n,o=u)});return i},m.min=function(n,t,r){var e,u,i=1/0,o=1/0;if(null==t&&null!=n){n=k(n)?n:m.values(n);for(var a=0,c=n.length;c>a;a++)e=n[a],i>e&&(i=e)}else t=x(t,r),m.each(n,function(n,r,e){u=t(n,r,e),(o>u||1/0===u&&1/0===i)&&(i=n,o=u)});return i},m.shuffle=function(n){for(var t,r=k(n)?n:m.values(n),e=r.length,u=Array(e),i=0;e>i;i++)t=m.random(0,i),t!==i&&(u[i]=u[t]),u[t]=r[i];return u},m.sample=function(n,t,r){return null==t||r?(k(n)||(n=m.values(n)),n[m.random(n.length-1)]):m.shuffle(n).slice(0,Math.max(0,t))},m.sortBy=function(n,t,r){return t=x(t,r),m.pluck(m.map(n,function(n,r,e){return{value:n,index:r,criteria:t(n,r,e)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index-t.index}),"value")};var F=function(n){return function(t,r,e){var u={};return r=x(r,e),m.each(t,function(e,i){var o=r(e,i,t);n(u,e,o)}),u}};m.groupBy=F(function(n,t,r){m.has(n,r)?n[r].push(t):n[r]=[t]}),m.indexBy=F(function(n,t,r){n[r]=t}),m.countBy=F(function(n,t,r){m.has(n,r)?n[r]++:n[r]=1}),m.toArray=function(n){return n?m.isArray(n)?l.call(n):k(n)?m.map(n,m.identity):m.values(n):[]},m.size=function(n){return null==n?0:k(n)?n.length:m.keys(n).length},m.partition=function(n,t,r){t=x(t,r);var e=[],u=[];return m.each(n,function(n,r,i){(t(n,r,i)?e:u).push(n)}),[e,u]},m.first=m.head=m.take=function(n,t,r){return null==n?void 0:null==t||r?n[0]:m.initial(n,n.length-t)},m.initial=function(n,t,r){return l.call(n,0,Math.max(0,n.length-(null==t||r?1:t)))},m.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:m.rest(n,Math.max(0,n.length-t))},m.rest=m.tail=m.drop=function(n,t,r){return l.call(n,null==t||r?1:t)},m.compact=function(n){return m.filter(n,m.identity)};var S=function(n,t,r,e){for(var u=[],i=0,o=e||0,a=O(n);a>o;o++){var c=n[o];if(k(c)&&(m.isArray(c)||m.isArguments(c))){t||(c=S(c,t,r));var f=0,l=c.length;for(u.length+=l;l>f;)u[i++]=c[f++]}else r||(u[i++]=c)}return u};m.flatten=function(n,t){return S(n,t,!1)},m.without=function(n){return m.difference(n,l.call(arguments,1))},m.uniq=m.unique=function(n,t,r,e){m.isBoolean(t)||(e=r,r=t,t=!1),null!=r&&(r=x(r,e));for(var u=[],i=[],o=0,a=O(n);a>o;o++){var c=n[o],f=r?r(c,o,n):c;t?(o&&i===f||u.push(c),i=f):r?m.contains(i,f)||(i.push(f),u.push(c)):m.contains(u,c)||u.push(c)}return u},m.union=function(){return m.uniq(S(arguments,!0,!0))},m.intersection=function(n){for(var t=[],r=arguments.length,e=0,u=O(n);u>e;e++){var i=n[e];if(!m.contains(t,i)){for(var o=1;r>o&&m.contains(arguments[o],i);o++);o===r&&t.push(i)}}return t},m.difference=function(n){var t=S(arguments,!0,!0,1);return m.filter(n,function(n){return!m.contains(t,n)})},m.zip=function(){return m.unzip(arguments)},m.unzip=function(n){for(var t=n&&m.max(n,O).length||0,r=Array(t),e=0;t>e;e++)r[e]=m.pluck(n,e);return r},m.object=function(n,t){for(var r={},e=0,u=O(n);u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},m.findIndex=t(1),m.findLastIndex=t(-1),m.sortedIndex=function(n,t,r,e){r=x(r,e,1);for(var u=r(t),i=0,o=O(n);o>i;){var a=Math.floor((i+o)/2);r(n[a])i;i++,n+=r)u[i]=n;return u};var E=function(n,t,r,e,u){if(!(e instanceof t))return n.apply(r,u);var i=j(n.prototype),o=n.apply(i,u);return m.isObject(o)?o:i};m.bind=function(n,t){if(g&&n.bind===g)return g.apply(n,l.call(arguments,1));if(!m.isFunction(n))throw new TypeError("Bind must be called on a function");var r=l.call(arguments,2),e=function(){return E(n,e,t,this,r.concat(l.call(arguments)))};return e},m.partial=function(n){var t=l.call(arguments,1),r=function(){for(var e=0,u=t.length,i=Array(u),o=0;u>o;o++)i[o]=t[o]===m?arguments[e++]:t[o];for(;e=e)throw new Error("bindAll must be passed function names");for(t=1;e>t;t++)r=arguments[t],n[r]=m.bind(n[r],n);return n},m.memoize=function(n,t){var r=function(e){var u=r.cache,i=""+(t?t.apply(this,arguments):e);return m.has(u,i)||(u[i]=n.apply(this,arguments)),u[i]};return r.cache={},r},m.delay=function(n,t){var r=l.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},m.defer=m.partial(m.delay,m,1),m.throttle=function(n,t,r){var e,u,i,o=null,a=0;r||(r={});var c=function(){a=r.leading===!1?0:m.now(),o=null,i=n.apply(e,u),o||(e=u=null)};return function(){var f=m.now();a||r.leading!==!1||(a=f);var l=t-(f-a);return e=this,u=arguments,0>=l||l>t?(o&&(clearTimeout(o),o=null),a=f,i=n.apply(e,u),o||(e=u=null)):o||r.trailing===!1||(o=setTimeout(c,l)),i}},m.debounce=function(n,t,r){var e,u,i,o,a,c=function(){var f=m.now()-o;t>f&&f>=0?e=setTimeout(c,t-f):(e=null,r||(a=n.apply(i,u),e||(i=u=null)))};return function(){i=this,u=arguments,o=m.now();var f=r&&!e;return e||(e=setTimeout(c,t)),f&&(a=n.apply(i,u),i=u=null),a}},m.wrap=function(n,t){return m.partial(t,n)},m.negate=function(n){return function(){return!n.apply(this,arguments)}},m.compose=function(){var n=arguments,t=n.length-1;return function(){for(var r=t,e=n[t].apply(this,arguments);r--;)e=n[r].call(this,e);return e}},m.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},m.before=function(n,t){var r;return function(){return--n>0&&(r=t.apply(this,arguments)),1>=n&&(t=null),r}},m.once=m.partial(m.before,2);var M=!{toString:null}.propertyIsEnumerable("toString"),I=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];m.keys=function(n){if(!m.isObject(n))return[];if(v)return v(n);var t=[];for(var r in n)m.has(n,r)&&t.push(r);return M&&e(n,t),t},m.allKeys=function(n){if(!m.isObject(n))return[];var t=[];for(var r in n)t.push(r);return M&&e(n,t),t},m.values=function(n){for(var t=m.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},m.mapObject=function(n,t,r){t=x(t,r);for(var e,u=m.keys(n),i=u.length,o={},a=0;i>a;a++)e=u[a],o[e]=t(n[e],e,n);return o},m.pairs=function(n){for(var t=m.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},m.invert=function(n){for(var t={},r=m.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return t},m.functions=m.methods=function(n){var t=[];for(var r in n)m.isFunction(n[r])&&t.push(r);return t.sort()},m.extend=_(m.allKeys),m.extendOwn=m.assign=_(m.keys),m.findKey=function(n,t,r){t=x(t,r);for(var e,u=m.keys(n),i=0,o=u.length;o>i;i++)if(e=u[i],t(n[e],e,n))return e},m.pick=function(n,t,r){var e,u,i={},o=n;if(null==o)return i;m.isFunction(t)?(u=m.allKeys(o),e=b(t,r)):(u=S(arguments,!1,!1,1),e=function(n,t,r){return t in r},o=Object(o));for(var a=0,c=u.length;c>a;a++){var f=u[a],l=o[f];e(l,f,o)&&(i[f]=l)}return i},m.omit=function(n,t,r){if(m.isFunction(t))t=m.negate(t);else{var e=m.map(S(arguments,!1,!1,1),String);t=function(n,t){return!m.contains(e,t)}}return m.pick(n,t,r)},m.defaults=_(m.allKeys,!0),m.create=function(n,t){var r=j(n);return t&&m.extendOwn(r,t),r},m.clone=function(n){return m.isObject(n)?m.isArray(n)?n.slice():m.extend({},n):n},m.tap=function(n,t){return t(n),n},m.isMatch=function(n,t){var r=m.keys(t),e=r.length;if(null==n)return!e;for(var u=Object(n),i=0;e>i;i++){var o=r[i];if(t[o]!==u[o]||!(o in u))return!1}return!0};var N=function(n,t,r,e){if(n===t)return 0!==n||1/n===1/t;if(null==n||null==t)return n===t;n instanceof m&&(n=n._wrapped),t instanceof m&&(t=t._wrapped);var u=s.call(n);if(u!==s.call(t))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+n==""+t;case"[object Number]":return+n!==+n?+t!==+t:0===+n?1/+n===1/t:+n===+t;case"[object Date]":case"[object Boolean]":return+n===+t}var i="[object Array]"===u;if(!i){if("object"!=typeof n||"object"!=typeof t)return!1;var o=n.constructor,a=t.constructor;if(o!==a&&!(m.isFunction(o)&&o instanceof o&&m.isFunction(a)&&a instanceof a)&&"constructor"in n&&"constructor"in t)return!1}r=r||[],e=e||[];for(var c=r.length;c--;)if(r[c]===n)return e[c]===t;if(r.push(n),e.push(t),i){if(c=n.length,c!==t.length)return!1;for(;c--;)if(!N(n[c],t[c],r,e))return!1}else{var f,l=m.keys(n);if(c=l.length,m.keys(t).length!==c)return!1;for(;c--;)if(f=l[c],!m.has(t,f)||!N(n[f],t[f],r,e))return!1}return r.pop(),e.pop(),!0};m.isEqual=function(n,t){return N(n,t)},m.isEmpty=function(n){return null==n?!0:k(n)&&(m.isArray(n)||m.isString(n)||m.isArguments(n))?0===n.length:0===m.keys(n).length},m.isElement=function(n){return!(!n||1!==n.nodeType)},m.isArray=h||function(n){return"[object Array]"===s.call(n)},m.isObject=function(n){var t=typeof n;return"function"===t||"object"===t&&!!n},m.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(n){m["is"+n]=function(t){return s.call(t)==="[object "+n+"]"}}),m.isArguments(arguments)||(m.isArguments=function(n){return m.has(n,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(m.isFunction=function(n){return"function"==typeof n||!1}),m.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},m.isNaN=function(n){return m.isNumber(n)&&n!==+n},m.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"===s.call(n)},m.isNull=function(n){return null===n},m.isUndefined=function(n){return n===void 0},m.has=function(n,t){return null!=n&&p.call(n,t)},m.noConflict=function(){return u._=i,this},m.identity=function(n){return n},m.constant=function(n){return function(){return n}},m.noop=function(){},m.property=w,m.propertyOf=function(n){return null==n?function(){}:function(t){return n[t]}},m.matcher=m.matches=function(n){return n=m.extendOwn({},n),function(t){return m.isMatch(t,n)}},m.times=function(n,t,r){var e=Array(Math.max(0,n));t=b(t,r,1);for(var u=0;n>u;u++)e[u]=t(u);return e},m.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))},m.now=Date.now||function(){return(new Date).getTime()};var B={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},T=m.invert(B),R=function(n){var t=function(t){return n[t]},r="(?:"+m.keys(n).join("|")+")",e=RegExp(r),u=RegExp(r,"g");return function(n){return n=null==n?"":""+n,e.test(n)?n.replace(u,t):n}};m.escape=R(B),m.unescape=R(T),m.result=function(n,t,r){var e=null==n?void 0:n[t];return e===void 0&&(e=r),m.isFunction(e)?e.call(n):e};var q=0;m.uniqueId=function(n){var t=++q+"";return n?n+t:t},m.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var K=/(.)^/,z={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},D=/\\|'|\r|\n|\u2028|\u2029/g,L=function(n){return"\\"+z[n]};m.template=function(n,t,r){!t&&r&&(t=r),t=m.defaults({},t,m.templateSettings);var e=RegExp([(t.escape||K).source,(t.interpolate||K).source,(t.evaluate||K).source].join("|")+"|$","g"),u=0,i="__p+='";n.replace(e,function(t,r,e,o,a){return i+=n.slice(u,a).replace(D,L),u=a+t.length,r?i+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":e?i+="'+\n((__t=("+e+"))==null?'':__t)+\n'":o&&(i+="';\n"+o+"\n__p+='"),t}),i+="';\n",t.variable||(i="with(obj||{}){\n"+i+"}\n"),i="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";try{var o=new Function(t.variable||"obj","_",i)}catch(a){throw a.source=i,a}var c=function(n){return o.call(this,n,m)},f=t.variable||"obj";return c.source="function("+f+"){\n"+i+"}",c},m.chain=function(n){var t=m(n);return t._chain=!0,t};var P=function(n,t){return n._chain?m(t).chain():t};m.mixin=function(n){m.each(m.functions(n),function(t){var r=m[t]=n[t];m.prototype[t]=function(){var n=[this._wrapped];return f.apply(n,arguments),P(this,r.apply(m,n))}})},m.mixin(m),m.each(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=o[n];m.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!==n&&"splice"!==n||0!==r.length||delete r[0],P(this,r)}}),m.each(["concat","join","slice"],function(n){var t=o[n];m.prototype[n]=function(){return P(this,t.apply(this._wrapped,arguments))}}),m.prototype.value=function(){return this._wrapped},m.prototype.valueOf=m.prototype.toJSON=m.prototype.value,m.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return m})}).call(this); (function(t){var e=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global;if(typeof define==="function"&&define.amd){define(["underscore","jquery","exports"],function(i,r,n){e.Backbone=t(e,n,i,r)})}else if(typeof exports!=="undefined"){var i=require("underscore"),r;try{r=require("jquery")}catch(n){}t(e,exports,i,r)}else{e.Backbone=t(e,{},e._,e.jQuery||e.Zepto||e.ender||e.$)}})(function(t,e,i,r){var n=t.Backbone;var s=Array.prototype.slice;e.VERSION="1.3.3";e.$=r;e.noConflict=function(){t.Backbone=n;return this};e.emulateHTTP=false;e.emulateJSON=false;var a=function(t,e,r){switch(t){case 1:return function(){return i[e](this[r])};case 2:return function(t){return i[e](this[r],t)};case 3:return function(t,n){return i[e](this[r],o(t,this),n)};case 4:return function(t,n,s){return i[e](this[r],o(t,this),n,s)};default:return function(){var t=s.call(arguments);t.unshift(this[r]);return i[e].apply(i,t)}}};var h=function(t,e,r){i.each(e,function(e,n){if(i[n])t.prototype[n]=a(e,n,r)})};var o=function(t,e){if(i.isFunction(t))return t;if(i.isObject(t)&&!e._isModel(t))return l(t);if(i.isString(t))return function(e){return e.get(t)};return t};var l=function(t){var e=i.matches(t);return function(t){return e(t.attributes)}};var u=e.Events={};var c=/\s+/;var f=function(t,e,r,n,s){var a=0,h;if(r&&typeof r==="object"){if(n!==void 0&&"context"in s&&s.context===void 0)s.context=n;for(h=i.keys(r);athis.length)n=this.length;if(n<0)n+=this.length+1;var s=[];var a=[];var h=[];var o=[];var l={};var u=e.add;var c=e.merge;var f=e.remove;var d=false;var v=this.comparator&&n==null&&e.sort!==false;var g=i.isString(this.comparator)?this.comparator:null;var p,m;for(m=0;m7);this._useHashChange=this._wantsHashChange&&this._hasHashChange;this._wantsPushState=!!this.options.pushState;this._hasPushState=!!(this.history&&this.history.pushState);this._usePushState=this._wantsPushState&&this._hasPushState;this.fragment=this.getFragment();this.root=("/"+this.root+"/").replace(O,"/");if(this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||"/";this.location.replace(e+"#"+this.getPath());return true}else if(this._hasPushState&&this.atRoot()){this.navigate(this.getHash(),{replace:true})}}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe");this.iframe.src="javascript:0";this.iframe.style.display="none";this.iframe.tabIndex=-1;var r=document.body;var n=r.insertBefore(this.iframe,r.firstChild).contentWindow;n.document.open();n.document.close();n.location.hash="#"+this.fragment}var s=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};if(this._usePushState){s("popstate",this.checkUrl,false)}else if(this._useHashChange&&!this.iframe){s("hashchange",this.checkUrl,false)}else if(this._wantsHashChange){this._checkUrlInterval=setInterval(this.checkUrl,this.interval)}if(!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};if(this._usePushState){t("popstate",this.checkUrl,false)}else if(this._useHashChange&&!this.iframe){t("hashchange",this.checkUrl,false)}if(this.iframe){document.body.removeChild(this.iframe);this.iframe=null}if(this._checkUrlInterval)clearInterval(this._checkUrlInterval);N.started=false},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe){e=this.getHash(this.iframe.contentWindow)}if(e===this.fragment)return false;if(this.iframe)this.navigate(e);this.loadUrl()},loadUrl:function(t){if(!this.matchRoot())return false;t=this.fragment=this.getFragment(t);return i.some(this.handlers,function(e){if(e.route.test(t)){e.callback(t);return true}})},navigate:function(t,e){if(!N.started)return false;if(!e||e===true)e={trigger:!!e};t=this.getFragment(t||"");var i=this.root;if(t===""||t.charAt(0)==="?"){i=i.slice(0,-1)||"/"}var r=i+t;t=this.decodeFragment(t.replace(U,""));if(this.fragment===t)return;this.fragment=t;if(this._usePushState){this.history[e.replace?"replaceState":"pushState"]({},document.title,r)}else if(this._wantsHashChange){this._updateHash(this.location,t,e.replace);if(this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var n=this.iframe.contentWindow;if(!e.replace){n.document.open();n.document.close()}this._updateHash(n.location,t,e.replace)}}else{return this.location.assign(r)}if(e.trigger)return this.loadUrl(t)},_updateHash:function(t,e,i){if(i){var r=t.href.replace(/(javascript:|#).*$/,"");t.replace(r+"#"+e)}else{t.hash="#"+e}}});e.history=new N;var q=function(t,e){var r=this;var n;if(t&&i.has(t,"constructor")){n=t.constructor}else{n=function(){return r.apply(this,arguments)}}i.extend(n,r,e);n.prototype=i.create(r.prototype,t);n.prototype.constructor=n;n.__super__=r.prototype;return n};y.extend=x.extend=$.extend=k.extend=N.extend=q;var F=function(){throw new Error('A "url" property or function must be specified')};var B=function(t,e){var i=e.error;e.error=function(r){if(i)i.call(e.context,t,r,e);t.trigger("error",t,r,e)}};return e}); !function(d){var s=window.wpApiSettings;function n(e){return e=n.buildAjaxOptions(e),n.transport(e)}n.buildAjaxOptions=function(e){var n,t,a,p,r,o=e.url,i=e.path;if("string"==typeof e.namespace&&"string"==typeof e.endpoint&&(t=e.namespace.replace(/^\/|\/$/g,""),i=(n=e.endpoint.replace(/^\//,""))?t+"/"+n:t),"string"==typeof i&&(t=s.root,i=i.replace(/^\//,""),"string"==typeof t&&-1!==t.indexOf("?")&&(i=i.replace("?","&")),o=t+i),p=!(e.data&&e.data._wpnonce),a=e.headers||{},p)for(r in a)if(a.hasOwnProperty(r)&&"x-wp-nonce"===r.toLowerCase()){p=!1;break}return p&&(a=d.extend({"X-WP-Nonce":s.nonce},a)),delete(e=d.extend({},e,{headers:a,url:o})).path,delete e.namespace,delete e.endpoint,e},n.transport=d.ajax,window.wp=window.wp||{},window.wp.apiRequest=n}(jQuery); !function(e){"use strict";e.wp=e.wp||{},wp.api=wp.api||new function(){this.models={},this.collections={},this.views={}},wp.api.versionString=wp.api.versionString||"wp/v2/",!_.isFunction(_.includes)&&_.isFunction(_.contains)&&(_.includes=_.contains)}(window),function(e){"use strict";var t,i;e.wp=e.wp||{},wp.api=wp.api||{},wp.api.utils=wp.api.utils||{},wp.api.getModelByRoute=function(t){return _.find(wp.api.models,function(e){return e.prototype.route&&t===e.prototype.route.index})},wp.api.getCollectionByRoute=function(t){return _.find(wp.api.collections,function(e){return e.prototype.route&&t===e.prototype.route.index})},Date.prototype.toISOString||(t=function(e){return i=1===(i=String(e)).length?"0"+i:i},Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+t(this.getUTCMonth()+1)+"-"+t(this.getUTCDate())+"T"+t(this.getUTCHours())+":"+t(this.getUTCMinutes())+":"+t(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}),wp.api.utils.parseISO8601=function(e){var t,i,n,o,s=0,a=[1,4,5,6,7,10,11];if(i=/^(\d{4}|[+\-]\d{6})(?:-(\d{2})(?:-(\d{2}))?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{3}))?)?(?:(Z)|([+\-])(\d{2})(?::(\d{2}))?)?)?$/.exec(e)){for(n=0;o=a[n];++n)i[o]=+i[o]||0;i[2]=(+i[2]||1)-1,i[3]=+i[3]||1,"Z"!==i[8]&&void 0!==i[9]&&(s=60*i[10]+i[11],"+"===i[9]&&(s=0-s)),t=Date.UTC(i[1],i[2],i[3],i[4],i[5]+s,i[6],i[7])}else t=Date.parse?Date.parse(e):NaN;return t},wp.api.utils.getRootUrl=function(){return e.location.origin?e.location.origin+"/":e.location.protocol+"//"+e.location.host+"/"},wp.api.utils.capitalize=function(e){return _.isUndefined(e)?e:e.charAt(0).toUpperCase()+e.slice(1)},wp.api.utils.capitalizeAndCamelCaseDashes=function(e){return _.isUndefined(e)?e:(e=wp.api.utils.capitalize(e),wp.api.utils.camelCaseDashes(e))},wp.api.utils.camelCaseDashes=function(e){return e.replace(/-([a-z])/g,function(e){return e[1].toUpperCase()})},wp.api.utils.extractRoutePart=function(e,t,i,n){return t=t||1,i=i||wp.api.versionString,e=(e=0===e.indexOf("/"+i)?e.substr(i.length+1):e).split("/"),n&&(e=e.reverse()),_.isUndefined(e[--t])?"":e[t]},wp.api.utils.extractParentName=function(e){var t=e.lastIndexOf("_id>[\\d]+)/");return t<0?"":((t=(t=e.substr(0,t-1)).split("/")).pop(),t=t.pop())},wp.api.utils.decorateFromRoute=function(e,t){_.each(e,function(e){_.includes(e.methods,"POST")||_.includes(e.methods,"PUT")?_.isEmpty(e.args)||(_.isEmpty(t.prototype.args)?t.prototype.args=e.args:t.prototype.args=_.extend(t.prototype.args,e.args)):_.includes(e.methods,"GET")&&(_.isEmpty(e.args)||(_.isEmpty(t.prototype.options)?t.prototype.options=e.args:t.prototype.options=_.extend(t.prototype.options,e.args)))})},wp.api.utils.addMixinsAndHelpers=function(t,e,i){function n(e,t,i,n,o){var s,a=jQuery.Deferred(),e=e.get("_embedded")||{};return _.isNumber(t)&&0!==t?(s=(s=e[n]?_.findWhere(e[n],{id:t}):s)||{id:t},(s=new wp.api.models[i](s)).get(o)?a.resolve(s):s.fetch({success:function(e){a.resolve(e)},error:function(e,t){a.reject(t)}}),a.promise()):(a.reject(),a)}var o=!1,s=["date","modified","date_gmt","modified_gmt"],a={setDate:function(e,t){t=t||"date";if(_.indexOf(s,t)<0)return!1;this.set(t,e.toISOString())},getDate:function(e){var t=e||"date",e=this.get(t);return!(_.indexOf(s,t)<0||_.isNull(e))&&new Date(wp.api.utils.parseISO8601(e))}},p=function(e,t){_.each(e.models,function(e){e.set("parent_post",t)})},r={getMeta:function(e){return this.get("meta")[e]},getMetas:function(){return this.get("meta")},setMetas:function(e){var t=this.get("meta");_.extend(t,e),this.set("meta",t)},setMeta:function(e,t){var i=this.get("meta");i[e]=t,this.set("meta",i)}},c={getRevisions:function(){return e=this,t="PostRevisions",s=o="",a=jQuery.Deferred(),r=e.get("id"),e=e.get("_embedded")||{},_.isNumber(r)&&0!==r?(_.isUndefined(i)||_.isUndefined(e[i])?o={parent:r}:s=_.isUndefined(n)?e[i]:e[i][n],o=new wp.api.collections[t](s,o),_.isUndefined(o.models[0])?o.fetch({success:function(e){p(e,r),a.resolve(e)},error:function(e,t){a.reject(t)}}):(p(o,r),a.resolve(o)),a.promise()):(a.reject(),a);var e,t,i,n,o,s,a,r}},d={getTags:function(){var e=this.get("tags"),t=new wp.api.collections.Tags;return _.isEmpty(e)?jQuery.Deferred().resolve([]):t.fetch({data:{include:e}})},setTags:function(e){var i,n=this,o=[];if(_.isString(e))return!1;_.isArray(e)?(new wp.api.collections.Tags).fetch({data:{per_page:100},success:function(t){_.each(e,function(e){(i=new wp.api.models.Tag(t.findWhere({slug:e}))).set("parent_post",n.get("id")),o.push(i)}),e=new wp.api.collections.Tags(o),n.setTagsWithCollection(e)}}):this.setTagsWithCollection(e)},setTagsWithCollection:function(e){return this.set("tags",e.pluck("id")),this.save()}},l={getCategories:function(){var e=this.get("categories"),t=new wp.api.collections.Categories;return _.isEmpty(e)?jQuery.Deferred().resolve([]):t.fetch({data:{include:e}})},setCategories:function(e){var i,n=this,o=[];if(_.isString(e))return!1;_.isArray(e)?(new wp.api.collections.Categories).fetch({data:{per_page:100},success:function(t){_.each(e,function(e){(i=new wp.api.models.Category(t.findWhere({slug:e}))).set("parent_post",n.get("id")),o.push(i)}),e=new wp.api.collections.Categories(o),n.setCategoriesWithCollection(e)}}):this.setCategoriesWithCollection(e)},setCategoriesWithCollection:function(e){return this.set("categories",e.pluck("id")),this.save()}},u={getAuthorUser:function(){return n(this,this.get("author"),"User","author","name")}},g={getFeaturedMedia:function(){return n(this,this.get("featured_media"),"Media","wp:featuredmedia","source_url")}};return _.isUndefined(t.prototype.args)?t:(_.each(s,function(e){_.isUndefined(t.prototype.args[e])||(o=!0)}),o&&(t=t.extend(a)),_.isUndefined(t.prototype.args.author)||(t=t.extend(u)),_.isUndefined(t.prototype.args.featured_media)||(t=t.extend(g)),_.isUndefined(t.prototype.args.categories)||(t=t.extend(l)),_.isUndefined(t.prototype.args.meta)||(t=t.extend(r)),_.isUndefined(t.prototype.args.tags)||(t=t.extend(d)),t=_.isUndefined(i.collections[e+"Revisions"])?t:t.extend(c))}}(window),function(){"use strict";var i=window.wpApiSettings||{},e=["Comment","Media","Comment","Post","Page","Status","Taxonomy","Type"];wp.api.WPApiBaseModel=Backbone.Model.extend({initialize:function(){-1===_.indexOf(e,this.name)&&(this.requireForceForDelete=!0)},sync:function(e,t,i){var n;return i=i||{},_.isNull(t.get("date_gmt"))&&t.unset("date_gmt"),_.isEmpty(t.get("slug"))&&t.unset("slug"),_.isFunction(t.nonce)&&!_.isEmpty(t.nonce())&&(n=i.beforeSend,i.beforeSend=function(e){if(e.setRequestHeader("X-WP-Nonce",t.nonce()),n)return n.apply(this,arguments)},i.complete=function(e){e=e.getResponseHeader("X-WP-Nonce");e&&_.isFunction(t.nonce)&&t.nonce()!==e&&t.endpointModel.set("nonce",e)}),this.requireForceForDelete&&"delete"===e&&(t.url=t.url()+"?force=true"),Backbone.sync(e,t,i)},save:function(e,t){return!(!_.includes(this.methods,"PUT")&&!_.includes(this.methods,"POST"))&&Backbone.Model.prototype.save.call(this,e,t)},destroy:function(e){return!!_.includes(this.methods,"DELETE")&&Backbone.Model.prototype.destroy.call(this,e)}}),wp.api.models.Schema=wp.api.WPApiBaseModel.extend({defaults:{_links:{},namespace:null,routes:{}},initialize:function(e,t){t=t||{},wp.api.WPApiBaseModel.prototype.initialize.call(this,e,t),this.apiRoot=t.apiRoot||i.root,this.versionString=t.versionString||i.versionString},url:function(){return this.apiRoot+this.versionString}})}(),function(){"use strict";window.wpApiSettings;wp.api.WPApiBaseCollection=Backbone.Collection.extend({initialize:function(e,t){this.state={data:{},currentPage:null,totalPages:null,totalObjects:null},_.isUndefined(t)?this.parent="":this.parent=t.parent},sync:function(e,t,i){var n,o,s=this;return i=i||{},_.isFunction(t.nonce)&&!_.isEmpty(t.nonce())&&(n=i.beforeSend,i.beforeSend=function(e){if(e.setRequestHeader("X-WP-Nonce",t.nonce()),n)return n.apply(s,arguments)},i.complete=function(e){e=e.getResponseHeader("X-WP-Nonce");e&&_.isFunction(t.nonce)&&t.nonce()!==e&&t.endpointModel.set("nonce",e)}),"read"===e&&(i.data?(s.state.data=_.clone(i.data),delete s.state.data.page):s.state.data=i.data={},void 0===i.data.page?(s.state.currentPage=null,s.state.totalPages=null,s.state.totalObjects=null):s.state.currentPage=i.data.page-1,o=i.success,i.success=function(e,t,i){if(_.isUndefined(i)||(s.state.totalPages=parseInt(i.getResponseHeader("x-wp-totalpages"),10),s.state.totalObjects=parseInt(i.getResponseHeader("x-wp-total"),10)),null===s.state.currentPage?s.state.currentPage=1:s.state.currentPage++,o)return o.apply(this,arguments)}),Backbone.sync(e,t,i)},more:function(e){if((e=e||{}).data=e.data||{},_.extend(e.data,this.state.data),void 0===e.data.page){if(!this.hasMore())return!1;null===this.state.currentPage||this.state.currentPage<=1?e.data.page=2:e.data.page=this.state.currentPage+1}return this.fetch(e)},hasMore:function(){return null===this.state.totalPages||null===this.state.totalObjects||null===this.state.currentPage?null:this.state.currentPage form').each(function(){ var $form=$(this); wpcf7.initForm($form); if(wpcf7.cached){ wpcf7.refill($form); }}); }); wpcf7.getId=function(form){ return parseInt($('input[name="_wpcf7"]', form).val(), 10); }; wpcf7.initForm=function(form){ var $form=$(form); $form.submit(function(event){ if(! wpcf7.supportHtml5.placeholder){ $('[placeholder].placeheld', $form).each(function(i, n){ $(n).val('').removeClass('placeheld'); }); } if(typeof window.FormData==='function'){ wpcf7.submit($form); event.preventDefault(); }}); $('.wpcf7-submit', $form).after(''); wpcf7.toggleSubmit($form); $form.on('click', '.wpcf7-acceptance', function(){ wpcf7.toggleSubmit($form); }); $('.wpcf7-exclusive-checkbox', $form).on('click', 'input:checkbox', function(){ var name=$(this).attr('name'); $form.find('input:checkbox[name="' + name + '"]').not(this).prop('checked', false); }); $('.wpcf7-list-item.has-free-text', $form).each(function(){ var $freetext=$(':input.wpcf7-free-text', this); var $wrap=$(this).closest('.wpcf7-form-control'); if($(':checkbox, :radio', this).is(':checked')){ $freetext.prop('disabled', false); }else{ $freetext.prop('disabled', true); } $wrap.on('change', ':checkbox, :radio', function(){ var $cb=$('.has-free-text', $wrap).find(':checkbox, :radio'); if($cb.is(':checked')){ $freetext.prop('disabled', false).focus(); }else{ $freetext.prop('disabled', true); }}); }); if(! wpcf7.supportHtml5.placeholder){ $('[placeholder]', $form).each(function(){ $(this).val($(this).attr('placeholder')); $(this).addClass('placeheld'); $(this).focus(function(){ if($(this).hasClass('placeheld')){ $(this).val('').removeClass('placeheld'); }}); $(this).blur(function(){ if(''===$(this).val()){ $(this).val($(this).attr('placeholder')); $(this).addClass('placeheld'); }}); }); } if(wpcf7.jqueryUi&&! wpcf7.supportHtml5.date){ $form.find('input.wpcf7-date[type="date"]').each(function(){ $(this).datepicker({ dateFormat: 'yy-mm-dd', minDate: new Date($(this).attr('min')), maxDate: new Date($(this).attr('max')) }); }); } if(wpcf7.jqueryUi&&! wpcf7.supportHtml5.number){ $form.find('input.wpcf7-number[type="number"]').each(function(){ $(this).spinner({ min: $(this).attr('min'), max: $(this).attr('max'), step: $(this).attr('step') }); }); } $('.wpcf7-character-count', $form).each(function(){ var $count=$(this); var name=$count.attr('data-target-name'); var down=$count.hasClass('down'); var starting=parseInt($count.attr('data-starting-value'), 10); var maximum=parseInt($count.attr('data-maximum-value'), 10); var minimum=parseInt($count.attr('data-minimum-value'), 10); var updateCount=function(target){ var $target=$(target); var length=$target.val().length; var count=down ? starting - length:length; $count.attr('data-current-value', count); $count.text(count); if(maximum&&maximum < length){ $count.addClass('too-long'); }else{ $count.removeClass('too-long'); } if(minimum&&length < minimum){ $count.addClass('too-short'); }else{ $count.removeClass('too-short'); }}; $(':input[name="' + name + '"]', $form).each(function(){ updateCount(this); $(this).keyup(function(){ updateCount(this); }); }); }); $form.on('change', '.wpcf7-validates-as-url', function(){ var val=$.trim($(this).val()); if(val && ! val.match(/^[a-z][a-z0-9.+-]*:/i) && -1!==val.indexOf('.')){ val=val.replace(/^\/+/, ''); val='http://' + val; } $(this).val(val); }); }; wpcf7.submit=function(form){ if(typeof window.FormData!=='function'){ return; } var $form=$(form); $('.ajax-loader', $form).addClass('is-active'); wpcf7.clearResponse($form); var formData=new FormData($form.get(0)); var detail={ id: $form.closest('div.wpcf7').attr('id'), status: 'init', inputs: [], formData: formData }; $.each($form.serializeArray(), function(i, field){ if('_wpcf7'==field.name){ detail.contactFormId=field.value; }else if('_wpcf7_version'==field.name){ detail.pluginVersion=field.value; }else if('_wpcf7_locale'==field.name){ detail.contactFormLocale=field.value; }else if('_wpcf7_unit_tag'==field.name){ detail.unitTag=field.value; }else if('_wpcf7_container_post'==field.name){ detail.containerPostId=field.value; }else if(field.name.match(/^_wpcf7_\w+_free_text_/)){ var owner=field.name.replace(/^_wpcf7_\w+_free_text_/, ''); detail.inputs.push({ name: owner + '-free-text', value: field.value }); }else if(field.name.match(/^_/)){ }else{ detail.inputs.push(field); }}); wpcf7.triggerEvent($form.closest('div.wpcf7'), 'beforesubmit', detail); var ajaxSuccess=function(data, status, xhr, $form){ detail.id=$(data.into).attr('id'); detail.status=data.status; detail.apiResponse=data; var $message=$('.wpcf7-response-output', $form); switch(data.status){ case 'validation_failed': $.each(data.invalidFields, function(i, n){ $(n.into, $form).each(function(){ wpcf7.notValidTip(this, n.message); $('.wpcf7-form-control', this).addClass('wpcf7-not-valid'); $('[aria-invalid]', this).attr('aria-invalid', 'true'); }); }); $message.addClass('wpcf7-validation-errors'); $form.addClass('invalid'); wpcf7.triggerEvent(data.into, 'invalid', detail); break; case 'acceptance_missing': $message.addClass('wpcf7-acceptance-missing'); $form.addClass('unaccepted'); wpcf7.triggerEvent(data.into, 'unaccepted', detail); break; case 'spam': $message.addClass('wpcf7-spam-blocked'); $form.addClass('spam'); wpcf7.triggerEvent(data.into, 'spam', detail); break; case 'aborted': $message.addClass('wpcf7-aborted'); $form.addClass('aborted'); wpcf7.triggerEvent(data.into, 'aborted', detail); break; case 'mail_sent': $message.addClass('wpcf7-mail-sent-ok'); $form.addClass('sent'); wpcf7.triggerEvent(data.into, 'mailsent', detail); break; case 'mail_failed': $message.addClass('wpcf7-mail-sent-ng'); $form.addClass('failed'); wpcf7.triggerEvent(data.into, 'mailfailed', detail); break; default: var customStatusClass='custom-' + data.status.replace(/[^0-9a-z]+/i, '-'); $message.addClass('wpcf7-' + customStatusClass); $form.addClass(customStatusClass); } wpcf7.refill($form, data); wpcf7.triggerEvent(data.into, 'submit', detail); if('mail_sent'==data.status){ $form.each(function(){ this.reset(); }); wpcf7.toggleSubmit($form); } if(! wpcf7.supportHtml5.placeholder){ $form.find('[placeholder].placeheld').each(function(i, n){ $(n).val($(n).attr('placeholder')); }); } $message.html('').append(data.message).slideDown('fast'); $message.attr('role', 'alert'); $('.screen-reader-response', $form.closest('.wpcf7')).each(function(){ var $response=$(this); $response.html('').attr('role', '').append(data.message); if(data.invalidFields){ var $invalids=$('
    '); $.each(data.invalidFields, function(i, n){ if(n.idref){ var $li=$('
  • ').append($('').attr('href', '#' + n.idref).append(n.message)); }else{ var $li=$('
  • ').append(n.message); } $invalids.append($li); }); $response.append($invalids); } $response.attr('role', 'alert').focus(); }); }; $.ajax({ type: 'POST', url: wpcf7.apiSettings.getRoute('/contact-forms/' + wpcf7.getId($form) + '/feedback'), data: formData, dataType: 'json', processData: false, contentType: false }).done(function(data, status, xhr){ ajaxSuccess(data, status, xhr, $form); $('.ajax-loader', $form).removeClass('is-active'); }).fail(function(xhr, status, error){ var $e=$('
    ').text(error.message); $form.after($e); }); }; wpcf7.triggerEvent=function(target, name, detail){ var $target=$(target); var event=new CustomEvent('wpcf7' + name, { bubbles: true, detail: detail }); $target.get(0).dispatchEvent(event); $target.trigger('wpcf7:' + name, detail); $target.trigger(name + '.wpcf7', detail); }; wpcf7.toggleSubmit=function(form, state){ var $form=$(form); var $submit=$('input:submit', $form); if(typeof state!=='undefined'){ $submit.prop('disabled', ! state); return; } if($form.hasClass('wpcf7-acceptance-as-validation')){ return; } $submit.prop('disabled', false); $('.wpcf7-acceptance', $form).each(function(){ var $span=$(this); var $input=$('input:checkbox', $span); if(! $span.hasClass('optional')){ if($span.hasClass('invert')&&$input.is(':checked') || ! $span.hasClass('invert')&&! $input.is(':checked')){ $submit.prop('disabled', true); return false; }} }); }; wpcf7.notValidTip=function(target, message){ var $target=$(target); $('.wpcf7-not-valid-tip', $target).remove(); $('') .text(message).appendTo($target); if($target.is('.use-floating-validation-tip *')){ var fadeOut=function(target){ $(target).not(':hidden').animate({ opacity: 0 }, 'fast', function(){ $(this).css({ 'z-index': -100 }); }); }; $target.on('mouseover', '.wpcf7-not-valid-tip', function(){ fadeOut(this); }); $target.on('focus', ':input', function(){ fadeOut($('.wpcf7-not-valid-tip', $target)); }); }}; wpcf7.refill=function(form, data){ var $form=$(form); var refillCaptcha=function($form, items){ $.each(items, function(i, n){ $form.find(':input[name="' + i + '"]').val(''); $form.find('img.wpcf7-captcha-' + i).attr('src', n); var match=/([0-9]+)\.(png|gif|jpeg)$/.exec(n); $form.find('input:hidden[name="_wpcf7_captcha_challenge_' + i + '"]').attr('value', match[ 1 ]); }); }; var refillQuiz=function($form, items){ $.each(items, function(i, n){ $form.find(':input[name="' + i + '"]').val(''); $form.find(':input[name="' + i + '"]').siblings('span.wpcf7-quiz-label').text(n[ 0 ]); $form.find('input:hidden[name="_wpcf7_quiz_answer_' + i + '"]').attr('value', n[ 1 ]); }); }; if(typeof data==='undefined'){ $.ajax({ type: 'GET', url: wpcf7.apiSettings.getRoute('/contact-forms/' + wpcf7.getId($form) + '/refill'), beforeSend: function(xhr){ var nonce=$form.find(':input[name="_wpnonce"]').val(); if(nonce){ xhr.setRequestHeader('X-WP-Nonce', nonce); }}, dataType: 'json' }).done(function(data, status, xhr){ if(data.captcha){ refillCaptcha($form, data.captcha); } if(data.quiz){ refillQuiz($form, data.quiz); }}); }else{ if(data.captcha){ refillCaptcha($form, data.captcha); } if(data.quiz){ refillQuiz($form, data.quiz); }} }; wpcf7.clearResponse=function(form){ var $form=$(form); $form.removeClass('invalid spam sent failed'); $form.siblings('.screen-reader-response').html('').attr('role', ''); $('.wpcf7-not-valid-tip', $form).remove(); $('[aria-invalid]', $form).attr('aria-invalid', 'false'); $('.wpcf7-form-control', $form).removeClass('wpcf7-not-valid'); $('.wpcf7-response-output', $form) .hide().empty().removeAttr('role') .removeClass('wpcf7-mail-sent-ok wpcf7-mail-sent-ng wpcf7-validation-errors wpcf7-spam-blocked'); }; wpcf7.apiSettings.getRoute=function(path){ var url=wpcf7.apiSettings.root; url=url.replace(wpcf7.apiSettings.namespace, wpcf7.apiSettings.namespace + path); return url; };})(jQuery); (function (){ if(typeof window.CustomEvent==="function") return false; function CustomEvent(event, params){ params=params||{ bubbles: false, cancelable: false, detail: undefined }; var evt=document.createEvent('CustomEvent'); evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail); return evt; } CustomEvent.prototype=window.Event.prototype; window.CustomEvent=CustomEvent; })(); !function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):"undefined"!=typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){"use strict";var b=window.Slick||{};b=function(){function c(c,d){var f,e=this;e.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:a(c),appendDots:a(c),arrows:!0,asNavFor:null,prevArrow:'',nextArrow:'',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(b,c){return a('',tClose:"Close (Esc)",tLoading:"Loading..."}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("
    ");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'The content could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'
    ',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'The image could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'
    ',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=b.st.gallery,e=".mfp-gallery",g=Boolean(a.fn.mfpFastClick);return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s),h=g?"mfpFastClick":"click";e[h](function(){b.prev()}),f[h](function(){b.next()}),b.isIE7&&(x("b",e[0],!1,!0),x("a",e[0],!1,!0),x("b",f[0],!1,!0),x("a",f[0],!1,!0)),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowLeft&&g&&b.arrowLeft.add(b.arrowRight).destroyMfpFastClick(),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),function(){var b=1e3,c="ontouchstart"in window,d=function(){v.off("touchmove"+f+" touchend"+f)},e="mfpFastClick",f="."+e;a.fn.mfpFastClick=function(e){return a(this).each(function(){var g,h=a(this);if(c){var i,j,k,l,m,n;h.on("touchstart"+f,function(a){l=!1,n=1,m=a.originalEvent?a.originalEvent.touches[0]:a.touches[0],j=m.clientX,k=m.clientY,v.on("touchmove"+f,function(a){m=a.originalEvent?a.originalEvent.touches:a.touches,n=m.length,m=m[0],(Math.abs(m.clientX-j)>10||Math.abs(m.clientY-k)>10)&&(l=!0,d())}).on("touchend"+f,function(a){d(),l||n>1||(g=!0,a.preventDefault(),clearTimeout(i),i=setTimeout(function(){g=!1},b),e())})})}h.on("click"+f,function(){g||e()})})},a.fn.destroyMfpFastClick=function(){a(this).off("touchstart"+f+" click"+f),c&&v.off("touchmove"+f+" touchend"+f)}}(),A()}); (function(e){"use strict";e.fn.counterUp=function(t){var n=e.extend({time:400,delay:10},t);return this.each(function(){var t=e(this),r=n,i=function(){var e=[],n=r.time/r.delay,i=t.text(),s=/[0-9]+,[0-9]+/.test(i);i=i.replace(/,/g,"");var o=/^[0-9]+$/.test(i),u=/^[0-9]+\.[0-9]+$/.test(i),a=u?(i.split(".")[1]||[]).length:0;for(var f=n;f>=1;f--){var l=parseInt(i/n*f);u&&(l=parseFloat(i/n*f).toFixed(a));if(s)while(/(\d+)(\d{3})/.test(l.toString()))l=l.toString().replace(/(\d+)(\d{3})/,"$1,$2");e.unshift(l)}t.data("counterup-nums",e);t.text("0");var c=function(){t.text(t.data("counterup-nums").shift());if(t.data("counterup-nums").length)setTimeout(t.data("counterup-func"),r.delay);else{delete t.data("counterup-nums");t.data("counterup-nums",null);t.data("counterup-func",null)}};t.data("counterup-func",c);setTimeout(t.data("counterup-func"),r.delay)};t.waypoint(i,{offset:"100%",triggerOnce:!0})})}})(jQuery); (function(){var t=[].indexOf||function(t){for(var e=0,n=this.length;e=0;s={horizontal:{},vertical:{}};f=1;a={};u="waypoints-context-id";p="resize.waypoints";y="scroll.waypoints";v=1;w="waypoints-waypoint-ids";g="waypoint";m="waypoints";o=function(){function t(t){var e=this;this.$element=t;this.element=t[0];this.didResize=false;this.didScroll=false;this.id="context"+f++;this.oldScroll={x:t.scrollLeft(),y:t.scrollTop()};this.waypoints={horizontal:{},vertical:{}};t.data(u,this.id);a[this.id]=this;t.bind(y,function(){var t;if(!(e.didScroll||c)){e.didScroll=true;t=function(){e.doScroll();return e.didScroll=false};return r.setTimeout(t,n[m].settings.scrollThrottle)}});t.bind(p,function(){var t;if(!e.didResize){e.didResize=true;t=function(){n[m]("refresh");return e.didResize=false};return r.setTimeout(t,n[m].settings.resizeThrottle)}})}t.prototype.doScroll=function(){var t,e=this;t={horizontal:{newScroll:this.$element.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.$element.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};if(c&&(!t.vertical.oldScroll||!t.vertical.newScroll)){n[m]("refresh")}n.each(t,function(t,r){var i,o,l;l=[];o=r.newScroll>r.oldScroll;i=o?r.forward:r.backward;n.each(e.waypoints[t],function(t,e){var n,i;if(r.oldScroll<(n=e.offset)&&n<=r.newScroll){return l.push(e)}else if(r.newScroll<(i=e.offset)&&i<=r.oldScroll){return l.push(e)}});l.sort(function(t,e){return t.offset-e.offset});if(!o){l.reverse()}return n.each(l,function(t,e){if(e.options.continuous||t===l.length-1){return e.trigger([i])}})});return this.oldScroll={x:t.horizontal.newScroll,y:t.vertical.newScroll}};t.prototype.refresh=function(){var t,e,r,i=this;r=n.isWindow(this.element);e=this.$element.offset();this.doScroll();t={horizontal:{contextOffset:r?0:e.left,contextScroll:r?0:this.oldScroll.x,contextDimension:this.$element.width(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:r?0:e.top,contextScroll:r?0:this.oldScroll.y,contextDimension:r?n[m]("viewportHeight"):this.$element.height(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};return n.each(t,function(t,e){return n.each(i.waypoints[t],function(t,r){var i,o,l,s,f;i=r.options.offset;l=r.offset;o=n.isWindow(r.element)?0:r.$element.offset()[e.offsetProp];if(n.isFunction(i)){i=i.apply(r.element)}else if(typeof i==="string"){i=parseFloat(i);if(r.options.offset.indexOf("%")>-1){i=Math.ceil(e.contextDimension*i/100)}}r.offset=o-e.contextOffset+e.contextScroll-i;if(r.options.onlyOnScroll&&l!=null||!r.enabled){return}if(l!==null&&l<(s=e.oldScroll)&&s<=r.offset){return r.trigger([e.backward])}else if(l!==null&&l>(f=e.oldScroll)&&f>=r.offset){return r.trigger([e.forward])}else if(l===null&&e.oldScroll>=r.offset){return r.trigger([e.forward])}})})};t.prototype.checkEmpty=function(){if(n.isEmptyObject(this.waypoints.horizontal)&&n.isEmptyObject(this.waypoints.vertical)){this.$element.unbind([p,y].join(" "));return delete a[this.id]}};return t}();l=function(){function t(t,e,r){var i,o;r=n.extend({},n.fn[g].defaults,r);if(r.offset==="bottom-in-view"){r.offset=function(){var t;t=n[m]("viewportHeight");if(!n.isWindow(e.element)){t=e.$element.height()}return t-n(this).outerHeight()}}this.$element=t;this.element=t[0];this.axis=r.horizontal?"horizontal":"vertical";this.callback=r.handler;this.context=e;this.enabled=r.enabled;this.id="waypoints"+v++;this.offset=null;this.options=r;e.waypoints[this.axis][this.id]=this;s[this.axis][this.id]=this;i=(o=t.data(w))!=null?o:[];i.push(this.id);t.data(w,i)}t.prototype.trigger=function(t){if(!this.enabled){return}if(this.callback!=null){this.callback.apply(this.element,t)}if(this.options.triggerOnce){return this.destroy()}};t.prototype.disable=function(){return this.enabled=false};t.prototype.enable=function(){this.context.refresh();return this.enabled=true};t.prototype.destroy=function(){delete s[this.axis][this.id];delete this.context.waypoints[this.axis][this.id];return this.context.checkEmpty()};t.getWaypointsByElement=function(t){var e,r;r=n(t).data(w);if(!r){return[]}e=n.extend({},s.horizontal,s.vertical);return n.map(r,function(t){return e[t]})};return t}();d={init:function(t,e){var r;if(e==null){e={}}if((r=e.handler)==null){e.handler=t}this.each(function(){var t,r,i,s;t=n(this);i=(s=e.context)!=null?s:n.fn[g].defaults.context;if(!n.isWindow(i)){i=t.closest(i)}i=n(i);r=a[i.data(u)];if(!r){r=new o(i)}return new l(t,r,e)});n[m]("refresh");return this},disable:function(){return d._invoke(this,"disable")},enable:function(){return d._invoke(this,"enable")},destroy:function(){return d._invoke(this,"destroy")},prev:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(e>0){return t.push(n[e-1])}})},next:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(et.oldScroll.y})},left:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset<=t.oldScroll.x})},right:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset>t.oldScroll.x})},enable:function(){return h._invoke("enable")},disable:function(){return h._invoke("disable")},destroy:function(){return h._invoke("destroy")},extendFn:function(t,e){return d[t]=e},_invoke:function(t){var e;e=n.extend({},s.vertical,s.horizontal);return n.each(e,function(e,n){n[t]();return true})},_filter:function(t,e,r){var i,o;i=a[n(t).data(u)];if(!i){return[]}o=[];n.each(i.waypoints[e],function(t,e){if(r(i,e)){return o.push(e)}});o.sort(function(t,e){return t.offset-e.offset});return n.map(o,function(t){return t.element})}};n[m]=function(){var t,n;n=arguments[0],t=2<=arguments.length?e.call(arguments,1):[];if(h[n]){return h[n].apply(null,t)}else{return h.aggregate.call(null,n)}};n[m].settings={resizeThrottle:100,scrollThrottle:30};return i.load(function(){return n[m]("refresh")})})}).call(this); (function($){ var $window=$(window); var windowHeight=$window.height(); $window.resize(function (){ windowHeight=$window.height(); }); $.fn.parallax=function(xpos, speedFactor, outerHeight){ var $this=$(this); var getHeight; var firstTop; var paddingTop=0; $this.each(function(){ firstTop=$this.offset().top; }); if(outerHeight){ getHeight=function(jqo){ return jqo.outerHeight(true); };}else{ getHeight=function(jqo){ return jqo.height(); };} if(arguments.length < 1||xpos===null) xpos="50%"; if(arguments.length < 2||speedFactor===null) speedFactor=0.1; if(arguments.length < 3||outerHeight===null) outerHeight=true; function update(){ var pos=$window.scrollTop(); $this.each(function(){ var $element=$(this); var top=$element.offset().top; var height=getHeight($element); if(top + height < pos||top > pos + windowHeight){ return; } $this.css('backgroundPosition', xpos + " " + Math.round((firstTop - pos) * speedFactor) + "px"); }); } $window.bind('scroll', update).resize(update); update(); };})(jQuery); (function ($){ $.fn.theiaStickySidebar=function (options){ var defaults={ 'containerSelector': '', 'additionalMarginTop': 0, 'additionalMarginBottom': 0, 'updateSidebarHeight': true, 'minWidth': 0, 'disableOnResponsiveLayouts': true, 'sidebarBehavior': 'modern' }; options=$.extend(defaults, options); options.additionalMarginTop=parseInt(options.additionalMarginTop)||0; options.additionalMarginBottom=parseInt(options.additionalMarginBottom)||0; tryInitOrHookIntoEvents(options, this); function tryInitOrHookIntoEvents(options, $that){ var success=tryInit(options, $that); if(!success){ console.log('TSS: Body width smaller than options.minWidth. Init is delayed.'); $(document).scroll(function (options, $that){ return function (evt){ var success=tryInit(options, $that); if(success){ $(this).unbind(evt); }};}(options, $that)); $(window).resize(function (options, $that){ return function (evt){ var success=tryInit(options, $that); if(success){ $(this).unbind(evt); }};}(options, $that)) }} function tryInit(options, $that){ if(options.initialized===true){ return true; } if($('body').width() < options.minWidth){ return false; } init(options, $that); return true; } function init(options, $that){ options.initialized=true; $('head').append($('')); $that.each(function (){ var o={}; o.sidebar=$(this); o.options=options||{}; o.container=$(o.options.containerSelector); if(o.container.length==0){ o.container=o.sidebar.parent(); } o.sidebar.parents().css('-webkit-transform', 'none'); o.sidebar.css({ 'position': 'relative', 'overflow': 'visible', '-webkit-box-sizing': 'border-box', '-moz-box-sizing': 'border-box', 'box-sizing': 'border-box' }); o.stickySidebar=o.sidebar.find('.theiaStickySidebar'); if(o.stickySidebar.length==0){ var javaScriptMIMETypes=/(?:text|application)\/(?:x-)?(?:javascript|ecmascript)/i; o.sidebar.find('script').filter(function(index, script){ return script.type.length===0||script.type.match(javaScriptMIMETypes); }).remove(); o.stickySidebar=$('
    ').addClass('theiaStickySidebar').append(o.sidebar.children()); o.sidebar.append(o.stickySidebar); } o.marginBottom=parseInt(o.sidebar.css('margin-bottom')); o.paddingTop=parseInt(o.sidebar.css('padding-top')); o.paddingBottom=parseInt(o.sidebar.css('padding-bottom')); var collapsedTopHeight=o.stickySidebar.offset().top; var collapsedBottomHeight=o.stickySidebar.outerHeight(); o.stickySidebar.css('padding-top', 1); o.stickySidebar.css('padding-bottom', 1); collapsedTopHeight -=o.stickySidebar.offset().top; collapsedBottomHeight=o.stickySidebar.outerHeight() - collapsedBottomHeight - collapsedTopHeight; if(collapsedTopHeight==0){ o.stickySidebar.css('padding-top', 0); o.stickySidebarPaddingTop=0; }else{ o.stickySidebarPaddingTop=1; } if(collapsedBottomHeight==0){ o.stickySidebar.css('padding-bottom', 0); o.stickySidebarPaddingBottom=0; }else{ o.stickySidebarPaddingBottom=1; } o.previousScrollTop=null; o.fixedScrollTop=0; resetSidebar(); o.onScroll=function (o){ if(!o.stickySidebar.is(":visible")){ return; } if($('body').width() < o.options.minWidth){ resetSidebar(); return; } if(o.options.disableOnResponsiveLayouts){ var sidebarWidth=o.sidebar.outerWidth(o.sidebar.css('float')=='none'); if(sidebarWidth + 50 > o.container.width()){ resetSidebar(); return; }} var scrollTop=$(document).scrollTop(); var position='static'; if(scrollTop >=o.sidebar.offset().top + (o.paddingTop - o.options.additionalMarginTop)){ var offsetTop=o.paddingTop + options.additionalMarginTop; var offsetBottom=o.paddingBottom + o.marginBottom + options.additionalMarginBottom; var containerTop=o.sidebar.offset().top; var containerBottom=o.sidebar.offset().top + getClearedHeight(o.container); var windowOffsetTop=0 + options.additionalMarginTop; var windowOffsetBottom; var sidebarSmallerThanWindow=(o.stickySidebar.outerHeight() + offsetTop + offsetBottom) < $(window).height(); if(sidebarSmallerThanWindow){ windowOffsetBottom=windowOffsetTop + o.stickySidebar.outerHeight(); }else{ windowOffsetBottom=$(window).height() - o.marginBottom - o.paddingBottom - options.additionalMarginBottom; } var staticLimitTop=containerTop - scrollTop + o.paddingTop; var staticLimitBottom=containerBottom - scrollTop - o.paddingBottom - o.marginBottom; var top=o.stickySidebar.offset().top - scrollTop; var scrollTopDiff=o.previousScrollTop - scrollTop; if(o.stickySidebar.css('position')=='fixed'){ if(o.options.sidebarBehavior=='modern'){ top +=scrollTopDiff; }} if(o.options.sidebarBehavior=='stick-to-top'){ top=options.additionalMarginTop; } if(o.options.sidebarBehavior=='stick-to-bottom'){ top=windowOffsetBottom - o.stickySidebar.outerHeight(); } if(scrollTopDiff > 0){ top=Math.min(top, windowOffsetTop); }else{ top=Math.max(top, windowOffsetBottom - o.stickySidebar.outerHeight()); } top=Math.max(top, staticLimitTop); top=Math.min(top, staticLimitBottom - o.stickySidebar.outerHeight()); var sidebarSameHeightAsContainer=o.container.height()==o.stickySidebar.outerHeight(); if(!sidebarSameHeightAsContainer&&top==windowOffsetTop){ position='fixed'; } else if(!sidebarSameHeightAsContainer&&top==windowOffsetBottom - o.stickySidebar.outerHeight()){ position='fixed'; } else if(scrollTop + top - o.sidebar.offset().top - o.paddingTop <=options.additionalMarginTop){ position='static'; }else{ position='absolute'; }} if(position=='fixed'){ var scrollLeft=$(document).scrollLeft(); o.stickySidebar.css({ 'position': 'fixed', 'width': getWidthForObject(o.stickySidebar) + 'px', 'transform': 'translateY(' + top + 'px)', 'left': (o.sidebar.offset().left + parseInt(o.sidebar.css('padding-left')) - scrollLeft) + 'px', 'top': '0px' }); } else if(position=='absolute'){ var css={}; if(o.stickySidebar.css('position')!='absolute'){ css.position='absolute'; css.transform='translateY(' + (scrollTop + top - o.sidebar.offset().top - o.stickySidebarPaddingTop - o.stickySidebarPaddingBottom) + 'px)'; css.top='0px'; } css.width=getWidthForObject(o.stickySidebar) + 'px'; css.left=''; o.stickySidebar.css(css); } else if(position=='static'){ resetSidebar(); } if(position!='static'){ if(o.options.updateSidebarHeight==true){ o.sidebar.css({ 'min-height': o.stickySidebar.outerHeight() + o.stickySidebar.offset().top - o.sidebar.offset().top + o.paddingBottom }); }} o.previousScrollTop=scrollTop; }; o.onScroll(o); $(document).scroll(function (o){ return function (){ o.onScroll(o); };}(o)); $(window).resize(function (o){ return function (){ o.stickySidebar.css({'position': 'static'}); o.onScroll(o); };}(o)); function resetSidebar(){ o.fixedScrollTop=0; o.sidebar.css({ 'min-height': '1px' }); o.stickySidebar.css({ 'position': 'static', 'width': '', 'transform': 'none' }); } function getClearedHeight(e){ var height=e.height(); e.children().each(function (){ height=Math.max(height, $(this).height()); }); return height; }}); } function getWidthForObject(object){ var width; try { width=object[0].getBoundingClientRect().width; } catch(err){ } if(typeof width==="undefined"){ width=object.width(); } return width; }} })(jQuery); ;(function($, window, document, undefined){ var OnePageNav=function(elem, options){ this.elem=elem; this.$elem=$(elem); this.options=options; this.metadata=this.$elem.data('plugin-options'); this.$win=$(window); this.sections={}; this.didScroll=false; this.$doc=$(document); this.docHeight=this.$doc.height(); }; OnePageNav.prototype={ defaults: { navItems: 'a', currentClass: 'current', changeHash: false, easing: 'swing', filter: '', scrollSpeed: 750, scrollThreshold: 0.5, begin: false, end: false, scrollChange: false }, init: function(){ this.config=$.extend({}, this.defaults, this.options, this.metadata); this.$nav=this.$elem.find(this.config.navItems); if(this.config.filter!==''){ this.$nav=this.$nav.filter(this.config.filter); } this.$nav.on('click.onePageNav', $.proxy(this.handleClick, this)); this.getPositions(); this.bindInterval(); this.$win.on('resize.onePageNav', $.proxy(this.getPositions, this)); return this; }, adjustNav: function(self, $parent){ self.$elem.find('.' + self.config.currentClass).removeClass(self.config.currentClass); $parent.addClass(self.config.currentClass); }, bindInterval: function(){ var self=this; var docHeight; self.$win.on('scroll.onePageNav', function(){ self.didScroll=true; }); self.t=setInterval(function(){ docHeight=self.$doc.height(); if(self.didScroll){ self.didScroll=false; self.scrollChange(); } if(docHeight!==self.docHeight){ self.docHeight=docHeight; self.getPositions(); }}, 250); }, getHash: function($link){ return $link.attr('href').split('#')[1]; }, getPositions: function(){ var self=this; var linkHref; var topPos; var $target; self.$nav.each(function(){ linkHref=self.getHash($(this)); $target=$('#' + linkHref); if($target.length){ topPos=$target.offset().top; self.sections[linkHref]=Math.round(topPos); }}); }, getSection: function(windowPos){ var returnValue=null; var windowHeight=Math.round(this.$win.height() * this.config.scrollThreshold); for(var section in this.sections){ if((this.sections[section] - windowHeight) < windowPos){ returnValue=section; }} return returnValue; }, handleClick: function(e){ var self=this; var $link=$(e.currentTarget); var $parent=$link.parent(); var newLoc='#' + self.getHash($link); if(!$parent.hasClass(self.config.currentClass)){ if(self.config.begin){ self.config.begin(); } self.adjustNav(self, $parent); self.unbindInterval(); self.scrollTo(newLoc, function(){ if(self.config.changeHash){ window.location.hash=newLoc; } self.bindInterval(); if(self.config.end){ self.config.end(); }}); } e.preventDefault(); }, scrollChange: function(){ var windowTop=this.$win.scrollTop(); var position=this.getSection(windowTop); var $parent; if(position!==null){ $parent=this.$elem.find('a[href$="#' + position + '"]').parent(); if(!$parent.hasClass(this.config.currentClass)){ this.adjustNav(this, $parent); if(this.config.scrollChange){ this.config.scrollChange($parent); }} }}, scrollTo: function(target, callback){ var offset=$(target).offset().top; $('html, body').animate({ scrollTop: offset }, this.config.scrollSpeed, this.config.easing, callback); }, unbindInterval: function(){ clearInterval(this.t); this.$win.unbind('scroll.onePageNav'); }}; OnePageNav.defaults=OnePageNav.prototype.defaults; $.fn.onePageNav=function(options){ return this.each(function(){ new OnePageNav(this, options).init(); }); };})(jQuery, window , document); jQuery(function ($){ 'use strict'; $(document).ready(function(){ $('.wpcf7 input').iCheck({ checkboxClass: 'icheckbox_minimal', radioClass: 'iradio_minimal', increaseArea: '20%' }); $('.woocommerce input').iCheck({ checkboxClass: 'icheckbox_minimal', radioClass: 'iradio_minimal', increaseArea: '20%' }); }); (function (){ $('.search-icon').click(function(){ if($(this).hasClass('opened')){ $(this).removeClass('opened'); $('.search-icon i').removeClass('active-search').addClass('fa-search'); $('.search-form').fadeOut('slow').removeClass('').addClass(''); }else{ $(this).addClass('opened'); $('.search-icon i').addClass('active-search').removeClass('fa-search'); $('.search-form').fadeIn('slow').removeClass('').addClass(''); }}); $('body').click(function(){ $('.search-icon').removeClass('opened'); $('.search-icon i').removeClass('active-search').addClass('fa-search'); $('.search-form').fadeOut('slow').removeClass('').addClass(''); }); $('.tr-search').click(function(e){ e.stopPropagation(); }); }()); (function (){ $('.tr-rating-bar').bind('inview', function(event, visible, visiblePartX, visiblePartY){ if(visible){ $.each($('div.progress-bar'),function(){ $(this).css('width', $(this).attr('aria-valuenow')+'%'); }); $(this).unbind('inview'); }}); }()); $(window).scroll(function(event){ Scroll(); }); $('#navbar-collapse').onePageNav({ currentClass: 'active', filter: ':not(.external)' }); function Scroll(){ var contentTop=[]; var contentBottom=[]; var winTop=$(window).scrollTop(); var rangeTop=200; var rangeBottom=500; $('.navbar-nav').find('.scroll a').each(function(){ contentTop.push($($(this).attr('href')).offset().top); contentBottom.push($($(this).attr('href')).offset().top + $($(this).attr('href')).height()); }) $.each(contentTop, function(i){ if(winTop > contentTop[i] - rangeTop){ $('.navbar-nav li.scroll') .removeClass('active') .eq(i).addClass('active'); }}) }; (function (){ $(window).scroll(function(){ var navbar=$('.navbar'); var $this=$(this); if($this.scrollTop() > 55){ navbar.addClass('navbar-fixed-top animated fadeInDown'); }else{ navbar.removeClass('navbar-fixed-top animated fadeInDown'); }}); }()); $(window).bind('load', function (){ parallaxInit(); }); function parallaxInit(){ $('.tr-video').parallax("50%", 0.3); $('.tr-subscribe').parallax("50%", 0.3); $('.tr-twitter').parallax("50%", 0.3); $('.tr-cta-2').parallax("50%", 0.3); } parallaxInit(); (function (){ $('#portfolio-item').cubeportfolio({ filters: '#portfolio-menu', loadMore: '#portfolio-menu', animationType: 'flipBottom', gapHorizontal: 30, gapVertical: 30, mediaQueries: [{ width: 768, cols: 3 }, { width: 480, cols: 2 }, { width: 0, cols: 1 }], }); }()); (function(){ $('.team-slider').slick({ infinite: true, slidesToShow: 4, autoplay:true, autoplaySpeed:10000, slidesToScroll: 1, responsive: [ { breakpoint: 1025, settings: { slidesToShow: 3, }}, { breakpoint: 481, settings: { slidesToShow: 1, }} ] }); $('.blog-slider').slick({ infinite: true, slidesToShow: 1, autoplay:false, autoplaySpeed:10000, slidesToScroll: 1, }); $('.clients-slider').slick({ infinite: true, slidesToShow: 4, autoplay:true, autoplaySpeed:10000, slidesToScroll: 1, responsive: [ { breakpoint: 1025, settings: { slidesToShow: 3, }}, { breakpoint: 768, settings: { slidesToShow: 2, }}, { breakpoint: 500, settings: { slidesToShow: 1, }} ] }); $('.twitter-slider').slick({ dots: true, slidesToShow: 3, autoplay:true, autoplaySpeed:10000, slidesToScroll: 2, responsive: [ { breakpoint: 1025, settings: { slidesToShow: 3, }}, { breakpoint: 790, settings: { slidesToShow: 2, slidesToScroll: 1, }}, { breakpoint: 500, settings: { slidesToShow: 1, slidesToScroll: 1, }} ] }); $('.testimonial-slider').slick({ infinite: true, slidesToShow: 1, autoplay:true, autoplaySpeed:10000, slidesToScroll: 1, }); $('.details-slider').slick({ infinite: true, slidesToShow: 1, autoplay:true, autoplaySpeed:10000, slidesToScroll: 1, }); }()); (function(){ $('.video-link').magnificPopup({type:'iframe'}); }()); (function (){ $('input[type="checkbox"]').change(function(){ if($(this).is(':checked')){ $(this).parent('label').addClass('checked'); }else{ $(this).parent('label').removeClass('checked'); }}); }()); (function (){ $('.pricing-switcher input[type="checkbox"]').on('click', function(){ var $this=$('.tr-pricing'); if($this.hasClass('yearly-plan')){ $this.removeClass('yearly-plan').addClass('monthly-plan'); }else if($this.hasClass('monthly-plan')){ $this.removeClass('monthly-plan').addClass('yearly-plan'); }else{ $this.addClass('yearly-plan'); }}); }()); (function (){ $('.counter').counterUp({ delay: 10, time: 1000 }); }()); (function(){ $('.tr-sticky') .theiaStickySidebar({ additionalMarginTop: 0 }); }()); (function($){ function doAnimations(elems){ var animEndEv='webkitAnimationEnd animationend'; elems.each(function (){ var $this=$(this), $animationType=$this.data('animation'); $this.addClass($animationType).one(animEndEv, function (){ $this.removeClass($animationType); }); }); } var $myCarousel=$('#home-carousel'), $firstAnimatingElems=$myCarousel.find('.item:first').find("[data-animation ^='animated']"); $myCarousel.carousel(); doAnimations($firstAnimatingElems); $myCarousel.carousel('pause'); $myCarousel.on('slide.bs.carousel', function (e){ var $animatingElems=$(e.relatedTarget).find("[data-animation ^='animated']"); doAnimations($animatingElems); }); })(jQuery); (function(){ AOS.init({ }); }()); (function(){ $('.tr-dropdown').on('click', '.tr-change a', function(ev){ if("#"===$(this).attr('href')){ ev.preventDefault(); var parent=$(this).parents('.tr-dropdown'); parent.find('.change-text').html($(this).html()); }}); }()); }); (function(f){function A(a,b,d){var c=a[0],g=/er/.test(d)?_indeterminate:/bl/.test(d)?n:k,e=d==_update?{checked:c[k],disabled:c[n],indeterminate:"true"==a.attr(_indeterminate)||"false"==a.attr(_determinate)}:c[g];if(/^(ch|di|in)/.test(d)&&!e)x(a,g);else if(/^(un|en|de)/.test(d)&&e)q(a,g);else if(d==_update)for(var f in e)e[f]?x(a,f,!0):q(a,f,!0);else if(!b||"toggle"==d){if(!b)a[_callback]("ifClicked");e?c[_type]!==r&&q(a,g):x(a,g)}}function x(a,b,d){var c=a[0],g=a.parent(),e=b==k,u=b==_indeterminate, v=b==n,s=u?_determinate:e?y:"enabled",F=l(a,s+t(c[_type])),B=l(a,b+t(c[_type]));if(!0!==c[b]){if(!d&&b==k&&c[_type]==r&&c.name){var w=a.closest("form"),p='input[name="'+c.name+'"]',p=w.length?w.find(p):f(p);p.each(function(){this!==c&&f(this).data(m)&&q(f(this),b)})}u?(c[b]=!0,c[k]&&q(a,k,"force")):(d||(c[b]=!0),e&&c[_indeterminate]&&q(a,_indeterminate,!1));D(a,e,b,d)}c[n]&&l(a,_cursor,!0)&&g.find("."+C).css(_cursor,"default");g[_add](B||l(a,b)||"");g.attr("role")&&!u&&g.attr("aria-"+(v?n:k),"true"); g[_remove](F||l(a,s)||"")}function q(a,b,d){var c=a[0],g=a.parent(),e=b==k,f=b==_indeterminate,m=b==n,s=f?_determinate:e?y:"enabled",q=l(a,s+t(c[_type])),r=l(a,b+t(c[_type]));if(!1!==c[b]){if(f||!d||"force"==d)c[b]=!1;D(a,e,s,d)}!c[n]&&l(a,_cursor,!0)&&g.find("."+C).css(_cursor,"pointer");g[_remove](r||l(a,b)||"");g.attr("role")&&!f&&g.attr("aria-"+(m?n:k),"false");g[_add](q||l(a,s)||"")}function E(a,b){if(a.data(m)){a.parent().html(a.attr("style",a.data(m).s||""));if(b)a[_callback](b);a.off(".i").unwrap(); f(_label+'[for="'+a[0].id+'"]').add(a.closest(_label)).off(".i")}}function l(a,b,f){if(a.data(m))return a.data(m).o[b+(f?"":"Class")]}function t(a){return a.charAt(0).toUpperCase()+a.slice(1)}function D(a,b,f,c){if(!c){if(b)a[_callback]("ifToggled");a[_callback]("ifChanged")[_callback]("if"+t(f))}}var m="iCheck",C=m+"-helper",r="radio",k="checked",y="un"+k,n="disabled";_determinate="determinate";_indeterminate="in"+_determinate;_update="update";_type="type";_click="click";_touch="touchbegin.i touchend.i"; _add="addClass";_remove="removeClass";_callback="trigger";_label="label";_cursor="cursor";_mobile=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);f.fn[m]=function(a,b){var d='input[type="checkbox"], input[type="'+r+'"]',c=f(),g=function(a){a.each(function(){var a=f(this);c=a.is(d)?c.add(a):c.add(a.find(d))})};if(/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(a))return a=a.toLowerCase(),g(this),c.each(function(){var c= f(this);"destroy"==a?E(c,"ifDestroyed"):A(c,!0,a);f.isFunction(b)&&b()});if("object"!=typeof a&&a)return this;var e=f.extend({checkedClass:k,disabledClass:n,indeterminateClass:_indeterminate,labelHover:!0},a),l=e.handle,v=e.hoverClass||"hover",s=e.focusClass||"focus",t=e.activeClass||"active",B=!!e.labelHover,w=e.labelHoverClass||"hover",p=(""+e.increaseArea).replace("%","")|0;if("checkbox"==l||l==r)d='input[type="'+l+'"]';-50>p&&(p=-50);g(this);return c.each(function(){var a=f(this);E(a);var c=this, b=c.id,g=-p+"%",d=100+2*p+"%",d={position:"absolute",top:g,left:g,display:"block",width:d,height:d,margin:0,padding:0,background:"#fff",border:0,opacity:0},g=_mobile?{position:"absolute",visibility:"hidden"}:p?d:{position:"absolute",opacity:0},l="checkbox"==c[_type]?e.checkboxClass||"icheckbox":e.radioClass||"i"+r,z=f(_label+'[for="'+b+'"]').add(a.closest(_label)),u=!!e.aria,y=m+"-"+Math.random().toString(36).substr(2,6),h='
    ")[_callback]("ifCreated").parent().append(e.insert);d=f('').css(d).appendTo(h);a.data(m,{o:e,s:a.attr("style")}).css(g);e.inheritClass&&h[_add](c.className||"");e.inheritID&&b&&h.attr("id",m+"-"+b);"static"==h.css("position")&&h.css("position","relative");A(a,!0,_update);if(z.length)z.on(_click+".i mouseover.i mouseout.i "+_touch,function(b){var d=b[_type],e=f(this);if(!c[n]){if(d==_click){if(f(b.target).is("a"))return; A(a,!1,!0)}else B&&(/ut|nd/.test(d)?(h[_remove](v),e[_remove](w)):(h[_add](v),e[_add](w)));if(_mobile)b.stopPropagation();else return!1}});a.on(_click+".i focus.i blur.i keyup.i keydown.i keypress.i",function(b){var d=b[_type];b=b.keyCode;if(d==_click)return!1;if("keydown"==d&&32==b)return c[_type]==r&&c[k]||(c[k]?q(a,k):x(a,k)),!1;if("keyup"==d&&c[_type]==r)!c[k]&&x(a,k);else if(/us|ur/.test(d))h["blur"==d?_remove:_add](s)});d.on(_click+" mousedown mouseup mouseover mouseout "+_touch,function(b){var d= b[_type],e=/wn|up/.test(d)?t:v;if(!c[n]){if(d==_click)A(a,!1,!0);else{if(/wn|er|in/.test(d))h[_add](e);else h[_remove](e+" "+t);if(z.length&&B&&e==v)z[/ut|nd/.test(d)?_remove:_add](w)}if(_mobile)b.stopPropagation();else return!1}})})}})(window.jQuery||window.Zepto); (function(){ var container, button, menu, links, i, len; container=document.getElementById('site-navigation'); if(! container){ return; } button=container.getElementsByTagName('button')[0]; if('undefined'===typeof button){ return; } menu=container.getElementsByTagName('ul')[0]; if('undefined'===typeof menu){ button.style.display='none'; return; } menu.setAttribute('aria-expanded', 'false'); if(-1===menu.className.indexOf('nav-menu')){ menu.className +=' nav-menu'; } button.onclick=function(){ if(-1!==container.className.indexOf('toggled')){ container.className=container.className.replace(' toggled', ''); button.setAttribute('aria-expanded', 'false'); menu.setAttribute('aria-expanded', 'false'); }else{ container.className +=' toggled'; button.setAttribute('aria-expanded', 'true'); menu.setAttribute('aria-expanded', 'true'); }}; links=menu.getElementsByTagName('a'); for(i=0, len=links.length; i < len; i++){ links[i].addEventListener('focus', toggleFocus, true); links[i].addEventListener('blur', toggleFocus, true); } function toggleFocus(){ var self=this; while(-1===self.className.indexOf('nav-menu')){ if('li'===self.tagName.toLowerCase()){ if(-1!==self.className.indexOf('focus')){ self.className=self.className.replace(' focus', ''); }else{ self.className +=' focus'; }} self=self.parentElement; }} (function(container){ var touchStartFn, i, parentLink=container.querySelectorAll('.menu-item-has-children > a, .page_item_has_children > a'); if('ontouchstart' in window){ touchStartFn=function(e){ var menuItem=this.parentNode, i; if(! menuItem.classList.contains('focus')){ e.preventDefault(); for(i=0; i < menuItem.parentNode.children.length; ++i){ if(menuItem===menuItem.parentNode.children[i]){ continue; } menuItem.parentNode.children[i].classList.remove('focus'); } menuItem.classList.add('focus'); }else{ menuItem.classList.remove('focus'); }}; for(i=0; i < parentLink.length; ++i){ parentLink[i].addEventListener('touchstart', touchStartFn, false); }} }(container)); })(); (function(){ var isIe=/(trident|msie)/i.test(navigator.userAgent); if(isIe&&document.getElementById&&window.addEventListener){ window.addEventListener('hashchange', function(){ var id=location.hash.substring(1), element; if(!(/^[A-z0-9_-]+$/.test(id))){ return; } element=document.getElementById(id); if(element){ if(!(/^(?:a|select|input|button|textarea)$/i.test(element.tagName))){ element.tabIndex=-1; } element.focus(); }}, false); }})(); !function(d,l){"use strict";var e=!1,n=!1;if(l.querySelector)if(d.addEventListener)e=!0;if(d.wp=d.wp||{},!d.wp.receiveEmbedMessage)if(d.wp.receiveEmbedMessage=function(e){var t=e.data;if(t)if(t.secret||t.message||t.value)if(!/[^a-zA-Z0-9]/.test(t.secret)){for(var r,i,a,s=l.querySelectorAll('iframe[data-secret="'+t.secret+'"]'),n=l.querySelectorAll('blockquote[data-secret="'+t.secret+'"]'),o=new RegExp("^https?:$","i"),c=0;c=$tabs.tabs("length")&&(index=0),$tabs.tabs("select",index)}else{index=$tabs.tabs("option","active");var length=$tabs.find(".wpb_tab").length;index=jQuery(this).parent().hasClass("wpb_next_slide")?length<=index+1?0:index+1:index-1<0?length-1:index-1,$tabs.tabs("option","active",index)}})})}}),"function"!=typeof window.vc_accordionBehaviour&&(window.vc_accordionBehaviour=function(){jQuery(".wpb_accordion").each(function(index){var $tabs,$this=jQuery(this),active_tab=($this.attr("data-interval"),!isNaN(jQuery(this).data("active-tab"))&&0 div > h3",autoHeight:!1,heightStyle:"content",active:active_tab,collapsible:collapsible,navigation:!0,activate:vc_accordionActivate,change:function(event,ui){void 0!==jQuery.fn.isotope&&ui.newContent.find(".isotope").isotope("layout"),vc_carouselBehaviour(ui.newPanel)}}),!0===$this.data("vcDisableKeydown")&&($tabs.data("uiAccordion")._keydown=function(){})})}),"function"!=typeof window.vc_teaserGrid&&(window.vc_teaserGrid=function(){var layout_modes={fitrows:"fitRows",masonry:"masonry"};jQuery(".wpb_grid .teaser_grid_container:not(.wpb_carousel), .wpb_filtered_grid .teaser_grid_container:not(.wpb_carousel)").each(function(){var $container=jQuery(this),$thumbs=$container.find(".wpb_thumbnails"),layout_mode=$thumbs.attr("data-layout-mode");$thumbs.isotope({itemSelector:".isotope-item",layoutMode:void 0===layout_modes[layout_mode]?"fitRows":layout_modes[layout_mode]}),$container.find(".categories_filter a").data("isotope",$thumbs).click(function(e){e.preventDefault();var $thumbs=jQuery(this).data("isotope");jQuery(this).parent().parent().find(".active").removeClass("active"),jQuery(this).parent().addClass("active"),$thumbs.isotope({filter:jQuery(this).attr("data-filter")})}),jQuery(window).bind("load resize",function(){$thumbs.isotope("layout")})})}),"function"!=typeof window.vc_carouselBehaviour&&(window.vc_carouselBehaviour=function($parent){($parent?$parent.find(".wpb_carousel"):jQuery(".wpb_carousel")).each(function(){var $this=jQuery(this);if(!0!==$this.data("carousel_enabled")&&$this.is(":visible")){$this.data("carousel_enabled",!0);getColumnsCount(jQuery(this));jQuery(this).hasClass("columns_count_1")&&900;var carousele_li=jQuery(this).find(".wpb_thumbnails-fluid li");carousele_li.css({"margin-right":carousele_li.css("margin-left"),"margin-left":0});var fluid_ul=jQuery(this).find("ul.wpb_thumbnails-fluid");fluid_ul.width(fluid_ul.width()+300),jQuery(window).resize(function(){screen_size!=(screen_size=getSizeName())&&window.setTimeout("location.reload()",20)})}})}),"function"!=typeof window.vc_slidersBehaviour&&(window.vc_slidersBehaviour=function(){jQuery(".wpb_gallery_slides").each(function(index){var $imagesGrid,this_element=jQuery(this);if(this_element.hasClass("wpb_slider_nivo")){var sliderTimeout=1e3*this_element.attr("data-interval");0===sliderTimeout&&(sliderTimeout=9999999999),this_element.find(".nivoSlider").nivoSlider({effect:"boxRainGrow,boxRain,boxRainReverse,boxRainGrowReverse",slices:15,boxCols:8,boxRows:4,animSpeed:800,pauseTime:sliderTimeout,startSlide:0,directionNav:!0,directionNavHide:!0,controlNav:!0,keyboardNav:!1,pauseOnHover:!0,manualAdvance:!1,prevText:"Prev",nextText:"Next"})}else this_element.hasClass("wpb_image_grid")&&(jQuery.fn.imagesLoaded?$imagesGrid=this_element.find(".wpb_image_grid_ul").imagesLoaded(function(){$imagesGrid.isotope({itemSelector:".isotope-item",layoutMode:"fitRows"})}):this_element.find(".wpb_image_grid_ul").isotope({itemSelector:".isotope-item",layoutMode:"fitRows"}))})}),"function"!=typeof window.vc_prettyPhoto&&(window.vc_prettyPhoto=function(){try{jQuery&&jQuery.fn&&jQuery.fn.prettyPhoto&&jQuery('a.prettyphoto, .gallery-icon a[href*=".jpg"]').prettyPhoto({animationSpeed:"normal",hook:"data-rel",padding:15,opacity:.7,showTitle:!0,allowresize:!0,counter_separator_label:"/",hideflash:!1,deeplinking:!1,modal:!1,callback:function(){-1
    ')}),vc_initVideoBackgrounds(),callSkrollInit=!1,window.vcParallaxSkroll&&window.vcParallaxSkroll.destroy(),$(".vc_parallax-inner").remove(),$("[data-5p-top-bottom]").removeAttr("data-5p-top-bottom data-30p-top-bottom"),$("[data-vc-parallax]").each(function(){var skrollrSize,skrollrStart,$parallaxElement,parallaxImage,youtubeId;callSkrollInit=!0,"on"===$(this).data("vcParallaxOFade")&&$(this).children().attr("data-5p-top-bottom","opacity:0;").attr("data-30p-top-bottom","opacity:1;"),skrollrSize=100*$(this).data("vcParallax"),($parallaxElement=$("
    ").addClass("vc_parallax-inner").appendTo($(this))).height(skrollrSize+"%"),(youtubeId=vcExtractYoutubeId(parallaxImage=$(this).data("vcParallaxImage")))?insertYoutubeVideoAsBackground($parallaxElement,youtubeId):void 0!==parallaxImage&&$parallaxElement.css("background-image","url("+parallaxImage+")"),skrollrStart=-(skrollrSize-100),$parallaxElement.attr("data-bottom-top","top: "+skrollrStart+"%;").attr("data-top-bottom","top: 0%;")}),callSkrollInit&&window.skrollr&&(vcSkrollrOptions={forceHeight:!1,smoothScrolling:!1,mobileCheck:function(){return!1}},window.vcParallaxSkroll=skrollr.init(vcSkrollrOptions),window.vcParallaxSkroll)}),"function"!=typeof window.vc_gridBehaviour&&(window.vc_gridBehaviour=function(){jQuery.fn.vcGrid&&jQuery("[data-vc-grid]").vcGrid()}),"function"!=typeof window.getColumnsCount&&(window.getColumnsCount=function(el){for(var find=!1,i=1;!1===find;){if(el.hasClass("columns_count_"+i))return find=!0,i;i++}});var screen_size=getSizeName();function getSizeName(){var screen_w=jQuery(window).width();return 1170
    ').find(".inner");new YT.Player($container[0],{width:"100%",height:"100%",videoId:youtubeId,playerVars:{playlist:youtubeId,iv_load_policy:3,enablejsapi:1,disablekb:1,autoplay:1,controls:0,showinfo:0,rel:0,loop:1,wmode:"transparent"},events:{onReady:function(event){event.target.mute().setLoop(!0)}}}),vcResizeVideoBackground($element),jQuery(window).bind("resize",function(){vcResizeVideoBackground($element)})}function vcResizeVideoBackground($element){var iframeW,iframeH,marginLeft,marginTop,containerW=$element.innerWidth(),containerH=$element.innerHeight();containerW/containerH<16/9?(iframeW=containerH*(16/9),iframeH=containerH,marginLeft=-Math.round((iframeW-containerW)/2)+"px",marginTop=-Math.round((iframeH-containerH)/2)+"px"):(iframeH=(iframeW=containerW)*(9/16),marginTop=-Math.round((iframeH-containerH)/2)+"px",marginLeft=-Math.round((iframeW-containerW)/2)+"px"),iframeW+="px",iframeH+="px",$element.find(".vc_video-bg iframe").css({maxWidth:"1000%",marginLeft:marginLeft,marginTop:marginTop,width:iframeW,height:iframeH})}function vcExtractYoutubeId(url){if(void 0===url)return!1;var id=url.match(/(?:https?:\/{2})?(?:w{3}\.)?youtu(?:be)?\.(?:com|be)(?:\/watch\?v=|\/)([^\s&]+)/);return null!==id&&id[1]}if("function"!=typeof window.wpb_prepare_tab_content&&(window.wpb_prepare_tab_content=function(event,ui){var $ui_panel,$google_maps,panel=ui.panel||ui.newPanel,$pie_charts=panel.find(".vc_pie_chart:not(.vc_ready)"),$round_charts=panel.find(".vc_round-chart"),$line_charts=panel.find(".vc_line-chart"),$carousel=panel.find('[data-ride="vc_carousel"]');if(vc_carouselBehaviour(),vc_plugin_flexslider(panel),ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var grid=jQuery(this).data("vcGrid");grid&&grid.gridBuilder&&grid.gridBuilder.setMasonry&&grid.gridBuilder.setMasonry()}),panel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&panel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var grid=jQuery(this).data("vcGrid");grid&&grid.gridBuilder&&grid.gridBuilder.setMasonry&&grid.gridBuilder.setMasonry()}),$pie_charts.length&&jQuery.fn.vcChat&&$pie_charts.vcChat(),$round_charts.length&&jQuery.fn.vcRoundChart&&$round_charts.vcRoundChart({reload:!1}),$line_charts.length&&jQuery.fn.vcLineChart&&$line_charts.vcLineChart({reload:!1}),$carousel.length&&jQuery.fn.carousel&&$carousel.carousel("resizeAction"),$ui_panel=panel.find(".isotope, .wpb_image_grid_ul"),$google_maps=panel.find(".wpb_gmaps_widget"),0<$ui_panel.length&&$ui_panel.isotope("layout"),$google_maps.length&&!$google_maps.is(".map_ready")){var $frame=$google_maps.find("iframe");$frame.attr("src",$frame.attr("src")),$google_maps.addClass("map_ready")}panel.parents(".isotope").length&&panel.parents(".isotope").each(function(){jQuery(this).isotope("layout")})}),"function"!=typeof window.vc_googleMapsPointer)function vc_googleMapsPointer(){var $=window.jQuery,$wpbGmapsWidget=$(".wpb_gmaps_widget");$wpbGmapsWidget.click(function(){$("iframe",this).css("pointer-events","auto")}),$wpbGmapsWidget.mouseleave(function(){$("iframe",this).css("pointer-events","none")}),$(".wpb_gmaps_widget iframe").css("pointer-events","none")}function vc_setHoverBoxPerspective(hoverBox){hoverBox.each(function(){var $this=jQuery(this),perspective=4*$this.width()+"px";$this.css("perspective",perspective)})}function vc_setHoverBoxHeight(hoverBox){hoverBox.each(function(){var $this=jQuery(this),hoverBoxInner=$this.find(".vc-hoverbox-inner");hoverBoxInner.css("min-height",0);var frontHeight=$this.find(".vc-hoverbox-front-inner").outerHeight(),backHeight=$this.find(".vc-hoverbox-back-inner").outerHeight(),hoverBoxHeight=backHeight2)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.6",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.6",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.6",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.6",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.6",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&jdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth
    ',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-mo.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.6",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.6",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.6",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); jQuery(function(){ jQuery('.simplefilter li').click(function(){ jQuery('.simplefilter li').removeClass('active'); jQuery(this).addClass('active'); }); jQuery('.multifilter li').click(function(){ jQuery(this).toggleClass('active'); }); jQuery('.shuffle-btn').click(function(){ jQuery('.sort-btn').removeClass('active'); }); jQuery('.sort-btn').click(function(){ jQuery('.sort-btn').removeClass('active'); jQuery(this).addClass('active'); }); }); (function(global, $){ 'use strict'; if(!$) throw new Error('Filterizr requires jQuery to work.'); var Packer=function(w){ this.init(w); }; Packer.prototype={ init: function(w){ this.root={ x: 0, y: 0, w: w };}, fit: function(blocks){ var n, node, block, len=blocks.length; var h=len > 0 ? blocks[0].h:0; this.root.h=h; for (n=0; n < len ; n++){ block=blocks[n]; if((node=this.findNode(this.root, block.w, block.h))) block.fit=this.splitNode(node, block.w, block.h); else block.fit=this.growDown(block.w, block.h); }}, findNode: function(root, w, h){ if(root.used) return this.findNode(root.right, w, h)||this.findNode(root.down, w, h); else if((w <=root.w)&&(h <=root.h)) return root; else return null; }, splitNode: function(node, w, h){ node.used=true; node.down={ x: node.x, y: node.y + h, w: node.w, h: node.h - h }; node.right={ x: node.x + w, y: node.y, w: node.w - w, h: h }; return node; }, growDown: function(w, h){ var node; this.root={ used: true, x: 0, y: 0, w: this.root.w, h: this.root.h + h, down: { x: 0, y: this.root.h, w: this.root.w, h: h }, right: this.root }; if((node=this.findNode(this.root, w, h))) return this.splitNode(node, w, h); else return null; }}; $.fn.filterizr=function(){ var self=this, args=arguments; if(!self._fltr){ self._fltr=$.fn.filterizr.prototype.init(self.selector, (typeof args[0]==='object' ? args[0]:undefined)); } if(typeof args[0]==='string'){ if(args[0].lastIndexOf('_') > -1) throw new Error('Filterizr error: You cannot call private methods'); if(typeof self._fltr[args[0]]==='function'){ self._fltr[args[0]](args[1], args[2]); } else throw new Error('Filterizr error: There is no such function'); } return self; }; $.fn.filterizr.prototype={ init: function(selector, options){ var self=$(selector).extend($.fn.filterizr.prototype); self.options={ animationDuration: 0.5, callbacks: { onFilteringStart: function(){ }, onFilteringEnd: function(){ }, onShufflingStart: function(){ }, onShufflingEnd: function(){ }, onSortingStart: function(){ }, onSortingEnd: function(){ }}, delay: 0, delayMode: 'progressive', easing: 'ease-out', filter: 'all', filterOutCss: { 'opacity': 0, 'transform': 'scale(0.5)' }, filterInCss: { 'opacity': 1, 'transform': 'scale(1)' }, layout: 'sameWidth', selector: (typeof selector==='string') ? selector:'.filtr-container', setupControls: true }; if(arguments.length===0){ selector=self.options.selector; options=self.options; } if(arguments.length===1&&typeof arguments[0]==='object') options=arguments[0]; if(options){ self.setOptions(options); } self.css({ 'padding':0, 'position': 'relative' }); self._lastCategory=0; self._isAnimating=false; self._isShuffling=false; self._isSorting=false; self._mainArray=self._getFiltrItems(); self._subArrays=self._makeSubarrays(); self._activeArray=self._getCollectionByFilter(self.options.filter); self._toggledCategories={ }; self._typedText=$('input[data-search]').val()||''; self._uID='xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c){ var r=Math.random()*16|0, v=c=='x' ? r:(r&0x3|0x8); return v.toString(16); }); self._setupEvents(); if(self.options.setupControls) self._setupControls(); self.filter(self.options.filter); return self; }, filter: function(targetFilter){ var self=this, target=self._getCollectionByFilter(targetFilter); self.options.filter=targetFilter; self.trigger('filteringStart'); self._handleFiltering(target); if(self._isSearchActivated()) self.search(self._typedText); }, toggleFilter: function(toggledFilter){ var self=this, target=[], i=0; self.trigger('filteringStart'); if(toggledFilter){ if(!self._toggledCategories[toggledFilter]) self._toggledCategories[toggledFilter]=true; else delete self._toggledCategories[toggledFilter]; } if(self._multifilterModeOn()){ target=self._makeMultifilterArray(); self._handleFiltering(target); if(self._isSearchActivated()) self.search(self._typedText); }else{ self.filter('all'); if(self._isSearchActivated()) self.search(self._typedText); }}, search: function(text){ var self=this, array=self._multifilterModeOn() ? self._makeMultifilterArray() : self._getCollectionByFilter(self.options.filter), target=[], i=0; if(self._isSearchActivated()){ for (i=0; i < array.length; i++){ var containsText=array[i].text().toLowerCase().indexOf(text.toLowerCase()) > -1; if(containsText){ target.push(array[i]); }} } if(target.length > 0){ self._handleFiltering(target); }else{ if(self._isSearchActivated()){ for (i=0; i < self._activeArray.length; i++){ self._activeArray[i]._filterOut(); }}else{ self._handleFiltering(array); }} }, shuffle: function(){ var self=this; self._isAnimating=true; self._isShuffling=true; self.trigger('shufflingStart'); self._mainArray=self._fisherYatesShuffle(self._mainArray); self._subArrays=self._makeSubarrays(); var target=self._multifilterModeOn() ? self._makeMultifilterArray() : self._getCollectionByFilter(self.options.filter); if(self._isSearchActivated()) self.search(self._typedText); else self._placeItems(target); }, sort: function(attr, sortOrder){ var self=this; attr=attr||'domIndex'; sortOrder=sortOrder||'asc'; self._isAnimating=true; self._isSorting=true; self.trigger('sortingStart'); var isUserAttr=attr!=='domIndex'&&attr!=='sortData'&&attr!=='w'&&attr!=='h'; if(isUserAttr){ for (var i=0; i < self._mainArray.length; i++){ self._mainArray[i][attr]=self._mainArray[i].data(attr); }} self._mainArray.sort(self._comparator(attr, sortOrder)); self._subArrays=self._makeSubarrays(); var target=self._multifilterModeOn() ? self._makeMultifilterArray() : self._getCollectionByFilter(self.options.filter); if(self._isSearchActivated()) self.search(self._typedText); else self._placeItems(target); }, setOptions: function(options){ var self=this, i=0; for (var prop in options){ self.options[prop]=options[prop]; } if(self._mainArray&&(options.animationDuration||options.delay||options.easing||options.delayMode)){ for (i=0; i < self._mainArray.length; i++){ self._mainArray[i].css('transition', 'all ' + self.options.animationDuration + 's ' + self.options.easing + ' ' + self._mainArray[i]._calcDelay() + 'ms'); }} if(options.callbacks){ if(!options.callbacks.onFilteringStart) self.options.callbacks.onFilteringStart=function(){ }; if(!options.callbacks.onFilteringEnd) self.options.callbacks.onFilteringEnd=function(){ }; if(!options.callbacks.onShufflingStart) self.options.callbacks.onShufflingStart=function(){ }; if(!options.callbacks.onShufflingEnd) self.options.callbacks.onShufflingEnd=function(){ }; if(!options.callbacks.onSortingStart) self.options.callbacks.onSortingStart=function(){ }; if(!options.callbacks.onSortingEnd) self.options.callbacks.onSortingEnd=function(){ };} if(!self.options.filterInCss.transform) self.options.filterInCss.transform='translate3d(0,0,0)'; if(!self.options.filterOutCss.transform) self.options.filterOutCss.transform='translate3d(0,0,0)'; }, _getFiltrItems: function(){ var self=this, filtrItems=$(self.find('.filtr-item')), itemsArray=[]; $.each(filtrItems, function(i, e){ var item=$(e).extend(FiltrItemProto)._init(i, self); itemsArray.push(item); }); return itemsArray; }, _makeSubarrays: function(){ var self=this, subArrays=[]; for (var i=0; i < self._lastCategory; i++) subArrays.push([]); for (i=0; i < self._mainArray.length; i++){ if(typeof self._mainArray[i]._category==='object'){ var length=self._mainArray[i]._category.length; for (var x=0; x < length; x++){ subArrays[self._mainArray[i]._category[x] - 1].push(self._mainArray[i]); }} else subArrays[self._mainArray[i]._category - 1].push(self._mainArray[i]); } return subArrays; }, _makeMultifilterArray: function(){ var self=this, target=[], addedMap={}; for (var i=0; i < self._mainArray.length; i++){ var item=self._mainArray[i], belongsToCategory=false, isUnique=item.domIndex in addedMap===false; if(Array.isArray(item._category)){ for (var x=0; x < item._category.length; x++){ if(item._category[x] in self._toggledCategories){ belongsToCategory=true; break; }} }else{ if(item._category in self._toggledCategories) belongsToCategory=true; } if(isUnique&&belongsToCategory){ addedMap[item.domIndex]=true; target.push(item); }} return target; }, _setupControls: function(){ var self=this; $('*[data-filter]').click(function(){ var targetFilter=$(this).data('filter'); if(self.options.filter===targetFilter) return; self.filter(targetFilter); }); $('*[data-multifilter]').click(function(){ var targetFilter=$(this).data('multifilter'); if(targetFilter==='all'){ self._toggledCategories={ }; self.filter('all'); }else{ self.toggleFilter(targetFilter); }}); $('*[data-shuffle]').click(function(){ self.shuffle(); }); $('*[data-sortAsc]').click(function(){ var sortAttr=$('*[data-sortOrder]').val(); self.sort(sortAttr, 'asc'); }); $('*[data-sortDesc]').click(function(){ var sortAttr=$('*[data-sortOrder]').val(); self.sort(sortAttr, 'desc'); }); $('input[data-search]').keyup(function(){ self._typedText=$(this).val(); self._delayEvent(function(){ self.search(self._typedText); }, 250, self._uID); }); }, _setupEvents: function(){ var self=this; $(global).resize(function(){ self._delayEvent(function(){ self.trigger('resizeFiltrContainer'); }, 250, self._uID); }); self .on('resizeFiltrContainer', function(){ if(self._multifilterModeOn()) self.toggleFilter(); else self.filter(self.options.filter); }) .on('filteringStart', function(){ self.options.callbacks.onFilteringStart(); }) .on('filteringEnd', function(){ self.options.callbacks.onFilteringEnd(); }) .on('shufflingStart', function(){ self._isShuffling=true; self.options.callbacks.onShufflingStart(); }) .on('shufflingEnd', function(){ self.options.callbacks.onShufflingEnd(); self._isShuffling=false; }) .on('sortingStart', function(){ self._isSorting=true; self.options.callbacks.onSortingStart(); }) .on('sortingEnd', function(){ self.options.callbacks.onSortingEnd(); self._isSorting=false; }); }, _calcItemPositions: function(){ var self=this, array=self._activeArray, containerHeight=0, cols=Math.round(self.width() / self.find('.filtr-item').outerWidth()), rows=0, itemWidth=array[0].outerWidth(), itemHeight=0, left=0, top=0, i=0, x=0, posArray=[]; if(self.options.layout==='packed'){ $.each(self._activeArray, function(i, e){ e._updateDimensions(); }); var packer=new Packer(self.outerWidth()); packer.fit(self._activeArray); for (i=0; i < array.length; i++){ posArray.push({ left: array[i].fit.x, top: array[i].fit.y }); } containerHeight=packer.root.h; } if(self.options.layout==='horizontal'){ rows=1; for (i=1; i <=array.length; i++){ itemWidth=array[i - 1].outerWidth(); itemHeight=array[i - 1].outerHeight(); posArray.push({ left: left, top: top }); left +=itemWidth; if(containerHeight < itemHeight) containerHeight=itemHeight; }} else if(self.options.layout==='vertical'){ for (i=1; i <=array.length; i++){ itemHeight=array[i - 1].outerHeight(); posArray.push({ left: left, top: top }); top +=itemHeight; } containerHeight=top; } else if(self.options.layout==='sameHeight'){ rows=1; var rowWidth=self.outerWidth(); for (i=1; i <=array.length; i++){ itemWidth=array[i - 1].width(); var itemOuterWidth=array[i - 1].outerWidth(), nextItemWidth=0; if(array[i]) nextItemWidth=array[i].width(); posArray.push({ left: left, top: top }); x=left + itemWidth + nextItemWidth; if(x > rowWidth){ x=0; left=0; top +=array[0].outerHeight(); rows++; } else left +=itemOuterWidth; } containerHeight=rows * array[0].outerHeight(); } else if(self.options.layout==='sameWidth'){ for (i=1; i <=array.length; i++){ posArray.push({ left: left, top: top }); if(i % cols===0) rows++; left +=itemWidth; top=0; if(rows > 0){ x=rows; while (x > 0){ top +=array[i - (cols * x)].outerHeight(); x--; }} if(i % cols===0) left=0; } for (i=0; i < cols; i++){ var columnHeight=0, index=i; while(array[index]){ columnHeight +=array[index].outerHeight(); index +=cols; } if(columnHeight > containerHeight){ containerHeight=columnHeight; columnHeight=0; } else columnHeight=0; }} else if(self.options.layout==='sameSize'){ for (i=1; i <=array.length; i++){ posArray.push({ left: left, top: top }); left +=itemWidth; if(i % cols===0){ top +=array[0].outerHeight(); left=0; }} rows=Math.ceil(array.length / cols); containerHeight=rows * array[0].outerHeight(); } self.css('height', containerHeight); return posArray; }, _handleFiltering: function(target){ var self=this, toFilterOut=self._getArrayOfUniqueItems(self._activeArray, target); for (var i=0; i < toFilterOut.length; i++){ toFilterOut[i]._filterOut(); } self._activeArray=target; self._placeItems(target); }, _multifilterModeOn: function(){ var self=this; return Object.keys(self._toggledCategories).length > 0; }, _isSearchActivated: function(){ var self=this; return self._typedText.length > 0; }, _placeItems: function(arr){ var self=this; self._isAnimating=true; self._itemPositions=self._calcItemPositions(); for (var i=0; i < arr.length; i++){ arr[i]._filterIn(self._itemPositions[i]); }}, _getCollectionByFilter: function(filter){ var self=this; return filter==='all' ? self._mainArray:self._subArrays[filter - 1]; }, _makeDeepCopy: function(obj){ var r={}; for (var p in obj) r[p]=obj[p]; return r; }, _comparator: function(prop, sortOrder){ return function(a, b){ if(sortOrder==='asc'){ if(a[prop] < b[prop]) return -1; else if(a[prop] > b[prop]) return 1; else return 0; } else if(sortOrder==='desc'){ if(b[prop] < a[prop]) return -1; else if(b[prop] > a[prop]) return 1; else return 0; }};}, _getArrayOfUniqueItems: function(arr1, arr2){ var r=[], o={}, l=arr2.length, i, v; for (i=0; i < l; i++){ o[arr2[i].domIndex]=true; } l=arr1.length; for (i=0; i < l; i++){ v=arr1[i]; if(!(v.domIndex in o)){ r.push(v); }} return r; }, _delayEvent: (function (){ var self=this, timers={}; return function (callback, ms, uniqueId){ if(uniqueId===null){ throw Error("UniqueID needed"); } if(timers[uniqueId]){ clearTimeout (timers[uniqueId]); } timers[uniqueId]=setTimeout(callback, ms); };})(), _fisherYatesShuffle: function shuffle(array){ var m=array.length, t, i; while (m){ i=Math.floor(Math.random() * m--); t=array[m]; array[m]=array[i]; array[i]=t; } return array; }}; var FiltrItemProto={ _init: function(index, parent){ var self=this, delay=0; self._parent=parent; self._category=self._getCategory(); self._lastPos={}; self.domIndex=index; self.sortData=self.data('sort'); self.w=0; self.h=0; self._isFilteredOut=true; self._filteringOut=false; self._filteringIn=false; self.css(parent.options.filterOutCss) .css({ '-webkit-backface-visibility': 'hidden', 'perspective': '1000px', '-webkit-perspective': '1000px', '-webkit-transform-style': 'preserve-3d', 'position': 'absolute', 'transition': 'all ' + parent.options.animationDuration + 's ' + parent.options.easing + ' ' + self._calcDelay() + 'ms' }); self.on("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd", function(){ self._onTransitionEnd(); }); return self; }, _updateDimensions: function(){ var self=this; self.w=self.outerWidth(); self.h=self.outerHeight(); }, _calcDelay: function(){ var self=this, r=0; if(self._parent.options.delayMode==='progressive') r=self._parent.options.delay * self.domIndex; else if(self.domIndex % 2===0) r=self._parent.options.delay; return r; }, _getCategory: function(){ var self=this, ret=self.data('category'); if(typeof ret==='string'){ ret=ret.split(', '); for (var i=0; i < ret.length; i++){ if(isNaN(parseInt(ret[i]))){ throw new Error('Filterizr: the value of data-category must be a number, starting from value 1 and increasing.'); } if(parseInt(ret[i]) > self._parent._lastCategory){ self._parent._lastCategory=parseInt(ret[i]); }} }else{ if(ret > self._parent._lastCategory) self._parent._lastCategory=ret; } return ret; }, _onTransitionEnd: function(){ var self=this; if(self._filteringOut){ $(self).addClass('filteredOut'); self._isFilteredOut=true; self._filteringOut=false; } else if(self._filteringIn){ self._isFilteredOut=false; self._filteringIn=false; } if(self._parent._isAnimating){ if(self._parent._isShuffling) self._parent.trigger('shufflingEnd'); else if(self._parent._isSorting) self._parent.trigger('sortingEnd'); else self._parent.trigger('filteringEnd'); self._parent._isAnimating=false; }}, _filterOut: function(){ var self=this, filterOutCss=self._parent._makeDeepCopy(self._parent.options.filterOutCss); filterOutCss.transform +=' translate3d(' + self._lastPos.left + 'px,' + self._lastPos.top + 'px, 0)'; self.css(filterOutCss); self.css('pointer-events', 'none'); self._filteringOut=true; }, _filterIn: function(targetPos){ var self=this, filterInCss=self._parent._makeDeepCopy(self._parent.options.filterInCss); $(self).removeClass('filteredOut'); self._filteringIn=true; self._lastPos=targetPos; self.css('pointer-events', 'auto'); filterInCss.transform +=' translate3d(' + targetPos.left + 'px,' + targetPos.top + 'px, 0)'; self.css(filterInCss); }};})(this, jQuery); (function($){ $.fn.YouTubePopUp=function(options){ var YouTubePopUpOptions=$.extend({ autoplay: 1 }, options); $(this).on('click', function (e){ var youtubeLink=$(this).attr("href"); if(youtubeLink.match(/(youtube.com)/)){ var split_c="v="; var split_n=1; } if(youtubeLink.match(/(youtu.be)/)||youtubeLink.match(/(vimeo.com\/)+[0-9]/)){ var split_c="/"; var split_n=3; } if(youtubeLink.match(/(vimeo.com\/)+[a-zA-Z]/)){ var split_c="/"; var split_n=5; } var getYouTubeVideoID=youtubeLink.split(split_c)[split_n]; var cleanVideoID=getYouTubeVideoID.replace(/(&)+(.*)/, ""); if(youtubeLink.match(/(youtu.be)/)||youtubeLink.match(/(youtube.com)/)){ var videoEmbedLink="https://www.youtube.com/embed/"+cleanVideoID+"?autoplay="+YouTubePopUpOptions.autoplay+""; } if(youtubeLink.match(/(vimeo.com\/)+[0-9]/)||youtubeLink.match(/(vimeo.com\/)+[a-zA-Z]/)){ var videoEmbedLink="https://player.vimeo.com/video/"+cleanVideoID+"?autoplay="+YouTubePopUpOptions.autoplay+""; } $("body").append('
    '); if($('.YouTubePopUp-Wrap').hasClass('YouTubePopUp-animation')){ setTimeout(function(){ $('.YouTubePopUp-Wrap').removeClass("YouTubePopUp-animation"); }, 600); } $(".YouTubePopUp-Wrap, .YouTubePopUp-Close").click(function(){ $(".YouTubePopUp-Wrap").addClass("YouTubePopUp-Hide").delay(515).queue(function(){ $(this).remove(); }); }); e.preventDefault(); }); $(document).keyup(function(e){ if(e.keyCode==27){ $('.YouTubePopUp-Wrap, .YouTubePopUp-Close').click(); }}); };}(jQuery)); (function(){ "use strict"; var $, EkkoLightbox; $=jQuery; EkkoLightbox=function(element, options){ var content, footer, header; this.options=$.extend({ title: null, footer: null, remote: null }, $.fn.ekkoLightbox.defaults, options||{}); this.$element=$(element); content=''; this.modal_id=this.options.modal_id ? this.options.modal_id:'ekkoLightbox-' + Math.floor((Math.random() * 1000) + 1); header=''; footer=''; $(document.body).append(''); this.modal=$('#' + this.modal_id); this.modal_dialog=this.modal.find('.modal-dialog').first(); this.modal_content=this.modal.find('.modal-content').first(); this.modal_body=this.modal.find('.modal-body').first(); this.modal_header=this.modal.find('.modal-header').first(); this.modal_footer=this.modal.find('.modal-footer').first(); this.lightbox_container=this.modal_body.find('.ekko-lightbox-container').first(); this.lightbox_body=this.lightbox_container.find('> div:first-child').first(); this.showLoading(); this.modal_arrows=null; this.border={ top: parseFloat(this.modal_dialog.css('border-top-width')) + parseFloat(this.modal_content.css('border-top-width')) + parseFloat(this.modal_body.css('border-top-width')), right: parseFloat(this.modal_dialog.css('border-right-width')) + parseFloat(this.modal_content.css('border-right-width')) + parseFloat(this.modal_body.css('border-right-width')), bottom: parseFloat(this.modal_dialog.css('border-bottom-width')) + parseFloat(this.modal_content.css('border-bottom-width')) + parseFloat(this.modal_body.css('border-bottom-width')), left: parseFloat(this.modal_dialog.css('border-left-width')) + parseFloat(this.modal_content.css('border-left-width')) + parseFloat(this.modal_body.css('border-left-width')) }; this.padding={ top: parseFloat(this.modal_dialog.css('padding-top')) + parseFloat(this.modal_content.css('padding-top')) + parseFloat(this.modal_body.css('padding-top')), right: parseFloat(this.modal_dialog.css('padding-right')) + parseFloat(this.modal_content.css('padding-right')) + parseFloat(this.modal_body.css('padding-right')), bottom: parseFloat(this.modal_dialog.css('padding-bottom')) + parseFloat(this.modal_content.css('padding-bottom')) + parseFloat(this.modal_body.css('padding-bottom')), left: parseFloat(this.modal_dialog.css('padding-left')) + parseFloat(this.modal_content.css('padding-left')) + parseFloat(this.modal_body.css('padding-left')) }; this.modal.on('show.bs.modal', this.options.onShow.bind(this)).on('shown.bs.modal', (function(_this){ return function(){ _this.modal_shown(); return _this.options.onShown.call(_this); };})(this)).on('hide.bs.modal', this.options.onHide.bind(this)).on('hidden.bs.modal', (function(_this){ return function(){ if(_this.gallery){ $(document).off('keydown.ekkoLightbox'); } _this.modal.remove(); return _this.options.onHidden.call(_this); };})(this)).modal('show', options); return this.modal; }; EkkoLightbox.prototype={ modal_shown: function(){ var video_id; if(!this.options.remote){ return this.error('No remote target given'); }else{ this.gallery=this.$element.data('gallery'); if(this.gallery){ if(this.options.gallery_parent_selector==='document.body'||this.options.gallery_parent_selector===''){ this.gallery_items=$(document.body).find('*[data-gallery="' + this.gallery + '"]'); }else{ this.gallery_items=this.$element.parents(this.options.gallery_parent_selector).first().find('*[data-gallery="' + this.gallery + '"]'); } this.gallery_index=this.gallery_items.index(this.$element); $(document).on('keydown.ekkoLightbox', this.navigate.bind(this)); if(this.options.directional_arrows&&this.gallery_items.length > 1){ this.lightbox_container.append('
    '); this.modal_arrows=this.lightbox_container.find('div.ekko-lightbox-nav-overlay').first(); this.lightbox_container.find('a' + this.strip_spaces(this.options.left_arrow_class)).on('click', (function(_this){ return function(event){ event.preventDefault(); return _this.navigate_left(); };})(this)); this.lightbox_container.find('a' + this.strip_spaces(this.options.right_arrow_class)).on('click', (function(_this){ return function(event){ event.preventDefault(); return _this.navigate_right(); };})(this)); }} if(this.options.type){ if(this.options.type==='image'){ return this.preloadImage(this.options.remote, true); }else if(this.options.type==='youtube'&&(video_id=this.getYoutubeId(this.options.remote))){ return this.showYoutubeVideo(video_id); }else if(this.options.type==='vimeo'){ return this.showVimeoVideo(this.options.remote); }else if(this.options.type==='instagram'){ return this.showInstagramVideo(this.options.remote); }else if(this.options.type==='url'){ return this.loadRemoteContent(this.options.remote); }else if(this.options.type==='video'){ return this.showVideoIframe(this.options.remote); }else{ return this.error("Could not detect remote target type. Force the type using data-type=\"image|youtube|vimeo|instagram|url|video\""); }}else{ return this.detectRemoteType(this.options.remote); }} }, strip_stops: function(str){ return str.replace(/\./g, ''); }, strip_spaces: function(str){ return str.replace(/\s/g, ''); }, isImage: function(str){ return str.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i); }, isSwf: function(str){ return str.match(/\.(swf)((\?|#).*)?$/i); }, getYoutubeId: function(str){ var match; match=str.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/); if(match&&match[2].length===11){ return match[2]; }else{ return false; }}, getVimeoId: function(str){ if(str.indexOf('vimeo') > 0){ return str; }else{ return false; }}, getInstagramId: function(str){ if(str.indexOf('instagram') > 0){ return str; }else{ return false; }}, navigate: function(event){ event=event||window.event; if(event.keyCode===39||event.keyCode===37){ if(event.keyCode===39){ return this.navigate_right(); }else if(event.keyCode===37){ return this.navigate_left(); }} }, navigateTo: function(index){ var next, src; if(index < 0||index > this.gallery_items.length - 1){ return this; } this.showLoading(); this.gallery_index=index; this.$element=$(this.gallery_items.get(this.gallery_index)); this.updateTitleAndFooter(); src=this.$element.attr('data-remote')||this.$element.attr('href'); this.detectRemoteType(src, this.$element.attr('data-type')||false); if(this.gallery_index + 1 < this.gallery_items.length){ next=$(this.gallery_items.get(this.gallery_index + 1), false); src=next.attr('data-remote')||next.attr('href'); if(next.attr('data-type')==='image'||this.isImage(src)){ return this.preloadImage(src, false); }} }, navigate_left: function(){ if(this.gallery_items.length===1){ return; } if(this.gallery_index===0){ this.gallery_index=this.gallery_items.length - 1; }else{ this.gallery_index--; } this.options.onNavigate.call(this, 'left', this.gallery_index); return this.navigateTo(this.gallery_index); }, navigate_right: function(){ if(this.gallery_items.length===1){ return; } if(this.gallery_index===this.gallery_items.length - 1){ this.gallery_index=0; }else{ this.gallery_index++; } this.options.onNavigate.call(this, 'right', this.gallery_index); return this.navigateTo(this.gallery_index); }, detectRemoteType: function(src, type){ var video_id; type=type||false; if(type==='image'||this.isImage(src)){ this.options.type='image'; return this.preloadImage(src, true); }else if(type==='youtube'||(video_id=this.getYoutubeId(src))){ this.options.type='youtube'; return this.showYoutubeVideo(video_id); }else if(type==='vimeo'||(video_id=this.getVimeoId(src))){ this.options.type='vimeo'; return this.showVimeoVideo(video_id); }else if(type==='instagram'||(video_id=this.getInstagramId(src))){ this.options.type='instagram'; return this.showInstagramVideo(video_id); }else if(type==='video'){ this.options.type='video'; return this.showVideoIframe(src); }else{ this.options.type='url'; return this.loadRemoteContent(src); }}, updateTitleAndFooter: function(){ var caption, footer, header, title; header=this.modal_content.find('.modal-header'); footer=this.modal_content.find('.modal-footer'); title=this.$element.data('title')||""; caption=this.$element.data('footer')||""; if(title||this.options.always_show_close){ header.css('display', '').find('.modal-title').html(title||" "); }else{ header.css('display', 'none'); } if(caption){ footer.css('display', '').html(caption); }else{ footer.css('display', 'none'); } return this; }, showLoading: function(){ this.lightbox_body.html(''); return this; }, showYoutubeVideo: function(id){ var height, rel, width; if((this.$element.attr('data-norelated')!=null)||this.options.no_related){ rel="&rel=0"; }else{ rel=""; } width=this.checkDimensions(this.$element.data('width')||560); height=width / (560 / 315); return this.showVideoIframe('//www.youtube.com/embed/' + id + '?badge=0&autoplay=1&html5=1' + rel, width, height); }, showVimeoVideo: function(id){ var height, width; width=this.checkDimensions(this.$element.data('width')||560); height=width / (500 / 281); return this.showVideoIframe(id + '?autoplay=1', width, height); }, showInstagramVideo: function(id){ var height, width; width=this.checkDimensions(this.$element.data('width')||612); this.resize(width); height=width + 80; this.lightbox_body.html(''); this.options.onContentLoaded.call(this); if(this.modal_arrows){ return this.modal_arrows.css('display', 'none'); }}, showVideoIframe: function(url, width, height){ height=height||width; this.resize(width); this.lightbox_body.html('
    '); this.options.onContentLoaded.call(this); if(this.modal_arrows){ this.modal_arrows.css('display', 'none'); } return this; }, loadRemoteContent: function(url){ var disableExternalCheck, width; width=this.$element.data('width')||560; this.resize(width); disableExternalCheck=this.$element.data('disableExternalCheck')||false; if(!disableExternalCheck&&!this.isExternal(url)){ this.lightbox_body.load(url, $.proxy((function(_this){ return function(){ return _this.$element.trigger('loaded.bs.modal'); };})(this))); }else{ this.lightbox_body.html(''); this.options.onContentLoaded.call(this); } if(this.modal_arrows){ this.modal_arrows.css('display', 'none'); } return this; }, isExternal: function(url){ var match; match=url.match(/^([^:\/?#]+:)?(?:\/\/([^\/?#]*))?([^?#]+)?(\?[^#]*)?(#.*)?/); if(typeof match[1]==="string"&&match[1].length > 0&&match[1].toLowerCase()!==location.protocol){ return true; } if(typeof match[2]==="string"&&match[2].length > 0&&match[2].replace(new RegExp(":(" + { "http:": 80, "https:": 443 }[location.protocol] + ")?$"), "")!==location.host){ return true; } return false; }, error: function(message){ this.lightbox_body.html(message); return this; }, preloadImage: function(src, onLoadShowImage){ var img; img=new Image(); if((onLoadShowImage==null)||onLoadShowImage===true){ img.onload=(function(_this){ return function(){ var image; image=$(''); image.attr('src', img.src); image.addClass('img-responsive'); _this.lightbox_body.html(image); if(_this.modal_arrows){ _this.modal_arrows.css('display', 'block'); } return image.load(function(){ if(_this.options.scale_height){ _this.scaleHeight(img.height, img.width); }else{ _this.resize(img.width); } return _this.options.onContentLoaded.call(_this); }); };})(this); img.onerror=(function(_this){ return function(){ return _this.error('Failed to load image: ' + src); };})(this); } img.src=src; return img; }, scaleHeight: function(height, width){ var border_padding, factor, footer_height, header_height, margins, max_height; header_height=this.modal_header.outerHeight(true)||0; footer_height=this.modal_footer.outerHeight(true)||0; if(!this.modal_footer.is(':visible')){ footer_height=0; } if(!this.modal_header.is(':visible')){ header_height=0; } border_padding=this.border.top + this.border.bottom + this.padding.top + this.padding.bottom; margins=parseFloat(this.modal_dialog.css('margin-top')) + parseFloat(this.modal_dialog.css('margin-bottom')); max_height=$(window).height() - border_padding - margins - header_height - footer_height; factor=Math.min(max_height / height, 1); this.modal_dialog.css('height', 'auto').css('max-height', max_height); return this.resize(factor * width); }, resize: function(width){ var width_total; width_total=width + this.border.left + this.padding.left + this.padding.right + this.border.right; this.modal_dialog.css('width', 'auto').css('max-width', width_total); this.lightbox_container.find('a').css('line-height', function(){ return $(this).parent().height() + 'px'; }); return this; }, checkDimensions: function(width){ var body_width, width_total; width_total=width + this.border.left + this.padding.left + this.padding.right + this.border.right; body_width=document.body.clientWidth; if(width_total > body_width){ width=this.modal_body.width(); } return width; }, close: function(){ return this.modal.modal('hide'); }, addTrailingSlash: function(url){ if(url.substr(-1)!=='/'){ url +='/'; } return url; }}; $.fn.ekkoLightbox=function(options){ return this.each(function(){ var $this; $this=$(this); options=$.extend({ remote: $this.attr('data-remote')||$this.attr('href'), gallery_parent_selector: $this.attr('data-parent'), type: $this.attr('data-type') }, options, $this.data()); new EkkoLightbox(this, options); return this; }); }; $.fn.ekkoLightbox.defaults={ gallery_parent_selector: 'document.body', left_arrow_class: '.glyphicon .glyphicon-chevron-left', right_arrow_class: '.glyphicon .glyphicon-chevron-right', directional_arrows: true, type: null, always_show_close: true, no_related: false, scale_height: true, loadingMessage: 'Loading...', onShow: function(){}, onShown: function(){}, onHide: function(){}, onHidden: function(){}, onNavigate: function(){}, onContentLoaded: function(){}};}).call(this); !function(o,p,n,i){function l(){o(".woo-login-popup-sc-modal-overlay").fadeOut(100),o(".woo-login-popup-sc-modal-on").animate({top:"-200px",opacity:"0"},250,function(){o(".woo-login-popup-sc-modal-on").css({display:"none",opacity:"1"})})}o(n).ready(function(){o(n).on("click",".woo-login-popup-sc-open",function(n){var i=o(this).attr("href"),l=["#woo-login-popup-sc-login","#woo-login-popup-sc-register","#woo-login-popup-sc-password"];if(void 0===i&&(i=o(this).find("a").attr("href")),void 0!==i&&jQuery.inArray(i,l)>-1?(o(".woo-login-popup-sc").hide(),o(i).show()):(o(".woo-login-popup-sc").hide(),o("#woo-login-popup-sc-login").show()),o(".woo-login-popup-sc-modal-off").length>0)o("html, body").animate({scrollTop:o(".woo-login-popup-sc-modal-off").offset().top-30},400),o(".woo-login-popup-sc-modal-overlay").show();else{var t="100px";o(p).width()<700&&(t="20px"),o(".woo-login-popup-sc-modal-overlay, .woo-login-popup-sc-modal-on").show(),o(".woo-login-popup-sc-modal-on").animate({top:t},400)}n.preventDefault(),n.stopPropagation()}),o(n).on("click",".woo-login-popup-sc-toggle",function(p){var n=o(this).attr("href");void 0!==n&&o(".woo-login-popup-sc").fadeOut("fast").promise().done(function(){o(n).show()}),p.preventDefault(),p.stopPropagation()}),o(n).on("click",".woo-login-popup-sc-modal-overlay, .woo-login-popup-sc-close a",function(o){l(),o.preventDefault(),o.stopPropagation()}),o(n).keyup(function(o){27==o.keyCode&&l()})})}(jQuery,window,document);