!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t("object"==typeof module&&module.exports?require("jquery"):jQuery)}(function(t){function e(t){return t.replace(/(:|\.|\/)/g,"\\$1")}var o="1.6.0",i={},l={exclude:[],excludeWithin:[],offset:0,direction:"top",delegateSelector:null,scrollElement:null,scrollTarget:null,beforeScroll:function(){},afterScroll:function(){},easing:"swing",speed:400,autoCoefficient:2,preventDefault:!0},s=function(e){var o=[],i=!1,l=e.dir&&"left"===e.dir?"scrollLeft":"scrollTop";return this.each(function(){var e=t(this);return this!==document&&this!==window?!document.scrollingElement||this!==document.documentElement&&this!==document.body?void(e[l]()>0?o.push(this):(e[l](1),i=e[l]()>0,i&&o.push(this),e[l](0))):(o.push(document.scrollingElement),!1):void 0}),o.length||this.each(function(){"BODY"===this.nodeName&&(o=[this])}),"first"===e.el&&o.length>1&&(o=[o[0]]),o};t.fn.extend({scrollable:function(t){var e=s.call(this,{dir:t});return this.pushStack(e)},firstScrollable:function(t){var e=s.call(this,{el:"first",dir:t});return this.pushStack(e)},smoothScroll:function(o,i){if(o=o||{},"options"===o)return i?this.each(function(){var e=t(this),o=t.extend(e.data("ssOpts")||{},i);t(this).data("ssOpts",o)}):this.first().data("ssOpts");var l=t.extend({},t.fn.smoothScroll.defaults,o),s=function(o){var i=this,s=t(this),n=t.extend({},l,s.data("ssOpts")||{}),c=l.exclude,a=n.excludeWithin,r=0,h=0,u=!0,d={},p=t.smoothScroll.filterPath(location.pathname),f=t.smoothScroll.filterPath(i.pathname),m=location.hostname===i.hostname||!i.hostname,g=n.scrollTarget||f===p,v=e(i.hash);if(n.scrollTarget||m&&g&&v){for(;u&&r1&&"[object Object]"!==String(e)){if(o=jQuery.extend({},o),(null===e||void 0===e)&&(o.expires=-1),"number"==typeof o.expires){var i=o.expires,l=o.expires=new Date;l.setDate(l.getDate()+i)}return e=String(e),document.cookie=[encodeURIComponent(t),"=",o.raw?e:encodeURIComponent(e),o.expires?"; expires="+o.expires.toUTCString():"",o.path?"; path="+o.path:"",o.domain?"; domain="+o.domain:"",o.secure?"; secure":""].join("")}o=e||{};var s,n=o.raw?function(t){return t}:decodeURIComponent;return(s=new RegExp("(?:^|;)"+encodeURIComponent(t)+"=([^;]*)").exec(document.cookie))?n(s[1]):null},jQuery(document).ready(function(t){if("undefined"!=typeof tocplus){if(t.fn.shrinkTOCWidth=function(){t(this).css({width:"auto",display:"table"}),/MSIE 7\./.test(navigator.userAgent)&&t(this).css("width","")},1==tocplus.smooth_scroll){var e=hostname=pathname=qs=hash=null;t("body a").click(function(){if(hostname=t(this).prop("hostname"),pathname=t(this).prop("pathname"),qs=t(this).prop("search"),hash=t(this).prop("hash"),pathname.length>0&&"/"!=pathname.charAt(0)&&(pathname="/"+pathname),window.location.hostname==hostname&&window.location.pathname==pathname&&window.location.search==qs&&""!==hash){var o=hash.replace(/([ !"$%&'()*+,.\/:;<=>?@[\]^`{|}~])/g,"\\$1");t(o).length>0?e=hash:(anchor=hash,anchor=anchor.replace("#",""),e='a[name="'+anchor+'"]',0==t(e).length&&(e="")),offset="undefined"!=typeof tocplus.smooth_scroll_offset?-1*tocplus.smooth_scroll_offset:t("#wpadminbar").length>0&&t("#wpadminbar").is(":visible")?-30:0,e&&t.smoothScroll({scrollTarget:e,offset:offset})}})}if("undefined"!=typeof tocplus.visibility_show){var o="undefined"!=typeof tocplus.visibility_hide_by_default?!0:!1;if(t.cookie)var i=t.cookie("tocplus_hidetoc")?tocplus.visibility_show:tocplus.visibility_hide;else var i=tocplus.visibility_hide;o&&(i=i==tocplus.visibility_hide?tocplus.visibility_show:tocplus.visibility_hide),t("#toc_container p.toc_title").append(' ['+i+"]"),i==tocplus.visibility_show&&(t("ul.toc_list").hide(),t("#toc_container").addClass("contracted").shrinkTOCWidth()),t("span.toc_toggle a").click(function(e){switch(e.preventDefault(),t(this).html()){case t("
").html(tocplus.visibility_hide).text():t(this).html(tocplus.visibility_show),t.cookie&&(o?t.cookie("tocplus_hidetoc",null,{path:"/"}):t.cookie("tocplus_hidetoc","1",{expires:30,path:"/"})),t("ul.toc_list").hide("fast"),t("#toc_container").addClass("contracted").shrinkTOCWidth();break;case t("
").html(tocplus.visibility_show).text():default:t(this).html(tocplus.visibility_hide),t.cookie&&(o?t.cookie("tocplus_hidetoc","1",{expires:30,path:"/"}):t.cookie("tocplus_hidetoc",null,{path:"/"})),t("#toc_container").css("width",tocplus.width).removeClass("contracted"),t("ul.toc_list").show("fast")}})}}}); var cff_js_exists=(typeof cff_js_exists!=='undefined') ? true:false; if(!cff_js_exists){ if(typeof window.cff_block_editor!=='undefined'){ cffmetatrans=false; cffajaxurl=window.cff_block_editor.cffajaxurl; } if(typeof cffnomobileswipe==='undefined'){ !function (a, b, c, d){ "use strict"; function e(a, b, c){ return setTimeout(j(a, c), b) } function f(a, b, c){ return Array.isArray(a) ? (g(a, c[b], c), !0):!1 } function g(a, b, c){ var e; if(a) if(a.forEach) a.forEach(b, c); else if(a.length!==d) for (e=0; e < a.length;) b.call(c, a[e], e, a), e++; else for (e in a) a.hasOwnProperty(e)&&b.call(c, a[e], e, a) } function h(b, c, d){ var e="DEPRECATED METHOD: " + c + "\n" + d + " AT \n"; return function (){ var c=new Error("get-stack-trace"), d=c&&c.stack ? c.stack.replace(/^[^\(]+?[\n$]/gm, "").replace(/^\s+at\s+/gm, "").replace(/^Object.\s*\(/gm, "{anonymous}()@"):"Unknown Stack Trace", f=a.console&&(a.console.warn||a.console.log); return f&&f.call(a.console, e, d), b.apply(this, arguments) }} function i(a, b, c){ var d, e=b.prototype; d=a.prototype=Object.create(e), d.constructor=a, d._super=e, c&&la(d, c) } function j(a, b){ return function (){ return a.apply(b, arguments) }} function k(a, b){ return typeof a==oa ? a.apply(b ? b[0]||d:d, b):a } function l(a, b){ return a===d ? b:a } function m(a, b, c){ g(q(b), function (b){ a.addEventListener(b, c, !1) }) } function n(a, b, c){ g(q(b), function (b){ a.removeEventListener(b, c, !1) }) } function o(a, b){ for (; a;){ if(a==b) return !0; a=a.parentNode } return !1 } function p(a, b){ return a.indexOf(b) > -1 } function q(a){ return a.trim().split(/\s+/g) } function r(a, b, c){ if(a.indexOf&&!c) return a.indexOf(b); for (var d=0; d < a.length;){ if(c&&a[d][c]==b||!c&&a[d]===b) return d; d++ } return -1 } function s(a){ return Array.prototype.slice.call(a, 0) } function t(a, b, c){ for (var d=[], e=[], f=0; f < a.length;){ var g=b ? a[f][b]:a[f]; r(e, g) < 0&&d.push(a[f]), e[f]=g, f++ } return c&&(d=b ? d.sort(function (a, c){ return a[b] > c[b] }):d.sort()), d } function u(a, b){ for (var c, e, f=b[0].toUpperCase() + b.slice(1), g=0; g < ma.length;){ if(c=ma[g], e=c ? c + f:b, e in a) return e; g++ } return d } function v(){ return ua++ } function w(b){ var c=b.ownerDocument||b; return c.defaultView||c.parentWindow||a } function x(a, b){ var c=this; this.manager=a, this.callback=b, this.element=a.element, this.target=a.options.inputTarget, this.domHandler=function (b){ k(a.options.enable, [a])&&c.handler(b) }, this.init() } function y(a){ var b, c=a.options.inputClass; return new (b=c ? c:xa ? M:ya ? P:wa ? R:L)(a, z) } function z(a, b, c){ var d=c.pointers.length, e=c.changedPointers.length, f=b & Ea&&d - e===0, g=b & (Ga | Ha)&&d - e===0; c.isFirst = !!f, c.isFinal = !!g, f&&(a.session={}), c.eventType=b, A(a, c), a.emit("hammer.input", c), a.recognize(c), a.session.prevInput=c } function A(a, b){ var c=a.session, d=b.pointers, e=d.length; c.firstInput||(c.firstInput=D(b)), e > 1&&!c.firstMultiple ? c.firstMultiple=D(b):1===e&&(c.firstMultiple = !1); var f=c.firstInput, g=c.firstMultiple, h=g ? g.center:f.center, i=b.center=E(d); b.timeStamp=ra(), b.deltaTime=b.timeStamp - f.timeStamp, b.angle=I(h, i), b.distance=H(h, i), B(c, b), b.offsetDirection=G(b.deltaX, b.deltaY); var j=F(b.deltaTime, b.deltaX, b.deltaY); b.overallVelocityX=j.x, b.overallVelocityY=j.y, b.overallVelocity=qa(j.x) > qa(j.y) ? j.x:j.y, b.scale=g ? K(g.pointers, d):1, b.rotation=g ? J(g.pointers, d):0, b.maxPointers=c.prevInput ? b.pointers.length > c.prevInput.maxPointers ? b.pointers.length:c.prevInput.maxPointers:b.pointers.length, C(c, b); var k=a.element; o(b.srcEvent.target, k)&&(k=b.srcEvent.target), b.target=k } function B(a, b){ var c=b.center, d=a.offsetDelta||{}, e=a.prevDelta||{}, f=a.prevInput||{}; b.eventType!==Ea&&f.eventType!==Ga||(e=a.prevDelta={ x: f.deltaX||0, y: f.deltaY||0 }, d=a.offsetDelta={x: c.x, y: c.y}), b.deltaX=e.x + (c.x - d.x), b.deltaY=e.y + (c.y - d.y) } function C(a, b){ var c, e, f, g, h=a.lastInterval||b, i=b.timeStamp - h.timeStamp; if(b.eventType!=Ha&&(i > Da||h.velocity===d)){ var j=b.deltaX - h.deltaX, k=b.deltaY - h.deltaY, l=F(i, j, k); e=l.x, f=l.y, c=qa(l.x) > qa(l.y) ? l.x:l.y, g=G(j, k), a.lastInterval=b } else c=h.velocity, e=h.velocityX, f=h.velocityY, g=h.direction; b.velocity=c, b.velocityX=e, b.velocityY=f, b.direction=g } function D(a){ for (var b=[], c=0; c < a.pointers.length;) b[c]={ clientX: pa(a.pointers[c].clientX), clientY: pa(a.pointers[c].clientY) }, c++; return {timeStamp: ra(), pointers: b, center: E(b), deltaX: a.deltaX, deltaY: a.deltaY}} function E(a){ var b=a.length; if(1===b) return {x: pa(a[0].clientX), y: pa(a[0].clientY)}; for (var c=0, d=0, e=0; b > e;) c +=a[e].clientX, d +=a[e].clientY, e++; return {x: pa(c / b), y: pa(d / b)}} function F(a, b, c){ return {x: b / a||0, y: c / a||0}} function G(a, b){ return a===b ? Ia:qa(a) >=qa(b) ? 0 > a ? Ja:Ka:0 > b ? La:Ma } function H(a, b, c){ c||(c=Qa); var d=b[c[0]] - a[c[0]], e=b[c[1]] - a[c[1]]; return Math.sqrt(d * d + e * e) } function I(a, b, c){ c||(c=Qa); var d=b[c[0]] - a[c[0]], e=b[c[1]] - a[c[1]]; return 180 * Math.atan2(e, d) / Math.PI } function J(a, b){ return I(b[1], b[0], Ra) + I(a[1], a[0], Ra) } function K(a, b){ return H(b[0], b[1], Ra) / H(a[0], a[1], Ra) } function L(){ this.evEl=Ta, this.evWin=Ua, this.pressed = !1, x.apply(this, arguments) } function M(){ this.evEl=Xa, this.evWin=Ya, x.apply(this, arguments), this.store=this.manager.session.pointerEvents=[] } function N(){ this.evTarget=$a, this.evWin=_a, this.started = !1, x.apply(this, arguments) } function O(a, b){ var c=s(a.touches), d=s(a.changedTouches); return b & (Ga | Ha)&&(c=t(c.concat(d), "identifier", !0)), [c, d] } function P(){ this.evTarget=bb, this.targetIds={}, x.apply(this, arguments) } function Q(a, b){ var c=s(a.touches), d=this.targetIds; if(b & (Ea | Fa)&&1===c.length) return d[c[0].identifier] = !0, [c, c]; var e, f, g=s(a.changedTouches), h=[], i=this.target; if(f=c.filter(function (a){ return o(a.target, i) }), b===Ea) for (e=0; e < f.length;) d[f[e].identifier] = !0, e++; for (e=0; e < g.length;) d[g[e].identifier]&&h.push(g[e]), b & (Ga | Ha)&&delete d[g[e].identifier], e++; return h.length ? [t(f.concat(h), "identifier", !0), h]:void 0 } function R(){ x.apply(this, arguments); var a=j(this.handler, this); this.touch=new P(this.manager, a), this.mouse=new L(this.manager, a), this.primaryTouch=null, this.lastTouches=[] } function S(a, b){ a & Ea ? (this.primaryTouch=b.changedPointers[0].identifier, T.call(this, b)):a & (Ga | Ha)&&T.call(this, b) } function T(a){ var b=a.changedPointers[0]; if(b.identifier===this.primaryTouch){ var c={x: b.clientX, y: b.clientY}; this.lastTouches.push(c); var d=this.lastTouches, e=function (){ var a=d.indexOf(c); a > -1&&d.splice(a, 1) }; setTimeout(e, cb) }} function U(a){ for (var b=a.srcEvent.clientX, c=a.srcEvent.clientY, d=0; d < this.lastTouches.length; d++){ var e=this.lastTouches[d], f=Math.abs(b - e.x), g=Math.abs(c - e.y); if(db >=f&&db >=g) return !0 } return !1 } function V(a, b){ this.manager=a, this.set(b) } function W(a){ if(p(a, jb)) return jb; var b=p(a, kb), c=p(a, lb); return b&&c ? jb:b||c ? b ? kb:lb:p(a, ib) ? ib:hb } function X(){ if(!fb) return !1; var b={}, c=a.CSS&&a.CSS.supports; return ["auto", "manipulation", "pan-y", "pan-x", "pan-x pan-y", "none"].forEach(function (d){ b[d]=c ? a.CSS.supports("touch-action", d):!0 }), b } function Y(a){ this.options=la({}, this.defaults, a||{}), this.id=v(), this.manager=null, this.options.enable=l(this.options.enable, !0), this.state=nb, this.simultaneous={}, this.requireFail=[] } function Z(a){ return a & sb ? "cancel":a & qb ? "end":a & pb ? "move":a & ob ? "start":"" } function $(a){ return a==Ma ? "down":a==La ? "up":a==Ja ? "left":a==Ka ? "right":"" } function _(a, b){ var c=b.manager; return c ? c.get(a):a } function aa(){ Y.apply(this, arguments) } function ba(){ aa.apply(this, arguments), this.pX=null, this.pY=null } function ca(){ aa.apply(this, arguments) } function da(){ Y.apply(this, arguments), this._timer=null, this._input=null } function ea(){ aa.apply(this, arguments) } function fa(){ aa.apply(this, arguments) } function ga(){ Y.apply(this, arguments), this.pTime = !1, this.pCenter = !1, this._timer=null, this._input=null, this.count=0 } function ha(a, b){ return b=b||{}, b.recognizers=l(b.recognizers, ha.defaults.preset), new ia(a, b) } function ia(a, b){ this.options=la({}, ha.defaults, b||{}), this.options.inputTarget=this.options.inputTarget||a, this.handlers={}, this.session={}, this.recognizers=[], this.oldCssProps={}, this.element=a, this.input=y(this), this.touchAction=new V(this, this.options.touchAction), ja(this, !0), g(this.options.recognizers, function (a){ var b=this.add(new a[0](a[1])); a[2]&&b.recognizeWith(a[2]), a[3]&&b.requireFailure(a[3]) }, this) } function ja(a, b){ var c=a.element; if(c.style){ var d; g(a.options.cssProps, function (e, f){ d=u(c.style, f), b ? (a.oldCssProps[d]=c.style[d], c.style[d]=e):c.style[d]=a.oldCssProps[d]||"" }), b||(a.oldCssProps={}) }} function ka(a, c){ var d=b.createEvent("Event"); d.initEvent(a, !0, !0), d.gesture=c, c.target.dispatchEvent(d) } var la, ma=["", "webkit", "Moz", "MS", "ms", "o"], na=b.createElement("div"), oa="function", pa=Math.round, qa=Math.abs, ra=Date.now; la="function"!=typeof Object.assign ? function (a){ if(a===d||null===a) throw new TypeError("Cannot convert undefined or null to object"); for (var b=Object(a), c=1; c < arguments.length; c++){ var e=arguments[c]; if(e!==d&&null!==e) for (var f in e) e.hasOwnProperty(f)&&(b[f]=e[f]) } return b }:Object.assign; var sa=h(function (a, b, c){ for (var e=Object.keys(b), f=0; f < e.length;) (!c||c&&a[e[f]]===d)&&(a[e[f]]=b[e[f]]), f++; return a }, "extend", "Use `assign`."), ta=h(function (a, b){ return sa(a, b, !0) }, "merge", "Use `assign`."), ua=1, va=/mobile|tablet|ip(ad|hone|od)|android/i, wa="ontouchstart" in a, xa=u(a, "PointerEvent")!==d, ya=wa&&va.test(navigator.userAgent), za="touch", Aa="pen", Ba="mouse", Ca="kinect", Da=25, Ea=1, Fa=2, Ga=4, Ha=8, Ia=1, Ja=2, Ka=4, La=8, Ma=16, Na=Ja | Ka, Oa=La | Ma, Pa=Na | Oa, Qa=["x", "y"], Ra=["clientX", "clientY"]; x.prototype={ handler: function (){ }, init: function (){ this.evEl&&m(this.element, this.evEl, this.domHandler), this.evTarget&&m(this.target, this.evTarget, this.domHandler), this.evWin&&m(w(this.element), this.evWin, this.domHandler) }, destroy: function (){ this.evEl&&n(this.element, this.evEl, this.domHandler), this.evTarget&&n(this.target, this.evTarget, this.domHandler), this.evWin&&n(w(this.element), this.evWin, this.domHandler) }}; var Sa={mousedown: Ea, mousemove: Fa, mouseup: Ga}, Ta="mousedown", Ua="mousemove mouseup"; i(L, x, { handler: function (a){ var b=Sa[a.type]; b & Ea&&0===a.button&&(this.pressed = !0), b & Fa&&1!==a.which&&(b=Ga), this.pressed&&(b & Ga&&(this.pressed = !1), this.callback(this.manager, b, { pointers: [a], changedPointers: [a], pointerType: Ba, srcEvent: a })) }}); var Va={pointerdown: Ea, pointermove: Fa, pointerup: Ga, pointercancel: Ha, pointerout: Ha}, Wa={2: za, 3: Aa, 4: Ba, 5: Ca}, Xa="pointerdown", Ya="pointermove pointerup pointercancel"; a.MSPointerEvent&&!a.PointerEvent&&(Xa="MSPointerDown", Ya="MSPointerMove MSPointerUp MSPointerCancel"), i(M, x, { handler: function (a){ var b=this.store, c = !1, d=a.type.toLowerCase().replace("ms", ""), e=Va[d], f=Wa[a.pointerType]||a.pointerType, g=f==za, h=r(b, a.pointerId, "pointerId"); e & Ea&&(0===a.button||g) ? 0 > h&&(b.push(a), h=b.length - 1):e & (Ga | Ha)&&(c = !0), 0 > h||(b[h]=a, this.callback(this.manager, e, { pointers: b, changedPointers: [a], pointerType: f, srcEvent: a }), c&&b.splice(h, 1)) }}); var Za={touchstart: Ea, touchmove: Fa, touchend: Ga, touchcancel: Ha}, $a="touchstart", _a="touchstart touchmove touchend touchcancel"; i(N, x, { handler: function (a){ var b=Za[a.type]; if(b===Ea&&(this.started = !0), this.started){ var c=O.call(this, a, b); b & (Ga | Ha)&&c[0].length - c[1].length===0&&(this.started = !1), this.callback(this.manager, b, { pointers: c[0], changedPointers: c[1], pointerType: za, srcEvent: a }) }} }); var ab={touchstart: Ea, touchmove: Fa, touchend: Ga, touchcancel: Ha}, bb="touchstart touchmove touchend touchcancel"; i(P, x, { handler: function (a){ var b=ab[a.type], c=Q.call(this, a, b); c&&this.callback(this.manager, b, { pointers: c[0], changedPointers: c[1], pointerType: za, srcEvent: a }) }}); var cb=2500, db=25; i(R, x, { handler: function (a, b, c){ var d=c.pointerType==za, e=c.pointerType==Ba; if(!(e&&c.sourceCapabilities&&c.sourceCapabilities.firesTouchEvents)){ if(d) S.call(this, b, c); else if(e&&U.call(this, c)) return; this.callback(a, b, c) }}, destroy: function (){ this.touch.destroy(), this.mouse.destroy() }}); var eb=u(na.style, "touchAction"), fb=eb!==d, gb="compute", hb="auto", ib="manipulation", jb="none", kb="pan-x", lb="pan-y", mb=X(); V.prototype={ set: function (a){ a==gb&&(a=this.compute()), fb&&this.manager.element.style&&mb[a]&&(this.manager.element.style[eb]=a), this.actions=a.toLowerCase().trim() }, update: function (){ this.set(this.manager.options.touchAction) }, compute: function (){ var a=[]; return g(this.manager.recognizers, function (b){ k(b.options.enable, [b])&&(a=a.concat(b.getTouchAction())) }), W(a.join(" ")) }, preventDefaults: function (a){ var b=a.srcEvent, c=a.offsetDirection; if(this.manager.session.prevented) return void b.preventDefault(); var d=this.actions, e=p(d, jb)&&!mb[jb], f=p(d, lb)&&!mb[lb], g=p(d, kb)&&!mb[kb]; if(e){ var h=1===a.pointers.length, i=a.distance < 2, j=a.deltaTime < 250; if(h&&i && j) return } return g&&f ? void 0:e||f&&c & Na||g&&c & Oa ? this.preventSrc(b):void 0 }, preventSrc: function (a){ this.manager.session.prevented = !0, a.preventDefault() }}; var nb=1, ob=2, pb=4, qb=8, rb=qb, sb=16, tb=32; Y.prototype={ defaults: {}, set: function (a){ return la(this.options, a), this.manager&&this.manager.touchAction.update(), this }, recognizeWith: function (a){ if(f(a, "recognizeWith", this)) return this; var b=this.simultaneous; return a=_(a, this), b[a.id]||(b[a.id]=a, a.recognizeWith(this)), this }, dropRecognizeWith: function (a){ return f(a, "dropRecognizeWith", this) ? this:(a=_(a, this), delete this.simultaneous[a.id], this) }, requireFailure: function (a){ if(f(a, "requireFailure", this)) return this; var b=this.requireFail; return a=_(a, this), -1===r(b, a)&&(b.push(a), a.requireFailure(this)), this }, dropRequireFailure: function (a){ if(f(a, "dropRequireFailure", this)) return this; a=_(a, this); var b=r(this.requireFail, a); return b > -1&&this.requireFail.splice(b, 1), this }, hasRequireFailures: function (){ return this.requireFail.length > 0 }, canRecognizeWith: function (a){ return !!this.simultaneous[a.id] }, emit: function (a){ function b(b){ c.manager.emit(b, a) } var c=this, d=this.state; qb > d&&b(c.options.event + Z(d)), b(c.options.event), a.additionalEvent&&b(a.additionalEvent), d >=qb&&b(c.options.event + Z(d)) }, tryEmit: function (a){ return this.canEmit() ? this.emit(a):void (this.state=tb) }, canEmit: function (){ for (var a=0; a < this.requireFail.length;){ if(!(this.requireFail[a].state & (tb | nb))) return !1; a++ } return !0 }, recognize: function (a){ var b=la({}, a); return k(this.options.enable, [this, b]) ? (this.state & (rb | sb | tb)&&(this.state=nb), this.state=this.process(b), void (this.state & (ob | pb | qb | sb)&&this.tryEmit(b))):(this.reset(), void (this.state=tb)) }, process: function (a){ }, getTouchAction: function (){ }, reset: function (){ }}, i(aa, Y, { defaults: {pointers: 1}, attrTest: function (a){ var b=this.options.pointers; return 0===b||a.pointers.length===b }, process: function (a){ var b=this.state, c=a.eventType, d=b & (ob | pb), e=this.attrTest(a); return d&&(c & Ha||!e) ? b | sb:d||e ? c & Ga ? b | qb:b & ob ? b | pb:ob:tb }}), i(ba, aa, { defaults: {event: "pan", threshold: 10, pointers: 1, direction: Pa}, getTouchAction: function (){ var a=this.options.direction, b=[]; return a & Na&&b.push(lb), a & Oa&&b.push(kb), b }, directionTest: function (a){ var b=this.options, c = !0, d=a.distance, e=a.direction, f=a.deltaX, g=a.deltaY; return e & b.direction||(b.direction & Na ? (e=0===f ? Ia:0 > f ? Ja:Ka, c=f!=this.pX, d=Math.abs(a.deltaX)):(e=0===g ? Ia:0 > g ? La:Ma, c=g!=this.pY, d=Math.abs(a.deltaY))), a.direction=e, c&&d > b.threshold&&e & b.direction }, attrTest: function (a){ return aa.prototype.attrTest.call(this, a)&&(this.state & ob||!(this.state & ob)&&this.directionTest(a)) }, emit: function (a){ this.pX=a.deltaX, this.pY=a.deltaY; var b=$(a.direction); b&&(a.additionalEvent=this.options.event + b), this._super.emit.call(this, a) }}), i(ca, aa, { defaults: {event: "pinch", threshold: 0, pointers: 2}, getTouchAction: function (){ return [jb] }, attrTest: function (a){ return this._super.attrTest.call(this, a)&&(Math.abs(a.scale - 1) > this.options.threshold||this.state & ob) }, emit: function (a){ if(1!==a.scale){ var b=a.scale < 1 ? "in":"out"; a.additionalEvent=this.options.event + b } this._super.emit.call(this, a) }}), i(da, Y, { defaults: {event: "press", pointers: 1, time: 251, threshold: 9}, getTouchAction: function (){ return [hb] }, process: function (a){ var b=this.options, c=a.pointers.length===b.pointers, d=a.distance < b.threshold, f=a.deltaTime > b.time; if(this._input=a, !d||!c||a.eventType & (Ga | Ha)&&!f) this.reset(); else if(a.eventType & Ea) this.reset(), this._timer=e(function (){ this.state=rb, this.tryEmit() }, b.time, this); else if(a.eventType & Ga) return rb; return tb }, reset: function (){ clearTimeout(this._timer) }, emit: function (a){ this.state===rb&&(a&&a.eventType & Ga ? this.manager.emit(this.options.event + "up", a):(this._input.timeStamp=ra(), this.manager.emit(this.options.event, this._input))) }}), i(ea, aa, { defaults: {event: "rotate", threshold: 0, pointers: 2}, getTouchAction: function (){ return [jb] }, attrTest: function (a){ return this._super.attrTest.call(this, a)&&(Math.abs(a.rotation) > this.options.threshold||this.state & ob) }}), i(fa, aa, { defaults: {event: "swipe", threshold: 10, velocity: .3, direction: Na | Oa, pointers: 1}, getTouchAction: function (){ return ba.prototype.getTouchAction.call(this) }, attrTest: function (a){ var b, c=this.options.direction; return c & (Na | Oa) ? b=a.overallVelocity:c & Na ? b=a.overallVelocityX:c & Oa&&(b=a.overallVelocityY), this._super.attrTest.call(this, a)&&c & a.offsetDirection&&a.distance > this.options.threshold&&a.maxPointers==this.options.pointers&&qa(b) > this.options.velocity&&a.eventType & Ga }, emit: function (a){ var b=$(a.offsetDirection); b&&this.manager.emit(this.options.event + b, a), this.manager.emit(this.options.event, a) }}), i(ga, Y, { defaults: { event: "tap", pointers: 1, taps: 1, interval: 300, time: 250, threshold: 9, posThreshold: 10 }, getTouchAction: function (){ return [ib] }, process: function (a){ var b=this.options, c=a.pointers.length===b.pointers, d=a.distance < b.threshold, f=a.deltaTime < b.time; if(this.reset(), a.eventType & Ea&&0===this.count) return this.failTimeout(); if(d&&f && c){ if(a.eventType!=Ga) return this.failTimeout(); var g=this.pTime ? a.timeStamp - this.pTime < b.interval:!0, h = !this.pCenter||H(this.pCenter, a.center) < b.posThreshold; this.pTime=a.timeStamp, this.pCenter=a.center, h&&g ? this.count +=1:this.count=1, this._input=a; var i=this.count % b.taps; if(0===i) return this.hasRequireFailures() ? (this._timer=e(function (){ this.state=rb, this.tryEmit() }, b.interval, this), ob):rb } return tb }, failTimeout: function (){ return this._timer=e(function (){ this.state=tb }, this.options.interval, this), tb }, reset: function (){ clearTimeout(this._timer) }, emit: function (){ this.state==rb&&(this._input.tapCount=this.count, this.manager.emit(this.options.event, this._input)) }}), ha.VERSION="2.0.8", ha.defaults={ domEvents: !1, touchAction: gb, enable: !0, inputTarget: null, inputClass: null, preset: [[ea, {enable: !1}], [ca, {enable: !1}, ["rotate"]], [fa, {direction: Na}], [ba, {direction: Na}, ["swipe"]], [ga], [ga, { event: "doubletap", taps: 2 }, ["tap"]], [da]], cssProps: { userSelect: "none", touchSelect: "none", touchCallout: "none", contentZooming: "none", userDrag: "none", tapHighlightColor: "rgba(0,0,0,0)" }}; var ub=1, vb=2; ia.prototype={ set: function (a){ return la(this.options, a), a.touchAction&&this.touchAction.update(), a.inputTarget&&(this.input.destroy(), this.input.target=a.inputTarget, this.input.init()), this }, stop: function (a){ this.session.stopped=a ? vb:ub }, recognize: function (a){ var b=this.session; if(!b.stopped){ this.touchAction.preventDefaults(a); var c, d=this.recognizers, e=b.curRecognizer; (!e||e&&e.state & rb)&&(e=b.curRecognizer=null); for (var f=0; f < d.length;) c=d[f], b.stopped===vb||e&&c!=e&&!c.canRecognizeWith(e) ? c.reset():c.recognize(a), !e&&c.state & (ob | pb | qb)&&(e=b.curRecognizer=c), f++ }}, get: function (a){ if(a instanceof Y) return a; for (var b=this.recognizers, c=0; c < b.length; c++) if(b[c].options.event==a) return b[c]; return null }, add: function (a){ if(f(a, "add", this)) return this; var b=this.get(a.options.event); return b&&this.remove(b), this.recognizers.push(a), a.manager=this, this.touchAction.update(), a }, remove: function (a){ if(f(a, "remove", this)) return this; if(a=this.get(a)){ var b=this.recognizers, c=r(b, a); -1!==c&&(b.splice(c, 1), this.touchAction.update()) } return this }, on: function (a, b){ if(a!==d&&b!==d){ var c=this.handlers; return g(q(a), function (a){ c[a]=c[a]||[], c[a].push(b) }), this }}, off: function (a, b){ if(a!==d){ var c=this.handlers; return g(q(a), function (a){ b ? c[a]&&c[a].splice(r(c[a], b), 1):delete c[a] }), this }}, emit: function (a, b){ this.options.domEvents&&ka(a, b); var c=this.handlers[a]&&this.handlers[a].slice(); if(c&&c.length){ b.type=a, b.preventDefault=function (){ b.srcEvent.preventDefault() }; for (var d=0; d < c.length;) c[d](b), d++ }}, destroy: function (){ this.element&&ja(this, !1), this.handlers={}, this.session={}, this.input.destroy(), this.element=null }}, la(ha, { INPUT_START: Ea, INPUT_MOVE: Fa, INPUT_END: Ga, INPUT_CANCEL: Ha, STATE_POSSIBLE: nb, STATE_BEGAN: ob, STATE_CHANGED: pb, STATE_ENDED: qb, STATE_RECOGNIZED: rb, STATE_CANCELLED: sb, STATE_FAILED: tb, DIRECTION_NONE: Ia, DIRECTION_LEFT: Ja, DIRECTION_RIGHT: Ka, DIRECTION_UP: La, DIRECTION_DOWN: Ma, DIRECTION_HORIZONTAL: Na, DIRECTION_VERTICAL: Oa, DIRECTION_ALL: Pa, Manager: ia, Input: x, TouchAction: V, TouchInput: P, MouseInput: L, PointerEventInput: M, TouchMouseInput: R, SingleTouchInput: N, Recognizer: Y, AttrRecognizer: aa, Tap: ga, Pan: ba, Swipe: fa, Pinch: ca, Rotate: ea, Press: da, on: m, off: n, each: g, merge: ta, extend: sa, assign: la, inherit: i, bindFn: j, prefixed: u }); var wb="undefined"!=typeof a ? a:"undefined"!=typeof self ? self:{}; wb.Hammer=ha, "function"==typeof define&&define.amd ? define(function (){ return ha }):"undefined"!=typeof module&&module.exports ? module.exports=ha:a[c]=ha }(window, document, "Hammer"); (function (factory){ if(typeof define==='function'&&define.amd){ define(['jquery', 'hammerjs'], factory); }else if(typeof exports==='object'){ factory(require('jquery'), require('hammerjs')); }else{ factory(jQuery, Hammer); }}(function (jQuery, Hammer){ function hammerify(el, options){ var $el=jQuery(el); if(!$el.data("hammer")){ $el.data("hammer", new Hammer($el[0], options)); }} jQuery.fn.hammer=function (options){ return this.each(function (){ hammerify(this, options); }); }; Hammer.Manager.prototype.emit=(function (originalEmit){ return function (type, data){ originalEmit.call(this, type, data); jQuery(this.element).trigger({ type: type, gesture: data }); };})(Hammer.Manager.prototype.emit); })); }else{ var Hammer={ Manager: { prototype: {}} }; (function (factory){ if(typeof define==='function'&&define.amd){ define(['jquery', 'hammerjs'], factory); }else if(typeof exports==='object'){ factory(require('jquery'), require('hammerjs')); }else{ factory(jQuery, Hammer); }}(function (jQuery, Hammer){ function hammerify(el, options){ } jQuery.fn.hammer=function (options){ return this.each(function (){ hammerify(this, options); }); }; Hammer.Manager.prototype.emit=(function (originalEmit){ return function (type, data){ originalEmit.call(this, type, data); jQuery(this.element).trigger({ type: type, gesture: data }); };})(Hammer.Manager.prototype.emit); })); } if(jQuery('#cff.cff-masonry-js').length||typeof window.cff_block_editor!=='undefined'){ !function(a){function b(){} function c(a){function c(b){b.prototype.option||(b.prototype.option=function(b){a.isPlainObject(b)&&(this.options=a.extend(!0,this.options,b))})} function e(b,c){a.fn[b]=function(e){if("string"==typeof e){for(var g=d.call(arguments,1),h=0,i=this.length;i>h;h++){var j=this[h],k=a.data(j,b);if(k)if(a.isFunction(k[e])&&"_"!==e.charAt(0)){var l=k[e].apply(k,g);if(void 0!==l)return l}else f("no such method '"+e+"' for "+b+" instance");else f("cannot call methods on "+b+" prior to initialization; attempted to call '"+e+"'")} return this} return this.each(function(){var d=a.data(this,b);d?(d.option(e),d._init()):(d=new c(this,e),a.data(this,b,d))})}} if(a){var f="undefined"==typeof console?b:function(a){console.error(a)};return a.bridget=function(a,b){c(b),e(a,b)},a.bridget}} var d=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],c):c("object"==typeof exports?require("jquery"):a.jQuery)}(window),function(a){function b(b){var c=a.event;return c.target=c.target||c.srcElement||b,c} var c=document.documentElement,d=function(){};c.addEventListener?d=function(a,b,c){a.addEventListener(b,c,!1)}:c.attachEvent&&(d=function(a,c,d){a[c+d]=d.handleEvent?function(){var c=b(a);d.handleEvent.call(d,c)}:function(){var c=b(a);d.call(a,c)},a.attachEvent("on"+c,a[c+d])});var e=function(){};c.removeEventListener?e=function(a,b,c){a.removeEventListener(b,c,!1)}:c.detachEvent&&(e=function(a,b,c){a.detachEvent("on"+b,a[b+c]);try{delete a[b+c]}catch(d){a[b+c]=void 0}});var f={bind:d,unbind:e};"function"==typeof define&&define.amd?define("eventie/eventie",f):"object"==typeof exports?module.exports=f:a.eventie=f}(window),function(){function a(){} function b(a,b){for(var c=a.length;c--;)if(a[c].listener===b)return c;return-1} function c(a){return function(){return this[a].apply(this,arguments)}} var d=a.prototype,e=this,f=e.EventEmitter;d.getListeners=function(a){var b,c,d=this._getEvents();if(a instanceof RegExp){b={};for(c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c])}else b=d[a]||(d[a]=[]);return b},d.flattenListeners=function(a){var b,c=[];for(b=0;be;e++)if(b=c[e]+a,"string"==typeof d[b])return b}} var c="Webkit Moz ms Ms O".split(" "),d=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return b}):"object"==typeof exports?module.exports=b:a.getStyleProperty=b}(window),function(a){function b(a){var b=parseFloat(a),c=-1===a.indexOf("%")&&!isNaN(b);return c&&b} function c(){} function d(){for(var a={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},b=0,c=g.length;c>b;b++){var d=g[b];a[d]=0} return a} function e(c){function e(){if(!m){m=!0;var d=a.getComputedStyle;if(j=function(){var a=d?function(a){return d(a,null)}:function(a){return a.currentStyle};return function(b){var c=a(b);return c||f("Style returned "+c+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),c}}(),k=c("boxSizing")){var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style[k]="border-box";var g=document.body||document.documentElement;g.appendChild(e);var h=j(e);l=200===b(h.width),g.removeChild(e)}}} function h(a){if(e(),"string"==typeof a&&(a=document.querySelector(a)),a&&"object"==typeof a&&a.nodeType){var c=j(a);if("none"===c.display)return d();var f={};f.width=a.offsetWidth,f.height=a.offsetHeight;for(var h=f.isBorderBox=!(!k||!c[k]||"border-box"!==c[k]),m=0,n=g.length;n>m;m++){var o=g[m],p=c[o];p=i(a,p);var q=parseFloat(p);f[o]=isNaN(q)?0:q} var r=f.paddingLeft+f.paddingRight,s=f.paddingTop+f.paddingBottom,t=f.marginLeft+f.marginRight,u=f.marginTop+f.marginBottom,v=f.borderLeftWidth+f.borderRightWidth,w=f.borderTopWidth+f.borderBottomWidth,x=h&&l,y=b(c.width);y!==!1&&(f.width=y+(x?0:r+v));var z=b(c.height);return z!==!1&&(f.height=z+(x?0:s+w)),f.innerWidth=f.width-(r+v),f.innerHeight=f.height-(s+w),f.outerWidth=f.width+t,f.outerHeight=f.height+u,f}} function i(b,c){if(a.getComputedStyle||-1===c.indexOf("%"))return c;var d=b.style,e=d.left,f=b.runtimeStyle,g=f&&f.left;return g&&(f.left=b.currentStyle.left),d.left=c,c=d.pixelLeft,d.left=e,g&&(f.left=g),c} var j,k,l,m=!1;return h} var f="undefined"==typeof console?c:function(a){console.error(a)},g=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],e):"object"==typeof exports?module.exports=e(require("desandro-get-style-property")):a.getSize=e(a.getStyleProperty)}(window),function(a){function b(a){"function"==typeof a&&(b.isReady?a():g.push(a))} function c(a){var c="readystatechange"===a.type&&"complete"!==f.readyState;b.isReady||c||d()} function d(){b.isReady=!0;for(var a=0,c=g.length;c>a;a++){var d=g[a];d()}} function e(e){return"complete"===f.readyState?d():(e.bind(f,"DOMContentLoaded",c),e.bind(f,"readystatechange",c),e.bind(a,"load",c)),b} var f=a.document,g=[];b.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],e):"object"==typeof exports?module.exports=e(require("eventie")):a.docReady=e(a.eventie)}(window),function(a){function b(a,b){return a[g](b)} function c(a){if(!a.parentNode){var b=document.createDocumentFragment();b.appendChild(a)}} function d(a,b){c(a);for(var d=a.parentNode.querySelectorAll(b),e=0,f=d.length;f>e;e++)if(d[e]===a)return!0;return!1} function e(a,d){return c(a),b(a,d)} var f,g=function(){if(a.matches)return"matches";if(a.matchesSelector)return"matchesSelector";for(var b=["webkit","moz","ms","o"],c=0,d=b.length;d>c;c++){var e=b[c],f=e+"MatchesSelector";if(a[f])return f}}();if(g){var h=document.createElement("div"),i=b(h,"div");f=i?b:e}else f=d;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return f}):"object"==typeof exports?module.exports=f:window.matchesSelector=f}(Element.prototype),function(a,b){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["doc-ready/doc-ready","matches-selector/matches-selector"],function(c,d){return b(a,c,d)}):"object"==typeof exports?module.exports=b(a,require("doc-ready"),require("desandro-matches-selector")):a.fizzyUIUtils=b(a,a.docReady,a.matchesSelector)}(window,function(a,b,c){var d={};d.extend=function(a,b){for(var c in b)a[c]=b[c];return a},d.modulo=function(a,b){return(a%b+b)%b};var e=Object.prototype.toString;d.isArray=function(a){return"[object Array]"==e.call(a)},d.makeArray=function(a){var b=[];if(d.isArray(a))b=a;else if(a&&"number"==typeof a.length)for(var c=0,e=a.length;e>c;c++)b.push(a[c]);else b.push(a);return b},d.indexOf=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},d.removeFrom=function(a,b){var c=d.indexOf(a,b);-1!=c&&a.splice(c,1)},d.isElement="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(a){return a instanceof HTMLElement}:function(a){return a&&"object"==typeof a&&1==a.nodeType&&"string"==typeof a.nodeName},d.setText=function(){function a(a,c){b=b||(void 0!==document.documentElement.textContent?"textContent":"innerText"),a[b]=c} var b;return a}(),d.getParent=function(a,b){for(;a!=document.body;)if(a=a.parentNode,c(a,b))return a},d.getQueryElement=function(a){return"string"==typeof a?document.querySelector(a):a},d.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},d.filterFindElements=function(a,b){a=d.makeArray(a);for(var e=[],f=0,g=a.length;g>f;f++){var h=a[f];if(d.isElement(h))if(b){c(h,b)&&e.push(h);for(var i=h.querySelectorAll(b),j=0,k=i.length;k>j;j++)e.push(i[j])}else e.push(h)} return e},d.debounceMethod=function(a,b,c){var d=a.prototype[b],e=b+"Timeout";a.prototype[b]=function(){var a=this[e];a&&clearTimeout(a);var b=arguments,f=this;this[e]=setTimeout(function(){d.apply(f,b),delete f[e]},c||100)}},d.toDashed=function(a){return a.replace(/(.)([A-Z])/g,function(a,b,c){return b+"-"+c}).toLowerCase()};var f=a.console;return d.htmlInit=function(c,e){b(function(){for(var b=d.toDashed(e),g=document.querySelectorAll(".js-"+b),h="data-"+b+"-options",i=0,j=g.length;j>i;i++){var k,l=g[i],m=l.getAttribute(h);try{k=m&&JSON.parse(m)}catch(n){f&&f.error("Error parsing "+h+" on "+l.nodeName.toLowerCase()+(l.id?"#"+l.id:"")+": "+n);continue} var o=new c(l,k),p=a.jQuery;p&&p.data(l,e,o)}})},d}),function(a,b){"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property","fizzy-ui-utils/utils"],function(c,d,e,f){return b(a,c,d,e,f)}):"object"==typeof exports?module.exports=b(a,require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property"),require("fizzy-ui-utils")):(a.Outlayer={},a.Outlayer.Item=b(a,a.EventEmitter,a.getSize,a.getStyleProperty,a.fizzyUIUtils))}(window,function(a,b,c,d,e){function f(a){for(var b in a)return!1;return b=null,!0} function g(a,b){a&&(this.element=a,this.layout=b,this.position={x:0,y:0},this._create())} var h=a.getComputedStyle,i=h?function(a){return h(a,null)}:function(a){return a.currentStyle},j=d("transition"),k=d("transform"),l=j&&k,m=!!d("perspective"),n={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[j],o=["transform","transition","transitionDuration","transitionProperty"],p=function(){for(var a={},b=0,c=o.length;c>b;b++){var e=o[b],f=d(e);f&&f!==e&&(a[e]=f)} return a}();e.extend(g.prototype,b.prototype),g.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.getSize=function(){this.size=c(this.element)},g.prototype.css=function(a){var b=this.element.style;for(var c in a){var d=p[c]||c;b[d]=a[c]}},g.prototype.getPosition=function(){var a=i(this.element),b=this.layout.options,c=b.isOriginLeft,d=b.isOriginTop,e=parseInt(a[c?"left":"right"],10),f=parseInt(a[d?"top":"bottom"],10);e=isNaN(e)?0:e,f=isNaN(f)?0:f;var g=this.layout.size;e-=c?g.paddingLeft:g.paddingRight,f-=d?g.paddingTop:g.paddingBottom,this.position.x=e,this.position.y=f},g.prototype.layoutPosition=function(){var a=this.layout.size,b=this.layout.options,c={},d=b.isOriginLeft?"paddingLeft":"paddingRight",e=b.isOriginLeft?"left":"right",f=b.isOriginLeft?"right":"left",g=this.position.x+a[d];g=b.percentPosition&&!b.isHorizontal?g/a.width*100+"%":g+"px",c[e]=g,c[f]="";var h=b.isOriginTop?"paddingTop":"paddingBottom",i=b.isOriginTop?"top":"bottom",j=b.isOriginTop?"bottom":"top",k=this.position.y+a[h];k=b.percentPosition&&b.isHorizontal?k/a.height*100+"%":k+"px",c[i]=k,c[j]="",this.css(c),this.emitEvent("layout",[this])};var q=m?function(a,b){return"translate3d("+a+"px, "+b+"px, 0)"}:function(a,b){return"translate("+a+"px, "+b+"px)"};g.prototype._transitionTo=function(a,b){this.getPosition();var c=this.position.x,d=this.position.y,e=parseInt(a,10),f=parseInt(b,10),g=e===this.position.x&&f===this.position.y;if(this.setPosition(a,b),g&&!this.isTransitioning)return void this.layoutPosition();var h=a-c,i=b-d,j={},k=this.layout.options;h=k.isOriginLeft?h:-h,i=k.isOriginTop?i:-i,j.transform=q(h,i),this.transition({to:j,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},g.prototype.goTo=function(a,b){this.setPosition(a,b),this.layoutPosition()},g.prototype.moveTo=l?g.prototype._transitionTo:g.prototype.goTo,g.prototype.setPosition=function(a,b){this.position.x=parseInt(a,10),this.position.y=parseInt(b,10)},g.prototype._nonTransition=function(a){this.css(a.to),a.isCleaning&&this._removeStyles(a.to);for(var b in a.onTransitionEnd)a.onTransitionEnd[b].call(this)},g.prototype._transition=function(a){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(a);var b=this._transn;for(var c in a.onTransitionEnd)b.onEnd[c]=a.onTransitionEnd[c];for(c in a.to)b.ingProperties[c]=!0,a.isCleaning&&(b.clean[c]=!0);if(a.from){this.css(a.from);var d=this.element.offsetHeight;d=null} this.enableTransition(a.to),this.css(a.to),this.isTransitioning=!0};var r=k&&e.toDashed(k)+",opacity";g.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:r,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(n,this,!1))},g.prototype.transition=g.prototype[j?"_transition":"_nonTransition"],g.prototype.onwebkitTransitionEnd=function(a){this.ontransitionend(a)},g.prototype.onotransitionend=function(a){this.ontransitionend(a)};var s={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};g.prototype.ontransitionend=function(a){if(a.target===this.element){var b=this._transn,c=s[a.propertyName]||a.propertyName;if(delete b.ingProperties[c],f(b.ingProperties)&&this.disableTransition(),c in b.clean&&(this.element.style[a.propertyName]="",delete b.clean[c]),c in b.onEnd){var d=b.onEnd[c];d.call(this),delete b.onEnd[c]} this.emitEvent("transitionEnd",[this])}},g.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(n,this,!1),this.isTransitioning=!1},g.prototype._removeStyles=function(a){var b={};for(var c in a)b[c]="";this.css(b)};var t={transitionProperty:"",transitionDuration:""};return g.prototype.removeTransitionStyles=function(){this.css(t)},g.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},g.prototype.remove=function(){if(!j||!parseFloat(this.layout.options.transitionDuration))return void this.removeElem();var a=this;this.once("transitionEnd",function(){a.removeElem()}),this.hide()},g.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("visibleStyle");b[c]=this.onRevealTransitionEnd,this.transition({from:a.hiddenStyle,to:a.visibleStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},g.prototype.getHideRevealTransitionEndProperty=function(a){var b=this.layout.options[a];if(b.opacity)return"opacity";for(var c in b)return c},g.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("hiddenStyle");b[c]=this.onHideTransitionEnd,this.transition({from:a.visibleStyle,to:a.hiddenStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},g.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},g}),function(a,b){"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","eventEmitter/EventEmitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(c,d,e,f,g){return b(a,c,d,e,f,g)}):"object"==typeof exports?module.exports=b(a,require("eventie"),require("wolfy87-eventemitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):a.Outlayer=b(a,a.eventie,a.EventEmitter,a.getSize,a.fizzyUIUtils,a.Outlayer.Item)}(window,function(a,b,c,d,e,f){function g(a,b){var c=e.getQueryElement(a);if(!c)return void(h&&h.error("Bad element for "+this.constructor.namespace+": "+(c||a)));this.element=c,i&&(this.$element=i(this.element)),this.options=e.extend({},this.constructor.defaults),this.option(b);var d=++k;this.element.outlayerGUID=d,l[d]=this,this._create(),this.options.isInitLayout&&this.layout()} var h=a.console,i=a.jQuery,j=function(){},k=0,l={};return g.namespace="outlayer",g.Item=f,g.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},e.extend(g.prototype,c.prototype),g.prototype.option=function(a){e.extend(this.options,a)},g.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),e.extend(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},g.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},g.prototype._itemize=function(a){for(var b=this._filterFindItemElements(a),c=this.constructor.Item,d=[],e=0,f=b.length;f>e;e++){var g=b[e],h=new c(g,this);d.push(h)} return d},g.prototype._filterFindItemElements=function(a){return e.filterFindElements(a,this.options.itemSelector)},g.prototype.getItemElements=function(){for(var a=[],b=0,c=this.items.length;c>b;b++)a.push(this.items[b].element);return a},g.prototype.layout=function(){this._resetLayout(),this._manageStamps();var a=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,a),this._isLayoutInited=!0},g.prototype._init=g.prototype.layout,g.prototype._resetLayout=function(){this.getSize()},g.prototype.getSize=function(){this.size=d(this.element)},g.prototype._getMeasurement=function(a,b){var c,f=this.options[a];f?("string"==typeof f?c=this.element.querySelector(f):e.isElement(f)&&(c=f),this[a]=c?d(c)[b]:f):this[a]=0},g.prototype.layoutItems=function(a,b){a=this._getItemsForLayout(a),this._layoutItems(a,b),this._postLayout()},g.prototype._getItemsForLayout=function(a){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c];e.isIgnored||b.push(e)} return b},g.prototype._layoutItems=function(a,b){if(this._emitCompleteOnItems("layout",a),a&&a.length){for(var c=[],d=0,e=a.length;e>d;d++){var f=a[d],g=this._getItemLayoutPosition(f);g.item=f,g.isInstant=b||f.isLayoutInstant,c.push(g)} this._processLayoutQueue(c)}},g.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},g.prototype._processLayoutQueue=function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b];this._positionItem(d.item,d.x,d.y,d.isInstant)}},g.prototype._positionItem=function(a,b,c,d){d?a.goTo(b,c):a.moveTo(b,c)},g.prototype._postLayout=function(){this.resizeContainer()},g.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var a=this._getContainerSize();a&&(this._setContainerMeasure(a.width,!0),this._setContainerMeasure(a.height,!1))}},g.prototype._getContainerSize=j,g.prototype._setContainerMeasure=function(a,b){if(void 0!==a){var c=this.size;c.isBorderBox&&(a+=b?c.paddingLeft+c.paddingRight+c.borderLeftWidth+c.borderRightWidth:c.paddingBottom+c.paddingTop+c.borderTopWidth+c.borderBottomWidth),a=Math.max(a,0),this.element.style[b?"width":"height"]=a+"px"}},g.prototype._emitCompleteOnItems=function(a,b){function c(){e.emitEvent(a+"Complete",[b])} function d(){g++,g===f&&c()} var e=this,f=b.length;if(!b||!f)return void c();for(var g=0,h=0,i=b.length;i>h;h++){var j=b[h];j.once(a,d)}},g.prototype.ignore=function(a){var b=this.getItem(a);b&&(b.isIgnored=!0)},g.prototype.unignore=function(a){var b=this.getItem(a);b&&delete b.isIgnored},g.prototype.stamp=function(a){if(a=this._find(a)){this.stamps=this.stamps.concat(a);for(var b=0,c=a.length;c>b;b++){var d=a[b];this.ignore(d)}}},g.prototype.unstamp=function(a){if(a=this._find(a))for(var b=0,c=a.length;c>b;b++){var d=a[b];e.removeFrom(this.stamps,d),this.unignore(d)}},g.prototype._find=function(a){return a?("string"==typeof a&&(a=this.element.querySelectorAll(a)),a=e.makeArray(a)):void 0},g.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var a=0,b=this.stamps.length;b>a;a++){var c=this.stamps[a];this._manageStamp(c)}}},g.prototype._getBoundingRect=function(){var a=this.element.getBoundingClientRect(),b=this.size;this._boundingRect={left:a.left+b.paddingLeft+b.borderLeftWidth,top:a.top+b.paddingTop+b.borderTopWidth,right:a.right-(b.paddingRight+b.borderRightWidth),bottom:a.bottom-(b.paddingBottom+b.borderBottomWidth)}},g.prototype._manageStamp=j,g.prototype._getElementOffset=function(a){var b=a.getBoundingClientRect(),c=this._boundingRect,e=d(a),f={left:b.left-c.left-e.marginLeft,top:b.top-c.top-e.marginTop,right:c.right-b.right-e.marginRight,bottom:c.bottom-b.bottom-e.marginBottom};return f},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.bindResize=function(){this.isResizeBound||(b.bind(a,"resize",this),this.isResizeBound=!0)},g.prototype.unbindResize=function(){this.isResizeBound&&b.unbind(a,"resize",this),this.isResizeBound=!1},g.prototype.onresize=function(){function a(){b.resize(),delete b.resizeTimeout} this.resizeTimeout&&clearTimeout(this.resizeTimeout);var b=this;this.resizeTimeout=setTimeout(a,100)},g.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},g.prototype.needsResizeLayout=function(){var a=d(this.element),b=this.size&&a;return b&&a.innerWidth!==this.size.innerWidth},g.prototype.addItems=function(a){var b=this._itemize(a);return b.length&&(this.items=this.items.concat(b)),b},g.prototype.appended=function(a){var b=this.addItems(a);b.length&&(this.layoutItems(b,!0),this.reveal(b))},g.prototype.prepended=function(a){var b=this._itemize(a);if(b.length){var c=this.items.slice(0);this.items=b.concat(c),this._resetLayout(),this._manageStamps(),this.layoutItems(b,!0),this.reveal(b),this.layoutItems(c)}},g.prototype.reveal=function(a){this._emitCompleteOnItems("reveal",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.reveal()}},g.prototype.hide=function(a){this._emitCompleteOnItems("hide",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.hide()}},g.prototype.revealItemElements=function(a){var b=this.getItems(a);this.reveal(b)},g.prototype.hideItemElements=function(a){var b=this.getItems(a);this.hide(b)},g.prototype.getItem=function(a){for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];if(d.element===a)return d}},g.prototype.getItems=function(a){a=e.makeArray(a);for(var b=[],c=0,d=a.length;d>c;c++){var f=a[c],g=this.getItem(f);g&&b.push(g)} return b},g.prototype.remove=function(a){var b=this.getItems(a);if(this._emitCompleteOnItems("remove",b),b&&b.length)for(var c=0,d=b.length;d>c;c++){var f=b[c];f.remove(),e.removeFrom(this.items,f)}},g.prototype.destroy=function(){var a=this.element.style;a.height="",a.position="",a.width="";for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];d.destroy()} this.unbindResize();var e=this.element.outlayerGUID;delete l[e],delete this.element.outlayerGUID,i&&i.removeData(this.element,this.constructor.namespace)},g.data=function(a){a=e.getQueryElement(a);var b=a&&a.outlayerGUID;return b&&l[b]},g.create=function(a,b){function c(){g.apply(this,arguments)} return Object.create?c.prototype=Object.create(g.prototype):e.extend(c.prototype,g.prototype),c.prototype.constructor=c,c.defaults=e.extend({},g.defaults),e.extend(c.defaults,b),c.prototype.settings={},c.namespace=a,c.data=g.data,c.Item=function(){f.apply(this,arguments)},c.Item.prototype=new f,e.htmlInit(c,a),i&&i.bridget&&i.bridget(a,c),c},g.Item=f,g}),function(a,b){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","fizzy-ui-utils/utils"],b):"object"==typeof exports?module.exports=b(require("outlayer"),require("get-size"),require("fizzy-ui-utils")):a.Masonry=b(a.Outlayer,a.getSize,a.fizzyUIUtils)}(window,function(a,b,c){var d=a.create("masonry");return d.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var a=this.cols;for(this.colYs=[];a--;)this.colYs.push(0);this.maxY=0},d.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var a=this.items[0],c=a&&a.element;this.columnWidth=c&&b(c).outerWidth||this.containerWidth} var d=this.columnWidth+=this.gutter,e=this.containerWidth+this.gutter,f=e/d,g=d-e%d,h=g&&1>g?"round":"floor";f=Math[h](f),this.cols=Math.max(f,1)},d.prototype.getContainerWidth=function(){var a=this.options.isFitWidth?this.element.parentNode:this.element,c=b(a);this.containerWidth=c&&c.innerWidth},d.prototype._getItemLayoutPosition=function(a){a.getSize();var b=a.size.outerWidth%this.columnWidth,d=b&&1>b?"round":"ceil",e=Math[d](a.size.outerWidth/this.columnWidth);e=Math.min(e,this.cols);for(var f=this._getColGroup(e),g=Math.min.apply(Math,f),h=c.indexOf(f,g),i={x:this.columnWidth*h,y:g},j=g+a.size.outerHeight,k=this.cols+1-f.length,l=0;k>l;l++)this.colYs[h+l]=j;return i},d.prototype._getColGroup=function(a){if(2>a)return this.colYs;for(var b=[],c=this.cols+1-a,d=0;c>d;d++){var e=this.colYs.slice(d,d+a);b[d]=Math.max.apply(Math,e)} return b},d.prototype._manageStamp=function(a){var c=b(a),d=this._getElementOffset(a),e=this.options.isOriginLeft?d.left:d.right,f=e+c.outerWidth,g=Math.floor(e/this.columnWidth);g=Math.max(0,g);var h=Math.floor(f/this.columnWidth);h-=f%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var i=(this.options.isOriginTop?d.top:d.bottom)+c.outerHeight,j=g;h>=j;j++)this.colYs[j]=Math.max(i,this.colYs[j])},d.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var a={height:this.maxY};return this.options.isFitWidth&&(a.width=this._getContainerFitWidth()),a},d.prototype._getContainerFitWidth=function(){for(var a=0,b=this.cols;--b&&0===this.colYs[b];)a++;return(this.cols-a)*this.columnWidth-this.gutter},d.prototype.needsResizeLayout=function(){var a=this.containerWidth;return this.getContainerWidth(),a!==this.containerWidth},d}) function cffAddMasonry($self){ var evt=jQuery.Event('cffbeforemasonry'); evt.$self=$self; jQuery(window).trigger(evt); if(typeof $self.masonry!=='function'){ return; } var windowWidth=jQuery(window).width(), masonryEnabled=false; if(windowWidth > 800){ if($self.hasClass('masonry-1-desktop')){ $self.addClass('cff-disable-masonry'); }else{ masonryEnabled=true; $self.addClass('cff-masonry cff-masonry-js').removeClass('cff-disable-masonry'); }}else if(windowWidth > 400){ if($self.hasClass('masonry-2-tablet') || $self.hasClass('masonry-3-tablet') || $self.hasClass('masonry-4-tablet') || $self.hasClass('masonry-5-tablet') || $self.hasClass('masonry-6-tablet')){ masonryEnabled=true; $self.addClass('cff-masonry cff-masonry-js').removeClass('cff-disable-masonry'); }else{ $self.addClass('cff-disable-masonry'); }}else{ if($self.hasClass('masonry-2-mobile') || $self.hasClass('masonry-3-mobile')){ masonryEnabled=true; $self.addClass('cff-masonry cff-masonry-js').removeClass('cff-disable-masonry'); }else{ $self.addClass('cff-disable-masonry'); }} if($self.hasClass('cff-masonry')){ $self.find('.cff-album-item a').removeAttr('style'); } if(masonryEnabled){ if($self.find('.cff-item').length){ window.cffMasonrySettings.itemSelector='.cff-new, .cff-item, .cff-likebox'; $self.masonry(window.cffMasonrySettings); $self.find('.cff-item').each(function(){ jQuery(this).css('margin-bottom', '15px'); }); }else if($self.find('.cff-album-item').length){ window.cffMasonrySettings.itemSelector='.cff-album-item, .cff-likebox'; $self.masonry(window.cffMasonrySettings); }} }} window.cffMasonrySettings={itemSelector: '.cff-album-item' }; function Cff(){ this.feeds={}; this.options={};} Cff.prototype={ createPage: function (createFeeds, createFeedsArgs){ if(typeof window.cffOptions==='undefined' || typeof window.cffOptions.resized_url==='undefined'){ window.cffOptions={ resized_url: location.protocol + '//' + window.location.hostname + "/wp-content/uploads/sb-facebook-feed-images/", placeholder: location.protocol + '//' + window.location.hostname + "/wp-content/plugins/custom-facebook-feed-pro/assets/img/placeholder.png", }} createFeeds(createFeedsArgs); }, createFeeds: function (args){ jQuery('.cff').each(function (index){ jQuery(this).attr('data-cff-index', index + 1); var $self=jQuery(this), flags=typeof $self.attr('data-cff-flags')!=='undefined' ? $self.attr('data-cff-flags').split(','):[]; var feedOptions={ feedID:$self.find('.cff_resized_image_data').attr('data-feedid'), shortCodeAtts:$self.attr('data-cff-shortcode'), resizingEnabled:$self.find('.cff_resized_image_data').length, page: 1, pag_url:'', gdpr:(flags.indexOf('gdpr') > -1), overrideBlockCDN:(flags.indexOf('overrideBlockCDN') > -1), consentGiven:false, locator:(flags.indexOf('locator') > -1), postID:typeof $self.attr('data-postid')!=='undefind' ? $self.attr('data-postid'):'unknown', }; window.cff.feeds[index]=new CffFeed(this, index, feedOptions); if(typeof window.cff.feeds[index].setResizedImages!=='undefined'){ window.cff.feeds[index].setResizedImages(); } if(typeof window.cff.feeds[index].setResizedImages!=='undefined'){ window.cff.feeds[index].init(); }}); }, }; function CffFeed(el, index, settings){ this.el=el; this.index=index; this.settings=settings; this.resizedImages={}; this.needsResizing=[]; this.imagesWaiting=0; } CffFeed.prototype={ init: function(){ var feed=this; feed.settings.consentGiven=feed.checkConsent(); if(!feed.settings.consentGiven){ if(jQuery(this.el).find('.cff-load-more').is(':visible')){ jQuery(this.el).find('.cff-load-more').hide().addClass('cff-no-consent-hide'); } var $wrapper=jQuery(this.el).closest('.cff-wrapper'); if($wrapper.find('.cff-visual-header').length){ $wrapper.find('.cff-header-text').closest('.cff-visual-header').addClass('cff-no-consent'); } $wrapper.find('.fb-video').addClass('cff-no-consent'); setTimeout(function(){ feed.settings.consentGiven=feed.checkConsent(); if(feed.settings.consentGiven){ feed.addFullFeatures(); }},1000); } var cff_delay=(function (){ var cff_timer=0; return function (cff_callback, cff_ms){ clearTimeout(cff_timer); cff_timer=setTimeout(cff_callback, cff_ms); };})(); this.afterInitialImagesLoaded(); jQuery(window).on('resize', function (){ cff_delay(function (){ feed.afterResize(); }, 500); }); jQuery(this.el).find('.cff-item').each(function(){ feed.lazyLoadCheck(jQuery(this)); }); }, addFullFeatures: function(){ var $=jQuery, $self=jQuery(this.el); jQuery('.cff-gdpr-notice').remove(); jQuery(this.el).find('.cff-author-img').each(function(){ $(this).find('img').attr('src',$(this).attr('data-avatar')); $(this).removeClass('cff-no-consent'); }); jQuery('.fb-video.cff-no-consent').removeClass('cff-no-consent'); if(jQuery('.cff-visual-header').length){ jQuery('.cff-visual-header').each(function(){ jQuery(this).removeClass('cff-no-consent'); if(jQuery(this).find('.cff-header-hero').length){ jQuery(this).find('.cff-header-hero').find('img').attr('src',jQuery(this).find('.cff-header-hero').find('img').attr('data-cover-url')) } if(jQuery(this).find('.cff-header-img').length){ jQuery(this).find('.cff-header-img').find('img').attr('src',jQuery(this).find('.cff-header-img').find('img').attr('data-avatar')) }}); } jQuery('.cff-comment:visible').each(function(){ var $thisComment=jQuery(this); var consentGiven=(typeof window.cff!=='undefined'&&typeof window.cff.feeds!=='undefined') ? window.cff.feeds[0].settings.consentGiven:true; if(consentGiven){ $thisComment.find('.cff-comment-img:not(.cff-comment-reply-img) a, .cff-comment-img:not(.cff-comment-reply-img) span').html('Avatar'); }}); jQuery('.cff-comment-image-placeholder').each(function(){ jQuery(this).replaceWith('Attachement'); }); jQuery('.cff-likebox iframe').each(function(){ var $likebox=$(this), likeboxWidth=$likebox.attr('data-likebox-width'), cffFeedWidth=$likebox.parent().width(); if(likeboxWidth=='') likeboxWidth=340; if(cffFeedWidth < likeboxWidth) likeboxWidth=cffFeedWidth; $likebox.attr('src', 'https://www.facebook.com/plugins/page.php?href=https%3A%2F%2Fwww.facebook.com%2F'+$likebox.attr('data-likebox-id')+'%2F&tabs&width='+Math.floor(likeboxWidth)+'&small_header='+$likebox.attr('data-likebox-header')+'&adapt_container_width=true&hide_cover='+$likebox.attr('data-hide-cover')+'&hide_cta='+$likebox.attr('data-hide-cta')+'&show_facepile='+$likebox.attr('data-likebox-faces')+'&locale='+$likebox.attr('data-locale')); }); jQuery('.cff-iframe-placeholder').each(function(){ var $placeholder=jQuery(this), src=$placeholder.attr('data-src'), type=$placeholder.attr('data-type'); switch (type){ case 'facebook': $placeholder.replaceWith(''); break; case 'youtube': $placeholder.replaceWith(''); break; case 'vimeo': $placeholder.replaceWith(''); break; case 'soundcloud': $placeholder.replaceWith(''); break; case 'spotify': $placeholder.replaceWith(''); break; case 'video': var posterSrc=$placeholder.attr('data-poster-src'); $placeholder.replaceWith(''); break; }}); jQuery(this.el).find('.cff-load-more.cff-no-consent-hide').show(); this.afterResize(); }, setResizedImages: function(){ if(jQuery(this.el).find('.cff_resized_image_data').length && typeof jQuery(this.el).find('.cff_resized_image_data').attr('data-resized')!=='undefined' && (jQuery(this.el).find('.cff_resized_image_data').attr('data-resized').indexOf('{"')===0||jQuery(this.el).find('.cff_resized_image_data').attr('data-resized').indexOf('[')===0)){ var rawResized=JSON.parse(jQuery(this.el).find('.cff_resized_image_data').attr('data-resized')), organizedResized={}; jQuery.each(rawResized,function(index,value){ organizedResized[value.facebook_id]={ id: value.media_id, sizes: JSON.parse(value.sizes), aspect: value.aspect_ratio }}); this.resizedImages=organizedResized; } jQuery(this.el).find('.cff_resized_image_data').remove(); }, sendNeedsResizingToServer: function(){ var feed=this; if(feed.needsResizing.length > 0&&feed.settings.resizingEnabled){ var itemOffset=jQuery(this.el).find('.cff-item').length; if(!feed.settings.consentGiven && !feed.settings.overrideBlockCDN){ if(typeof jQuery(this.el).find('.cff-lightbox-link').attr('data-cff-lightbox')!=='undefined'){ jQuery(this.el).find('.cff-lightbox-link').attr('data-x-cff-lightbox',jQuery(this.el).find('.cff-lightbox-link').attr('data-cff-lightbox')); jQuery(this.el).find('.cff-lightbox-link').removeAttr('data-cff-lightbox'); }} var submitData={ action: 'cff_resized_images_submit', needs_resizing: feed.needsResizing, offset: itemOffset, feed_id: feed.settings.feedID, atts: feed.settings.shortCodeAtts, pag_url: feed.pag_url, location: feed.locationGuess(), post_id: feed.settings.postID, }; var onSuccess=function(data){ feed.needsResizing=[]; if(data.trim().indexOf('{')===0){ var response=JSON.parse(data); if(feed.settings.debugEnabled){ console.log(response); } if(typeof response.resizing!=='undefined'){ var resized=response.resizing; for (var property in resized){ if(resized.hasOwnProperty(property)){ feed.resizedImages[property]=resized[property]; }} feed.maybeRaiseImageResolution(); if(typeof jQuery(feed.el).find('.cff-lightbox-link').attr('data-x-cff-lightbox')!=='undefined'){ jQuery(feed.el).find('.cff-lightbox-link').attr('data-cff-lightbox',jQuery(feed.el).find('.cff-lightbox-link').attr('data-x-cff-lightbox')); jQuery(feed.el).find('.cff-lightbox-link').removeAttr('data-x-cff-lightbox'); } setTimeout(function(){ feed.afterResize(); },500); }} }; cffAjax(submitData,onSuccess); }else if(feed.settings.locator){ var submitData={ action: 'cff_do_locator', feed_id: feed.settings.feedID, atts: feed.settings.shortCodeAtts, location: feed.locationGuess(), post_id: feed.settings.postID }; var onSuccess=function(data){ }; cffAjax(submitData,onSuccess); }}, hasTargetElement: function($cffItem){ var $target=$cffItem; if($cffItem.find('.cff-photo').length){ $target=$cffItem.find('.cff-photo'); }else if($cffItem.find('.cff-poster').length){ $target=$cffItem.find('.cff-poster'); }else if($cffItem.find('.cff-link-slider-slides').length){ $target=$cffItem.find('.cff-link-slider-slides'); }else if($cffItem.find('.cff-img-wrap').length){ $target=$cffItem.find('.cff-img-wrap'); }else if($cffItem.find('.cff-album-cover').length){ $target=$cffItem.find('.cff-album-cover'); }else if($cffItem.find('.cff-link').length){ $target=$cffItem.find('.cff-link'); } return typeof $target.attr('data-img-src-set')!=='undefined'; }, getTargetElement: function($cffItem){ var $target=$cffItem.find('.cff-photo'); if($cffItem.find('.cff-poster').length){ $target=$cffItem.find('.cff-poster'); }else if($cffItem.find('.cff-link-slider-slides').length){ $target=$cffItem.find('.cff-link-slider-item'); }else if($cffItem.find('.cff-img-wrap').length){ $target=$cffItem.find('.cff-img-wrap'); }else if($cffItem.find('.cff-album-cover').length){ $target=$cffItem.find('.cff-album-cover'); }else if($cffItem.find('.cff-link').length){ $target=$cffItem.find('.cff-link'); } return $target; }, getTargetElementImage: function($targetItem){ if($targetItem.find('img').length){ return $targetItem.find('img'); }else{ return $targetItem; }}, getTargetWidth: function($imgWrapItem,$item,index){ var width=50, newWidth=0; if($item.find('.cff-multi-image').length > 2&&index > 0){ newWidth=$item.innerWidth() / 3; }else if($item.closest('.cff-masonry').length){ newWidth=$item.innerWidth(); }else if($imgWrapItem.closest('.cff-item').find('.cff-link-slider').length){ newWidth=$imgWrapItem.closest('.cff-item').find('.cff-link-slider').width(); }else if($imgWrapItem.closest('.cff-media-wrap').length && !$imgWrapItem.closest('.cff-thumb-layout').length && !$imgWrapItem.closest('.cff-half-layout').length){ newWidth=$imgWrapItem.closest('.cff-media-wrap').width(); }else{ newWidth=$imgWrapItem.innerWidth(); } return Math.max(width,newWidth); }, maybeRaiseSingleImageResolution: function ($item, index, forceChange){ var feed=this, $target=feed.getTargetElement($item), imgSrcSet=feed.getImageUrls($item,$target); $target.each(function(i){ var $imgWrapItem=jQuery(this), $targetImageElement=feed.getTargetElementImage($imgWrapItem), currentUrl=$targetImageElement.attr('src'), currentRes=typeof $imgWrapItem.attr('data-current')==='undefined' ? 0:parseInt($imgWrapItem.attr('data-current')), neededRes=feed.getTargetWidth($imgWrapItem,$item,i), changeToRes=false; if(currentRes < neededRes&&typeof imgSrcSet[i]!=='undefined'){ var foundBestRes=false; jQuery.each(imgSrcSet[i], function (ii, value){ if(! foundBestRes&&ii > currentRes){ changeToRes=ii; if(ii >=neededRes){ foundBestRes=true; }} }); } if(!feed.settings.consentGiven){ var $lightboxAnchor=false; if($imgWrapItem.find('a[data-cff-lightbox]').length){ $lightboxAnchor=$imgWrapItem.find('a[data-cff-lightbox]'); }else if($imgWrapItem.closest('.cff-item').find('a[data-cff-lightbox]').length){ $lightboxAnchor=$imgWrapItem.closest('.cff-item').find('a[data-cff-lightbox]'); } if($imgWrapItem.find('area[data-cff-lightbox]').length){ $lightboxAnchor=$imgWrapItem.find('area[data-cff-lightbox]'); }else if($imgWrapItem.closest('.cff-item').find('area[data-cff-lightbox]').length){ $lightboxAnchor=$imgWrapItem.closest('.cff-item').find('area[data-cff-lightbox]'); } if($lightboxAnchor){ if($lightboxAnchor.parent('div').hasClass('cff-html5-video')){ $lightboxAnchor.attr('href',$lightboxAnchor.parent('.cff-html5-video').attr('data-cff-video-link')); }else{ $lightboxAnchor.attr('href',feed.getMaxResImage(imgSrcSet,i)); }} } if(changeToRes){ currentRes=changeToRes; if(feed.settings.debugEnabled){ var reason=currentUrl===feed.placeholderURL ? 'was placeholder':'too small'; } $imgWrapItem.attr('data-current',changeToRes); var newUrl=imgSrcSet[i][changeToRes]; if(newUrl!==currentUrl){ $targetImageElement.attr('src', newUrl); if($imgWrapItem.hasClass('imgLiquid_ready')){ $imgWrapItem.css('background-image', 'url("' + newUrl + '")'); $imgWrapItem.imgLiquid({fill:true}); } feed.processNewImage($imgWrapItem); if(currentRes < 720&&$item.hasClass('cff-album-item')&&! $targetImageElement.hasClass('cff-secondary-check')){ $targetImageElement.addClass('cff-secondary-check'); $targetImageElement.on('load',function(){ if(!jQuery(this).hasClass('cff-secondary-checked')){ jQuery(this).addClass('cff-secondary-checked'); var imagEl=$targetImageElement.get(0), height=imagEl.naturalHeight, aspectRatio=imagEl.naturalWidth/imagEl.naturalHeight; if($targetImageElement.innerWidth() > height){ neededRes=feed.getTargetWidth($imgWrapItem,$item,i) * aspectRatio; if(parseInt(currentRes) < neededRes){ foundBestRes=false; jQuery.each(imgSrcSet[i], function (ii, value){ if(! foundBestRes&&ii > currentRes){ changeToRes=ii; if(ii >=neededRes){ foundBestRes=true; }} }); if(changeToRes){ $imgWrapItem.attr('data-current', changeToRes); var newUrl=imgSrcSet[i][changeToRes]; if(newUrl!==currentUrl){ $targetImageElement.attr('src', newUrl); if($imgWrapItem.hasClass('imgLiquid_ready')){ $imgWrapItem.css('background-image', 'url("' + newUrl + '")'); $imgWrapItem.imgLiquid({fill:true}); } feed.processNewImage($imgWrapItem); }} }} }}); }} } $targetImageElement.on('error', function (){ if(!jQuery(this).hasClass('cff-img-error')){ jQuery(this).addClass('cff-img-error'); var newUrl=typeof jQuery(this).attr('data-orig-source')!=='undefined' ? jQuery(this).attr('data-orig-source'):false; if(newUrl&&newUrl!==currentUrl){ $targetImageElement.attr('src', newUrl); if($imgWrapItem.hasClass('imgLiquid_ready')){ $imgWrapItem.css('background-image', 'url("' + newUrl + '")'); }} setTimeout(function(){ feed.afterResize(); }, 1500) }else{ console.log('unfixed error ' + jQuery(this).attr('src')); }}); }); }, maybeRaiseImageResolution: function (justNew){ var feed=this, itemsSelector=typeof justNew!=='undefined'&&justNew===true ? '.cff-item.cff-new, .cff-album-item.cff-new':'.cff-item, .cff-album-item'; jQuery(feed.el).find(itemsSelector).each(function (index){ if(!jQuery(this).hasClass('cff-num-diff-hide') && feed.hasTargetElement(jQuery(this))){ feed.maybeRaiseSingleImageResolution(jQuery(this),index); }}); }, getImageUrls: function ($item,$target){ var feed=this, srcSet={}, $srcSetItem=false, id=$item.attr('id').replace('cff_', ''); if(typeof $target.attr('data-img-src-set')!=='undefined'){ $srcSetItem=$target; }else if(typeof $item.find('.cff-photo').attr('data-img-src-set')!=='undefined'){ $srcSetItem=$item.find('.cff-photo'); }else if(typeof $item.find('.cff-link-slider-slides').attr('data-img-src-set')!=='undefined'){ $srcSetItem=$item.find('.cff-link-slider-slides'); }else if(typeof $item.find('.cff-album-cover').attr('data-img-src-set')!=='undefined'){ $srcSetItem=$item.find('.cff-album-cover'); } if($srcSetItem){ srcSet=JSON.parse($srcSetItem.attr('data-img-src-set').replace(/\\\//g, '/')) } if(!this.settings.consentGiven&&!this.settings.overrideBlockCDN){ jQuery.each(srcSet,function(index,value){ srcSet[index]={};}); } var returnSrcSet=srcSet; if(typeof feed.resizedImages[id]==='undefined'&&id.indexOf('_')===-1){ id=$item.attr('data-page-id') + '_' + id; } if(typeof feed.resizedImages[id]!=='undefined' && feed.resizedImages[id].id!=='pending' && feed.resizedImages[id].id!=='error'){ jQuery.each(srcSet,function(index,value){ if(feed.settings.consentGiven){ returnSrcSet[index]={}; var apiSourceSet=JSON.parse($srcSetItem.attr('data-img-src-set').replace(/\\\//g, '/')); jQuery.each(apiSourceSet[index],function(index2,value2){ if(index2 > 700 || index2 < 220){ returnSrcSet[index][index2]=value2; }}); } jQuery.each(feed.resizedImages[id].sizes,function(index2,value2){ returnSrcSet[index][value2]=window.cffOptions.resized_url+feed.resizedImages[id].id+'-'+index+'-'+value2+'.jpg'; }); }); }else if(typeof this.resizedImages[id]==='undefined' || (typeof this.resizedImages[id]['id']!=='undefined'&&this.resizedImages[id]['id']!=='pending'&&this.resizedImages[id]['id']!=='error')){ var hasMediumSize=false; jQuery.each(returnSrcSet[0],function(resolution){ if(parseInt(resolution) > 150&&parseInt(resolution) < 500){ hasMediumSize=true; }}); if(feed.settings.gdpr){ hasMediumSize=false; } if(!hasMediumSize){ this.addToNeedsResizing(id); }} return returnSrcSet; }, addToNeedsResizing: function (id){ if(this.needsResizing.indexOf(id)===-1){ this.needsResizing.push(id); }}, processNewImage: function($item){ var feed=this; $item.find('img').each(function(){ if(!jQuery(this).prop('complete')){ feed.imagesWaiting++; jQuery(this).addClass('cff-image-loading').on('load',function(){ jQuery(this).removeClass('cff-image-loading'); feed.imagesWaiting--; if(feed.imagesWaiting < 1){ feed.afterResize(); }}); jQuery(this).on('error',function(){ jQuery(this).removeClass('cff-image-loading'); feed.imagesWaiting--; if(feed.imagesWaiting < 1){ feed.afterResize(); }}); }}); }, getMaxResImage: function(imgSrcSet,index){ if(typeof imgSrcSet[index]==='undefined'){ return false; } var largest=0, largestImage=false; jQuery.each(imgSrcSet[index], function (index, value){ if(index > largest){ largest=index; largestImage=value.toString(); }}); return largestImage; }, lazyLoadCheck: function($item){ var feed=this, $target=feed.getTargetElement($item), imgSrcSet=feed.getImageUrls($item,$target); if(!$item.closest('.cff').hasClass('cff-no-ll-check')){ $item.find('img').each(function(index){ if(typeof jQuery(this).attr('data-src')!=='undefined'){ jQuery(this).attr('data-src',jQuery(this).attr('data-orig-source')); } if(typeof jQuery(this).attr('data-orig-src')!=='undefined'){ jQuery(this).attr('data-orig-src',jQuery(this).attr('data-orig-source')); } if(!feed.settings.consentGiven){ jQuery(this).removeAttr('data-orig-source'); maxResImage=feed.getMaxResImage(imgSrcSet,index); if(maxResImage&&maxResImage.indexOf('scontent')===-1){ jQuery(this).attr('data-orig-source',maxResImage); }} jQuery(this).on('load',function(){ if(!jQuery(this).hasClass('cff-replaced') && jQuery(this).attr('src').indexOf('placeholder') > -1){ jQuery(this).addClass('cff-replaced'); var origSource=typeof jQuery(this).attr('data-orig-source')!=='undefined' ? jQuery(this).attr('data-orig-source'):false; if(origSource){ jQuery(this).attr('src',jQuery(this).attr('data-orig-source')); if(jQuery(this).closest('.imgLiquid_bgSize').length){ jQuery(this).closest('.imgLiquid_bgSize').css('background-image', 'url(' + origSource + ')'); }} }}); }); }}, maybeRelayoutMasonry: function(){ var $cff=jQuery(this.el); if($cff.hasClass('cff-masonry-js')&&!$cff.hasClass('cff-masonry-css')){ var cff_delay=(function (){ var cff_timer=0; return function (cff_callback, cff_ms){ clearTimeout(cff_timer); cff_timer=setTimeout(cff_callback, cff_ms); };})(); cff_delay(function (){ cffAddMasonry($cff); }, 500); }}, afterInitialImagesLoaded: function(){ this.maybeRaiseImageResolution(); this.sendNeedsResizingToServer(); this.maybeCleanUpNew(); if(this.settings.consentGiven){ this.addFullFeatures(); }else{ jQuery('.cff-gdpr-notice').css({'display':'inline-block'}); }}, afterResize: function (){ this.maybeRaiseImageResolution(); this.maybeRelayoutMasonry(); }, afterLoadMoreClicked: function(){ this.maybeRaiseImageResolution(); this.addFullFeatures(); }, maybeCleanUpNew: function(){ var feed=this, $cff=jQuery(this.el); setTimeout(function(){ if(feed.index > 0){ $cff.find('.cff-new').removeClass('cff-new'); } $cff.find('img').each(function(){ if(feed.settings.consentGiven&&!jQuery(this).hasClass('cff-image-loading') &&(jQuery(this).attr('src')!=null&&jQuery(this).attr('src')!=undefined)&&jQuery(this).attr('src').indexOf('placeholder.png') > -1){ console.log('lazy load correction'); var $self=jQuery(this), currentSrc=$self.attr('src'), originalSrc=$self.attr('data-orig-source'); if(originalSrc!=currentSrc){ $self.attr('src', originalSrc); } if($self.hasClass('cff-multi-image')){ $self.css('background-image', 'url(' + originalSrc + ')'); }} }); },1250); }, checkConsent: function(){ if(this.settings.consentGiven||!this.settings.gdpr){ return true; } if(typeof CLI_Cookie!=="undefined"){ if(CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)!==null){ if(CLI_Cookie.read('cookielawinfo-checkbox-non-necessary')!=='null'){ this.settings.consentGiven=CLI_Cookie.read('cookielawinfo-checkbox-non-necessary')==='yes'; } if(CLI_Cookie.read('cookielawinfo-checkbox-necessary')!=='null'){ this.settings.consentGiven=CLI_Cookie.read('cookielawinfo-checkbox-necessary')==='yes'; }} }else if(typeof window.cnArgs!=="undefined"){ var value="; " + document.cookie, parts=value.split('; cookie_notice_accepted='); if(parts.length===2){ var val=parts.pop().split(';').shift(); this.settings.consentGiven=(val==='true'); }}else if(typeof window.cookieconsent!=='undefined'){ this.settings.consentGiven=cffCmplzGetCookie('complianz_consent_status')==='allow'; }else if(typeof window.Cookiebot!=="undefined"){ this.settings.consentGiven=Cookiebot.consented; }else if(typeof window.BorlabsCookie!=='undefined'){ this.settings.consentGiven=window.BorlabsCookie.checkCookieConsent('facebook'); } var evt=jQuery.Event('cffcheckconsent'); evt.feed=this; jQuery(window).trigger(evt); return this.settings.consentGiven; }, afterConsentToggled: function(){ if(this.checkConsent()){ var feed=this; feed.maybeRaiseImageResolution(); this.addFullFeatures(); setTimeout(function(){ feed.afterResize(); },500); }}, locationGuess: function($cff=false){ var $feed=($cff==false) ? jQuery(this.el):$cff, location='content'; if($feed.closest('footer').length){ location='footer'; }else if($feed.closest('.header').length || $feed.closest('header').length){ location='header'; }else if($feed.closest('.sidebar').length || $feed.closest('aside').length){ location='sidebar'; } return location; }}; function cffAjax(submitData, onSuccess){ jQuery.ajax({ url: cffajaxurl, type: 'post', data: submitData, success: onSuccess }); } function cffCmplzGetCookie(cname){ var name=cname + "="; var cArr=window.document.cookie.split(';'); for (var i=0; i < cArr.length; i++){ var c=cArr[i].trim(); if(c.indexOf(name)==0) return c.substring(name.length, c.length); } return ""; } function cff_init($cff){ jQuery('.cff-nojs').removeClass('cff-nojs'); var cffTouchDevice=false; if(cffIsTouchDevice()===true) cffTouchDevice=true; function cffIsTouchDevice(){ return true==("ontouchstart" in window||window.DocumentTouch&&document instanceof DocumentTouch); } var firsttime=false; if(typeof $cff==='undefined'){ $cff=jQuery('.cff'); firsttime=true; } (function($){ jQuery(document).off('click', '#cff a.cff-view-comments').on('click', '#cff a.cff-view-comments', function(){ var $self=jQuery(this), $commentsBox=$self.closest('.cff-item').find('.cff-comments-box'); $self.toggleClass('cff-open'); $commentsBox.slideToggle(300); var $feed=$self.closest('#cff'), $item=$(this).closest('.cff-item'); if($feed.hasClass('cff-masonry-js')&&!$feed.hasClass('cff-opaque-comments')){ setTimeout(function(){ cffAddMasonry($feed); }, 500); } $commentsBox.find('.cff-comment:visible').each(function(){ var $thisComment=jQuery(this); var consentGiven=(typeof window.cff!=='undefined'&&typeof window.cff.feeds!=='undefined') ? window.cff.feeds[0].settings.consentGiven:true; if(consentGiven){ $thisComment.find('.cff-comment-img:not(.cff-comment-reply-img) a, .cff-comment-img:not(.cff-comment-reply-img) span').html('Avatar'); }}); }); var cffAnimateIconColorVar, stopAnimate=false; $cff.find('.cff-view-comments').on('mouseenter', function(){ var $self=$(this), time=50; if($self.hasClass('cff-open')) return; $self.find('.cff-icon').each(function(){ var $cffIcon=jQuery(this); cffAnimateIconColor($cffIcon, time); time +=50; }); }).on('mouseleave', function(){ cffStopAnimateIconColor(); $(this).find('.cff-icon').removeClass('cff-animate'); }); function cffAnimateIconColor($cffIcon, time){ stopAnimate=false; cffAnimateIconColorVar=setTimeout(function(){ if(!stopAnimate) $cffIcon.addClass('cff-animate'); }, time); } function cffStopAnimateIconColor(){ clearTimeout(cffAnimateIconColorVar); stopAnimate=true; } if(typeof cffsiteurl==='undefined'||cffsiteurl=='') cffsiteurl=window.location.host + '/wp-content/plugins'; var locatefile=true; var metaArr={}, newMetaArr={}, metaArray=[]; var lb=0; jQuery('#cff.cff-lb').each(function(){ lb++; $(this).attr('data-cff-lb', lb); }); var $cff_post_selector=$cff.find('.cff-item.cff-new, .cff-album-item.cff-new'); if(firsttime){ $cff_post_selector=jQuery('#cff .cff-item.cff-new, #cff .cff-album-item.cff-new'); } $cff_post_selector.each(function(){ var $self=jQuery(this); if($self.find('.cff-viewpost-link, .cff-viewpost-facebook, .cff-viewpost').parent('p').length){ if(!$self.hasClass('event')) $self.find('.cff-viewpost-link, .cff-viewpost-facebook, .cff-viewpost').unwrap('p'); } if($self.find('.cff-photo').parent('p').length){ $self.find('p .cff-photo').unwrap('p'); $self.find('.cff-album-icon').appendTo('.cff-photo:last'); } if($self.find('.cff-event-thumb').parent('p').length){ $self.find('.cff-event-thumb').unwrap('p'); } if($self.find('.cff-vidLink').parent('p').length){ $self.find('.cff-vidLink').unwrap('p'); } if($self.find('.cff-link').parent('p').length){ $self.find('.cff-link').unwrap('p'); } if($self.find('.cff-viewpost-link').parent('p').length){ $self.find('.cff-viewpost-link').unwrap('p'); } if($self.find('.cff-viewpost-facebook').parent('p').length){ $self.find('.cff-viewpost-facebook').unwrap('p'); } if($self.find('iframe').parent('p').length){ $self.find('iframe').unwrap('p'); } if($self.find('.cff-author').parent('p').length){ $self.find('.cff-author').eq(1).unwrap('p'); $self.find('.cff-author').eq(1).remove(); } if($self.find('.cff-view-comments').parent('p').length){ $self.find('.cff-meta-wrap > p').remove(); $self.find('.cff-view-comments').eq(1).remove(); var $cffMeta=$self.find('.cff-meta'), cffMetaClasses=$cffMeta.attr('class'); $cffMeta.find('.cff-view-comments').unwrap().wrapInner('
    '); } if($self.find('.cff-photo').siblings('.cff-photo').length){ $self.find('.cff-photo').slice(0,2).remove(); } if($('.cff-author-img').parent().is('p')) $('.cff-author-img').unwrap('p'); $self.find('p:empty').not('.cff-comments-box p').remove(); var expanded=false; if($self.hasClass('cff-event')){ var $post_text=$self.find('.cff-desc .cff-desc-text'), text_limit=$post_text.parent().attr('data-char'); }else{ var $post_text=$self.find('.cff-post-text .cff-text'), text_limit=$self.closest('#cff').attr('data-char'); } if(typeof text_limit==='undefined'||text_limit=='') text_limit=99999; if($post_text.find('a.cff-post-text-link').length) $post_text=$self.find('.cff-post-text .cff-text a'); var full_text=$post_text.html(); if(full_text==undefined) full_text=''; var cff_trunc_regx=new RegExp(/(<[^>]*>)/g); var cff_trunc_counter=0; full_text_arr=full_text.split(cff_trunc_regx); for (var i=0, len=full_text_arr.length; i < len; i++){ if(!(cff_trunc_regx.test(full_text_arr[i]))){ if(cff_trunc_counter==text_limit){ full_text_arr.splice(i, 1); continue; } cff_trunc_counter=cff_trunc_counter + full_text_arr[i].length; if(cff_trunc_counter > text_limit){ var diff=cff_trunc_counter - text_limit; full_text_arr[i]=full_text_arr[i].slice(0, -diff); cff_trunc_counter=text_limit; if(full_text.length > text_limit) $self.find('.cff-expand').show(); }} } var short_text=full_text_arr.join(''); short_text=short_text.replace(/(<(?!\/)[^>]+>)+(<\/[^>]+>)/g, ""); var lastChar=short_text.substr(short_text.length - 1); if(lastChar=='<') short_text=short_text.substring(0, short_text.length - 1); short_text=short_text.replace(/(
    \s*)+$/,''); short_text=short_text.replace(/(\s*)+$/,''); $post_text.html(short_text); $self.find('.cff-expand a').off('click').on('click', function(e){ e.preventDefault(); var $expand=jQuery(this), $more=$expand.find('.cff-more'), $less=$expand.find('.cff-less'); if(expanded==false){ $post_text.html(full_text); expanded=true; $more.hide(); $less.show(); }else{ $post_text.html(short_text); expanded=false; $more.show(); $less.hide(); } cffLinkHashtags(); $post_text.find('a').attr('target', '_blank'); if($self.closest('.cff').hasClass('cff-masonry-js')&&!$self.closest('.cff').hasClass('cff-masonry-css')){ cffAddMasonry($cff); }}); $post_text.find('a').add($self.find('.cff-post-desc a')).attr({ 'target':'_blank', 'rel':'nofollow noopener noreferrer' }); var post_id=$self.attr('id').substring(4), post_id_orig=$self.find('.cff-view-comments').attr('id'); if(locatefile!=true) $self.find('.cff-lightbox-thumbs-holder').css('min-height', 0); jQuery(document).off('click', '#cff .cff-show-more-comments, .cff-lightbox-sidebar .cff-show-more-comments').on('click', '#cff .cff-show-more-comments, .cff-lightbox-sidebar .cff-show-more-comments', function(){ var $cffMoreCommentsLink=jQuery(this), thisCommentsTotal=parseInt($cffMoreCommentsLink.attr('data-cff-comments-total')); if($cffMoreCommentsLink.hasClass('cff-clicked')&&thisCommentsTotal > 25){ $cffMoreCommentsLink.find('a').attr({ 'href':$cffMoreCommentsLink.closest('.cff-comments-box').find('.cff-comment-on-facebook a').attr('href'), 'target':'_blank' }); } if(thisCommentsTotal <=25) $cffMoreCommentsLink.hide(); $cffMoreCommentsLink.addClass('cff-clicked'); $cffMoreCommentsLink.parent().find('.cff-comment').show().each(function(){ var $thisComment=jQuery(this); var consentGiven=(typeof window.cff!=='undefined'&&typeof window.cff.feeds!=='undefined') ? window.cff.feeds[0].settings.consentGiven:true; if(consentGiven){ $thisComment.find('.cff-comment-img:not(.cff-comment-reply-img) a, .cff-comment-img:not(.cff-comment-reply-img) span').html('Avatar'); }}); var $closestCff=$cffMoreCommentsLink.closest('.cff'); if($closestCff.hasClass('cff-masonry-js')&&!$closestCff.hasClass('cff-opaque-comments')){ setTimeout(function(){ cffAddMasonry($closestCff); }, 500); }}); if($self.hasClass('cff-timeline-event')||$self.hasClass('cff-event')){ if($(this).find('.cff-date .cff-start-date k').text()!==$(this).find('.cff-date .cff-end-date k').text()) $(this).find('.cff-date .cff-end-date k').show(); } var $cffPhotoImg=$self.find('.cff-photo img, .cff-event-thumb img, .cff-poster, .cff-album-cover img'), cffPhotoImgSrc=$cffPhotoImg.attr('src'), cffImgStringAttr=$cffPhotoImg.attr('data-querystring'); if(typeof cffPhotoImgSrc=='undefined') cffPhotoImgSrc=''; if(cffPhotoImgSrc.indexOf('i0.wp.com') > -1||cffPhotoImgSrc.indexOf('i1.wp.com') > -1||cffPhotoImgSrc.indexOf('i2.wp.com') > -1||cffPhotoImgSrc.indexOf('i3.wp.com') > -1||cffPhotoImgSrc.indexOf('i4.wp.com') > -1||cffPhotoImgSrc.indexOf('i5.wp.com') > -1){ var photonSrc=$cffPhotoImg.attr('src').substring(0, $cffPhotoImg.attr('src').indexOf('?')), newSrc=photonSrc.replace('http://', 'https:/').replace(/i0.wp.com|i1.wp.com|i2.wp.com|i3.wp.com|i4.wp.com|i5.wp.com/gi, '') + '?' + cffImgStringAttr; $cffPhotoImg.attr('src', newSrc); } function cffLinkHashtags(){ var cffTextStr=$self.find('.cff-text').html(), cffDescStr=$self.find('.cff-post-desc').html(), regex=/(^|\s)#(\w*[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]+\w*)/gi, linkcolor=$self.find('.cff-text').attr('data-color'), linkcolorHTML=''; function replacer(hash){ var replacementString=jQuery.trim(hash); if(/^#[0-9A-F]{6}$/i.test(replacementString)){ return replacementString; }else{ if(typeof linkcolor!=='undefined'){ if(linkcolor.length > 1) linkcolorHTML='style="color:#' + linkcolor + '"'; } return ' ' + replacementString + ''; }} if(typeof cfflinkhashtags=='undefined') cfflinkhashtags='true'; if(cfflinkhashtags=='true'){ var $cffText=$self.find('.cff-text'); if($cffText.length > 0){ cffTextStr=cffTextStr.replace(/
    /g, "
    "); $cffText.html(cffTextStr.replace(regex , replacer)); }} if($self.find('.cff-post-desc').length > 0) $self.find('.cff-post-desc').html(cffDescStr.replace(regex , replacer)); } cffLinkHashtags(); $self.find('.cff-text a').attr('target', '_blank'); if($self.closest('#cff').hasClass('cff-lb')){ $self.find('.cff-photo, .cff-album-cover, .cff-event-thumb, .cff-html5-video, .cff-iframe-wrap').each(function(){ var $photo=$(this), postId=post_id, cffLightboxTitle='', cffShowThumbs=false, postType='', cffgroupalbums=''; cffShowThumbs=true; function cffFormatCaption(text){ return String(text).replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"').replace(/\n/g, "
    "); } if($self.hasClass('cff-albums-only')){ postType='albumsonly'; cffLightboxTitle=cffFormatCaption($self.find('img').attr('alt')); var dataGroup=$self.closest('#cff').attr('data-group'); if(typeof dataGroup!=='undefined') cffgroupalbums='data-cffgroupalbums="true"'; }else if($self.hasClass('cff-timeline-event')){ var capText=''; if($self.find('.cff-author-text .cff-page-name').length) capText +=$self.find('.cff-author-text .cff-page-name').text() + '

    '; if(full_text.length > 5) capText +=full_text; cffLightboxTitle=cffFormatCaption(capText); }else if($self.hasClass('cff-event')){ if($self.find('.cff-details').length){ if($self.find('.cff-event-title').length) cffLightboxTitle='' + cffFormatCaption($self.find('.cff-event-title').html() + ''); if($self.find('.cff-date').length) cffLightboxTitle +='' + cffFormatCaption($self.find('.cff-date').html() + ''); if($self.find('.cff-location').length) cffLightboxTitle +='' + cffFormatCaption($self.find('.cff-location').html() + ''); cffLightboxTitle +='' + full_text + ''; }}else if($self.hasClass('cff-album-item')){ cffLightboxTitle=cffFormatCaption($self.find('img').attr('alt')); }else{ var lb_title=full_text; if(full_text.trim()=='') lb_title=$self.find('.cff-post-desc').text(); if(lb_title==''&&$self.find('.cff-author .cff-story').length) lb_title=$self.find('.cff-author .cff-page-name').text(); if(lb_title=='') lb_title=' '; cffLightboxTitle=cffFormatCaption(lb_title); } if(cffLightboxTitle.length > 1) cffLightboxTitle=cffLightboxTitle.replace(/"/g, '"'); var cffLightboxTile='
    View
    '; $photo.prepend(cffLightboxTile); if(!cffTouchDevice){ $photo.on('mouseenter', function(){ $self.find('.cff-photo-hover').fadeIn(150); }).on('mouseleave', function(){ $self.find('.cff-photo-hover').stop().fadeOut(500); }); }}); } $self.find('.cff-share-link').off('click').on('click', function(e){ e.preventDefault(); var $cffShareTooltip=$self.find('.cff-share-tooltip') if($cffShareTooltip.is(':visible')){ $cffShareTooltip.hide().find('a').removeClass('cff-show'); }else{ $cffShareTooltip.show(); var time=0; $cffShareTooltip.find('a').each(function(){ var $cffShareIcon=jQuery(this); setTimeout(function(){ $cffShareIcon.addClass('cff-show'); }, time); time +=20; }); }}); if(typeof $cff.attr('data-restricted')!=='undefined'){ var cff_restricted_page=true; }else{ var cff_restricted_page=false; } if($self.hasClass('cff-album-item')){ var cff_data_full_size=$self.attr('data-cff-full-size'); if(typeof cff_data_full_size!=='undefined'&&cff_data_full_size!=''){ if(cff_restricted_page){ $self.find('.cff-lightbox-link').attr('href', cff_data_full_size).closest('.cff-album-cover').css('background-image', 'url('+cff_data_full_size+')'); $self.find('img').attr('src', cff_data_full_size); }else{ $self.find('.cff-lightbox-link').attr('href', cff_data_full_size); }} } if(( $self.find('.cff-html5-video').length||$self.hasClass('cff-video'))){ var cff_live_video=false; if($self.find('.cff-html5-video').length){ var $vid_sel=$self.find('.cff-html5-video'); if($vid_sel.attr('data-cff-live')=='true') cff_live_video=true; } if($self.hasClass('cff-video')) var $vid_sel=$self; if(cff_live_video&&$(window).width() <=640){ }else{ if(!$self.closest('.cff').hasClass('cff-private-group')){ if($vid_sel.attr('data-cff-video-player')!='standard'){ $self.find('.cff-lightbox-link').attr({ 'data-iframe':'https://www.facebook.com/v2.3/plugins/video.php?href=' + $vid_sel.attr('data-cff-video-link'), 'data-video':'' }); }} }} setTimeout(function(){ $self.find('.cff-iframe-wrap .fluid-width-video-wrapper iframe').unwrap().wrap('
    '); $self.find('.cff-iframe-wrap .iframe-embed iframe').unwrap('iframe-embed'); }, 500); $self.find('.cff-album-info a').on('click', function(e){ e.preventDefault(); $self.find('.cff-lightbox-link').trigger('click'); }); }); jQuery(document).off('click', '.cff-comment-replies a').on('click', '.cff-comment-replies a', function(){ cffLoadCommentReplies($(this)); }); $('.cff-wrapper').each(function(){ var $cff=$(this).find('#cff'), cff_grid_pag=$cff.attr('data-grid-pag'); var shortcode_token_param=cffGetShortcodeToken($cff); var $cffNumDiffHide=$(this).find('.cff'); if(typeof $cffNumDiffHide.attr('data-nummobile')!=='undefined'){ var num=typeof $cffNumDiffHide.attr('data-pag-num')!=='undefined'&&$cffNumDiffHide.attr('data-pag-num')!=='' ? parseInt($cffNumDiffHide.attr('data-pag-num')):1, nummobile=typeof $cffNumDiffHide.attr('data-nummobile')!=='undefined'&&$cffNumDiffHide.attr('data-nummobile')!=='' ? parseInt($cffNumDiffHide.attr('data-nummobile')):num, itemSelector=$cffNumDiffHide.find('.cff-item').length ? '.cff-item':'.cff-album-item'; if($(window).width() < 480){ if(nummobile < $cffNumDiffHide.find(itemSelector).length){ $cffNumDiffHide.find(itemSelector).slice(nummobile - $cffNumDiffHide.find(itemSelector).length).addClass('cff-num-diff-hide'); }}else{ if(num < $cffNumDiffHide.find(itemSelector).length){ $cffNumDiffHide.find(itemSelector).slice(num - $cffNumDiffHide.find(itemSelector).length).addClass('cff-num-diff-hide'); }} $cffNumDiffHide.removeAttr('data-nummobile'); } if($cff.hasClass('cff-masonry-js'&&! $cff.hasClass('cff-all-reviews'))){ if($cff.find('.cff-album-item').length){ $cff.removeClass('cff-masonry-js'); return; } cffAddMasonry($cff); setTimeout(function(){ cffAddMasonry($cff); }, 1000); $(window).on('resize', function (){ setTimeout(function(){ cffAddMasonry($cff); }, 500); }); if($cff.find('.cff-credit').length) $cff.css('padding-bottom', 30); } function cffCheckWidth(){ if($cff.hasClass('cff-album-items-feed')){ var $cffElement=$cff; }else{ var $cffElement=$cff.find('.cff-item').first(); } if($cffElement.innerWidth() < 400){ if(!$cff.hasClass('cff-disable-narrow')){ $cff.addClass('narrow'); }}else{ $cff.removeClass('narrow'); } if($cffElement.innerWidth() < 250){ $cff.addClass('cff-super-narrow'); }} cffCheckWidth(); function cffActionLinksPos(){ if($cff.find('.cff-item').first().innerWidth() < (190 + $('.cff-post-links').innerWidth())){ $cff.find('.cff-post-links').addClass('cff-left') }else{ $cff.find('.cff-post-links').removeClass('cff-left'); }} cffActionLinksPos(); var cffdelay=(function(){ var cfftimer=0; return function(cffcallback, cffms){ clearTimeout (cfftimer); cfftimer=setTimeout(cffcallback, cffms); };})(); window.addEventListener('resize', function(event){ cffdelay(function(){ cffCheckWidth(); cffActionLinksPos(); cffResizeAlbum(); }, 500); }); function cffResizeAlbum(last){ var cffAlbumWidth=$cff.find('.cff-album-item').eq(0).find('a').innerWidth(); if(!$cff.hasClass('cff-masonry')){ $cff.find('.cff-album-item a').css('height', cffAlbumWidth); } $cff.find('.cff-photo.cff-crop').css('height', $cff.find('.cff-photo.cff-crop').width()); $cff.find('.cff-item.cff-album .cff-photo.cff-multiple, .cff-video-post .cff-html5-video.cff-multiple').each(function(){ var $cffPhotoEl=$(this); var cffPhotoImgWidth=$cffPhotoEl.find('img').first().width(); if(cffPhotoImgWidth < 10) cffPhotoImgWidth=300; if($cffPhotoEl.hasClass('cff-img-layout-3')) $cffPhotoEl.find('.cff-img-attachments .cff-crop').css('height', cffPhotoImgWidth/2); if($cffPhotoEl.hasClass('cff-img-layout-4')) $cffPhotoEl.find('.cff-img-attachments .cff-crop').css('height', cffPhotoImgWidth/3); if($cffPhotoEl.is('.cff-img-layout-3, .cff-img-layout-4')){ var $cffMainImage=$cffPhotoEl.find('.cff-main-image'), cropPercentage=0.6; if($cffPhotoEl.hasClass('cff-img-layout-4')) cropPercentage=0.8; var cffImageHeight=Math.round(cffPhotoImgWidth / $cffMainImage.find('img').attr('data-ratio')); $cffMainImage.css('height', Math.round(Math.max(cffImageHeight*cropPercentage, $cffPhotoEl.find('.cff-img-attachments').height()))); }else if($cffPhotoEl.is('.cff-img-layout-2')){ var $cffCrop=$cffPhotoEl.find('.cff-img-wrap.cff-crop'); if($cffPhotoEl.hasClass('cff-portrait')){ $cffPhotoEl.find('.cff-img-wrap.cff-crop').css('height', $cffPhotoEl.width()*0.8); }else{ $cffPhotoEl.find('.cff-img-wrap.cff-crop').css('height', $cffPhotoEl.width()/2); }} if(last==true&&($cffPhotoEl.is('.cff-img-layout-3')||$cffPhotoEl.is('.cff-img-layout-4'))&&$cffPhotoEl.find('.cff-main-image').height() < 10) $cffPhotoEl.find('.cff-img-layout-3 .cff-main-image img, .cff-img-layout-4 .cff-main-image img').css({ 'display':'block', 'visibility':'visible' }) if(cffPhotoImgWidth < 200){ $cffPhotoEl.addClass('cff-small-layout'); }else{ $cffPhotoEl.removeClass('cff-small-layout'); }}); } cffResizeAlbum(false); setTimeout(function(){ cffResizeAlbum(false); }, 50); setTimeout(function(){ cffResizeAlbum(true); }, 500); setTimeout(function(){ cffResizeAlbum(true); }, 1500); var num_events=parseInt($cff.attr('data-pag-num')), show_events=num_events; $cff.find('.cff-event').slice(0, num_events).css('display', 'inline-block'); if($cff.hasClass('cff-all-reviews')){ var num_reviews=parseInt($cff.attr('data-pag-num')), show_reviews=num_reviews; var review_offset=parseInt($cff.attr('data-offset')); if(typeof review_offset=='undefined'||isNaN(review_offset)) review_offset=0; $cff.find('.cff-review').slice(0, num_reviews + review_offset).css('display', 'inline-block'); if(review_offset > 0) $cff.find('.cff-review').slice(0, review_offset).remove(); if($cff.hasClass('cff-masonry-js')){ cffAddMasonry($cff); setTimeout(function(){ cffAddMasonry($cff); }, 1000); $(window).on('resize', function (){ setTimeout(function(){ cffAddMasonry($cff); }, 500); }); if($cff.find('.cff-credit').length) $cff.css('padding-bottom', 30); }} var $cffLoadMore=$cff.find('#cff-load-more'), cff_no_posts_added=$cff.find('.cff-load-more').attr('data-cff-no-posts-added'); if(typeof cff_no_posts_added==typeof undefined||cff_no_posts_added==false){ $cffLoadMore.attr('data-cff-no-posts-added', 'false'); } if($cff.find('.cff-item, .cff-album-item').length < 1) $cffLoadMore.attr('data-cff-no-posts-added', 'true'); $cffLoadMore.off().on('click', function(){ var shortcodeData=$cff.attr('data-cff-shortcode'), $paginationURL=$cff.find('.cff-pag-url'), pag_url=$paginationURL.attr('data-cff-pag-url'), feed_id=$paginationURL.attr('data-transient-name'), post_id=$paginationURL.attr('data-post-id'), location=CffFeed.prototype.locationGuess($cff); var events_count=$cff.find('.cff-upcoming-event').length; if(events_count > 0){ show_events=show_events + num_events; $cff.find('.cff-upcoming-event').slice(0, show_events).css('display', 'inline-block'); if(show_events > events_count){ $cff.find('#cff-load-more').hide(); cff_no_more_posts($cff, $cffLoadMore); } if($cff.hasClass('cff-masonry-js')&&!$cff.hasClass('cff-masonry-css')){ cffAddMasonry($cff); } return; } if($cff.hasClass('cff-all-reviews')){ var reviews_count=$cff.find('.cff-review').length; if(reviews_count > 0){ show_reviews=show_reviews + num_reviews; $cff.find('.cff-review').slice(0, show_reviews).css('display', 'inline-block'); if(show_reviews > reviews_count){ $cff.find('#cff-load-more').hide(); cff_no_more_posts($cff, $cffLoadMore); } if($cff.hasClass('cff-masonry-js')&&!$cff.hasClass('cff-masonry-css')){ cffAddMasonry($cff); } return; }} $cffLoadMore.off().removeAttr('id').addClass('cff-disabled'); $paginationURL.remove(); if($cff.hasClass('cff-album-items-feed')){ var item_sel='.cff-album-item'; }else{ var item_sel='.cff-item'; } if(item_sel=='.cff-album-item'){ if((pag_url==''||pag_url=='{}')) pag_url=$paginationURL.attr('data-cff-prev-url'); var prev_urls=$paginationURL.attr('data-cff-prev-url'); var prev_urls_arr=(typeof prev_urls=='undefined') ? '':JSON.parse(prev_urls); } var pag_url_arr=(typeof pag_url=='undefined') ? '':JSON.parse(pag_url); if(item_sel=='.cff-album-item'){ for (var key in prev_urls_arr){ if(prev_urls_arr.hasOwnProperty(key)){ if(typeof pag_url_arr[key]=='undefined') pag_url_arr[key]=prev_urls_arr[key]; }} } if((pag_url==''||pag_url=='{}'||pag_url==0||pag_url=='0')&&item_sel=='.cff-item'){ $cffLoadMore.hide(); cff_no_more_posts($cff, $cffLoadMore); }else{ $cffLoadMore.addClass('cff-loading').append('
    '); $cffLoadMore.find('.cff-loader').css('background-color', $cffLoadMore.css('color')); } var cff_timeline_api_paging=false; if($cff.attr('data-timeline-pag')) cff_timeline_api_paging=true; if(cff_timeline_api_paging==true){ }else{ for (var key in pag_url_arr){ if(pag_url_arr.hasOwnProperty(key)&&key!='latest_record_date'){ var this_url=pag_url_arr[key], until_old=cffGetParameterByName('until', this_url), $last_item=$cff.find(item_sel+'.cff-' + key).last(), until_new=(parseInt($last_item.attr('data-cff-timestamp')) - 1).toString(), backdated_new=false; if(typeof $last_item.attr('data-cff-backdated')!='undefined'){ until_new=(parseInt($last_item.attr('data-cff-backdated')) - 1).toString(); } if(isNaN(parseFloat(until_new))){ $last_item=$cff.find(item_sel).last(); until_new=(parseInt($last_item.attr('data-cff-timestamp')) - 1).toString(); if(typeof $last_item.attr('data-cff-backdated')!='undefined'){ until_new=(parseInt($last_item.attr('data-cff-backdated')) - 1).toString(); }} var new_url=this_url; if($cffLoadMore.attr('data-cff-no-posts-added')=='true'){ }else{ if(item_sel!=='.cff-album-item'){ if(this_url.indexOf("until=")!==-1){ var new_url=this_url.replace("until="+until_old,"until="+until_new); }else{ var new_url=this_url + "&until="+until_new; } if(new_url.indexOf('&after=') > -1) new_url=new_url.replace("&after="+cffGetParameterByName('after', new_url),""); }} if(cff_grid_pag=='offset'){ if(item_sel=='.cff-album-item'){ if(new_url.indexOf('&after=') > -1) new_url=new_url.replace("&after="+cffGetParameterByName('after', new_url),""); key=key.replace(/(:|\.|\[|\]|,|=)/g, "\\$1"); var albumItemCount=$cff.find('.cff-album-item.cff-' + key).length + $cff.find('.cff-empty-album.cff-' + key).length; if(new_url.indexOf('&offset=') > -1){ new_url=new_url.replace("&offset="+cffGetParameterByName('offset', new_url), "&offset="+albumItemCount); }else{ new_url=new_url + "&offset=" + albumItemCount; } key=key.replace(/\\/g, ''); }} if((this_url.indexOf('/events') > -1&&this_url.indexOf('&after=') > -1)||(this_url.indexOf('/ratings') > -1&&this_url.indexOf('&after=') > -1&&$cff.hasClass('cff-all-reviews'))){ new_url=new_url.replace("&after="+cffGetParameterByName('after', new_url),""); } if(new_url.indexOf('&__paging_token') > -1){ new_url=new_url.replace("&__paging_token="+cffGetParameterByName('__paging_token', new_url),""); } pag_url_arr[key]=new_url; }} } var pageAtt=typeof $cff.attr('data-page')!=='undefined' ? $cff.attr('data-page'):1, page=parseInt(pageAtt) + 1; $cff.attr('data-page', page); pag_url=JSON.stringify(pag_url_arr); jQuery.ajax({ url:cffajaxurl, type:'post', data:{ action:'cff_get_new_posts', shortcode_data:shortcodeData, pag_url:pag_url, feed_id:feed_id, post_id:post_id, location:location, page: page }, success:function(data){ $cff.find('.cff-num-diff-hide').removeClass('cff-num-diff-hide'); if(data.indexOf('
    '+no_more_posts_text+'

    '); } if($cff.find('.cff-album-item').length){ $cff.removeClass('cff-masonry cff-masonry-js cff-masonry-css'); } $cff.find('.cff-more-dates').on('click', function(){ $(this).siblings('.cff-multiple-dates').slideToggle(100); }); }); function cffGetCommentsIDArray(){ var commentsArrayIDs=[]; $('.cff-posts-wrap').each(function(){ var wrapper=$(this); wrapper.find('.cff-item.cff-new:not(.cff-event)').each(function(){ var $self=$(this), post_id_orig=$self.find('.cff-view-comments').attr('id'), object_id=$self.closest('.cff-item').attr('data-object-id'); commentsArrayIDs.push(post_id_orig); }); }); return commentsArrayIDs; } function cffGetFeedLocatorDataArray(){ var feedLocatorData=[]; $('.cff-timeline-feed').each(function(){ $cffPagUrl=$(this).find('.cff-pag-url'); var singleFeedLocatorData={ feedID:$cffPagUrl.attr('data-feed-id'), postID:$cffPagUrl.attr('data-post-id'), shortCodeAtts:$(this).attr('data-cff-shortcode').trim()=='' ? {}:JSON.parse($(this).attr('data-cff-shortcode')), location:CffFeed.prototype.locationGuess($(this)) }; feedLocatorData.push(singleFeedLocatorData); }); return feedLocatorData; } if($('.cff-timeline-feed').length&&(typeof cffdisablecommentcaching=='undefined')){ var commentsArrayIDs=cffGetCommentsIDArray(), feedLocatorData=cffGetFeedLocatorDataArray(); var atts=typeof $cff.attr('data-cff-shortcode')!=='undefined'&&$cff.attr('data-cff-shortcode').indexOf('{')===0 ? JSON.parse($cff.attr('data-cff-shortcode')):{}; var page=typeof $cff.attr('data-page')!=='undefined' ? parseInt($cff.attr('data-page')):1; $.ajax({ url: cffajaxurl, type: 'POST', async: true, cache: false, data:{ action: 'get_meta', comments_array_ids:commentsArrayIDs, feedLocatorData:feedLocatorData, atts: atts, page: page }, success: function(data){ if(data==''||data.length < 1){ metaArr=[]; }else{ data=data.replace(/\\'/g, "'"); metaArr=JSON.parse(data); } $cff.each(function(){ $(this).find('.cff-item.cff-new:not(.cff-event)').each(function(){ var $self=$(this), post_id_orig=$self.find('.cff-view-comments').attr('id'), object_id=$self.closest('.cff-item').attr('data-object-id'); if(metaArr.hasOwnProperty(post_id_orig)&&metaArr[post_id_orig]!=""){ cffCreateComments($self, JSON.parse(metaArr[post_id_orig])['content']); cffAddFullsizeImageURLs($self, JSON.parse(metaArr[post_id_orig])['content']); }else{ cffGetMetaAPI($self, post_id_orig, object_id); }}); }); }, error: function(xhr,textStatus,e){ return; }}); }else{ $('#cff .cff-item.cff-new:not(.cff-event)').each(function(){ var $self=$(this), post_id_orig=$self.find('.cff-view-comments').attr('id'), object_id=$self.closest('.cff-item').attr('data-object-id'); cffGetMetaAPI($self, post_id_orig, object_id); }); } function cffGetMetaAPI($self, post_id_orig, object_id){ if($self.find('.cff-view-comments').length==0) return; if(typeof object_id=='undefined'||object_id.length < 2) object_id=''; var object_id_query=''+object_id, post_id_query='?post_id='+post_id_orig, use_id='object', post_comment_count=$self.find('.cff-comments .cff-count').text(), post_likes_count=$self.find('.cff-likes .cff-count').text(), cff_page_id=$self.attr('data-page-id'); if(typeof post_comment_count=='undefined'||post_comment_count=='') post_comment_count=0; if(typeof $self.attr('data-comments-js')!=='undefined'){ if(typeof post_comment_count=='undefined'||post_comment_count=='') post_comment_count=1; } if(typeof post_likes_count=='undefined'||post_likes_count=='') post_likes_count=0; if(typeof object_id=='undefined'||object_id.length < 2||$self.find('.cff-comments-box').hasClass('cff-shared-story')||$self.hasClass('cff-timeline-event')) use_id='post'; var timeline_event=''; if($self.hasClass('cff-timeline-event')) timeline_event='&timeline_event=true'; var usegrouptoken='', useowntoken=''; if($self.closest('#cff').hasClass('cff-group')) usegrouptoken='&usegrouptoken=true'; if($self.closest('#cff').attr('data-own-token')=='true') useowntoken='&useowntoken=true'; shortcode_token_param=cffGetShortcodeToken($self.closest('#cff')); var cff_is_video_post=$self.hasClass('cff-video-post') ? '&isvideo=true':''; var url=cffsiteurl + "/custom-facebook-feed-pro/query.php?o_id=" + object_id + '&post_id='+post_id_orig + '&use_id=' + use_id + timeline_event + usegrouptoken + useowntoken + '&comments_num=' + post_comment_count + '&likes_num=' + post_likes_count + '&type=meta' + cff_is_video_post + '&pageid=' + cff_page_id + shortcode_token_param; if($self.hasClass('cff-album')) url +='&timelinealbum=true'; if(locatefile==true&&typeof window.cff_block_editor==='undefined'){ var submitData={ action: 'cff_query', o_id: object_id, post_id: post_id_orig, use_id: use_id, comments_num: post_comment_count, likes_num: post_likes_count, type: 'meta', pageid: cff_page_id, }; if($self.hasClass('cff-video-post')){ submitData.isvideo=true; } if($self.hasClass('cff-timeline-event')){ submitData.timeline_event=true; } if($self.closest('#cff').hasClass('cff-group')){ submitData.usegrouptoken=true; } if($self.closest('#cff').attr('data-own-token')=='true'){ submitData.useowntoken=true; } if(shortcode_token_param!==''){ var token=shortcode_token_param.split('='); submitData.at=token[1]; } var onSuccess=function(data){ metaArray.push({'id_post':post_id_orig, 'content':data}); metaArr[ post_id_orig ]=data; newMetaArr[ post_id_orig ]=data; cffCreateComments($self, data); cffAddFullsizeImageURLs($self, data); cffSetMetaCache(metaArray); }; cffAjax(submitData,onSuccess); }} var cffSetMetaCache_executed=false; function cffSetMetaCache(newMetaArr){ if(typeof cffdisablecommentcaching!='undefined') return; if(!cffSetMetaCache_executed){ var cffTimesCached=0, cffCacheDelay=setTimeout(function(){ var cffCacheInterval=setInterval(function(){ cffCacheMeta(newMetaArr); cffTimesCached++; if(cffTimesCached==2) clearInterval(cffCacheInterval); }, 3000); cffCacheMeta(newMetaArr); }, 500); cffSetMetaCache_executed=true; } function cffCacheMeta(newMetaArr){ var jsonstring=JSON.stringify(newMetaArr); var atts=typeof $cff.attr('data-cff-shortcode')!=='undefined'&&$cff.attr('data-cff-shortcode').indexOf('{')===0 ? JSON.parse($cff.attr('data-cff-shortcode')):{}; var page=typeof $cff.attr('data-page')!=='undefined' ? parseInt($cff.attr('data-page')):1; var opts={ url: cffajaxurl, type: 'POST', async: true, cache: false, data:{ action: 'cache_meta', metadata: jsonstring, atts: atts, page: page }, success: function(response){ return; }, error: function(xhr,textStatus,e){ return; }}; $.ajax(opts); }} function cffGetParameterByName(name, url){ name=name.replace(/[\[\]]/g, "\\$&"); var regex=new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), results=regex.exec(url); if(!results) return null; if(!results[2]) return ''; return decodeURIComponent(results[2].replace(/\+/g, " ")); } function cffLinkify(inputText){ var replacedText, replacePattern1, replacePattern2, replacePattern3; replacePattern1=/(\b(https?|ftp):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gim; replacedText=inputText.replace(replacePattern1, '$1'); replacePattern2=/(^|[^\/])(www\.[\S]+(\b|$))/gim; replacedText=replacedText.replace(replacePattern2, '$1$2'); replacePattern3=/(([a-zA-Z0-9\-\_\.])+@[a-zA-Z\_]+?(\.[a-zA-Z]{2,6})+)/gim; replacedText=replacedText.replace(replacePattern3, '$1'); return replacedText; } $(document).off('click', '#cff .cff-html5-video .cff-html5-play').on('click', '#cff .cff-html5-video .cff-html5-play', function(e){ e.preventDefault(); var $self=$(this), $videoWrapper=$self.closest('.cff-html5-video'), video=$self.siblings('video')[0]; video.play(); $self.hide(); $self.siblings('.cff-poster').hide(); if(video.hasAttribute("controls")){ video.removeAttribute("controls") }else{ video.setAttribute("controls","controls") } if($videoWrapper.innerWidth() < 150&&!$videoWrapper.hasClass('cff-no-video-expand')){ $videoWrapper.css('width','100%').closest('.cff-item').find('.cff-text-wrapper').css('width','100%'); }}); function cffAddFullsizeImageURLs($self, data){ var data=JSON.parse(data); if(typeof data.images!=='undefined'&&data.images!==null) $self.find('.cff-lightbox-link').attr('href', data.images[0].source); } function cffCreateComments($self, data){ if(data.substring(0, 1)=="<") return false; var data=JSON.parse(data), cff_comments='', cff_likes_this='', commentShow=parseInt($self.find('.cff-comments-box').attr('data-num')), like_count=(typeof data.likes!=='undefined') ? data.likes.summary.total_count:0, $cffCommentsBox=$self.find('.cff-comments-box'), $cffCommentLikes=$cffCommentsBox.find('.cff-comment-likes'), cff_hide_comment_avatars=Boolean($self.find('.cff-comments-box').attr('data-cff-hide-avatars')), cff_expand_comments=Boolean($self.find('.cff-comments-box').attr('data-cff-expand-comments')), cff_translate_like_this_text=$cffCommentsBox.attr('data-cff-like-text'), cff_translate_likes_this_text=$cffCommentsBox.attr('data-cff-likes-text'), cff_translate_reacted_to_this_text=$cffCommentsBox.attr('data-cff-reacted-text'), cff_translate_and_text=$cffCommentsBox.attr('data-cff-and-text'), cff_translate_other_text=$cffCommentsBox.attr('data-cff-other-text'), cff_translate_others_text=$cffCommentsBox.attr('data-cff-others-text'), cff_translate_reply_text=$cffCommentsBox.attr('data-cff-reply-text'), cff_translate_replies_text=$cffCommentsBox.attr('data-cff-replies-text'), cff_total_comments_count=(typeof data.comments!=='undefined') ? data.comments.summary.total_count:0, cff_meta_link_color=$self.find('.cff-comments-box').attr('data-cff-meta-link-color'), cff_post_tags=Boolean($self.find('.cff-comments-box').attr('data-cff-post-tags')); if(typeof $self.attr('data-comments-js')!=='undefined'){ var comment_count=(typeof data.comments!=='undefined') ? data.comments.summary.total_count:0; $self.find('.cff-comments .cff-count').text(comment_count); } var cff_haha_count=(typeof data.haha!=='undefined') ? data.haha.summary.total_count:0; var cff_love_count=(typeof data.love!=='undefined') ? data.love.summary.total_count:0; var cff_wow_count=(typeof data.wow!=='undefined') ? data.wow.summary.total_count:0; var cff_sad_count=(typeof data.sad!=='undefined') ? data.sad.summary.total_count:0; var cff_angry_count=(typeof data.angry!=='undefined') ? data.angry.summary.total_count:0; var reactions_arr=[cff_haha_count, cff_love_count, cff_wow_count, cff_sad_count, cff_angry_count]; var reaction_first_num=reactions_arr.sort(sortNumber)[0]; var reaction_second_num=reactions_arr.sort(sortNumber)[1]; function sortNumber(a,b){ return b - a; } var reactions_html='', love_added=false, haha_added=false, wow_added=false, sad_added=false, angry_added=false, love_svg=''+'', haha_svg=''+'', wow_svg=''+'', sad_svg=''+'', angry_svg='', like_svg=''+'', like_svg_2=''; var reaction_one_html=''; if(reaction_first_num > 0){ if(data.love.summary.total_count==reaction_first_num){ reaction_one_html +=''+love_svg+''; love_added=true; } if(data.haha.summary.total_count==reaction_first_num){ reaction_one_html +=''+haha_svg+''; haha_added=true; } if(data.wow.summary.total_count==reaction_first_num){ reaction_one_html +=''+wow_svg+''; wow_added=true; } if(data.sad.summary.total_count==reaction_first_num){ reaction_one_html +=''+sad_svg+''; sad_added=true; } if(data.angry.summary.total_count==reaction_first_num){ reaction_one_html +=''+angry_svg+''; angry_added=true; } reactions_html +=reaction_one_html; } if(reaction_one_html.split('cff-reaction-one').length < 3){ if(reaction_second_num > 0){ var reaction_two_html=''; if(data.love.summary.total_count==reaction_second_num&&!love_added){ reaction_two_html=''+love_svg+''; } if(data.haha.summary.total_count==reaction_second_num&&!haha_added){ reaction_two_html=''+haha_svg+''; } if(data.wow.summary.total_count==reaction_second_num&&!wow_added){ reaction_two_html=''+wow_svg+''; } if(data.sad.summary.total_count==reaction_second_num&&!sad_added){ reaction_two_html=''+sad_svg+''; } if(data.angry.summary.total_count==reaction_second_num&&!angry_added){ reaction_two_html=''+angry_svg+''; } reactions_html +=reaction_two_html; }} if($self.find('.cff-meta .cff-likes').find('.cff-icon').length < 2) $self.find('.cff-meta .cff-likes .cff-icon').after(reactions_html); if(parseInt(like_count)==0&&(parseInt(cff_love_count) > 0||parseInt(cff_haha_count) > 0||parseInt(cff_wow_count) > 0||parseInt(cff_sad_count) > 0||parseInt(cff_angry_count) > 0)){ $self.find('.cff-meta .cff-likes .cff-like').remove(); $self.find('.cff-meta .cff-likes span').addClass('cff-no-animate'); } var cff_reactions_count=parseInt(like_count) + parseInt(cff_love_count) + parseInt(cff_haha_count) + parseInt(cff_wow_count) + parseInt(cff_sad_count) + parseInt(cff_angry_count); if(cff_reactions_count > 0) $self.find('.cff-meta .cff-likes .cff-count').text(cff_reactions_count); var cff_no_reactions=false; if(cff_love_count==0&&cff_haha_count==0&&cff_wow_count==0&&cff_sad_count==0&&cff_angry_count==0) cff_no_reactions=true; var reactions_count_html=''; if(parseInt(like_count) > 0){ reactions_count_html +=''+like_svg+''; if(!cff_no_reactions){ if(parseInt(like_count) > 0) reactions_count_html +=''+like_count+''; if(cff_love_count > 0) reactions_count_html +=''+love_svg+''+cff_love_count+''; if(cff_haha_count > 0) reactions_count_html +=''+haha_svg+''+cff_haha_count+''; if(cff_wow_count > 0) reactions_count_html +=''+wow_svg+''+cff_wow_count+''; if(cff_sad_count > 0) reactions_count_html +=''+sad_svg+''+cff_sad_count+''; if(cff_angry_count > 0) reactions_count_html +=''+angry_svg+''+cff_angry_count+''; }} reactions_count_html +=''; if(typeof data.likes!=='undefined'){ if(data.likes.data.length){ cff_likes_this +=''; var liker_one='', liker_two=''; if(like_count > 0&&typeof data.likes.data[0]!=='undefined'){ var userHasLink=false; if(typeof data.likes.data[0].link!=='undefined'){ if(data.likes.data[0].link.indexOf('/app_scoped_user_id/')==-1) userHasLink=true; } userHasLink ? liker_one +=''+data.likes.data[0].name; userHasLink ? liker_one +='':liker_one +=''; } if(like_count > 1&&typeof data.likes.data[1]!=='undefined'){ var userHasLink=false; if(typeof data.likes.data[1].link!=='undefined'){ if(data.likes.data[1].link.indexOf('/app_scoped_user_id/')==-1) userHasLink=true; } userHasLink ? liker_two +='':liker_two=''; liker_two +=data.likes.data[1].name; userHasLink ? liker_two +='':liker_two +=''; } if(like_count==1){ cff_likes_this +=liker_one+' '+cff_translate_likes_this_text; }else if(like_count==2){ cff_likes_this +=liker_one+' '+cff_translate_and_text+' '+liker_two+' '+cff_translate_like_this_text; }else if(like_count==3){ cff_likes_this +=liker_one+', '+liker_two+' '+cff_translate_and_text+' 1 '+cff_translate_other_text+' '+cff_translate_like_this_text; }else{ cff_likes_this +=liker_one+', '+liker_two+' '+cff_translate_and_text+' '; if(like_count==25) cff_likes_this +=''; cff_likes_this +=parseInt(cff_reactions_count)-2; if(like_count==25) cff_likes_this +=''; cff_likes_this +=' '+cff_translate_others_text; if(parseInt(cff_reactions_count)==parseInt(like_count)){ cff_likes_this +=' '+cff_translate_like_this_text; }else{ cff_likes_this +=' '+cff_translate_reacted_to_this_text; }} cff_likes_this +=''; if($cffCommentLikes.find('.cff-reactions-count').length < 1) $cffCommentLikes.append('' + reactions_count_html + cff_likes_this + ''); }else{ if(cff_no_reactions){ $cffCommentLikes.hide(); }else{ if($cffCommentLikes.find('.cff-reactions-count').length < 1) $cffCommentLikes.append('' + reactions_count_html + ''); }} } if(typeof data.comments!=='undefined'){ $.each(data.comments.data, function(i, commentItem){ var consentGiven=(typeof window.cff!=='undefined'&&typeof window.cff.feeds!=='undefined') ? window.cff.feeds[0].settings.consentGiven:true; var comment_message=cffEncodeHTML(commentItem.message), comment_message=cffLinkify(comment_message), cff_comment_author_info=true, cff_hide_comment_avatars=Boolean($self.find('.cff-comments-box').attr('data-cff-hide-avatars')); if(typeof commentItem.from!=='undefined'){ cff_comment_from_id=commentItem.from.id; }else{ cff_hide_comment_avatars=true; cff_comment_author_info=false; cff_comment_from_id=''; } cff_comments +='
    =commentShow) ? cff_comments +='display: none;':cff_comments +='display: block;'; if(typeof $self.find('#cff_'+commentItem.id).attr('style')!=='undefined') cff_comments +=$self.find('#cff_'+commentItem.id).attr('style'); cff_comments +='"'; if(typeof commentItem.from!=='undefined'){ if(typeof commentItem.from.picture!=='undefined'){ cff_comments +='data-avatar="'+commentItem.from.picture.data.url+'"'; }} cff_comments +='>'; cff_comments +='
    '; cff_comments +='

    '; if(cff_comment_author_info){ if(typeof commentItem.from.link!=='undefined'){ cff_comments +=''+commentItem.from.name+''; }else{ cff_comments +=''+commentItem.from.name+''; }} if(cff_post_tags&&commentItem.hasOwnProperty('message_tags')){ $.each(commentItem.message_tags, function(i, message_tag){ tag_name=message_tag.name; tag_link=''+message_tag.name+''; comment_message=comment_message.replace(tag_name, tag_link); }); } cff_comments +=comment_message+'

    '; if(commentItem.hasOwnProperty('attachment')){ if(commentItem.attachment.hasOwnProperty('media')){ if(consentGiven){ cff_comments +='';
}else{
cff_comments +='<a class='; } if(consentGiven){ if(commentItem.attachment.hasOwnProperty('title')){ cff_comments +=commentItem.attachment.title; }else{ cff_comments +='Attachment'; } cff_comments +='" />'; }else{ cff_comments +=''; }} } cff_comments +=''; var cff_middot='', cff_comment_time=$self.find('#cff_'+commentItem.id).attr('data-cff-comment-date'); if(typeof cff_comment_time!=='undefined'){ cff_comments +=''+cff_comment_time+''; cff_middot='  ·  '; } if(commentItem.like_count > 0) cff_comments +=''+like_svg_2+''+commentItem.like_count+''; cff_comments +=''; var cff_comment_count=parseInt(commentItem.comment_count); if(cff_comment_count > 0){ var cff_replies_text_string=''; (cff_comment_count==1) ? cff_replies_text_string=cff_translate_reply_text:cff_replies_text_string=cff_translate_replies_text; cff_comments +='

    '+cff_comment_count+' '+cff_replies_text_string+'

    '; } cff_comments +='
    '; cff_comments +='
    '; if(!cff_hide_comment_avatars&&cff_comment_author_info){ cff_comments +=''; } cff_comments +='
    '; }); } $self.find('.cff-comments-wrap .cff-comment').remove(); $self.find('.cff-comments-wrap').prepend(cff_comments); $self.find('.cff-show-more-comments').attr('data-cff-comments-total', cff_total_comments_count); if($self.find('.cff-comment-likes span').length > 0) $self.find('.cff-comment-on-facebook').css({'border-top-left-radius':"0",'border-top-right-radius':"0"}); if($self.find('.cff-comments-wrap .cff-comment').length > 0) $self.find('.cff-comment-on-facebook').css({'border-bottom-left-radius':"0",'border-bottom-right-radius':"0"}); if($self.find('.cff-comments-wrap .cff-comment').length < 1) $self.find('.cff-comment-on-facebook').css('padding','8px 15px 8px 10px'); setTimeout(function(){ if($self.closest('.cff').hasClass('cff-masonry-js')&&!$self.closest('.cff').hasClass('cff-masonry-css')) cffAddMasonry($self.closest('.cff')); }, 200); } function cff_lazy_load_correction(){ var $=jQuery; $('.cff-lightbox-link').each(function(){ var $lbLink=$(this); if($lbLink.closest('.cff-album-item').attr('data-cff-full-size')){ lborigSrc=$lbLink.attr('data-cff-full-size'); }else{ lborigSrc=$lbLink.parent().find('img').attr('data-orig-source'); } $lbLink.attr('href', lborigSrc); }) $('img[data-orig-source]').each(function(){ var $self=$(this), currentSrc=$self.attr('src'), originalSrc=$self.attr('data-orig-source'); if(originalSrc!=currentSrc){ $self.attr('src', originalSrc); } if($self.hasClass('cff-multi-image')){ $self.css('background-image', 'url(' + originalSrc + ')'); }}); $('.cff-link-slider').each(function(){ $(this).find('.cff-link-slider-slides').css('width', '2500px') }); } if(typeof window.cff==='undefined'||typeof window.cff.feeds==='undefined'){ if(!$cff.find('.cff_resized_image_data').length){ cff_lazy_load_correction(); }}else if(typeof window.cff.feeds[0]!=='undefined'){ if(!window.cff.feeds[0].settings.resizingEnabled){ cff_lazy_load_correction(); }} setTimeout(function(){ $cff.find('.cff-link-slider').each(function(){ var $cffLinkSlider=$(this), $cffLinkSliderSlides=$cffLinkSlider.find('.cff-link-slider-slides'), $cffLinkSliderItem=$cffLinkSliderSlides.find('.cff-link-slider-item'), cffLinkSliderCount=$cffLinkSliderItem.length, cffLinkSliderWidth=$cffLinkSlider.width(), cffCurSlide=0; $cffLinkSliderSlides.css({ width: cffLinkSliderWidth * cffLinkSliderCount }); $cffLinkSliderItem.css({ width: cffLinkSliderWidth }); function cffMoveSlide(dir){ dir=='prev' ? cffCurSlide--:cffCurSlide++; $cffLinkSliderSlides.css('left', -cffCurSlide*cffLinkSliderWidth); cffCurSlide==cffLinkSliderCount-1 ? $cffLinkSlider.find('a.cff-slider-next').hide():$cffLinkSlider.find('a.cff-slider-next').show(); cffCurSlide > 0 ? $cffLinkSlider.find('a.cff-slider-prev').show():$cffLinkSlider.find('a.cff-slider-prev').hide(); }; $cffLinkSlider.find('a.cff-slider-prev, a.cff-slider-next').on('click', function(e){ e.preventDefault(); $(this).hasClass('cff-slider-prev') ? cffMoveSlide('prev'):cffMoveSlide('next'); }); setTimeout(function(){ var cffLastSlideHeight=$cffLinkSliderSlides.find('.cff-link-slider-item').first().height(); $cffLinkSliderSlides.find('.cff-final-item').css('height', cffLastSlideHeight).find('img').css('margin-top', (cffLastSlideHeight/2)-100); }, 1500); $cffLinkSliderSlides.find('.cff-link-slider-item').show(); }); }, 200); })(jQuery); var imgLiquid=imgLiquid||{VER: '0.9.944'}; imgLiquid.bgs_Available=false; imgLiquid.bgs_CheckRunned=false; jQuery('.cff').each(function(){ if(!jQuery(this).hasClass('cff-disable-liquid')){ $cff.find('.cff-new .cff-album-cover img').css('visibility', 'hidden'); }}); $cff.find('.cff-new .cff-crop img').css('visibility', 'hidden'); jQuery('#cff .cff-img-attachments .cff-crop img').css('opacity', 0); (function ($){ function checkBgsIsavailable(){ if(imgLiquid.bgs_CheckRunned) return; else imgLiquid.bgs_CheckRunned=true; var spanBgs=$(''); $('body').append(spanBgs); !function (){ var bgs_Check=spanBgs[0]; if(!bgs_Check||!window.getComputedStyle) return; var compStyle=window.getComputedStyle(bgs_Check, null); if(!compStyle||!compStyle.backgroundSize) return; imgLiquid.bgs_Available=(compStyle.backgroundSize==='cover'); }(); spanBgs.remove(); } $.fn.extend({ imgLiquid: function (options){ this.defaults={ fill: true, verticalAlign: 'center', // 'top' // 'bottom' // '50%' // '10%' horizontalAlign: 'center', // 'left' // 'right' // '50%' // '10%' useBackgroundSize: false, useDataHtmlAttr: true, responsive: true, delay: false, fadeInTime: false, removeBoxBackground: true, hardPixels: true, responsiveCheckTime: 500, timecheckvisibility: 500, onStart: null, onFinish: null, onItemStart: null, onItemFinish: function(index, container, img){ img.addClass('cffFadeIn'); }, onItemError: null }; checkBgsIsavailable(); var imgLiquidRoot=this; this.options=options; this.settings=$.extend({}, this.defaults, this.options); if(this.settings.onStart) this.settings.onStart(); return this.each(function ($i){ var settings=imgLiquidRoot.settings, $imgBoxCont=$(this), $img=$('img:first',$imgBoxCont); if(!$img.length){onError(); return;} if(!$img.data('imgLiquid_settings')){ settings=$.extend({}, imgLiquidRoot.settings, getSettingsOverwrite()); }else{ $imgBoxCont.removeClass('imgLiquid_error').removeClass('imgLiquid_ready'); settings=$.extend({}, $img.data('imgLiquid_settings'), imgLiquidRoot.options); } $img.data('imgLiquid_settings', settings); if(settings.onItemStart) settings.onItemStart($i, $imgBoxCont, $img); if(imgLiquid.bgs_Available&&settings.useBackgroundSize) processBgSize(); else processOldMethod(); function processBgSize(){ if($imgBoxCont.css('background-image').indexOf(encodeURI($img.attr('src')))===-1){ $imgBoxCont.css({'background-image': 'url("' + encodeURI($img.attr('src')) + '")'}); } $imgBoxCont.css({ 'background-size': (settings.fill) ? 'cover':'contain', 'background-position': (settings.horizontalAlign + ' ' + settings.verticalAlign).toLowerCase(), 'background-repeat': 'no-repeat' }); $('a:first', $imgBoxCont).css({ 'display': 'block', 'width': '100%', 'height': '100%' }); $('img', $imgBoxCont).css({'display': 'none'}); if(settings.onItemFinish) settings.onItemFinish($i, $imgBoxCont, $img); $imgBoxCont.addClass('imgLiquid_bgSize'); $imgBoxCont.addClass('imgLiquid_ready'); checkFinish(); } function processOldMethod(){ if($img.data('oldSrc')&&$img.data('oldSrc')!==$img.attr('src')){ var $imgCopy=$img.clone().removeAttr('style'); $imgCopy.data('imgLiquid_settings', $img.data('imgLiquid_settings')); $img.parent().prepend($imgCopy); $img.remove(); $img=$imgCopy; $img[0].width=0; setTimeout(processOldMethod, 10); return; } if($img.data('imgLiquid_oldProcessed')){ makeOldProcess(); return; } $img.data('imgLiquid_oldProcessed', false); $img.data('oldSrc', $img.attr('src')); $('img:not(:first)', $imgBoxCont).css('display', 'none'); $imgBoxCont.css({'overflow': 'hidden'}); $img.fadeTo(0, 0).removeAttr('width').removeAttr('height').css({ 'visibility': 'visible', 'max-width': 'none', 'max-height': 'none', 'width': 'auto', 'height': 'auto', 'display': 'block' }); $img.on('error', onError); $img[0].onerror=onError; function onLoad(){ if($img.data('imgLiquid_error')||$img.data('imgLiquid_loaded')||$img.data('imgLiquid_oldProcessed')) return; if($imgBoxCont.is(':visible')&&$img[0].complete&&$img[0].width > 0&&$img[0].height > 0){ $img.data('imgLiquid_loaded', true); setTimeout(makeOldProcess, $i * settings.delay); }else{ setTimeout(onLoad, settings.timecheckvisibility); }} onLoad(); checkResponsive(); } function checkResponsive(){ if(!settings.responsive&&!$img.data('imgLiquid_oldProcessed')) return; if(!$img.data('imgLiquid_settings')) return; settings=$img.data('imgLiquid_settings'); $imgBoxCont.actualSize=$imgBoxCont.get(0).offsetWidth + ($imgBoxCont.get(0).offsetHeight / 10000); if($imgBoxCont.sizeOld&&$imgBoxCont.actualSize!==$imgBoxCont.sizeOld) makeOldProcess(); $imgBoxCont.sizeOld=$imgBoxCont.actualSize; setTimeout(checkResponsive, settings.responsiveCheckTime); } function onError(){ $img.data('imgLiquid_error', true); $imgBoxCont.addClass('imgLiquid_error'); if(settings.onItemError) settings.onItemError($i, $imgBoxCont, $img); checkFinish(); } function getSettingsOverwrite(){ var SettingsOverwrite={}; if(imgLiquidRoot.settings.useDataHtmlAttr){ var dif=$imgBoxCont.attr('data-imgLiquid-fill'), ha=$imgBoxCont.attr('data-imgLiquid-horizontalAlign'), va=$imgBoxCont.attr('data-imgLiquid-verticalAlign'); if(dif==='true'||dif==='false') SettingsOverwrite.fill=Boolean (dif==='true'); if(ha!==undefined&&(ha==='left'||ha==='center'||ha==='right'||ha.indexOf('%')!==-1)) SettingsOverwrite.horizontalAlign=ha; if(va!==undefined&&(va==='top'||va==='bottom'||va==='center'||va.indexOf('%')!==-1)) SettingsOverwrite.verticalAlign=va; } if(imgLiquid.isIE&&imgLiquidRoot.settings.ieFadeInDisabled) SettingsOverwrite.fadeInTime=0; return SettingsOverwrite; } function makeOldProcess(){ var w, h, wn, hn, ha, va, hdif, vdif, margT=0, margL=0, $imgCW=$imgBoxCont.width(), $imgCH=$imgBoxCont.height(); if($img.data('owidth')===undefined) $img.data('owidth', $img[0].width); if($img.data('oheight')===undefined) $img.data('oheight', $img[0].height); if(settings.fill===($imgCW / $imgCH) >=($img.data('owidth') / $img.data('oheight'))){ w='100%'; h='auto'; wn=Math.floor($imgCW); hn=Math.floor($imgCW * ($img.data('oheight') / $img.data('owidth'))); }else{ w='auto'; h='100%'; wn=Math.floor($imgCH * ($img.data('owidth') / $img.data('oheight'))); hn=Math.floor($imgCH); } ha=settings.horizontalAlign.toLowerCase(); hdif=$imgCW - wn; if(ha==='left') margL=0; if(ha==='center') margL=hdif * 0.5; if(ha==='right') margL=hdif; if(ha.indexOf('%')!==-1){ ha=parseInt (ha.replace('%',''), 10); if(ha > 0) margL=hdif * ha * 0.01; } va=settings.verticalAlign.toLowerCase(); vdif=$imgCH - hn; if(va==='left') margT=0; if(va==='center') margT=vdif * 0.5; if(va==='bottom') margT=vdif; if(va.indexOf('%')!==-1){ va=parseInt (va.replace('%',''), 10); if(va > 0) margT=vdif * va * 0.01; } if(settings.hardPixels){w=wn; h=hn;} $img.css({ 'width': w, 'height': h, 'margin-left': Math.floor(margL), 'margin-top': Math.floor(margT) }); if(!$img.data('imgLiquid_oldProcessed')){ $img.fadeTo(settings.fadeInTime, 1); $img.data('imgLiquid_oldProcessed', true); if(settings.removeBoxBackground) $imgBoxCont.css('background-image', 'none'); $imgBoxCont.addClass('imgLiquid_nobgSize'); $imgBoxCont.addClass('imgLiquid_ready'); } if(settings.onItemFinish) settings.onItemFinish($i, $imgBoxCont, $img); checkFinish(); } function checkFinish(){ if($i===imgLiquidRoot.length - 1) if(imgLiquidRoot.settings.onFinish) imgLiquidRoot.settings.onFinish(); }}); }}); })(jQuery); if(typeof window.cff==='undefined'||typeof window.cff.feeds==='undefined'){ window.cff=new Cff(); window.cff.createPage(window.cff.createFeeds, {}); } jQuery(document).ready(function(){ var allInitiated=true; jQuery('.cff').each(function(index){ if(typeof window.cff!=='undefined' && typeof window.cff.feeds!=='undefined' && typeof window.cff.feeds[index]==='undefined'){ allInitiated=false; }}); if(!allInitiated){ window.cff.createPage(window.cff.createFeeds, {}); } var $=jQuery; $('#cookie-notice a').on('click', function(){ setTimeout(function(){ $.each(window.cff.feeds,function(index){ window.cff.feeds[ index ].afterConsentToggled(); }); },1000); }); $('#cookie-law-info-bar a').on('click', function(){ setTimeout(function(){ $.each(window.cff.feeds,function(index){ window.cff.feeds[ index ].afterConsentToggled(); }); },1000); }); $('.cli-user-preference-checkbox').on('click', function(){ setTimeout(function(){ $.each(window.cff.feeds,function(index){ window.cff.feeds[ index ].settings.consentGiven=false; window.cff.feeds[ index ].afterConsentToggled(); }); },1000); }); $(window).on('CookiebotOnAccept', function (event){ $.each(window.cff.feeds,function(index){ window.cff.feeds[ index ].settings.consentGiven=true; window.cff.feeds[ index ].afterConsentToggled(); }); }); $(document).on('cmplzAcceptAll', function (event){ $.each(window.cff.feeds,function(index){ window.cff.feeds[ index ].settings.consentGiven=true; window.cff.feeds[ index ].afterConsentToggled(); }); }); $(document).on('cmplzRevoke', function (event){ $.each(window.cff.feeds,function(index){ window.cff.feeds[ index ].settings.consentGiven=false; window.cff.feeds[ index ].afterConsentToggled(); }); }); $(document).on('borlabs-cookie-consent-saved', function (event){ $.each(window.cff.feeds,function(index){ window.cff.feeds[ index ].settings.consentGiven=false; window.cff.feeds[ index ].afterConsentToggled(); }); }); }); setTimeout(function(){ jQuery('#cff .embed-responsive video, #cff .embed-responsive iframe').unwrap(); }, 500); !function (){ var css=imgLiquid.injectCss, head=document.getElementsByTagName('head')[0], style=document.createElement('style'); style.type='text/css'; if(style.styleSheet){ style.styleSheet.cssText=css; }else{ style.appendChild(document.createTextNode(css)); } head.appendChild(style); }(); jQuery('.cff').each(function(){ if(!jQuery(this).hasClass('cff-disable-liquid')){ jQuery(this).find(".cff-new .cff-album-cover").imgLiquid({fill:true}); }}); jQuery(".cff-new .cff-crop").imgLiquid({fill:true, useBackgroundSize:true}); jQuery(".cff-header-hero").imgLiquid({fill:true}); } cff_init(); function cffGetShortcodeToken($cff){ var shortcode_token_param=''; if($cff.attr('data-cff-shortcode')){ if($cff.attr('data-cff-shortcode').indexOf('accesstoken')!==-1){ var shortcode_att=$cff.attr('data-cff-shortcode'), shortcode_att_arr=JSON.parse(shortcode_att); shortcode_token_param=encodeURI('&at=' + shortcode_att_arr['accesstoken']); }} return shortcode_token_param; } window.cffLinkify=(function(){var k="[a-z\\d.-]+://",h="(?:(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])\\.){3}(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])",c="(?:(?:[^\\s!@#$%^&*()_=+[\\]{}\\\\|;:'\",.<>/?]+)\\.)+",n="(?:ac|ad|aero|ae|af|ag|ai|al|am|an|ao|aq|arpa|ar|asia|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|biz|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|cat|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|coop|com|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|info|int|in|io|iq|ir|is|it|je|jm|jobs|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mil|mk|ml|mm|mn|mobi|mo|mp|mq|mr|ms|mt|museum|mu|mv|mw|mx|my|mz|name|na|nc|net|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pro|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tel|tf|tg|th|tj|tk|tl|tm|tn|to|tp|travel|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|xn--0zwm56d|xn--11b5bs3a9aj6g|xn--80akhbyknj4f|xn--9t4b11yi5a|xn--deba0ad|xn--g6w251d|xn--hgbk6aj7f53bba|xn--hlcj6aya9esc7a|xn--jxalpdlp|xn--kgbechtv|xn--zckzah|ye|yt|yu|za|zm|zw)",f="(?:"+c+n+"|"+h+")",o="(?:[;/][^#?<>\\s]*)?",e="(?:\\?[^#<>\\s]*)?(?:#[^<>\\s]*)?",d="\\b"+k+"[^<>\\s]+",a="\\b"+f+o+e+"(?!\\w)",m="mailto:",j="(?:"+m+")?[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@"+f+e+"(?!\\w)",l=new RegExp("(?:"+d+"|"+a+"|"+j+")","ig"),g=new RegExp("^"+k,"i"),b={"'":"`",">":"<",")":"(","]":"[","}":"{","B;":"B+","b:":"b9"},i={callback:function(q,p){return p?''+q+"":q},punct_regexp:/(?:[!?.,:;'"]|(?:&|&)(?:lt|gt|quot|apos|raquo|laquo|rsaquo|lsaquo);)$/};return function(u,z){z=z||{};var w,v,A,p,x="",t=[],s,E,C,y,q,D,B,r;for(v in i){if(z[v]===undefined){z[v]=i[v]}}while(w=l.exec(u)){A=w[0];E=l.lastIndex;C=E-A.length;if(/[\/:]/.test(u.charAt(C-1))){continue}do{y=A;r=A.substr(-1);B=b[r];if(B){q=A.match(new RegExp("\\"+B+"(?!$)","g"));D=A.match(new RegExp("\\"+r,"g"));if((q?q.length:0)<(D?D.length:0)){A=A.substr(0,A.length-1);E--}}if(z.punct_regexp){A=A.replace(z.punct_regexp,function(F){E-=F.length;return""})}}while(A.length&&A!==y);p=A;if(!g.test(p)){p=(p.indexOf("@")!==-1?(!p.indexOf(m)?"":m):!p.indexOf("irc.")?"irc://":!p.indexOf("ftp.")?"ftp://":"http://")+p}if(s!=C){t.push([u.slice(s,C)]);s=E}t.push([A,p])}t.push([u.substr(s)]);for(v=0;v' + replacementString + ''; }} function cffReplaceTags(tag){ var replacementString=jQuery.trim(tag); return '' + replacementString + ''; } var hashRegex=/[#]+[A-Za-z0-9-_]+/g, tagRegex=/[@]+[A-Za-z0-9-_]+/g; function cffEncodeHTML(raw){ if(typeof raw==='undefined'){ return ''; } var encoded=raw.replace(/(>)/g,'>'), encoded=encoded.replace(/(<)/g,'<'); encoded=encoded.replace(/(<br\/>)/g,'
    '); encoded=encoded.replace(/(<br>)/g,'
    '); return encoded; } function cffLoadCommentReplies($this){ var usegrouptoken='', useowntoken='', $cffClosestContainer=jQuery('#cff_'+$this.parent().attr('data-id')).closest('#cff'); if($cffClosestContainer.hasClass('cff-group')) usegrouptoken='&usegrouptoken=true'; if($cffClosestContainer.attr('data-own-token')=='true') useowntoken='&useowntoken=true'; var cff_page_id=$this.closest('.cff-item').attr('data-page-id'), shortcode_token_param=cffGetShortcodeToken($cffClosestContainer), $commentReplies=$this.parent(), $commentRepliesBox=$commentReplies.siblings('.cff-comment-replies-box'), comments_url=cffsiteurl + "/custom-facebook-feed-pro/comments.php?id=" + $commentReplies.attr('data-id') + usegrouptoken + useowntoken + '&pageid=' + cff_page_id + shortcode_token_param; if($commentReplies.hasClass('cff-hide')){ $commentRepliesBox.hide(); $commentReplies.removeClass('cff-hide'); }else{ $commentRepliesBox.show(); $commentReplies.addClass('cff-hide'); if($commentRepliesBox.hasClass('cff-empty')){ var $commentRepliesA=$commentReplies.find('a'); $commentRepliesA.append('
    '); $commentReplies.find('.cff-loader').css('background-color', $commentRepliesA.css('color')); var submitData={ action: 'cff_comments', id: $commentReplies.attr('data-id'), pageid: cff_page_id, }; if($cffClosestContainer.hasClass('cff-group')){ submitData.usegrouptoken=true; } if($cffClosestContainer.attr('data-own-token')=='true'){ submitData.useowntoken=true; } if(shortcode_token_param!==''){ var token=shortcode_token_param.split('='); submitData.at=token[1]; } var onSuccess=function(data){ $commentReplies.find('.cff-loader').remove(); var data=JSON.parse(data), allComments=''; if(typeof data.comments!=='undefined'){ jQuery.each(data.comments.data, function(i, commentItem){ var consentGiven=(typeof window.cff!=='undefined'&&typeof window.cff.feeds!=='undefined') ? window.cff.feeds[0].settings.consentGiven:true; var cff_comment_author_info=true; if(typeof commentItem.from!=='undefined'){ cff_comment_from_id=commentItem.from.id; }else{ cff_comment_author_info=false; cff_comment_from_id=''; } allComments +='

    '; if(cff_comment_author_info){ if(typeof commentItem.from.link!='undefined'){ allComments +=''+commentItem.from.name+''; }else{ allComments +=''+commentItem.from.name+''; }} var cffCommentMessage=cffEncodeHTML(commentItem.message); allComments +=cffCommentMessage; if(parseInt(commentItem.like_count) > 0) allComments +=''+commentItem.like_count+''; allComments +='

    '; if(typeof commentItem.attachment!=='undefined'){ if(consentGiven){ allComments +=''+commentItem.attachment.title+''; }else{ allComments +=''; }} allComments +='
    '; if(cff_comment_author_info){ if(consentGiven){ allComments +='
    Avatar
    '; }else{ allComments +='
    '; }} allComments +='
    '; }); } $commentRepliesBox.html(allComments).removeClass('cff-empty'); if($this.closest('#cff').hasClass('cff-masonry-js')&&!$this.closest('#cff').hasClass('cff-masonry-css')&&!$this.closest('#cff').hasClass('cff-opaque-comments')){ cffAddMasonry($this.closest('#cff')); }}; cffAjax(submitData,onSuccess); }} } function cffLightbox(){ (function(){ var $=jQuery; var LightboxOptions=(function(){ function LightboxOptions(){ this.fadeDuration=300; this.fitImagesInViewport=true; this.resizeDuration=400; this.positionFromTop=50; this.showImageNumberLabel=true; this.alwaysShowNavOnTouchDevices=false; this.wrapAround=false; } LightboxOptions.prototype.albumLabel=function(curImageNum, albumSize){ return curImageNum + " / " + albumSize; }; return LightboxOptions; })(); var Lightbox=(function(){ function Lightbox(options){ this.options=options; this.album=[]; this.currentImageIndex=void 0; this.init(); } Lightbox.prototype.init=function(){ this.enable(); this.build(); }; Lightbox.prototype.enable=function(){ var self=this; $('body').on('click', 'a[data-cff-lightbox], area[data-cff-lightbox]', function(event){ self.start($(event.currentTarget)); return false; }); }; Lightbox.prototype.build=function(){ var cff_lightbox_svg_class=''; if($('.cff.cff-no-svgs').length) cff_lightbox_svg_class='cff-no-svgs'; var self=this; $("
    ").appendTo($('body')); if(typeof jQuery("#cff-lightbox-wrapper").find(".cff-lightbox-dataContainer").hammer!=='function'){ var Hammer={ Manager: { prototype: {}} }; (function (factory){ if(typeof define==='function'&&define.amd){ define(['jquery', 'hammerjs'], factory); }else if(typeof exports==='object'){ factory(require('jquery'), require('hammerjs')); }else{ factory(jQuery, Hammer); }}(function (jQuery, Hammer){ function hammerify(el, options){ } jQuery.fn.hammer=function (options){ return this.each(function (){ hammerify(this, options); }); }; Hammer.Manager.prototype.emit=(function (originalEmit){ return function (type, data){ originalEmit.call(this, type, data); jQuery(this.element).trigger({ type: type, gesture: data }); };})(Hammer.Manager.prototype.emit); })); } this.$lightbox=$('#cff-lightbox-wrapper'); this.$overlay=$('#cff-lightbox-overlay'); this.$outerContainer=this.$lightbox.find('.cff-lightbox-outerContainer'); this.$container=this.$lightbox.find('.cff-lightbox-container'); this.containerTopPadding=parseInt(this.$container.css('padding-top'), 10); this.containerRightPadding=parseInt(this.$container.css('padding-right'), 10); this.containerBottomPadding=parseInt(this.$container.css('padding-bottom'), 10); this.containerLeftPadding=parseInt(this.$container.css('padding-left'), 10); this.$overlay.hide().on('click', function(){ self.end(); if(cff_supports_video()) $('#cff-lightbox-wrapper video.cff-lightbox-video')[0].pause(); $('#cff-lightbox-wrapper iframe').attr('src', ''); if($('body').length){ $('body').removeClass('cff_no_scroll'); } return false; }); this.$lightbox.hide().on('click', function(event){ if($(event.target).attr('id')==='cff-lightbox-wrapper'){ self.end(); if(cff_supports_video()) $('#cff-lightbox-wrapper video.cff-lightbox-video')[0].pause(); $('#cff-lightbox-wrapper iframe').attr('src', ''); if($('body').length){ $('body').removeClass('cff_no_scroll'); }} return false; }); this.$outerContainer.on('click', function(event){ if($(event.target).attr('id')==='cff-lightbox-wrapper'){ self.end(); if(cff_supports_video()) $('#cff-lightbox-wrapper video.cff-lightbox-video')[0].pause(); $('#cff-lightbox-wrapper iframe').attr('src', ''); } return false; }); this.$lightbox.find('.cff-lightbox-prev').on('click', function(){ if(self.currentImageIndex===0){ self.changeImage(self.album.length - 1); }else{ self.changeImage(self.currentImageIndex - 1); } if(cff_supports_video()) $('#cff-lightbox-wrapper video.cff-lightbox-video')[0].pause(); $('#cff-lightbox-wrapper iframe').attr('src', ''); return false; }); this.$lightbox.find('.cff-lightbox-next').on('click', function(){ if(self.currentImageIndex===self.album.length - 1){ self.changeImage(0); }else{ self.changeImage(self.currentImageIndex + 1); } if(cff_supports_video()) $('#cff-lightbox-wrapper video.cff-lightbox-video')[0].pause(); $('#cff-lightbox-wrapper iframe').attr('src', ''); return false; }); this.$lightbox.find('.cff-lightbox-outerContainer').hammer().on("swipeleft", function(){ if(self.currentImageIndex===self.album.length - 1){ self.changeImage(0); }else{ self.changeImage(self.currentImageIndex + 1); } if(cff_supports_video()) $('#cff-lightbox-wrapper video.cff-lightbox-video')[0].pause(); $('#cff-lightbox-wrapper iframe').attr('src', ''); return false; }); this.$lightbox.find('.cff-lightbox-outerContainer').hammer().on("swiperight", function(){ if(self.currentImageIndex===0){ self.changeImage(self.album.length - 1); }else{ self.changeImage(self.currentImageIndex - 1); } if(cff_supports_video()) $('#cff-lightbox-wrapper video.cff-lightbox-video')[0].pause(); $('#cff-lightbox-wrapper iframe').attr('src', ''); return false; }); $('.cff-lightbox-thumbs').on('click', '.cff-lightbox-attachment', function (){ var $thumb=$(this), $thumbImg=$thumb.find('img'), captionText=$thumb.attr('data-caption'); if(captionText==''||captionText=='undefined') captionText=$thumb.attr('orig-caption'); self.changeImage(parseInt($thumb.attr('data-cff-lightbox-order')), $thumb.attr('href'), $thumbImg.attr('width'), $thumbImg.attr('height'), $thumb.attr('data-facebook'), captionText); return false; }); this.$lightbox.find('.cff-lightbox-loader, .cff-lightbox-close').on('click', function(){ self.end(); if(cff_supports_video()) $('#cff-lightbox-wrapper video.cff-lightbox-video')[0].pause(); $('#cff-lightbox-wrapper iframe').attr('src', ''); if($('body').length){ $('body').removeClass('cff_no_scroll'); } return false; }); }; Lightbox.prototype.start=function($link){ var self=this; var $window=$(window); $window.on('resize', $.proxy(this.sizeOverlay, this)); if($('body').length){ $('body').addClass('cff_no_scroll'); } $('select, object, embed').css({ visibility: "hidden" }); this.sizeOverlay(); if(this.album.length==0) this.album=[]; var imageNumber=0; function addToAlbum($link){ if(!$link.closest('.cff-posts-wrap').hasClass('cff_owl-carousel')){ var albumClassName=$link.closest('.cff-posts-wrap').children().attr('class'); }else{ var albumClassName=$link.closest('.cff-posts-wrap .cff_owl-item').children().attr('class'); } linkParentPostID=''; if(typeof albumClassName!=='undefined'){ linkParentPostID=$link.closest('.'+albumClassName.split(' ')[0]).attr('id'); linkParentPostID=linkParentPostID.replace('cff_','') } var found=false; $.each(self.album, function(i, imageitem){ if(( imageitem.link==$link.attr('href'))&&(imageitem.postid==linkParentPostID)){ found=true; return; }}); if(!$('.cff-duplicate-video-thumbnails').length) if(found==true) return; var closestFeedIndex=parseInt($link.closest('.cff').attr('data-cff-index')-1); var video=$link.attr("data-video"), iframe=$link.attr('data-iframe'), link=$link.attr("href"), count=0; var consentGiven=(typeof window.cff!=='undefined'&&typeof window.cff.feeds!=='undefined') ? window.cff.feeds[0].settings.consentGiven:true; if(!consentGiven){ if(iframe!==''){ iframe='link'; } if(video!==''){ video='link'; } if($link.closest('.cff-album-item').length && typeof $link.closest('.cff-album-item').attr('data-count')!=='undefined'){ count=$link.closest('.cff-album-item').attr('data-count'); }} self.album.push({ link: link, title: $link.attr('data-title')||$link.attr('title'), postid: $link.attr('data-id'), showthumbs: $link.attr('data-thumbs'), facebookurl: $link.attr('data-url'), video: video, iframe: iframe, type: $link.attr('data-type'), cffgroupalbums: $link.attr('data-cffgroupalbums'), isthumbnail: $link.attr('data-cff-isthumbnail'), pagename: $link.parent().attr('data-cff-page-name'), posttime: $link.parent().attr('data-cff-post-time'), lbcomments: $link.attr('data-lb-comments'), feedIndex: closestFeedIndex, count: count }); } var dataLightboxValue=$link.attr('data-cff-lightbox'); var $links; if(dataLightboxValue){ $links=$($link.prop("tagName") + '[data-cff-lightbox="' + dataLightboxValue + '"]'); for (var i=0; i < $links.length; i=++i){ addToAlbum($($links[i])); if($links[i]===$link[0]){ imageNumber=i; $.each(self.album, function(i, image){ if((image.postid==$link.attr('data-id'))&&image.isthumbnail!=true) imageNumber=i; }); }} }else{ if($link.attr('rel')==='lightbox'){ addToAlbum($link); }else{ $links=$($link.prop("tagName") + '[rel="' + $link.attr('rel') + '"]'); for (var j=0; j < $links.length; j=++j){ addToAlbum($($links[j])); if($links[j]===$link[0]){ imageNumber=j; }} }} var top=$window.scrollTop() + this.options.positionFromTop; var left=$window.scrollLeft(); this.$lightbox.css({ top: top + 'px', left: left + 'px' }).fadeIn(this.options.fadeDuration); this.changeImage(imageNumber); }; Lightbox.prototype.changeImage=function(imageNumberVal, imageUrl, imgWidth, imgHeight, facebookLink, captionText){ var self=this, isThumb=false, bottomPadding=120; imageNumber=imageNumberVal; if(typeof imageUrl!=='undefined') isThumb=true; this.disableKeyboardNav(); var $image=this.$lightbox.find('.cff-lightbox-image'); this.$overlay.fadeIn(this.options.fadeDuration); $('.cff-lightbox-loader').fadeIn('slow'); this.$lightbox.find('.cff-lightbox-image, .cff-lightbox-nav, .cff-lightbox-prev, .cff-lightbox-next, .cff-lightbox-dataContainer, .cff-lightbox-numbers, .cff-lightbox-caption').hide(); this.$outerContainer.addClass('animating'); var preloader=new Image(); preloader.onload=function(){ var $preloader, imageHeight, imageWidth, maxImageHeight, maxImageWidth, windowHeight, windowWidth; $image.attr('src', self.album[imageNumber].link); if(isThumb){ $image.attr('src', imageUrl); $('.cff-lightbox-facebook').attr('href', facebookLink); $('.cff-lightbox-caption .cff-lightbox-caption-text').html(captionText); preloader.width=imgWidth; preloader.height=imgHeight; bottomPadding=180; } $preloader=$(preloader); $image.width(preloader.width); $image.height(preloader.height); if(self.options.fitImagesInViewport){ windowWidth=$(window).width(); windowHeight=$(window).height(); var cff_lb_comments_width=0, cffNavArrowsWidth=80; if($('#cff_' + self.album[0].postid).closest('#cff').attr('data-lb-comments')=='true'&&windowWidth > 640) cff_lb_comments_width=300; if(window.innerWidth < 640) cffNavArrowsWidth=40; maxImageWidth=windowWidth - self.containerLeftPadding - self.containerRightPadding - 20 - cff_lb_comments_width - cffNavArrowsWidth; maxImageHeight=windowHeight - self.containerTopPadding - self.containerBottomPadding - bottomPadding; if((preloader.width > maxImageWidth)||(preloader.height > maxImageHeight)){ if((preloader.width / maxImageWidth) > (preloader.height / maxImageHeight)){ imageWidth=maxImageWidth; imageHeight=parseInt(preloader.height / (preloader.width / imageWidth), 10); $image.width(imageWidth); $image.height(imageHeight); }else{ imageHeight=maxImageHeight; imageWidth=parseInt(preloader.width / (preloader.height / imageHeight), 10); $image.width(imageWidth); $image.height(imageHeight); }} } self.sizeContainer($image.width(), $image.height()); }; preloader.src=this.album[imageNumber].link; this.currentImageIndex=imageNumber; }; Lightbox.prototype.sizeOverlay=function(){ this.$overlay .width($(window).width()) .height($(document).height()); }; Lightbox.prototype.sizeContainer=function(imageWidth, imageHeight){ var self=this; var oldWidth=this.$outerContainer.outerWidth(); var oldHeight=this.$outerContainer.outerHeight(); var newWidth=imageWidth + this.containerLeftPadding + this.containerRightPadding; var newHeight=imageHeight + this.containerTopPadding + this.containerBottomPadding; function postResize(){ self.$lightbox.find('.cff-lightbox-dataContainer').width(newWidth); self.$lightbox.find('.cff-lightbox-prevLink').height(newHeight); self.$lightbox.find('.cff-lightbox-nextLink').height(newHeight); self.showImage(); } if(oldWidth!==newWidth||oldHeight!==newHeight){ this.$outerContainer.animate({ width: newWidth, height: newHeight }, this.options.resizeDuration, 'swing', function(){ postResize(); }); }else{ postResize(); }}; Lightbox.prototype.showImage=function(){ this.$lightbox.find('.cff-lightbox-loader').hide(); this.$lightbox.find('.cff-lightbox-image').fadeIn('slow'); this.updateNav(); this.updateDetails(); this.preloadNeighboringImages(); this.enableKeyboardNav(); }; Lightbox.prototype.updateNav=function(){ var alwaysShowNav=false; try { document.createEvent("TouchEvent"); alwaysShowNav=(this.options.alwaysShowNavOnTouchDevices)? true: false; } catch (e){} this.$lightbox.find('.cff-lightbox-nav').show(); if(this.album.length > 1){ if(this.options.wrapAround){ if(alwaysShowNav){ this.$lightbox.find('.cff-lightbox-prev, .cff-lightbox-next').css('opacity', '1'); } this.$lightbox.find('.cff-lightbox-prev, .cff-lightbox-next').show(); }else{ if(this.currentImageIndex > 0){ this.$lightbox.find('.cff-lightbox-prev').show(); if(alwaysShowNav){ this.$lightbox.find('.cff-lightbox-prev').css('opacity', '1'); }} if(this.currentImageIndex < this.album.length - 1){ this.$lightbox.find('.cff-lightbox-next').show(); if(alwaysShowNav){ this.$lightbox.find('.cff-lightbox-next').css('opacity', '1'); }} }} }; var thumbsArr={}; Lightbox.prototype.updateDetails=function(){ var self=this; var origCaption=''; this.$lightbox.find('.cff-lightbox-nav, .cff-lightbox-nav a').show(); if($('.cff-lightbox-video').length==0) $('.cff-lightbox-container').prepend(""); if(cff_supports_video()){ $('#cff-lightbox-wrapper').removeClass('cff-has-video'); if(typeof this.album[this.currentImageIndex].video!=='undefined' && this.album[this.currentImageIndex].video!=='link'){ if(this.album[this.currentImageIndex].video.length){ $('#cff-lightbox-wrapper').addClass('cff-has-video'); $('.cff-lightbox-video').attr({ 'src':this.album[this.currentImageIndex].video, 'poster':this.album[this.currentImageIndex].link, 'autoplay':'true' }); }} } var iframeIsLink=false; if(this.album[this.currentImageIndex].iframe==='link'){ iframeIsLink=true; } if((this.album[this.currentImageIndex].video==='link'||iframeIsLink) && ! jQuery(".cff-lightbox-container .cff_gdpr_notice").length){ jQuery(".cff-lightbox-container").prepend('') }else if(this.album[this.currentImageIndex].video!=='link'&&!iframeIsLink){ jQuery('.cff_gdpr_notice').remove(); }else if(jQuery(".cff-lightbox-container .cff_gdpr_notice").length){ jQuery(".cff-lightbox-container .cff_gdpr_notice").attr('href',this.album[this.currentImageIndex].facebookurl); } var cff_lb_comments=(this.album[this.currentImageIndex].lbcomments=='true'&&$('#cff_'+this.album[this.currentImageIndex].postid+' .cff-lightbox-link').attr('data-lb-comments')!='false') ? true:false; if($(window).width() <=640) cff_lb_comments=false; if(cff_lb_comments){ var lb_post_id=this.album[this.currentImageIndex].postid, page_id=lb_post_id.split('_')[0], author_name=this.album[this.currentImageIndex].pagename, date_in_correct_format=this.album[this.currentImageIndex].posttime, $lightbox_sidebar=$('.cff-lightbox-container .cff-lightbox-sidebar'), $lightbox_thumbs_holder=$('.cff-lightbox-thumbs-holder'), from_id=$('#cff_'+this.album[this.currentImageIndex].postid).attr('data-cff-from'); $('.cff-lightbox-wrapper').addClass('cff-enable-lb-comments'); $('.cff-lightbox-dataContainer').css('width', $('.cff-lightbox-dataContainer').innerWidth() + 300); $lightbox_sidebar.css('display', 'block'); var cff_post_author=""; var consentGiven=(typeof window.cff!=='undefined'&&typeof window.cff.feeds!=='undefined') ? window.cff.feeds[0].settings.consentGiven:true; if(consentGiven&&typeof from_id!=='undefined'){ cff_post_author="

    "+date_in_correct_format+"

    "+author_name+"
    "; }else{ cff_post_author="

    "+date_in_correct_format+"

    "; } $('.cff-lightbox-dataContainer .cff-lightbox-close').remove(); $lightbox_sidebar.html("
    " + cff_post_author + "

    " + $('.cff-lightbox-caption-text').html() + '

    ' + $('#cff_'+this.album[this.currentImageIndex].postid+' .cff-comments-box')[0].outerHTML); this.$lightbox.find('.cff-lightbox-close').on('click', function(){ self.end(); if(cff_supports_video()) $('#cff-lightbox-wrapper video.cff-lightbox-video')[0].pause(); $('#cff-lightbox-wrapper iframe').attr('src', ''); if($('body').length){ $('body').removeClass('cff_no_scroll'); } return false; }); setTimeout(function(){ if($lightbox_thumbs_holder.find('a').length > 1){ $lightbox_sidebar.find('.cff-page-name a').text($lightbox_thumbs_holder.find('a.cff-selected').attr('data-page-name')); $lightbox_sidebar.find('.cff-date').text($lightbox_thumbs_holder.find('a.cff-selected').attr('data-post-date')); }}, 0); $lightbox_thumbs_holder.css('margin-top', -10); if($lightbox_sidebar.find('.cff-reactions-count').innerWidth() > 150){ $lightbox_sidebar.find('.cff-likes-this-text').addClass('cff-long'); } $lightbox_sidebar.find('.cff-comment:visible').each(function(){ var $thisComment=jQuery(this); var consentGiven=(typeof window.cff!=='undefined'&&typeof window.cff.feeds!=='undefined') ? window.cff.feeds[0].settings.consentGiven:true; if(consentGiven){ $thisComment.find('.cff-comment-img:not(.cff-comment-reply-img) a, .cff-comment-img:not(.cff-comment-reply-img) span').html('Avatar'); }}); $lightbox_sidebar.find('.cff-comment-replies a').on('click', function(){ cffLoadCommentReplies($(this)); }); $lightbox_sidebar.find('.cff-show-more-comments a').attr('href', $lightbox_sidebar.find('.cff-comment-on-facebook a').attr('href')); }else{ $('.cff-lightbox-wrapper .cff-lightbox-sidebar').html(''); $('.cff-lightbox-wrapper').removeClass('cff-enable-lb-comments'); } $('#cff-lightbox-wrapper').removeClass('cff-has-iframe cff-fb-player cff-has-thumbs'); if(typeof this.album[this.currentImageIndex].iframe!=='undefined'){ if(this.album[this.currentImageIndex].iframe.length&&this.album[this.currentImageIndex].iframe!=='link'){ var videoURL=this.album[this.currentImageIndex].iframe; $('#cff-lightbox-wrapper').addClass('cff-has-iframe'); if(videoURL.indexOf("https://www.facebook.com/v2.3/plugins/video.php?")!=-1) $('#cff-lightbox-wrapper').addClass('cff-fb-player'); if(videoURL.indexOf(".swf") > -1||videoURL.indexOf("&autoplay=1")!=-1){ var autoplayParam=''; }else{ var autoplayParam='?autoplay=1'; } var vInt=setTimeout(function(){ $('#cff-lightbox-wrapper iframe').attr({ 'src':videoURL + autoplayParam + "&mute=0" }); }, 500); }} var isThumbnail=false; if(this.album[this.currentImageIndex].isthumbnail) isThumbnail=true; if(!isThumbnail) $('.cff-lightbox-thumbs-holder').empty().removeClass('cff-animate'); if(this.album[this.currentImageIndex].link==$('.cff-lightbox-image').attr('src')){ $('.cff-lightbox-facebook').attr('href', this.album[this.currentImageIndex].facebookurl); } if(this.album[this.currentImageIndex].showthumbs=='true'){ $('.cff-lightbox-thumbs').show(); var thisPostId=this.album[this.currentImageIndex].postid, albumInfo='', albumThumbs='', albumsonly=false; if(this.album[this.currentImageIndex].type=='albumsonly') albumsonly=true; if(typeof thumbsArr[thisPostId]!=='undefined'){ $.each(thumbsArr[thisPostId], function(i, thumb){ var origCaption=thumb[5].replace(/"/g, '"'); var albumIndex=0; $.each(self.album, function(i, albumItem){ if(albumItem.postid==thisPostId){ albumIndex=i; return false; }}); var lightboxImageOrder=(parseInt(albumIndex)+parseInt(i)); if(typeof thumb[8]=='undefined') thumb[8]=thumb[0]; albumThumbs +=''; if(i > 0){ cffInsertLightboxImage(lightboxImageOrder, thumb[0], thumb[4], thumb[3], thisPostId, albumsonly, true, thumb[6], thumb[7], thumb[8]); }}); $('.cff-lightbox-thumbs-holder').html('
    ' + albumThumbs + '
    ').addClass('cff-animate'); $('.cff-lightbox-wrapper').addClass('cff-has-thumbs'); jQuery(".cff-lightbox-thumbs-holder a").imgLiquid({fill:true, useBackgroundSize:true}); $('.cff-loader').hide(); $('.cff-lightbox-thumbs-holder').css('min-height', 0); }else{ if(typeof cffsiteurl==='undefined'||cffsiteurl=='') cffsiteurl=window.location.host + '/wp-content/plugins'; var $cffClosest=$('#cff_'+thisPostId).closest('.cff'), cff_page_id=$('#cff_'+thisPostId).attr('data-page-id'), shortcode_token_param=cffGetShortcodeToken($cffClosest), useowntoken=''; if($cffClosest.attr('data-own-token')=='true') useowntoken='&useowntoken=true'; var cffAttachmentsUrl=cffsiteurl + "/custom-facebook-feed-pro/thumbs.php?id=" + thisPostId + '&pageid=' + cff_page_id + useowntoken + shortcode_token_param, thumbsData=[]; if(albumsonly){ cffAttachmentsUrl=cffAttachmentsUrl + '&albumsonly=true'; var consentGiven=(typeof window.cff!=='undefined'&&typeof window.cff.feeds!=='undefined') ? window.cff.feeds[0].settings.consentGiven:true; if(consentGiven){ $('.cff-lightbox-thumbs-holder').css('min-height', 45).after('
    '); }} var cffgroupalbums=this.album[this.currentImageIndex].cffgroupalbums; if(cffgroupalbums) cffAttachmentsUrl=cffAttachmentsUrl + '&usegrouptoken=' + cffgroupalbums; var submitData={ action: 'cff_thumbs', id: thisPostId, pageid: cff_page_id, }; if(shortcode_token_param!==''){ var token=shortcode_token_param.split('='); submitData.at=token[1]; } if($cffClosest.attr('data-own-token')=='true'){ submitData.useowntoken=true; } if(cffgroupalbums){ submitData.usegrouptoken=cffgroupalbums; } if(albumsonly){ submitData.albumsonly=true; } var onSuccess=function(data){ data=JSON.parse(data); if(albumsonly){ $.each(data.data, function(i, photoItem){ var dataCaption=''; if(photoItem.name) dataCaption=photoItem.name; dataCaption=cffLinkify(dataCaption); dataCaption=dataCaption.replace(hashRegex , cffReplaceHashtags); dataCaption=String(dataCaption).replace(/& /g, '& ').replace(//g, '>').replace(/"/g, '"').replace(/\n/g, "
    "); origCaption=String(origCaption).replace(/& /g, '& ').replace(//g, '>').replace(/"/g, '"').replace(/\n/g, "
    "); var lightboxImageOrder=(parseInt(self.currentImageIndex)+parseInt(i)); var cffThumbHref=photoItem.source, cffPhotoItemWidth=photoItem.width, cffPhotoItemHeight=photoItem.height; if(typeof photoItem.images[0]!=='undefined'){ cffThumbHref=photoItem.images[0].source; cffPhotoItemWidth=photoItem.images[0].width; cffPhotoItemHeight=photoItem.images[0].height; } if(typeof photoItem.images[ photoItem.images.length-2 ]!=='undefined'){ var cffThumbImg=photoItem.images[ photoItem.images.length-2 ].source; }else{ var cffThumbImg=cffThumbHref; } albumThumbs +=''; thumbsData.push([cffThumbHref, cffPhotoItemWidth, cffPhotoItemHeight, 'http://facebook.com/'+photoItem.id, dataCaption, origCaption, undefined, undefined, cffThumbImg]); if(i > 0){ cffInsertLightboxImage(lightboxImageOrder, cffThumbHref, dataCaption, 'http://facebook.com/'+photoItem.id, thisPostId, albumsonly, true, cffThumbImg); }}); }else{ if(typeof data.attachments!=='undefined'){ $.each(data.attachments.data[0].subattachments.data, function(i, subattachment){ var dataCaption=''; if(subattachment.description) dataCaption=subattachment.description; origCaption=String(origCaption).replace(/"/g, '"'); dataCaption=cffLinkify(dataCaption); dataCaption=dataCaption.replace(hashRegex , cffReplaceHashtags); dataCaption=String(dataCaption).replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"').replace(/\n/g, "
    "); var lightboxImageOrder=(parseInt(self.currentImageIndex)+parseInt(i)); albumThumbs +=''; thumbsData.push([subattachment.media.image.src, subattachment.media.image.width, subattachment.media.image.height, subattachment.url, dataCaption, origCaption, author_name, date_in_correct_format]); if(i > 0){ cffInsertLightboxImage(lightboxImageOrder, subattachment.media.image.src, dataCaption, subattachment.url, thisPostId, albumsonly, true, author_name, date_in_correct_format, subattachment.media.image.src); }}); }} if(albumThumbs.length > 0){ $('.cff-lightbox-thumbs-holder').html('
    ' + albumThumbs + '
    ').addClass('cff-animate'); $('.cff-lightbox-wrapper').addClass('cff-has-thumbs'); } jQuery(".cff-lightbox-thumbs-holder .cff-lightbox-attachment").imgLiquid({fill:true, useBackgroundSize:true}); $('.cff-loader').hide(); $('.cff-lightbox-thumbs-holder').css('min-height', 0); thumbsArr[ thisPostId ]=thumbsData; if(albumsonly){ jQuery('.cff-lightbox-container').removeClass('cff-album-loading'); jQuery('.cff-lightbox-prev, .cff-lightbox-next').show(); }}; $('.cff-gdpr-more-link').remove(); if(window.cff.feeds[ this.album[this.currentImageIndex].feedIndex ].settings.consentGiven){ if(albumsonly){ jQuery('.cff-lightbox-container').addClass('cff-album-loading'); jQuery('.cff-lightbox-prev, .cff-lightbox-next').hide(); } cffAjax(submitData,onSuccess); }else{ if(parseInt(this.album[this.currentImageIndex].count) > 0){ $('.cff-lightbox-facebook').after('
    +' + this.album[this.currentImageIndex].count + '
    '); $('.cff-gdpr-more-link').imgLiquid({fill:true, useBackgroundSize:true}); setTimeout(function (){ $('.cff-gdpr-more-link span').css({ 'margin-top': '-' + ($('.cff-gdpr-more-link span').height() / 2) + 'px', 'margin-right': '-' + ($('.cff-gdpr-more-link span').width() / 2) + 'px', 'display': 'block' }); }, 200); }} }}else{ $('.cff-lightbox-thumbs').hide(); } $(".cff-lightbox-attachment").removeClass('cff-selected'); $(".cff-lightbox-attachment[href='"+$('.cff-lightbox-image').attr('src')+"']").addClass('cff-selected'); function cffInsertLightboxImage(currentImageIndex, link, title, facebookurl, postid, albumsonly, isThumbnail, cffThumbImg){ var found=false; $.each(self.album, function(i, thumbitem){ if(( thumbitem.link==link)&&(thumbitem.postid==postid)){ found=true; return; }}); if(found==true) return; (albumsonly) ? postType='albumsonly':postType=''; (albumsonly) ? lbcomments='false':lbcomments='true'; self.album.splice(currentImageIndex, 0, { link: link, title: title, postid: postid, showthumbs: 'true', facebookurl: facebookurl, video: '', iframe: '', type: postType, cffgroupalbums: undefined, isthumbnail: isThumbnail, lbcomments: lbcomments, thumbimg: cffThumbImg }); } this.$lightbox.find('.cff-lightbox-caption').fadeIn('fast'); if(typeof this.album[this.currentImageIndex].title!=='undefined'&&this.album[this.currentImageIndex].title!==""){ var origCaption=this.album[this.currentImageIndex].title; origCaption=origCaption.replace(hashRegex , cffReplaceHashtags); origCaption=String(origCaption).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"'); var $lightboxCaption=this.$lightbox.find('.cff-lightbox-caption'), $lightboxCaptionText=$lightboxCaption.find('.cff-lightbox-caption-text'); if(this.album[this.currentImageIndex].link==$('.cff-lightbox-image').attr('src')) $lightboxCaptionText.html(origCaption); if($lightboxCaptionText.text()==' '||$lightboxCaptionText.text()==''){ $lightboxCaption.addClass('cff-no-caption'); }else{ $lightboxCaption.removeClass('cff-no-caption'); }}else{ if(albumsonly||this.album[this.currentImageIndex].title===undefined) this.$lightbox.find('.cff-lightbox-caption-text').html(''); if(this.$lightbox.find('.cff-lightbox-caption .cff-lightbox-caption-text').text().length < 1) this.$lightbox.find('.cff-lightbox-caption').addClass('cff-no-caption').find('.cff-lightbox-caption-text').html(''); } this.$lightbox.find('.cff-lightbox-facebook, .cff-lightbox-caption-text a, .cff-lightbox-sidebar a:not(.cff-comment-replies-a), .cff_gdpr_notice, .cff-gdpr-more-link').off('click').on('click', function(event){ window.open($(this).attr('href'), '_blank' ) } ); if(this.album.length > 1&&this.options.showImageNumberLabel){ this.$lightbox.find('.cff-lightbox-number').text(this.options.albumLabel(this.currentImageIndex + 1, this.album.length)).fadeIn('fast'); }else{ this.$lightbox.find('.cff-lightbox-number').hide(); } if(typeof cffLightboxAction==='function'){ setTimeout(function(){ cffLightboxAction(); },100); } this.$outerContainer.removeClass('animating'); this.$lightbox.find('.cff-lightbox-dataContainer').fadeIn(this.options.resizeDuration, function(){ return self.sizeOverlay(); }); }; Lightbox.prototype.preloadNeighboringImages=function(){ if(this.album.length > this.currentImageIndex + 1){ var preloadNext=new Image(); preloadNext.src=this.album[this.currentImageIndex + 1].link; } if(this.currentImageIndex > 0){ var preloadPrev=new Image(); preloadPrev.src=this.album[this.currentImageIndex - 1].link; }}; Lightbox.prototype.enableKeyboardNav=function(){ $(document).on('keyup.keyboard', $.proxy(this.keyboardAction, this)); }; Lightbox.prototype.disableKeyboardNav=function(){ $(document).off('.keyboard'); }; Lightbox.prototype.keyboardAction=function(event){ var KEYCODE_ESC=27; var KEYCODE_LEFTARROW=37; var KEYCODE_RIGHTARROW=39; var keycode=event.keyCode; var key=String.fromCharCode(keycode).toLowerCase(); if(keycode===KEYCODE_ESC||key.match(/x|o|c/)){ if(cff_supports_video()) $('#cff-lightbox-wrapper video.cff-lightbox-video')[0].pause(); $('#cff-lightbox-wrapper iframe').attr('src', ''); this.end(); }else if(key==='p'||keycode===KEYCODE_LEFTARROW){ if(jQuery('.cff-lightbox-container').hasClass('cff-album-loading')){ return; } if(this.currentImageIndex!==0){ this.changeImage(this.currentImageIndex - 1); }else if(this.options.wrapAround&&this.album.length > 1){ this.changeImage(this.album.length - 1); } if(cff_supports_video()) $('#cff-lightbox-wrapper video.cff-lightbox-video')[0].pause(); $('#cff-lightbox-wrapper iframe').attr('src', ''); }else if(key==='n'||keycode===KEYCODE_RIGHTARROW){ if(jQuery('.cff-lightbox-container').hasClass('cff-album-loading')){ return; } if(this.currentImageIndex!==this.album.length - 1){ this.changeImage(this.currentImageIndex + 1); }else if(this.options.wrapAround&&this.album.length > 1){ this.changeImage(0); } if(cff_supports_video()) $('#cff-lightbox-wrapper video.cff-lightbox-video')[0].pause(); $('#cff-lightbox-wrapper iframe').attr('src', ''); }}; Lightbox.prototype.end=function(){ this.disableKeyboardNav(); $(window).off("resize", this.sizeOverlay); this.$lightbox.fadeOut(this.options.fadeDuration); this.$overlay.fadeOut(this.options.fadeDuration); $('select, object, embed').css({ visibility: "visible" }); }; return Lightbox; })(); $(function(){ var options=new LightboxOptions(); var lightbox=new Lightbox(options); }); }).call(this); function cff_supports_video(){ return !!document.createElement('video').canPlayType; }} if(jQuery('#cff.cff-lb').length) cffLightbox(); }; jQuery(document).ready(function(){ $window=jQuery(window), $the_post=jQuery('#the-post'), $wrapper=jQuery("#wrapper"); if(tie.SmothScroll){ tie_SmothScroll(); } $wrapper.fitVids(); jQuery('a.lightbox-enabled').iLightBox({ skin: tie.lightbox_skin}); if(tie.lightbox_all){ $the_post.find("div.entry a").not("div.entry .gallery a").each(function(i, el){ var href_value=el.href; if(/\.(jpg|jpeg|png|gif)$/.test(href_value)){ jQuery(this).iLightBox({ skin: tie.lightbox_skin}); }}); }; if(tie.lightbox_gallery){ $the_post.find("div.entry .gallery a").each(function(i, el){ var href_value=el.href; if(/\.(jpg|jpeg|png|gif)$/.test(href_value)){ jQuery(this).addClass('ilightbox-gallery'); }}); $the_post.find('.ilightbox-gallery').iLightBox({ skin: tie.lightbox_skin, path: tie.lightbox_thumb, controls: { arrows: tie.lightbox_arrows, }}); }; jQuery('section.videos-lightbox a.single-videolighbox').iLightBox({ skin: tie.lightbox_skin, path: tie.lightbox_thumb, controls: { arrows: tie.lightbox_arrows, }}); if(tie.woocommerce_lightbox=='yes'){ jQuery("a[rel='lightbox-enabled[product-gallery]']").iLightBox({ skin: tie.lightbox_skin, path: tie.lightbox_thumb, controls: { arrows: tie.lightbox_arrows, }}); }; jQuery("#slide-out-open").click(function(){ if(jQuery(this).hasClass("slide-out-open")){ $wrapper.css({overflow:"hidden"}); jQuery("body").addClass('js-nav'); jQuery(this).removeClass('slide-out-open').addClass('slide-out-close'); return false; } else if(jQuery(this).hasClass("slide-out-close")){ $wrapper.css({overflow:"auto"}); jQuery("body").removeClass('js-nav'); jQuery(this).removeClass('slide-out-close').addClass('slide-out-open'); return false; }}); if(!Modernizr.csstransforms||!Modernizr.csstransitions||!Modernizr.csstransforms3d){ var TieSlideOpenIE=false ; jQuery('#slide-out').hide(); jQuery("#slide-out-open").click(function(){ jQuery('#mobile-menu').show(); jQuery('#slide-out').show(); jQuery(this).hide(); jQuery('div.wrapper-outer').css({overflow:"hidden"}); jQuery('#open-slide-overlay').remove(); jQuery('body').append('
    '); TieSlideOpenIE=true ; }); jQuery(document).on("click", "#open-slide-overlay" , function(){ if(TieSlideOpenIE){ jQuery('#slide-out').hide(); jQuery('#mobile-menu').hide(); jQuery('#slide-out-open').show(); jQuery('div.wrapper-outer').css({overflow:"auto"}); jQuery(this).remove(); TieSlideOpenIE=false ; }}); } if(tie.mobile_menu_active){ var mobileItems=jQuery('#main-nav div.main-menu').clone(); mobileItems.find('div.mega-menu-content').remove(); mobileItems.find('li.menu-item-has-children').append(''); jQuery('#slide-out #mobile-menu').append(mobileItems); if(tie.mobile_menu_top){ var mobileItemsTop=jQuery('#top-nav div.top-menu ul.menu').clone(); mobileItemsTop.find('li.menu-item-has-children').append(''); jQuery('#slide-out #mobile-menu').append(mobileItemsTop); }} jQuery("#mobile-menu li.menu-item-has-children i.mobile-arrows").click(function(){ if(jQuery(this).hasClass("fa-chevron-down")) jQuery(this).removeClass("fa-chevron-down").addClass("fa-chevron-up"); else jQuery(this).removeClass("fa-chevron-up").addClass("fa-chevron-down"); jQuery(this).parent().find('ul:first').toggle(); }); var $topcontrol=jQuery('#topcontrol'); $window.scroll(function(){ if(jQuery(this).scrollTop() > 100){ $topcontrol.css({bottom:"10px"}); }else{ $topcontrol.css({bottom:"-100px"}); }}); $topcontrol.click(function(){ jQuery('html, body').animate({scrollTop: '0px'}, 800); return false; }); jQuery('a.go-to-the-post').click(function(){ jQuery('html, body').animate({scrollTop: $the_post.offset().top}, 500); return false; }); jQuery('.tooltip-nw').tipsy({fade: true, gravity: 'nw'}); jQuery('.tooltip-ne').tipsy({fade: true, gravity: 'ne'}); jQuery('.tooltip-w').tipsy({fade: true, gravity: 'w' }); jQuery('.tooltip-e').tipsy({fade: true, gravity: 'e' }); jQuery('.tooltip-sw').tipsy({fade: true, gravity: 'w' }); jQuery('.tooltip-se').tipsy({fade: true, gravity: 'e' }); jQuery('.ttip, .tooltip-n').tipsy({fade: true, gravity: 's'}); jQuery('.tooldown, .tooltip-s').tipsy({fade: true, gravity: 'n'}); jQuery("h3.toggle-head-open").click(function (){ jQuery(this).parent().find("div.toggle-content").slideToggle("slow"); jQuery(this).hide(); jQuery(this).parent().find("h3.toggle-head-close").show(); }); jQuery("h3.toggle-head-close").click(function (){ jQuery(this).parent().find("div.toggle-content").slideToggle("slow"); jQuery(this).hide(); jQuery(this).parent().find("h3.toggle-head-open").show(); }); jQuery("#main-nav li.mega-menu:not(#main-nav li li)").hover(function(){ var menuWidth=jQuery('#main-nav div.container').width(); var menuPosition=jQuery('#main-nav div.container').offset(); var menuItemPosition=jQuery(this).offset(); var PositionLeft=menuItemPosition.left-menuPosition.left+1; jQuery(this).find('div.mega-menu-block').css({ left: '-'+PositionLeft+'px', width: menuWidth }); }); jQuery("div.mega-cat-wrapper").each(function(){ jQuery(this).find("div.mega-cat-content-tab").hide(); jQuery(this).find("ul.mega-cat-sub-categories li:first").addClass("cat-active").show(); jQuery(this).find("div.mega-cat-content-tab:first").addClass("already-loaded").show(); jQuery(this).find("ul.mega-cat-sub-categories li").click(function(event){ event.preventDefault(); jQuery(this).parent().find("li").removeClass("cat-active"); jQuery(this).addClass("cat-active"); jQuery(this).parent().parent().parent().find("div.mega-cat-content-tab").hide(); var activeTab=jQuery(this).find("a").attr("href"); if(jQuery(activeTab).hasClass("already-loaded")){ jQuery(activeTab).fadeIn(); }else{ jQuery(activeTab).addClass("loading-items").fadeIn(600 , function(){ jQuery(this).removeClass("loading-items").addClass("already-loaded"); }); } return false; }); }); var userAgent=navigator.userAgent; if(userAgent.match(/iPad/i)){ if(userAgent.search("Safari") >=0&&userAgent.search("Chrome") < 0){ jQuery('#main-nav li.menu-item-has-children a, #main-nav li.mega-menu a, #top-nav li.menu-item-has-children a').attr("onclick","return true"); }} jQuery("div.cat-box-content").each(function(){ jQuery(this).find("div.cat-tabs-wrap").hide(); jQuery(this).find("div.cat-tabs-header ul li:first").addClass("active").show(); jQuery(this).find("div.cat-tabs-wrap:first").show(); jQuery(this).find("div.cat-tabs-header ul li").click(function(event){ event.preventDefault(); jQuery(this).parent().find("li").removeClass("active"); jQuery(this).addClass("active"); jQuery(this).parent().parent().parent().find("div.cat-tabs-wrap").hide(); var activeTab=jQuery(this).find("a").attr("href"); jQuery(activeTab).fadeIn(); return false; }); }); var $tabbed_Widget_tabs_wrap=jQuery("#tabbed-widget div.tabs-wrap"); $tabbed_Widget_tabs_wrap.hide(); jQuery("#tabbed-widget ul.posts-taps li:first").addClass("active").show(); jQuery("#tabbed-widget div.tabs-wrap:first").show(); jQuery("#tabbed-widget li.tabs").click(function(){ jQuery("#tabbed-widget ul.posts-taps li").removeClass("active"); jQuery(this).addClass("active"); $tabbed_Widget_tabs_wrap.hide(); var activeTab=jQuery(this).find("a").attr("href"); jQuery(activeTab).slideDown(); return false; }); $window.smartresize(function(){ jQuery("div.group_items-box").each(function(i, el){ var groups_height=jQuery(this).find('div.group_items:first-child').height(); jQuery(this).height(groups_height); }); }); var stickySidebarTop=0; var $fixed_enabled=jQuery("#main-nav.fixed-enabled"); if(!tie_isMobile.any()&&$fixed_enabled.length > 0){ stickySidebarTop=50; jQuery('#theme-header').imagesLoaded(function(){ jQuery(function(){ var navScroll_1=jQuery(document).scrollTop(); var headerHeight=$fixed_enabled .offset().top; $window.scroll(function(){ var navScroll_2=jQuery(document).scrollTop(); if(navScroll_2 > headerHeight){ $fixed_enabled.addClass('fixed-nav'); }else{ $fixed_enabled.removeClass('fixed-nav');} if(navScroll_2 > navScroll_1){ $fixed_enabled.removeClass('fixed-nav-appear');}else{ $fixed_enabled.addClass('fixed-nav-appear');} navScroll_1=jQuery(document).scrollTop(); }); }); }); } if(!tie_isMobile.any()&&tie.sticky_sidebar){ jQuery('#sidebar').theiaStickySidebar({"containerSelector":".content","additionalMarginTop": stickySidebarTop }); } jQuery(function(){ var $check_also_box=jQuery("#check-also-box"); if(tie.is_singular&&$check_also_box.length > 0){ var articleHeight=$the_post.outerHeight(); var checkAlsoClosed=false ; $window.scroll(function(){ if(!checkAlsoClosed){ var articleScroll=jQuery(document).scrollTop(); if(articleScroll > articleHeight){ $check_also_box.addClass('show-check-also');}else{ $check_also_box.removeClass('show-check-also');}} }); } jQuery('#check-also-close').click(function(){ $check_also_box.removeClass("show-check-also"); checkAlsoClosed=true ; return false; }); }); if(tie.is_singular&&tie.reading_indicator){ var reading_content=$the_post.find('.entry'); if(reading_content.length > 0){ reading_content.imagesLoaded(function(){ var content_height=reading_content.height(); window_height=$window.height(); $window.scroll(function(){ var percent=0, content_offset=reading_content.offset().top; window_offest=$window.scrollTop(); if(window_offest > content_offset){ percent=100 * (window_offest - content_offset) / (content_height - window_height); } jQuery('#reading-position-indicator').css('width', percent + '%'); }); }); }} if(tie.is_singular){ jQuery("#reply-title").after('
    '); }}); function createTicker(){ var tickerLIs=jQuery("#breaking-news ul").children(); tickerItems=new Array(); tickerLIs.each(function(el){ tickerItems.push(jQuery(this).html()); }); i=0 ; rotateTicker(); } var isInTag=false; function typetext(){ var $breaking_news=jQuery('#breaking-news ul'); if($breaking_news.length > 0){ var thisChar=tickerText.substr(c, 1); if(thisChar=='<'){ isInTag=true; } if(thisChar=='>'){ isInTag=false; } $breaking_news.html(tickerText.substr(0, c++)); if(c < tickerText.length+1) if(isInTag){ typetext(); }else{ setTimeout("typetext()", 35); }else{ c=1; tickerText=""; }} } jQuery(function(){ var win_height_padded=$window.height() * .9; $window.on('scroll', tieRevealOnScroll); function tieRevealOnScroll(){ var scrolled=$window.scrollTop(), win_height_padded=$window.height() * .9; jQuery("body.lazy-enabled #theme-footer div.post-thumbnail, body.lazy-enabled #main-content div.post-thumbnail, body.lazy-enabled #main-content img:not(.ei-slider-thumbs img), body.lazy-enabled #featured-posts").each(function (){ var $this=jQuery(this), offsetTop=$this.offset().top; if(scrolled + win_height_padded > offsetTop){ jQuery(this).addClass('tie-appear'); }}); } tieRevealOnScroll(); }); var tie_isMobile={Android:function(){return navigator.userAgent.match(/(?=.*\bAndroid\b)(?=.*\bMobile\b)/i)},BlackBerry:function(){return navigator.userAgent.match(/BlackBerry/i)},iOS:function(){return navigator.userAgent.match(/iPhone|iPod/i)},Opera:function(){return navigator.userAgent.match(/Opera Mini/i)},Windows:function(){return navigator.userAgent.match(/IEMobile/i)},any:function(){return tie_isMobile.Android()||tie_isMobile.BlackBerry()||tie_isMobile.iOS()||tie_isMobile.Opera()||tie_isMobile.Windows()}}; (function(e,t){var n=function(e,t,n){var r;return function(){function u(){if(!n)e.apply(s,o);r=null}var s=this,o=arguments;if(r)clearTimeout(r);else if(n)e.apply(s,o);r=setTimeout(u,t||100)}};jQuery.fn[t]=function(e){return e?this.bind("resize",n(e)):this.trigger(t)}})(jQuery,"smartresize") function tie_SmothScroll(){function c(){var e=false;if(e){N("keydown",y)}if(t.keyboardSupport&&!e){T("keydown",y)}}function h(){if(!document.body)return;var e=document.body;var i=document.documentElement;var a=window.innerHeight;var f=e.scrollHeight;o=document.compatMode.indexOf("CSS")>=0?i:e;u=e;c();s=true;if(top!=self){r=true}else if(f>a&&(e.offsetHeight<=a||i.offsetHeight<=a)){var l=false;var h=function(){if(!l&&i.scrollHeight!=document.height){l=true;setTimeout(function(){i.style.height=document.height+"px";l=false},500)}};i.style.height="auto";setTimeout(h,10);if(o.offsetHeight<=a){var p=document.createElement("div");p.style.clear="both";e.appendChild(p)}}if(!t.fixedBackground&&!n){e.style.backgroundAttachment="scroll";i.style.backgroundAttachment="scroll"}}function m(e,n,r,i){i||(i=1e3);k(n,r);if(t.accelerationMax!=1){var s=+(new Date);var o=s-v;if(o1){u=Math.min(u,t.accelerationMax);n*=u;r*=u}}v=+(new Date)}p.push({x:n,y:r,lastX:n<0?.99:-.99,lastY:r<0?.99:-.99,start:+(new Date)});if(d){return}var a=e===document.body;var f=function(s){var o=+(new Date);var u=0;var l=0;for(var c=0;c=t.animationTime;var g=m?1:v/t.animationTime;if(t.pulseAlgorithm){g=D(g)}var y=h.x*g-h.lastX>>0;var b=h.y*g-h.lastY>>0;u+=y;l+=b;h.lastX+=y;h.lastY+=b;if(m){p.splice(c,1);c--}}if(a){window.scrollBy(u,l)}else{if(u)e.scrollLeft+=u;if(l)e.scrollTop+=l}if(!n&&!r){p=[]}if(p.length){M(f,e,i/t.frameRate+1)}else{d=false}};M(f,e,0);d=true}function g(e){if(!s){h()}var n=e.target;var r=x(n);if(!r||e.defaultPrevented||C(u,"embed")||C(n,"embed")&&/\.pdf/i.test(n.src)){return true}var i=e.wheelDeltaX||0;var o=e.wheelDeltaY||0;if(!i&&!o){o=e.wheelDelta||0}if(!t.touchpadSupport&&A(o)){return true}if(Math.abs(i)>1.2){i*=t.stepSize/120}if(Math.abs(o)>1.2){o*=t.stepSize/120}m(r,-i,-o);e.preventDefault()}function y(e){var n=e.target;var r=e.ctrlKey||e.altKey||e.metaKey||e.shiftKey&&e.keyCode!==l.spacebar;if(/input|textarea|select|embed/i.test(n.nodeName)||n.isContentEditable||e.defaultPrevented||r){return true}if(C(n,"button")&&e.keyCode===l.spacebar){return true}var i,s=0,o=0;var a=x(u);var f=a.clientHeight;if(a==document.body){f=window.innerHeight}switch(e.keyCode){case l.up:o=-t.arrowScroll;break;case l.down:o=t.arrowScroll;break;case l.spacebar:i=e.shiftKey?1:-1;o=-i*f*.9;break;case l.pageup:o=-f*.9;break;case l.pagedown:o=f*.9;break;case l.home:o=-a.scrollTop;break;case l.end:var c=a.scrollHeight-a.scrollTop-f;o=c>0?c+10:0;break;case l.left:s=-t.arrowScroll;break;case l.right:s=t.arrowScroll;break;default:return true}m(a,s,o);e.preventDefault()}function b(e){u=e.target}function S(e,t){for(var n=e.length;n--;)w[E(e[n])]=t;return t}function x(e){var t=[];var n=o.scrollHeight;do{var i=w[E(e)];if(i){return S(t,i)}t.push(e);if(n===e.scrollHeight){if(!r||o.clientHeight+100?1:-1;t=t>0?1:-1;if(i.x!==e||i.y!==t){i.x=e;i.y=t;p=[];v=0}}function A(e){if(!e)return;e=Math.abs(e);f.push(e);f.shift();clearTimeout(L);var t=O(f[0],120)&&O(f[1],120)&&O(f[2],120);return!t}function O(e,t){return Math.floor(e/t)==e/t}function _(e){var n,r,i;e=e*t.pulseScale;if(e<1){n=e-(1-Math.exp(-e))}else{r=Math.exp(-1);e-=1;i=1-Math.exp(-e);n=r+i*(1-r)}return n*t.pulseNormalize}function D(e){if(e>=1)return 1;if(e<=0)return 0;if(t.pulseNormalize==1){t.pulseNormalize/=_(1)}return _(e)}var e={frameRate:150,animationTime:400,stepSize:120,pulseAlgorithm:true,pulseScale:8,pulseNormalize:1,accelerationDelta:20,accelerationMax:1,keyboardSupport:true,arrowScroll:50,touchpadSupport:true,fixedBackground:true,excluded:""};var t=e;var n=false;var r=false;var i={x:0,y:0};var s=false;var o=document.documentElement;var u;var a;var f=[120,120,120];var l={left:37,up:38,right:39,down:40,spacebar:32,pageup:33,pagedown:34,end:35,home:36};var t=e;var p=[];var d=false;var v=+(new Date);var w={};setInterval(function(){w={}},10*1e3);var E=function(){var e=0;return function(t){return t.uniqueID||(t.uniqueID=e++)}}();var L;var M=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(e,t,n){window.setTimeout(e,n||1e3/60)}}();var P=/chrome/i.test(window.navigator.userAgent);var H=null;if("onwheel"in document.createElement("div"))H="wheel";else if("onmousewheel"in document.createElement("div"))H="mousewheel";if(H&&P){T(H,g);T("mousedown",b);T("load",h)}} ;window.Modernizr=function(a,b,c){function B(a){j.cssText=a}function C(a,b){return B(m.join(a+";")+(b||""))}function D(a,b){return typeof a===b}function E(a,b){return!!~(""+a).indexOf(b)}function F(a,b){for(var d in a){var e=a[d];if(!E(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function G(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:D(f,"function")?f.bind(d||b):f}return!1}function H(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+o.join(d+" ")+d).split(" ");return D(b,"string")||D(b,"undefined")?F(e,b):(e=(a+" "+p.join(d+" ")+d).split(" "),G(e,b,c))}var d="2.7.0",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n="Webkit Moz O ms",o=n.split(" "),p=n.toLowerCase().split(" "),q={svg:"http://www.w3.org/2000/svg"},r={},s={},t={},u=[],v=u.slice,w,x=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["­",'"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},y=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return x("@media "+b+" { #"+h+" { position: absolute; }}",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},z={}.hasOwnProperty,A;!D(z,"undefined")&&!D(z.call,"undefined")?A=function(a,b){return z.call(a,b)}:A=function(a,b){return b in a&&D(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=v.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(v.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(v.call(arguments)))};return e}),r.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:x(["@media (",m.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},r.csstransforms=function(){return!!H("transform")},r.csstransforms3d=function(){var a=!!H("perspective");return a&&"webkitPerspective"in g.style&&x("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},r.csstransitions=function(){return H("transition")},r.svg=function(){return!!b.createElementNS&&!!b.createElementNS(q.svg,"svg").createSVGRect};for(var I in r)A(r,I)&&(w=I.toLowerCase(),e[w]=r[I](),u.push((e[w]?"":"no-")+w));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)A(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},B(""),i=k=null,function(a,b){function l(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function m(){var a=s.elements;return typeof a=="string"?a.split(" "):a}function n(a){var b=j[a[h]];return b||(b={},i++,a[h]=i,j[i]=b),b}function o(a,c,d){c||(c=b);if(k)return c.createElement(a);d||(d=n(c));var g;return d.cache[a]?g=d.cache[a].cloneNode():f.test(a)?g=(d.cache[a]=d.createElem(a)).cloneNode():g=d.createElem(a),g.canHaveChildren&&!e.test(a)&&!g.tagUrn?d.frag.appendChild(g):g}function p(a,c){a||(a=b);if(k)return a.createDocumentFragment();c=c||n(a);var d=c.frag.cloneNode(),e=0,f=m(),g=f.length;for(;e",g="hidden"in a,k=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){g=!0,k=!0}})();var s={elements:d.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:c,shivCSS:d.shivCSS!==!1,supportsUnknownElements:k,shivMethods:d.shivMethods!==!1,type:"default",shivDocument:r,createElement:o,createDocumentFragment:p};a.html5=s,r(b)}(this,b),e._version=d,e._prefixes=m,e._domPrefixes=p,e._cssomPrefixes=o,e.mq=y,e.testProp=function(a){return F([a])},e.testAllProps=H,e.testStyles=x,e.prefixed=function(a,b,c){return b?H(a,b,c):H(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+u.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f *").css("opacity",0);this.current=0;var c=this;this.$loading=b('
    ').prependTo(c.$el);b.when(this._preloadImages()).done(function(){c.$loading.hide();c._setImagesSize();c._initThumbs();c.$imgItems.eq(c.current).css({opacity:1,"z-index":10}).show().find("div.ei-title > *").css("opacity",1);if(c.options.autoplay){c._startSlideshow()}c._initEvents()})},_preloadImages:function(){var a=this,c=0;return b.Deferred(function(d){a.$images.each(function(e){b("").load(function(){if(++c===a.itemsCount){d.resolve()}}).attr("src",b(this).attr("src"))})}).promise()},_setImagesSize:function(){this.elWidth=this.$el.width();var a=this;this.$images.each(function(c){var d=b(this);imgDim=a._getImageDim(d.attr("src"));d.css({width:imgDim.width,height:imgDim.height,marginLeft:imgDim.left,marginTop:imgDim.top})})},_getImageDim:function(a){var b=new Image;b.src=a;var c=this.elWidth,d=this.$el.height(),e=d/c,f=b.width,g=b.height,h=g/f,i,j,k,l;if(e>h){j=d;i=d/h}else{j=c*h;i=c}return{width:i,height:j,left:(c-i)/2,top:(d-j)/2}},_initThumbs:function(){this.$sliderElems.css({"max-width":this.options.thumbMaxWidth+"%",width:100/this.itemsCount+"%"});this.$sliderthumbs.css("max-width",this.options.thumbMaxWidth*this.itemsCount+"%").show()},_startSlideshow:function(){var a=this;this.slideshow=setTimeout(function(){var b;a.current===a.itemsCount-1?b=0:b=a.current+1;a._slideTo(b);if(a.options.autoplay){a._startSlideshow()}},this.options.slideshow_interval)},_slideTo:function(a){if(a===this.current||this.isAnimating)return false;this.isAnimating=true;var c=this.$imgItems.eq(this.current),d=this.$imgItems.eq(a),e=this,f={zIndex:10},g={opacity:1};if(this.options.animation==="sides"){f.left=a>this.current?-1*this.elWidth:this.elWidth;g.left=0}d.find("div.ei-title > h2").css("margin-right",50+"px").stop().delay(this.options.speed*this.options.titlesFactor).animate({marginRight:0+"px",opacity:1},this.options.titlespeed,this.options.titleeasing).end().find("div.ei-title > h3").css("margin-right",-50+"px").stop().delay(this.options.speed*this.options.titlesFactor).animate({marginRight:0+"px",opacity:1},this.options.titlespeed,this.options.titleeasing);b.when(c.css("z-index",1).find("div.ei-title > *").stop().fadeOut(this.options.speed/2,function(){b(this).show().css("opacity",0)}),d.css(f).stop().animate(g,this.options.speed,this.options.easing),this.$sliderElem.stop().animate({left:this.$thumbs.eq(a).position().left},this.options.speed)).done(function(){c.css("opacity",0).find("div.ei-title > *").css("opacity",0);e.current=a;e.isAnimating=false})},_initEvents:function(){var c=this;b(a).on("smartresize.eislideshow",function(a){c._setImagesSize();c.$sliderElem.css("left",c.$thumbs.eq(c.current).position().left)});this.$thumbs.on("click.eislideshow",function(a){if(c.options.autoplay){clearTimeout(c.slideshow);c.options.autoplay=false}var d=b(this),e=d.index()-1;c._slideTo(e);return false})}};var f=function(a){if(this.console){console.error(a)}};b.fn.eislideshow=function(a){if(typeof a==="string"){var c=Array.prototype.slice.call(arguments,1);this.each(function(){var d=b.data(this,"eislideshow");if(!d){f("cannot call methods on eislideshow prior to initialization; "+"attempted to call method '"+a+"'");return}if(!b.isFunction(d[a])||a.charAt(0)==="_"){f("no such method '"+a+"' for eislideshow instance");return}d[a].apply(d,c)})}else{this.each(function(){var c=b.data(this,"eislideshow");if(!c){b.data(this,"eislideshow",new b.Slideshow(a,this))}})}return this}})(window,jQuery); (function(a){function b(a,b){return typeof a=="function"?a.call(b):a}function c(a){while(a=a.parentNode){if(a==document)return true}return false}function d(b,c){this.$element=a(b);this.options=c;this.enabled=true;this.fixTitle()}d.prototype={show:function(){var c=this.getTitle();if(c&&this.enabled){var d=this.tip();d.find(".tipsy-inner")[this.options.html?"html":"text"](c);d[0].className="tipsy";d.remove().css({top:0,left:0,visibility:"hidden",display:"block"}).prependTo(document.body);var e=a.extend({},this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight});var f=d[0].offsetWidth,g=d[0].offsetHeight,h=b(this.options.gravity,this.$element[0]);var i;switch(h.charAt(0)){case"n":i={top:e.top+e.height+this.options.offset,left:e.left+e.width/2-f/2};break;case"s":i={top:e.top-g-this.options.offset,left:e.left+e.width/2-f/2};break;case"e":i={top:e.top+e.height/2-g/2,left:e.left-f-this.options.offset};break;case"w":i={top:e.top+e.height/2-g/2,left:e.left+e.width+this.options.offset};break}if(h.length==2){if(h.charAt(1)=="w"){i.left=e.left+e.width/2-15}else{i.left=e.left+e.width/2-f+15}}d.css(i).addClass("tipsy-"+h);d.find(".tipsy-arrow")[0].className="tipsy-arrow tipsy-arrow-"+h.charAt(0);if(this.options.className){d.addClass(b(this.options.className,this.$element[0]))}if(this.options.fade){d.stop().css({opacity:0,display:"block",visibility:"visible"}).animate({opacity:this.options.opacity})}else{d.css({visibility:"visible",opacity:this.options.opacity})}}},hide:function(){if(this.options.fade){this.tip().stop().fadeOut(function(){a(this).remove()})}else{this.tip().remove()}},fixTitle:function(){var a=this.$element;if(a.attr("title")||typeof a.attr("original-title")!="string"){a.attr("original-title",a.attr("title")||"").removeAttr("title")}},getTitle:function(){var a,b=this.$element,c=this.options;this.fixTitle();var a,c=this.options;if(typeof c.title=="string"){a=b.attr(c.title=="title"?"original-title":c.title)}else if(typeof c.title=="function"){a=c.title.call(b[0])}a=(""+a).replace(/(^\s*|\s*$)/,"");return a||c.fallback},tip:function(){if(!this.$tip){this.$tip=a('
    ').html('
    ');this.$tip.data("tipsy-pointee",this.$element[0])}return this.$tip},validate:function(){if(!this.$element[0].parentNode){this.hide();this.$element=null;this.options=null}},enable:function(){this.enabled=true},disable:function(){this.enabled=false},toggleEnabled:function(){this.enabled=!this.enabled}};a.fn.tipsy=function(b){function e(c){var e=a.data(c,"tipsy");if(!e){e=new d(c,a.fn.tipsy.elementOptions(c,b));a.data(c,"tipsy",e)}return e}function f(){var a=e(this);a.hoverState="in";if(b.delayIn==0){a.show()}else{a.fixTitle();setTimeout(function(){if(a.hoverState=="in")a.show()},b.delayIn)}}function g(){var a=e(this);a.hoverState="out";if(b.delayOut==0){a.hide()}else{setTimeout(function(){if(a.hoverState=="out")a.hide()},b.delayOut)}}if(b===true){return this.data("tipsy")}else if(typeof b=="string"){var c=this.data("tipsy");if(c)c[b]();return this}b=a.extend({},a.fn.tipsy.defaults,b);if(!b.live)this.each(function(){e(this)});if(b.trigger!="manual"){var h=b.live?"live":"bind",i=b.trigger=="hover"?"mouseenter":"focus",j=b.trigger=="hover"?"mouseleave":"blur";this[h](i,f)[h](j,g)}return this};a.fn.tipsy.defaults={className:null,delayIn:0,delayOut:0,fade:false,fallback:"",gravity:"n",html:false,live:false,offset:0,opacity:.8,title:"title",trigger:"hover"};a.fn.tipsy.revalidate=function(){a(".tipsy").each(function(){var b=a.data(this,"tipsy-pointee");if(!b||!c(b)){a(this).remove()}})};a.fn.tipsy.elementOptions=function(b,c){return a.metadata?a.extend({},c,a(b).metadata()):c};a.fn.tipsy.autoNS=function(){return a(this).offset().top>a(document).scrollTop()+a(window).height()/2?"s":"n"};a.fn.tipsy.autoWE=function(){return a(this).offset().left>a(document).scrollLeft()+a(window).width()/2?"e":"w"};a.fn.tipsy.autoBounds=function(b,c){return function(){var d={ns:c[0],ew:c.length>1?c[1]:false},e=a(document).scrollTop()+b,f=a(document).scrollLeft()+b,g=a(this);if(g.offset().top1){if($fade_object.settings.nextLink||$fade_object.settings.prevLink){$.bindControls($fade_object)}if($fade_object.settings.cancelLink){$.bindCancel($fade_object)}$($fade_object.container).css({position:"relative"}).addClass($fade_object.settings.runningClass);if($fade_object.settings.containerHeight=="auto"){height=$($fade_object.elements).filter(":first").height();$($fade_object.container).css({height:height+"px"})}else{$($fade_object.container).css({height:$fade_object.settings.containerHeight})}if($fade_object.settings.indexContainer){$.innerFadeIndex($fade_object)}for(var i=0;i<$fade_object.elements.length;i++){$($fade_object.elements[i]).hide(0).css("z-index",String($fade_object.elements.length-i)).css("position","absolute")}var toShow="";var toHide="";if($fade_object.settings.type=="random"){toShow=Math.floor(Math.random()*$fade_object.elements.length);do{toHide=Math.floor(Math.random()*$fade_object.elements.length)}while(toHide==toShow)}else if($fade_object.settings.type=="random_start"){$fade_object.settings.type="sequence";toHide=Math.floor(Math.random()*$fade_object.elements.length);toShow=(toHide+1)%$fade_object.elements.length}else{toShow=$fade_object.settings.first_slide;toHide=$fade_object.settings.first_slide==0?$fade_object.elements.length-1:$fade_object.settings.first_slide-1}if($fade_object.settings.animate){$.fadeTimeout($fade_object,toShow,toHide,true)}else{$($fade_object.elements[toShow]).show();$($fade_object.elements[toHide]).hide();$.updateIndexes($fade_object,toShow)}$.updateIndexes($fade_object,toShow);$($fade_object.elements[toShow]).show();if($fade_object.settings.currentItemContainer){$.currentItem($fade_object,toShow)}if($fade_object.settings.totalItemsContainer){$.totalItems($fade_object)}if($fade_object.settings.pauseLink){$.bind_pause($fade_object)}}})};$.fn.innerFadeTo=function(slide_number){return this.each(function(index){var $fade_object=$(this).data("object");var $currentVisibleItem=$($fade_object.elements).filter(":visible");var currentItemIndex=$($fade_object.elements).index($currentVisibleItem);$.stopSlideshow($fade_object);if(slide_number!=currentItemIndex){$.fadeToItem($fade_object,slide_number,currentItemIndex)}})};$.fadeToItem=function($fade_object,toShow,toHide){var speed=$fade_object.settings.speed;switch($fade_object.settings.animationType){case"slide":$($fade_object.elements[toHide]).slideUp(speed);$($fade_object.elements[toShow]).slideDown(speed);break;case"slideOver":var itemWidth=$($fade_object.elements[0]).width(),to_hide_css={},to_show_css={},to_hide_animation={},to_show_animation={};$($fade_object.container).css({overflow:"hidden"});to_hide_css={position:"absolute",top:"0px"};to_show_css=$.extend({},to_hide_css);if(toShow>toHide){to_hide_css.left="0px";to_hide_css.right="auto";to_show_css.left="auto";to_show_css.right="-"+itemWidth+"px";to_hide_animation.left="-"+itemWidth+"px";to_show_animation.right="0px";console.log(to_hide_css)}else{to_hide_css.left="auto";to_hide_css.right="0px";to_show_css.left="-"+itemWidth+"px";to_show_css.right="auto";to_hide_animation.right="-"+itemWidth+"px";to_show_animation.left="0px"};$($fade_object.elements[toHide]).css(to_hide_css);$($fade_object.elements[toShow]).css(to_show_css).show();$($fade_object.elements[toHide]).animate(to_hide_animation,speed,$fade_object.settings.easing,function(){$(this).hide()});$($fade_object.elements[toShow]).animate(to_show_animation,speed,$fade_object.settings.easing);break;case"fadeEmpty":$($fade_object.elements[toHide]).fadeOut(speed,function(){$($fade_object.elements[toShow]).fadeIn(speed)});break;case"slideEmpty":$($fade_object.elements[toHide]).slideUp(speed,function(){$($fade_object.elements[toShow]).slideDown(speed)});break;default:$($fade_object.elements[toHide]).fadeOut(speed);$($fade_object.elements[toShow]).fadeIn(speed);break}if($fade_object.settings.currentItemContainer){$.currentItem($fade_object,toShow)}if($fade_object.settings.indexContainer||$fade_object.settings.callback_index_update){$.updateIndexes($fade_object,toShow)}};$.fadeTimeout=function($fade_object,toShow,toHide,firstRun){if(window.isActive){if(firstRun!=true){$.fadeToItem($fade_object,toShow,toHide)}$fade_object.count++;if($fade_object.settings.loop==false&&$fade_object.count>=$fade_object.elements.length){$.stopSlideshow($fade_object);return}if($fade_object.settings.type=="random"){toHide=toShow;while(toShow==toHide){toShow=Math.floor(Math.random()*$fade_object.elements.length)}}else{toHide=toHide>toShow?0:toShow;toShow=toShow+1>=$fade_object.elements.length?0:toShow+1}}var timeout=firstRun&&$fade_object.settings.startDelay?$fade_object.settings.startDelay:$fade_object.settings.timeout;$($fade_object.container).data("current_timeout",setTimeout(function(){$.fadeTimeout($fade_object,toShow,toHide,false)},timeout))};$.fn.innerFadeUnbind=function(){return this.each(function(index){var $fade_object=$(this).data("object");$.stopSlideshow($fade_object)})};$.stopSlideshow=function($fade_object){clearTimeout($($fade_object.container).data("current_timeout"));$($fade_object.container).data("current_timeout",null)};$.bindControls=function($fade_object){$($fade_object.settings.nextLink).on("click",function(event){event.preventDefault();$.stopSlideshow($fade_object);var $currentElement=$($fade_object.elements).filter(":visible");var currentElementIndex=$($fade_object.elements).index($currentElement);var $nextElement=$currentElement.next().length>0?$currentElement.next():$($fade_object.elements).filter(":first");var nextElementIndex=$($fade_object.elements).index($nextElement);$.fadeToItem($fade_object,nextElementIndex,currentElementIndex)});$($fade_object.settings.prevLink).on("click",function(event){event.preventDefault();$.stopSlideshow($fade_object);var $currentElement=$($fade_object.elements).filter(":visible");var currentElementIndex=$($fade_object.elements).index($currentElement);var $previousElement=$currentElement.prev().length>0?$currentElement.prev():$($fade_object.elements).filter(":last");var previousElementIndex=$($fade_object.elements).index($previousElement);$.fadeToItem($fade_object,previousElementIndex,currentElementIndex)})};$.bind_pause=function($fade_object){$($fade_object.settings.pauseLink).unbind().click(function(event){event.preventDefault();if($($fade_object.container).data("current_timeout")!=null){$.stopSlideshow($fade_object)}else{var tag=$($fade_object.container).children(":first").prop("tagName").toLowerCase();var nextItem="";var previousItem="";if($fade_object.settings.type=="random"){previousItem=Math.floor(Math.random()*$fade_object.elements.length);do{nextItem=Math.floor(Math.random()*$fade_object.elements.length)}while(previousItem==nextItem)}else if($fade_object.settings.type=="random_start"){previousItem=Math.floor(Math.random()*$fade_object.elements.length);nextItem=(previousItem+1)%$fade_object.elements.length}else{previousItem=$(tag,$($fade_object.container)).index($(tag+":visible",$($fade_object.container)));nextItem=previousItem+1==$fade_object.elements.length?0:previousItem+1}$.fadeTimeout($fade_object,nextItem,previousItem,false)}})};$.bindCancel=function($fade_object){$($fade_object.settings.cancelLink).unbind().click(function(event){event.preventDefault();$.stopSlideshow($fade_object)})};$.updateIndexes=function($fade_object,toShow){$($fade_object.settings.indexContainer).children().removeClass("active");$("> :eq("+toShow+")",$($fade_object.settings.indexContainer)).addClass("active");if(typeof $fade_object.settings.callback_index_update=="function"){$fade_object.settings.callback_index_update.call(this,toShow)}};$.createIndexHandler=function($fade_object,count,link){$(link).click(function(event){event.preventDefault();var $currentVisibleItem=$($fade_object.elements).filter(":visible");var currentItemIndex=$($fade_object.elements).index($currentVisibleItem);$.stopSlideshow($fade_object);if($currentVisibleItem.size()<=1&&count!=currentItemIndex){$.fadeToItem($fade_object,count,currentItemIndex)}})};$.createIndexes=function($fade_object){var $indexContainer=$($fade_object.settings.indexContainer);for(var i=0;i<$fade_object.elements.length;i++){var $link=$('
  • '+(i+1)+"
  • ");$.createIndexHandler($fade_object,i,$link);$indexContainer.append($link)}};$.linkIndexes=function($fade_object){var $indexContainer=$($fade_object.settings.indexContainer);var $indexContainerChildren=$("> :visible",$indexContainer);if($indexContainerChildren.size()==$fade_object.elements.length){var count=$fade_object.elements.length;for(var i=0;i0,v="fade"===a.vars.animation,p=""!==a.vars.asNavFor,m={},f=!0;$.data(e,"flexslider",a),m={init:function(){a.animating=!1,a.currentSlide=parseInt(a.vars.startAt?a.vars.startAt:0,10),isNaN(a.currentSlide)&&(a.currentSlide=0),a.animatingTo=a.currentSlide,a.atEnd=0===a.currentSlide||a.currentSlide===a.last,a.containerSelector=a.vars.selector.substr(0,a.vars.selector.search(" ")),a.slides=$(a.vars.selector,a),a.container=$(a.containerSelector,a),a.count=a.slides.length,a.syncExists=$(a.vars.sync).length>0,"slide"===a.vars.animation&&(a.vars.animation="swing"),a.prop=c?"top":"marginLeft",a.args={},a.manualPause=!1,a.stopped=!1,a.started=!1,a.startTimeout=null,a.transitions=!a.vars.video&&!v&&a.vars.useCSS&&function(){var e=document.createElement("div"),t=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var n in t)if(void 0!==e.style[t[n]])return a.pfx=t[n].replace("Perspective","").toLowerCase(),a.prop="-"+a.pfx+"-transform",!0;return!1}(),a.ensureAnimationEnd="",""!==a.vars.controlsContainer&&(a.controlsContainer=$(a.vars.controlsContainer).length>0&&$(a.vars.controlsContainer)),""!==a.vars.manualControls&&(a.manualControls=$(a.vars.manualControls).length>0&&$(a.vars.manualControls)),""!==a.vars.customDirectionNav&&(a.customDirectionNav=2===$(a.vars.customDirectionNav).length&&$(a.vars.customDirectionNav)),a.vars.randomize&&(a.slides.sort(function(){return Math.round(Math.random())-.5}),a.container.empty().append(a.slides)),a.doMath(),a.setup("init"),a.vars.controlNav&&m.controlNav.setup(),a.vars.directionNav&&m.directionNav.setup(),a.vars.keyboard&&(1===$(a.containerSelector).length||a.vars.multipleKeyboard)&&$(document).bind("keyup",function(e){var t=e.keyCode;if(!a.animating&&(39===t||37===t)){var n=39===t?a.getTarget("next"):37===t?a.getTarget("prev"):!1;a.flexAnimate(n,a.vars.pauseOnAction)}}),a.vars.mousewheel&&a.bind("mousewheel",function(e,t,n,i){e.preventDefault();var s=a.getTarget(0>t?"next":"prev");a.flexAnimate(s,a.vars.pauseOnAction)}),a.vars.pausePlay&&m.pausePlay.setup(),a.vars.slideshow&&a.vars.pauseInvisible&&m.pauseInvisible.init(),a.vars.slideshow&&(a.vars.pauseOnHover&&a.hover(function(){a.manualPlay||a.manualPause||a.pause()},function(){a.manualPause||a.manualPlay||a.stopped||a.play()}),a.vars.pauseInvisible&&m.pauseInvisible.isHidden()||(a.vars.initDelay>0?a.startTimeout=setTimeout(a.play,a.vars.initDelay):a.play())),p&&m.asNav.setup(),s&&a.vars.touch&&m.touch(),(!v||v&&a.vars.smoothHeight)&&$(window).bind("resize orientationchange focus",m.resize),a.find("img").attr("draggable","false"),setTimeout(function(){a.vars.start(a)},200)},asNav:{setup:function(){a.asNav=!0,a.animatingTo=Math.floor(a.currentSlide/a.move),a.currentItem=a.currentSlide,a.slides.removeClass(n+"active-slide").eq(a.currentItem).addClass(n+"active-slide"),i?(e._slider=a,a.slides.each(function(){var e=this;e._gesture=new MSGesture,e._gesture.target=e,e.addEventListener("MSPointerDown",function(e){e.preventDefault(),e.currentTarget._gesture&&e.currentTarget._gesture.addPointer(e.pointerId)},!1),e.addEventListener("MSGestureTap",function(e){e.preventDefault();var t=$(this),n=t.index();$(a.vars.asNavFor).data("flexslider").animating||t.hasClass("active")||(a.direction=a.currentItem=s&&t.hasClass(n+"active-slide")?a.flexAnimate(a.getTarget("prev"),!0):$(a.vars.asNavFor).data("flexslider").animating||t.hasClass(n+"active-slide")||(a.direction=a.currentItem'),a.pagingCount>1)for(var l=0;l':""+t+"","thumbnails"===a.vars.controlNav&&!0===a.vars.thumbCaptions){var c=s.attr("data-thumbcaption");""!==c&&void 0!==c&&(i+=''+c+"")}a.controlNavScaffold.append("
  • "+i+"
  • "),t++}a.controlsContainer?$(a.controlsContainer).append(a.controlNavScaffold):a.append(a.controlNavScaffold),m.controlNav.set(),m.controlNav.active(),a.controlNavScaffold.delegate("a, img",r,function(e){if(e.preventDefault(),""===o||o===e.type){var t=$(this),i=a.controlNav.index(t);t.hasClass(n+"active")||(a.direction=i>a.currentSlide?"next":"prev",a.flexAnimate(i,a.vars.pauseOnAction))}""===o&&(o=e.type),m.setToClearWatchedEvent()})},setupManual:function(){a.controlNav=a.manualControls,m.controlNav.active(),a.controlNav.bind(r,function(e){if(e.preventDefault(),""===o||o===e.type){var t=$(this),i=a.controlNav.index(t);t.hasClass(n+"active")||(a.direction=i>a.currentSlide?"next":"prev",a.flexAnimate(i,a.vars.pauseOnAction))}""===o&&(o=e.type),m.setToClearWatchedEvent()})},set:function(){var e="thumbnails"===a.vars.controlNav?"img":"a";a.controlNav=$("."+n+"control-nav li "+e,a.controlsContainer?a.controlsContainer:a)},active:function(){a.controlNav.removeClass(n+"active").eq(a.animatingTo).addClass(n+"active")},update:function(e,t){a.pagingCount>1&&"add"===e?a.controlNavScaffold.append($("
  • "+a.count+"
  • ")):1===a.pagingCount?a.controlNavScaffold.find("li").remove():a.controlNav.eq(t).closest("li").remove(),m.controlNav.set(),a.pagingCount>1&&a.pagingCount!==a.controlNav.length?a.update(t,e):m.controlNav.active()}},directionNav:{setup:function(){var e=$('");a.customDirectionNav?a.directionNav=a.customDirectionNav:a.controlsContainer?($(a.controlsContainer).append(e),a.directionNav=$("."+n+"direction-nav li a",a.controlsContainer)):(a.append(e),a.directionNav=$("."+n+"direction-nav li a",a)),m.directionNav.update(),a.directionNav.bind(r,function(e){e.preventDefault();var t;(""===o||o===e.type)&&(t=a.getTarget($(this).hasClass(n+"next")?"next":"prev"),a.flexAnimate(t,a.vars.pauseOnAction)),""===o&&(o=e.type),m.setToClearWatchedEvent()})},update:function(){var e=n+"disabled";1===a.pagingCount?a.directionNav.addClass(e).attr("tabindex","-1"):a.vars.animationLoop?a.directionNav.removeClass(e).removeAttr("tabindex"):0===a.animatingTo?a.directionNav.removeClass(e).filter("."+n+"prev").addClass(e).attr("tabindex","-1"):a.animatingTo===a.last?a.directionNav.removeClass(e).filter("."+n+"next").addClass(e).attr("tabindex","-1"):a.directionNav.removeClass(e).removeAttr("tabindex")}},pausePlay:{setup:function(){var e=$('
    ');a.controlsContainer?(a.controlsContainer.append(e),a.pausePlay=$("."+n+"pauseplay a",a.controlsContainer)):(a.append(e),a.pausePlay=$("."+n+"pauseplay a",a)),m.pausePlay.update(a.vars.slideshow?n+"pause":n+"play"),a.pausePlay.bind(r,function(e){e.preventDefault(),(""===o||o===e.type)&&($(this).hasClass(n+"pause")?(a.manualPause=!0,a.manualPlay=!1,a.pause()):(a.manualPause=!1,a.manualPlay=!0,a.play())),""===o&&(o=e.type),m.setToClearWatchedEvent()})},update:function(e){"play"===e?a.pausePlay.removeClass(n+"pause").addClass(n+"play").html(a.vars.playText):a.pausePlay.removeClass(n+"play").addClass(n+"pause").html(a.vars.pauseText)}},touch:function(){function t(t){t.stopPropagation(),a.animating?t.preventDefault():(a.pause(),e._gesture.addPointer(t.pointerId),w=0,p=c?a.h:a.w,f=Number(new Date),l=u&&d&&a.animatingTo===a.last?0:u&&d?a.limit-(a.itemW+a.vars.itemMargin)*a.move*a.animatingTo:u&&a.currentSlide===a.last?a.limit:u?(a.itemW+a.vars.itemMargin)*a.move*a.currentSlide:d?(a.last-a.currentSlide+a.cloneOffset)*p:(a.currentSlide+a.cloneOffset)*p)}function n(t){t.stopPropagation();var a=t.target._slider;if(a){var n=-t.translationX,i=-t.translationY;return w+=c?i:n,m=w,y=c?Math.abs(w)500)&&(t.preventDefault(),!v&&a.transitions&&(a.vars.animationLoop||(m=w/(0===a.currentSlide&&0>w||a.currentSlide===a.last&&w>0?Math.abs(w)/p+2:1)),a.setProps(l+m,"setTouch"))))}}function s(e){e.stopPropagation();var t=e.target._slider;if(t){if(t.animatingTo===t.currentSlide&&!y&&null!==m){var a=d?-m:m,n=t.getTarget(a>0?"next":"prev");t.canAdvance(n)&&(Number(new Date)-f<550&&Math.abs(a)>50||Math.abs(a)>p/2)?t.flexAnimate(n,t.vars.pauseOnAction):v||t.flexAnimate(t.currentSlide,t.vars.pauseOnAction,!0)}r=null,o=null,m=null,l=null,w=0}}var r,o,l,p,m,f,g,h,S,y=!1,x=0,b=0,w=0;i?(e.style.msTouchAction="none",e._gesture=new MSGesture,e._gesture.target=e,e.addEventListener("MSPointerDown",t,!1),e._slider=a,e.addEventListener("MSGestureChange",n,!1),e.addEventListener("MSGestureEnd",s,!1)):(g=function(t){a.animating?t.preventDefault():(window.navigator.msPointerEnabled||1===t.touches.length)&&(a.pause(),p=c?a.h:a.w,f=Number(new Date),x=t.touches[0].pageX,b=t.touches[0].pageY,l=u&&d&&a.animatingTo===a.last?0:u&&d?a.limit-(a.itemW+a.vars.itemMargin)*a.move*a.animatingTo:u&&a.currentSlide===a.last?a.limit:u?(a.itemW+a.vars.itemMargin)*a.move*a.currentSlide:d?(a.last-a.currentSlide+a.cloneOffset)*p:(a.currentSlide+a.cloneOffset)*p,r=c?b:x,o=c?x:b,e.addEventListener("touchmove",h,!1),e.addEventListener("touchend",S,!1))},h=function(e){x=e.touches[0].pageX,b=e.touches[0].pageY,m=c?r-b:r-x,y=c?Math.abs(m)t)&&(e.preventDefault(),!v&&a.transitions&&(a.vars.animationLoop||(m/=0===a.currentSlide&&0>m||a.currentSlide===a.last&&m>0?Math.abs(m)/p+2:1),a.setProps(l+m,"setTouch")))},S=function(t){if(e.removeEventListener("touchmove",h,!1),a.animatingTo===a.currentSlide&&!y&&null!==m){var n=d?-m:m,i=a.getTarget(n>0?"next":"prev");a.canAdvance(i)&&(Number(new Date)-f<550&&Math.abs(n)>50||Math.abs(n)>p/2)?a.flexAnimate(i,a.vars.pauseOnAction):v||a.flexAnimate(a.currentSlide,a.vars.pauseOnAction,!0)}e.removeEventListener("touchend",S,!1),r=null,o=null,m=null,l=null},e.addEventListener("touchstart",g,!1))},resize:function(){!a.animating&&a.is(":visible")&&(u||a.doMath(),v?m.smoothHeight():u?(a.slides.width(a.computedW),a.update(a.pagingCount),a.setProps()):c?(a.viewport.height(a.h),a.setProps(a.h,"setTotal")):(a.vars.smoothHeight&&m.smoothHeight(),a.newSlides.width(a.computedW),a.setProps(a.computedW,"setTotal")))},smoothHeight:function(e){if(!c||v){var t=v?a:a.viewport;e?t.animate({height:a.slides.eq(a.animatingTo).height()},e):t.height(a.slides.eq(a.animatingTo).height())}},sync:function(e){var t=$(a.vars.sync).data("flexslider"),n=a.animatingTo;switch(e){case"animate":t.flexAnimate(n,a.vars.pauseOnAction,!1,!0);break;case"play":t.playing||t.asNav||t.play();break;case"pause":t.pause()}},uniqueID:function(e){return e.filter("[id]").add(e.find("[id]")).each(function(){var e=$(this);e.attr("id",e.attr("id")+"_clone")}),e},pauseInvisible:{visProp:null,init:function(){var e=m.pauseInvisible.getHiddenProp();if(e){var t=e.replace(/[H|h]idden/,"")+"visibilitychange";document.addEventListener(t,function(){m.pauseInvisible.isHidden()?a.startTimeout?clearTimeout(a.startTimeout):a.pause():a.started?a.play():a.vars.initDelay>0?setTimeout(a.play,a.vars.initDelay):a.play()})}},isHidden:function(){var e=m.pauseInvisible.getHiddenProp();return e?document[e]:!1},getHiddenProp:function(){var e=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var t=0;ta.currentSlide?"next":"prev"),p&&1===a.pagingCount&&(a.direction=a.currentItema.limit&&1!==a.visible?a.limit:S):h=0===a.currentSlide&&e===a.count-1&&a.vars.animationLoop&&"next"!==a.direction?d?(a.count+a.cloneOffset)*f:0:a.currentSlide===a.last&&0===e&&a.vars.animationLoop&&"prev"!==a.direction?d?0:(a.count+1)*f:d?(a.count-1-e+a.cloneOffset)*f:(e+a.cloneOffset)*f,a.setProps(h,"",a.vars.animationSpeed),a.transitions?(a.vars.animationLoop&&a.atEnd||(a.animating=!1,a.currentSlide=a.animatingTo),a.container.unbind("webkitTransitionEnd transitionend"),a.container.bind("webkitTransitionEnd transitionend",function(){clearTimeout(a.ensureAnimationEnd),a.wrapup(f)}),clearTimeout(a.ensureAnimationEnd),a.ensureAnimationEnd=setTimeout(function(){a.wrapup(f)},a.vars.animationSpeed+100)):a.container.animate(a.args,a.vars.animationSpeed,a.vars.easing,function(){a.wrapup(f)})}a.vars.smoothHeight&&m.smoothHeight(a.vars.animationSpeed)}},a.wrapup=function(e){v||u||(0===a.currentSlide&&a.animatingTo===a.last&&a.vars.animationLoop?a.setProps(e,"jumpEnd"):a.currentSlide===a.last&&0===a.animatingTo&&a.vars.animationLoop&&a.setProps(e,"jumpStart")),a.animating=!1,a.currentSlide=a.animatingTo,a.vars.after(a)},a.animateSlides=function(){!a.animating&&f&&a.flexAnimate(a.getTarget("next"))},a.pause=function(){clearInterval(a.animatedSlides),a.animatedSlides=null,a.playing=!1,a.vars.pausePlay&&m.pausePlay.update("play"),a.syncExists&&m.sync("pause")},a.play=function(){a.playing&&clearInterval(a.animatedSlides),a.animatedSlides=a.animatedSlides||setInterval(a.animateSlides,a.vars.slideshowSpeed),a.started=a.playing=!0,a.vars.pausePlay&&m.pausePlay.update("pause"),a.syncExists&&m.sync("play")},a.stop=function(){a.pause(),a.stopped=!0},a.canAdvance=function(e,t){var n=p?a.pagingCount-1:a.last;return t?!0:p&&a.currentItem===a.count-1&&0===e&&"prev"===a.direction?!0:p&&0===a.currentItem&&e===a.pagingCount-1&&"next"!==a.direction?!1:e!==a.currentSlide||p?a.vars.animationLoop?!0:a.atEnd&&0===a.currentSlide&&e===n&&"next"!==a.direction?!1:a.atEnd&&a.currentSlide===n&&0===e&&"next"===a.direction?!1:!0:!1},a.getTarget=function(e){return a.direction=e,"next"===e?a.currentSlide===a.last?0:a.currentSlide+1:0===a.currentSlide?a.last:a.currentSlide-1},a.setProps=function(e,t,n){var i=function(){var n=e?e:(a.itemW+a.vars.itemMargin)*a.move*a.animatingTo,i=function(){if(u)return"setTouch"===t?e:d&&a.animatingTo===a.last?0:d?a.limit-(a.itemW+a.vars.itemMargin)*a.move*a.animatingTo:a.animatingTo===a.last?a.limit:n;switch(t){case"setTotal":return d?(a.count-1-a.currentSlide+a.cloneOffset)*e:(a.currentSlide+a.cloneOffset)*e;case"setTouch":return d?e:e;case"jumpEnd":return d?e:a.count*e;case"jumpStart":return d?a.count*e:e;default:return e}}();return-1*i+"px"}();a.transitions&&(i=c?"translate3d(0,"+i+",0)":"translate3d("+i+",0,0)",n=void 0!==n?n/1e3+"s":"0s",a.container.css("-"+a.pfx+"-transition-duration",n),a.container.css("transition-duration",n)),a.args[a.prop]=i,(a.transitions||void 0===n)&&a.container.css(a.args),a.container.css("transform",i)},a.setup=function(e){if(v)a.slides.css({width:"100%","float":"left",marginRight:"-100%",position:"relative"}),"init"===e&&(s?a.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+a.vars.animationSpeed/1e3+"s ease",zIndex:1}).eq(a.currentSlide).css({opacity:1,zIndex:2}):0==a.vars.fadeFirstSlide?a.slides.css({opacity:0,display:"block",zIndex:1}).eq(a.currentSlide).css({zIndex:2}).css({opacity:1}):a.slides.css({opacity:0,display:"block",zIndex:1}).eq(a.currentSlide).css({zIndex:2}).animate({opacity:1},a.vars.animationSpeed,a.vars.easing)),a.vars.smoothHeight&&m.smoothHeight();else{var t,i;"init"===e&&(a.viewport=$('
    ').css({overflow:"hidden",position:"relative"}).appendTo(a).append(a.container),a.cloneCount=0,a.cloneOffset=0,d&&(i=$.makeArray(a.slides).reverse(),a.slides=$(i),a.container.empty().append(a.slides))),a.vars.animationLoop&&!u&&(a.cloneCount=2,a.cloneOffset=1,"init"!==e&&a.container.find(".clone").remove(),a.container.append(m.uniqueID(a.slides.first().clone().addClass("clone")).attr("aria-hidden","true")).prepend(m.uniqueID(a.slides.last().clone().addClass("clone")).attr("aria-hidden","true"))),a.newSlides=$(a.vars.selector,a),t=d?a.count-1-a.currentSlide+a.cloneOffset:a.currentSlide+a.cloneOffset,c&&!u?(a.container.height(200*(a.count+a.cloneCount)+"%").css("position","absolute").width("100%"),setTimeout(function(){a.newSlides.css({display:"block"}),a.doMath(),a.viewport.height(a.h),a.setProps(t*a.h,"init")},"init"===e?100:0)):(a.container.width(200*(a.count+a.cloneCount)+"%"),a.setProps(t*a.computedW,"init"),setTimeout(function(){a.doMath(),a.newSlides.css({width:a.computedW,"float":"left",display:"block"}),a.vars.smoothHeight&&m.smoothHeight()},"init"===e?100:0))}u||a.slides.removeClass(n+"active-slide").eq(a.currentSlide).addClass(n+"active-slide"),a.vars.init(a)},a.doMath=function(){var e=a.slides.first(),t=a.vars.itemMargin,n=a.vars.minItems,i=a.vars.maxItems;a.w=void 0===a.viewport?a.width():a.viewport.width(),a.h=e.height(),a.boxPadding=e.outerWidth()-e.width(),u?(a.itemT=a.vars.itemWidth+t,a.minW=n?n*a.itemT:a.w,a.maxW=i?i*a.itemT-t:a.w,a.itemW=a.minW>a.w?(a.w-t*(n-1))/n:a.maxWa.w?a.w:a.vars.itemWidth,a.visible=Math.floor(a.w/a.itemW),a.move=a.vars.move>0&&a.vars.movea.w?a.itemW*(a.count-1)+t*(a.count-1):(a.itemW+t)*a.count-a.w-t):(a.itemW=a.w,a.pagingCount=a.count,a.last=a.count-1),a.computedW=a.itemW-a.boxPadding},a.update=function(e,t){a.doMath(),u||(ea.controlNav.length?m.controlNav.update("add"):("remove"===t&&!u||a.pagingCounta.last&&(a.currentSlide-=1,a.animatingTo-=1),m.controlNav.update("remove",a.last))),a.vars.directionNav&&m.directionNav.update()},a.addSlide=function(e,t){var n=$(e);a.count+=1,a.last=a.count-1,c&&d?void 0!==t?a.slides.eq(a.count-t).after(n):a.container.prepend(n):void 0!==t?a.slides.eq(t).before(n):a.container.append(n),a.update(t,"add"),a.slides=$(a.vars.selector+":not(.clone)",a),a.setup(),a.vars.added(a)},a.removeSlide=function(e){var t=isNaN(e)?a.slides.index($(e)):e;a.count-=1,a.last=a.count-1,isNaN(e)?$(e,a.slides).remove():c&&d?a.slides.eq(a.last).remove():a.slides.eq(e).remove(),a.doMath(),a.update(t,"remove"),a.slides=$(a.vars.selector+":not(.clone)",a),a.setup(),a.vars.removed(a)},m.init()},$(window).blur(function(e){focused=!1}).focus(function(e){focused=!0}),$.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7e3,animationSpeed:600,initDelay:0,randomize:!1,fadeFirstSlide:!0,thumbCaptions:!1,pauseOnAction:!0,pauseOnHover:!1,pauseInvisible:!0,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",customDirectionNav:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:1,maxItems:0,move:0,allowOneSlide:!0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){},init:function(){}},$.fn.flexslider=function(e){if(void 0===e&&(e={}),"object"==typeof e)return this.each(function(){var t=$(this),a=e.selector?e.selector:".slides > li",n=t.find(a);1===n.length&&e.allowOneSlide===!0||0===n.length?(n.fadeIn(400),e.start&&e.start(t)):void 0===t.data("flexslider")&&new $.flexslider(this,e)});var t=$(this).data("flexslider");switch(e){case"play":t.play();break;case"pause":t.pause();break;case"stop":t.stop();break;case"next":t.flexAnimate(t.getTarget("next"),!0);break;case"prev":case"previous":t.flexAnimate(t.getTarget("prev"),!0);break;default:"number"==typeof e&&t.flexAnimate(e,!0)}}}(jQuery); (function(e){"use strict";e.fn.fitVids=function(t){var n={customSelector:null};if(t){e.extend(n,t)}return this.each(function(){var t=["iframe[src*='player.vimeo.com']","iframe[src*='www.youtube.com']","iframe[src*='www.youtube-nocookie.com']","iframe[src*='www.dailymotion.com']","iframe[src*='www.kickstarter.com']","object","embed"];if(n.customSelector){t.push(n.customSelector)}var r=e(this).find(t.join(","));r.each(function(){var t=e(this);if(this.tagName.toLowerCase()==="embed"&&t.parent("object").length||t.parent(".fluid-width-video-wrapper").length){return}var n=this.tagName.toLowerCase()==="object"||t.attr("height")&&!isNaN(parseInt(t.attr("height"),10))?parseInt(t.attr("height"),10):t.height(),r=!isNaN(parseInt(t.attr("width"),10))?parseInt(t.attr("width"),10):t.width(),i=n/r;if(!t.attr("id")){var s="fitvid"+Math.floor(Math.random()*999999);t.attr("id",s)}t.wrap('
    ').parent(".fluid-width-video-wrapper").css("padding-top",i*100+"%");t.removeAttr("height").removeAttr("width")})})}})(jQuery); (function(c,n){var l="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";c.fn.imagesLoaded=function(f){function m(){var b=c(i),a=c(h);d&&(h.length?d.reject(e,b,a):d.resolve(e));c.isFunction(f)&&f.call(g,e,b,a)}function j(b,a){b.src===l||-1!==c.inArray(b,k)||(k.push(b),a?h.push(b):i.push(b),c.data(b,"imagesLoaded",{isBroken:a,src:b.src}),o&&d.notifyWith(c(b),[a,e,c(i),c(h)]),e.length===k.length&&(setTimeout(m),e.unbind(".imagesLoaded")))}var g=this,d=c.isFunction(c.Deferred)?c.Deferred():0,o=c.isFunction(d.notify),e=g.find("img").add(g.filter("img")),k=[],i=[],h=[];c.isPlainObject(f)&&c.each(f,function(b,a){if("callback"===b)f=a;else if(d)d[b](a)});e.length?e.bind("load.imagesLoaded error.imagesLoaded",function(b){j(b.target,"error"===b.type)}).each(function(b,a){var d=a.src,e=c.data(a,"imagesLoaded");if(e&&e.src===d)j(a,e.isBroken);else if(a.complete&&a.naturalWidth!==n)j(a,0===a.naturalWidth||0===a.naturalHeight);else if(a.readyState||a.complete)a.src=l,a.src=d}):m();return d?d.promise(g):g}})(jQuery); !function(i){i.fn.theiaStickySidebar=function(t){var o={containerSelector:"",additionalMarginTop:0,additionalMarginBottom:0,updateSidebarHeight:!0,minWidth:0};t=i.extend(o,t),t.additionalMarginTop=parseInt(t.additionalMarginTop)||0,t.additionalMarginBottom=parseInt(t.additionalMarginBottom)||0,this.each(function(){function o(){e.fixedScrollTop=0,e.sidebar.css({"min-height":"1px"}),e.stickySidebar.css({position:"static",width:""})}function a(t){var o=t.height();return t.children().each(function(){o=Math.max(o,i(this).height())}),o}var e={};e.sidebar=i(this),e.options=t||{},e.container=i(e.options.containerSelector),0==e.container.size()&&(e.container=e.sidebar.parent()),e.sidebar.css({position:"relative",overflow:"visible","-webkit-box-sizing":"border-box","-moz-box-sizing":"border-box","box-sizing":"border-box"}),e.stickySidebar=e.sidebar.find(".theiaStickySidebar"),0==e.stickySidebar.length&&(e.sidebar.find("script").remove(),e.stickySidebar=i("
    ").addClass("theiaStickySidebar").append(e.sidebar.children()),e.sidebar.append(e.stickySidebar)),e.marginTop=parseInt(e.sidebar.css("margin-top")),e.marginBottom=parseInt(e.sidebar.css("margin-bottom")),e.paddingTop=parseInt(e.sidebar.css("padding-top")),e.paddingBottom=parseInt(e.sidebar.css("padding-bottom"));var d=e.stickySidebar.offset().top,r=e.stickySidebar.outerHeight();e.stickySidebar.css("padding-top",1),e.stickySidebar.css("padding-bottom",1),d-=e.stickySidebar.offset().top,r=e.stickySidebar.outerHeight()-r-d,0==d?(e.stickySidebar.css("padding-top",0),e.stickySidebarPaddingTop=0):e.stickySidebarPaddingTop=1,0==r?(e.stickySidebar.css("padding-bottom",0),e.stickySidebarPaddingBottom=0):e.stickySidebarPaddingBottom=1,e.previousScrollTop=null,e.fixedScrollTop=0,o(),e.onScroll=function(e){if(e.stickySidebar.is(":visible")){if(i("body").width()e.container.width())return void o();var d=i(document).scrollTop(),r="static";if(d>=e.container.offset().top+(e.paddingTop+e.marginTop-e.options.additionalMarginTop)){var n,s=e.paddingTop+e.marginTop+t.additionalMarginTop,c=e.paddingBottom+e.marginBottom+t.additionalMarginBottom,p=e.container.offset().top,b=e.container.offset().top+a(e.container),g=0+t.additionalMarginTop,l=e.stickySidebar.outerHeight()+s+c0?Math.min(h,g):Math.max(h,n-e.stickySidebar.outerHeight()),h=Math.max(h,f),h=Math.min(h,S-e.stickySidebar.outerHeight());var u=e.container.height()==e.stickySidebar.outerHeight();r=(u||h!=g)&&(u||h!=n-e.stickySidebar.outerHeight())?d+h-e.sidebar.offset().top-e.paddingTop<=t.additionalMarginTop?"static":"absolute":"fixed"}if("fixed"==r)e.stickySidebar.css({position:"fixed",width:e.sidebar.width(),top:h,left:e.sidebar.offset().left+parseInt(e.sidebar.css("padding-left"))});else if("absolute"==r){var y={};"absolute"!=e.stickySidebar.css("position")&&(y.position="absolute",y.top=d+h-e.sidebar.offset().top-e.stickySidebarPaddingTop-e.stickySidebarPaddingBottom),y.width=e.sidebar.width(),y.left="",e.stickySidebar.css(y)}else"static"==r&&o();"static"!=r&&1==e.options.updateSidebarHeight&&e.sidebar.css({"min-height":e.stickySidebar.outerHeight()+e.stickySidebar.offset().top-e.sidebar.offset().top+e.paddingBottom}),e.previousScrollTop=d}},e.onScroll(e),i(document).scroll(function(i){return function(){i.onScroll(i)}}(e)),i(window).resize(function(i){return function(){i.stickySidebar.css({position:"static"}),i.onScroll(i)}}(e))})}}(jQuery); eval(function(d,e,a,c,b,f){b=function(a){return(aD.2B&&(e="?"+M(9L*T()));b.4S(a[d]+e)}});18 b}12 Z(a){a=a.24(".").8v().1Y();17 b=-1!==a.1N("?")?a.24("?").8v():"";18 a.1q(b,"")}12 $(a){a=Z(a);18-1!==U.2F.1N(a)?"2F":-1!==U.2t.1N(a)?"2t":-1!==U.1H.1N(a)?"1H":"4p"}12 aa(a,b){18 1i(b/2l*a)}12 V(a){18(a=g3(a).1q(/^\\s+|\\s+$/g,"").5O(/^([^:\\/?#]+:)?(\\/\\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\\/?#]*)(?::(\\d*))?))?([^?#]*)(\\?[^#]*)?(#[\\s\\S]*)?/))?{2V:a[0]||"",5f:a[1]||"",4I:a[2]||"",fZ:a[3]||"",fY:a[4]||"",fX:a[5]||"",3I:a[6]||"",6y:a[7]||"",4o:a[8]||""}:1f}12 N(a,b){12 c(a){17 b=[];a.1q(/^(\\.\\.?(\\/|$))+/,"").1q(/\\/(\\.(\\/|$))+/g,"/").1q(/\\/\\.\\.$/,"/../").1q(/\\/?[^\\/]*/g,12(a){"/.."===a?b.8v():b.4S(a)});18 b.5y("").1q(/^\\//,"/"===a.4g(0)?"/":"")}b=V(b||"");a=V(a||"");18 b&&a?(b.5f||a.5f)+(b.5f||b.4I?b.4I:a.4I)+c(b.5f||b.4I||"/"===b.3I.4g(0)?b.3I:b.3I?(a.4I&&!a.3I?"/":"")+a.3I.7b(0,a.3I.79("/")+1)+b.3I:a.3I)+(b.5f||b.4I||b.3I?b.6y:b.6y||a.6y)+b.4o:1f}12 a7(a,b,c){11.78=11.78||{};11.78.ar=11.78.ar||{};17 d=0,e=0,f=0,l={fV:-6,fU:-5,a:-5,fT:-4,b:-4,fS:-3,fQ:-3,"#":-2,p:1,bh:1},d=12(a){a=(""+a).1q(/[7L\\-+]/g,".");a=a.1q(/([^.\\d]+)/g,".$1.").1q(/\\.{2,}/g,".");18 a.1g?a.24("."):[-8]},g=12(a){18 a?bt(a)?l[a]||-7:1i(a,10):0};a=d(a);b=d(b);e=ba(a.1g,b.1g);1t(d=0;db[d]){f=1;1z}1a(!c)18 f;4d(c){1r">":1r"gt":18 0=":1r"ge":18 0<=f;1r"<=":1r"fL":18 0>=f;1r"==":1r"=":1r"eq":18 0===f;1r"<>":1r"!=":1r"fI":18 0!==f;1r"":1r"<":1r"fD":18 0>f;8S:18 1f}}12 L(){17 a=0,b=0;"3g"==1d n.a9?(b=n.a9,a=n.fC):1x.2H&&(1x.2H.4s||1x.2H.4J)?(b=1x.2H.4J,a=1x.2H.4s):1x.3B&&(1x.3B.4s||1x.3B.4J)&&(b=1x.3B.4J,a=1x.3B.4s);18{x:a,y:b}}12 ca(a,b,c){17 d;d=q[a+b];1f==d&&(d=q[b]);18 1f!=d?(0==b.1N(a)&&1f==c&&(c=b.6A(a.1g)),1f==c&&(c=b),c+\'="\'+d+\'" \'):""}12 B(a,b){1a(0==a.1N("5Y#"))18"";0==a.1N("57#")&&1f==b&&(b=a.6A(4));18 ca("57#",a,b)}12 G(a,b){1a(0==a.1N("57#"))18"";0==a.1N("5Y#")&&1f==b&&(b=a.6A(4));18 ca("5Y#",a,b)}12 da(a,b){17 c,d="",e=b?" />":">";-1==a.1N("5Y#")&&(c=q["57#"+a],1f==c&&(c=q[a]),0==a.1N("57#")&&(a=a.6A(4)),1f!=c&&(d=\' <3W 2e="\'+a+\'" 2M="\'+c+\'"\'+e+"\\n"));18 d}12 bB(){1t(17 a=0;a<2R.1g;a++){17 b=2R[a];5Z q[b];5Z q["5Y#"+b];5Z q["57#"+b]}}12 91(){17 a;a="fB";17 b=2R;1a(4>b.1g||0!=b.1g%2)b=j,b=b.1q("%%",a),61(b),a="";2f{q=[];q.2i=b[0];q.1c=b[1];q.1e=b[2];q.6n="6l:9f-9r-9u-9y-9B";q.4L="3e://5m.7j.3l/2W/7J/";a=b[3];1a(1f==a||""==a)a="6,0,2,0";q.7d="3e://5m.7j.3l/fA/fy.fx#2B="+a;1t(17 c,d=4;d\\n"+da("2i",!1);d=" <8j "+G("2i")+G("1c")+G("1e")+G("4L")+G("2e")+G("8M")+G("77");bB("2i","1c","1e","4L","6n","7d","2e","77","7w","7r","49","8M","aI","1v","1J","aH");1t(c 2T q)a=q[c],1f!=a&&(d+=G(c),b+=da(c,!1));a=b+d+"> \\n"}18 a}17 U={2t:["fw"],2F:"ft fs fr fq fp fm fl fh ff".24(" "),4p:"fe fd fc fb f9 2J f8 7X bh f7 f5 f3 f2 f1 f0 eZ eY".24(" "),1H:"eX 9k eW eV eU 46 3t 7D 5d eT 8w".24(" ")},O=g(n),E=g(1x),D,C,H,z="",A=!!("eS"2T n)&&/eR|eQ|ae|af|ag|eP|eO|al eN/i.1F(69.7V),K=A?"3u.1E":"6a.1E",aK=A?"71.1E":"eM.1E",aP=A?"8l.1E":"eL.1E",W=A?"aX.1E":"b0.1E",I=4r.eK,P=4r.eJ,X=4r.eI,ba=4r.3F,Y=4r.3H,M=4r.eH,T=4r.eG,ea=12(a,b,c,d){17 e=11;e.14=b;e.3h=a.3h||a;e.4m=a.4m;e.99=d;1>c.1g?e.8s():e.1n=c;e.1j={1Q:e.1n.1g,2Y:0,1o:1f,1h:1f,1p:1f,3o:g("2H"),4c:0,1V:g(\'<1b 1v="19-1V">\'),2r:g(\'<1b 1v="19-2r"><1b>\'),1P:g(\'<1b 1v="19-1P">\'),3Y:g(\'<1b 1v="19-4v-1P">\'),1J:g(\'<1b 1v="19-1J">\'),9D:g(\'\'),6B:g(\'\'),81:g(\'\'),41:g(\'\'),43:g(\'\'),1O:g(\'<1b 1v="19-1O\'+(A?" 6z":"")+\'" 5a="18 2Z;"><1b 1v="19-23">\'),2K:g(\'<1b 1v="19-1O\'+(A?" 6z":"")+\' 19-1h" 5a="18 2Z;"><1b 1v="19-23">\'),2I:g(\'<1b 1v="19-1O\'+(A?" 6z":"")+\' 19-1p" 5a="18 2Z;"><1b 1v="19-23">\'),2D:g(\'<2o>\'),2n:g(\'<2o>\'),1B:g(\'<1b 1v="19-1B" 5a="18 2Z;"><1b 1v="19-1B-23"><1b 1v="19-1B-6d">\'),6e:!1,3O:!1,3N:!1,3C:!1,3v:!1,8f:eC,2y:!1,34:!1,4x:0,3w:0,4z:0};e.1j.8B=e.1j.2D.2d(e.1j.2n);e.7B();e.bb();e.14.47=0=e.1j.1Q?e.1j.1Q-1:e.14.47;e.14.47=e.14.bf?M(T()*e.1j.1Q):e.14.47;e.1j.2Y=e.14.47;d?e.bg():e.7H();e.14.2w&&(e.7P(),O.3n(12(){e.7P()}));A&&(a=/(6a|4C|4X|eB|eA)/ez,e.14.1S.1u=e.14.1S.1u.1q(a,"3u"),e.14.1S.1U=e.14.1S.1U.1q(a,"3u"),e.14.1T.1u=e.14.1T.1u.1q(a,"3u"),e.14.1T.1U=e.14.1T.1U.1q(a,"3u"));e.14.2a.6v&&g.3x(e.14.1M,{63:0,62:0,6F:0,6M:0})};ea.48={5h:12(){11.1j.4c+=1;"1G"==11.14.3y.1Y()?11.1j.2r.1Z().2u({1y:"-9z"},11.14.1u.2p,"2U"):11.1j.2r.1Z().2u({1w:"-9z"},11.14.1u.2p,"2U")},4a:12(){11.1j.4c-=1;11.1j.4c=0>11.1j.4c?0:11.1j.4c;"1G"==11.14.3y.1Y()?0>=11.1j.4c&&11.1j.2r.1Z().2u({1y:"-9F"},11.14.1u.2p,"7O"):0>=11.1j.4c&&11.1j.2r.1Z().2u({1w:"-9F"},11.14.1u.2p,"7O")},5l:12(){17 a=11;a.1I={ey:a.1j.1O,ex:a.1j.2K,ew:a.1j.2I,et:a.1j.1o,em:a.1j.1h,ek:a.1j.1p,1U:12(){a.32()},4K:12(){0<2R.1g?a.3i(!0):a.3i()},3c:12(){a.4V()}}},8s:12(){17 a=11,b=[],c=[];g(a.3h,a.4m).1X(12(){17 d=g(11),e=d.2L(a.14.2L)||1f,f=d.1A("14")&&eb("({"+d.1A("14")+"})")||{},l=d.1A("1S"),k=d.1A("1J"),h=d.1A("1k")||$(e);c.4S({1s:e,1S:l,1J:k,1k:h,14:f});a.99||b.4S(d)});a.1n=c;a.6s=b},7B:12(){17 a=11,b=[];g.1X(a.1n,12(c,d){"3p"==1d d&&(d={2h:d});17 e=d.2h||d.1s||1f,f=d.14||{},l=d.1S||1f,k=d.1J||1f,h=d.1k?d.1k.1Y():$(e),m="3q"!=1d e?Z(e):"";f.2j=f.2j||("2F"==h?e:1f);f.8k=f.8k||1f;f.3s=f.3s||a.14.3s;f.1c=f.1c||1f;f.1e=f.1e||1f;f.3V="2N"!=1d f.3V?f.3V:!0;f.3U="2N"!=1d f.3U?f.3U:!0;f.1T="2N"!=1d f.1T?f.1T:a.14.1T.8r&&g.3x({},{},a.14.1T.8r);"1H"==h&&(f.2g="2N"!=1d f.2g?f.2g:{},f.2g.3t=f.2g.3t||f.2g.e9||1f,f.2g.2a="2N"!=1d f.2g.2a?f.2g.2a:"2a",f.2g.6E=f.2g.6E||"e4",f.2g.5b="2N"!=1d f.2g.5b?f.2g.5b:!1);f.1c&&f.1e||("1H"==h?(f.1c=aC,f.1e=aF):"4p"==h?(f.1c="2l%",f.1e="90%"):"2t"==h&&(f.1c=aC,f.1e=aF));5Z d.2h;d.8R=c;d.1s=e;d.1S=l;d.1J=k;d.1k=h;d.14=f;d.2X=m;b.4S(d)});a.1n=b},bg:12(){17 a=11.1j.2Y;11.1j.1o=a;11.1j.1h=11.1n[a+1]?a+1:1f;11.1j.1p=11.1n[a-1]?a-1:1f;11.6H();11.6I()},6H:12(){17 a=11,b=a.1j,c=a.14,d=J(),e=c.3y.1Y(),f=0=b.1Q-1&&b.2D.2d(b.41).1D("3R"));c.1u.4f?(b.1V.1Z().33(c.1u.2p),b.1P.1Z().33(c.1u.2p)):(b.1V.1u(),b.1P.1u());17 k=f.1g;l?(a.5h(),g.1X(f,12(d,e){a.bq(11,12(d){17 e=-1;a.1n.5W(12(a,b,c){a.1s==d.2h&&(e=b);18 a.1s==d.2h});17 f=a.1n[e];d&&g.3x(!0,f,{1s:d.4y,1k:d.1k,aO:!0,14:{2g:d.2g,1c:"2F"==d.1k?0:d.1c||f.1c,1e:"2F"==d.1k?0:d.1e||f.1e,2j:f.14.2j||d.2j}});k--;0==k&&(a.4a(),b.7e=!1,a.5n(),c.1u.4f?2E(12(){a.5r()},c.1u.2p):a.5r())})})):c.1u.4f?2E(12(){a.5r()},c.1u.2p):a.5r();a.5l();n.1E={3Z:12(){a.32()},3c:12(){a.4V()},bI:12(){a.25("1h")},8V:12(){a.25("1p")},4h:12(b){a.4h(b)},4K:12(){a.4K()},6f:12(){0<2R.1g?a.3i(!0):a.3i()},5V:12(b){a.5V(b)},94:12(){a.32();a.6h()}};c.2w&&(b.3C=!0,n.31.4o=c.2w+"/"+b.1o,2E(12(){b.3C=!1},55));c.3E.97||(a.5U(),b.81.2G("19-4A").1D("19-4i"));"12"==1d a.14.1l.9b&&a.14.1l.9b.1m(a)},4Z:12(a,b,c){17 d,e;11.5l();a.2p=c||11.14.2C.5B;"1o"==b&&(11.1j.4j=a.14.3V?!1:!0,11.1j.53=a.14.3U?!1:!0);4d(b){1r"1o":d=11.1j.1O;e=11.1j.1o;1z;1r"1h":d=11.1j.2K;e=11.1j.1h;1z;1r"1p":d=11.1j.2I,e=11.1j.1p}d.8t("36 1v").1D("19-1O"+(A?" 6z":"")).1D(a.14.3s);g("1b.19-4v-1P",d).4E();1a(a.1J||11.14.3Y){c=11.1j.3Y.5S();1a(a.1J&&11.14.1u.1J){17 f=11.1j.1J.5S();f.4e().2J(a.1J);c.1K(f)}11.14.3Y&&c.1K(1<11.1j.1Q?11.1j.1P.5S():11.1j.1P);d.dX(c)}11.9v(a,d,e,b)},9v:12(a,b,c,d){17 e=11,f=e.14,l={9w:b,8F:c};4d(a.1k){1r"2F":"12"==1d f.1l.2b&&f.1l.2b.1m(e,e.1I,c);"12"==1d a.14.2b&&a.14.2b.1m(e,l);e.4k(a.1s,12(k){"12"==1d f.1l.1W&&f.1l.1W.1m(e,e.1I,c);"12"==1d a.14.1W&&a.14.1W.1m(e,l);b.1A({2s:k?k.1c:dR,2q:k?k.1e:7k});g("1b.19-23",b).4e().1K(k?\'<7l 2i="\'+a.1s+\'" 1v="19-2F" />\':\'<2o 1v="19-61">\'+f.5Q.4k+"");"12"==1d f.1l.1L&&f.1l.1L.1m(e,e.1I,c);"12"==1d a.14.1L&&a.14.1L.1m(e,l);e.3L(a,d,b)});1z;1r"1H":b.1A({2s:a.14.1c,2q:a.14.1e});e.4U(b,a);"12"==1d f.1l.1L&&f.1l.1L.1m(e,e.1I,c);"12"==1d a.14.1L&&a.14.1L.1m(e,l);e.3L(a,d,b);1z;1r"4p":e.5h();b.1A({2s:a.14.1c,2q:a.14.1e});17 k=e.4U(b,a);"12"==1d f.1l.1L&&f.1l.1L.1m(e,e.1I,c);"12"==1d a.14.1L&&a.14.1L.1m(e,l);"12"==1d f.1l.2b&&f.1l.2b.1m(e,e.1I,c);"12"==1d a.14.2b&&a.14.2b.1m(e,l);k.4n("5e",12(){"12"==1d f.1l.1W&&f.1l.1W.1m(e,e.1I,c);"12"==1d a.14.1W&&a.14.1W.1m(e,l);e.4a();e.3L(a,d,b);k.6K("5e")});1z;1r"6L":17 k=g(a.1s),h=e.4U(b,a),m=S(b);b.1A({2s:e.1n[c].14.1c||k.3j(),2q:e.1n[c].14.1e||k.2m()});h.dQ().eq(0).1u();"12"==1d f.1l.1L&&f.1l.1L.1m(e,e.1I,c);"12"==1d a.14.1L&&a.14.1L.1m(e,l);"12"==1d f.1l.2b&&f.1l.2b.1m(e,e.1I,c);"12"==1d a.14.2b&&a.14.2b.1m(e,l);e.4k(m,12(){"12"==1d f.1l.1W&&f.1l.1W.1m(e,e.1I,c);"12"==1d a.14.1W&&a.14.1W.1m(e,l);e.3L(a,d,b)});1z;1r"2t":k=e.4U(b,a);b.1A({2s:e.1n[c].14.1c||k.3j(),2q:e.1n[c].14.1e||k.2m()});"12"==1d f.1l.1L&&f.1l.1L.1m(e,e.1I,c);"12"==1d a.14.1L&&a.14.1L.1m(e,l);e.3L(a,d,b);1z;1r"6r":17 p=a.14.6r||{};"12"==1d f.1l.2b&&f.1l.2b.1m(e,e.1I,c);"12"==1d a.14.2b&&a.14.2b.1m(e,l);e.5h();g.6r({2h:a.1s||f.2Q.2h,1A:p.1A||1f,7v:p.7v||"2J",1k:p.1k||f.2Q.1k,6N:p.6N||f.2Q.6N,6O:p.6O||f.2Q.6O,6P:p.6P||f.2Q.6P,6Q:p.6Q||f.2Q.6Q,6R:p.6R||f.2Q.6R,6T:p.6T||f.2Q.6T,6U:p.6U||f.2Q.6U,70:p.70||f.2Q.70,5P:12(k,h,m){e.4a();17 x=g(k),t=g("1b.19-23",b),n=e.1n[c].14.1c||1i(x[0].73("1c")),v=e.1n[c].14.1e||1i(x[0].73("1e")),ah=x[0].73("1c")&&x[0].73("1e")?{ai:"dP"}:{};t.4e().1K(g(\'<1b 1v="19-75">\').1C(ah).2J(x));b.1u().1A({2s:n||t.3j(),2q:v||t.2m()}).1U();"12"==1d f.1l.1L&&f.1l.1L.1m(e,e.1I,c);"12"==1d a.14.1L&&a.14.1L.1m(e,l);x=S(b);e.4k(x,12(){"12"==1d f.1l.1W&&f.1l.1W.1m(e,e.1I,c);"12"==1d a.14.1W&&a.14.1W.1m(e,l);e.3L(a,d,b)});f.2Q.5P(k,h,m);"12"==1d p.5P&&p.5P(k,h,m)},4M:12(k,h,m){"12"==1d f.1l.1W&&f.1l.1W.1m(e,e.1I,c);"12"==1d a.14.1W&&a.14.1W.1m(e,l);e.4a();g("1b.19-23",b).4e().1K(\'<2o 1v="19-61">\'+f.5Q.am+"");e.3L(a,d,b);f.2Q.4M(k,h,m);"12"==1d p.4M&&p.4M(k,h,m)}});1z;1r"2J":h=a.1s;23=g("1b.19-23",b);h[0].8T?k=h.5S():(h=g(h),k=h.3h?g("<1b>"+h+""):h);17 x=e.1n[c].14.1c||1i(k.2L("1c")),t=e.1n[c].14.1e||1i(k.2L("1e"));e.4U(b,a);k.dL(1x.3B).1U();"12"==1d f.1l.1L&&f.1l.1L.1m(e,e.1I,c);"12"==1d a.14.1L&&a.14.1L.1m(e,l);m=S(b);"12"==1d f.1l.2b&&f.1l.2b.1m(e,e.1I,c);"12"==1d a.14.2b&&a.14.2b.1m(e,l);e.4k(m,12(){"12"==1d f.1l.1W&&f.1l.1W.1m(e,e.1I,c);"12"==1d a.14.1W&&a.14.1W.1m(e,l);b.1u().1A({2s:x||23.3j(),2q:t||23.2m()}).1U();k.4E();e.3L(a,d,b)})}},3L:12(a,b,c){17 d=11,e=d.1j,f=d.14;"1o"!=b&&("1h"==b?c.1D("19-1h"):c.1D("19-1p"));1a("1o"==b)17 l=e.1o;2f 1a("1h"==b)17 k=f.1M.6F,l=e.1h;2f k=f.1M.6M,l=e.1p;17 h={9w:c,8F:l};d.1n[l].14.1c=d.1n[l].14.1c||0;d.1n[l].14.1e=d.1n[l].14.1e||0;"1o"==b?f.1u.4f?c.1C(C,H).33(a.2p,12(){c.1C(C,"");1a(a.1S){d.84(a,c);17 b=g("1b.19-1S",c),e=1i(b.2m()/c.2m()*2l);f.1S.2Y&50>=e&&b.33(f.2C.5K)}1a(b=a.14.1T)d.88(b,a.1s,c),f.1T.2Y&&g("1b.19-1T",c).33(f.2C.5K);d.5n();"12"==1d f.1l.2x&&f.1l.2x.1m(d,d.1I,l);"12"==1d a.14.2x&&a.14.2x.1m(d,h)}):(c.1u(),d.5n(),"12"==1d f.1l.2x&&f.1l.2x.1m(d,d.1I,l),"12"==1d a.14.2x&&a.14.2x.1m(d,h)):f.1u.4f?c.ay(a.2p,k,12(){"1h"==b?e.3O=!1:e.3N=!1;d.5n();"12"==1d f.1l.2x&&f.1l.2x.1m(d,d.1I,l);"12"==1d a.14.2x&&a.14.2x.1m(d,h)}):(c.1C({2O:k}).1u(),"1h"==b?e.3O=!1:e.3N=!1,d.5n(),"12"==1d f.1l.2x&&f.1l.2x.1m(d,d.1I,l),"12"==1d a.14.2x&&a.14.2x.1m(d,h));2E(12(){d.3i()},0)},5r:12(){17 a=11.1j,b=11.14;b.2S&&3<=a.1Q?(a.1o==a.1Q-1&&(a.1h=0),0==a.1o&&(a.1p=a.1Q-1)):b.2S=!1;11.4Z(11.1n[a.1o],"1o",b.1u.2p);11.1n[a.1h]&&11.4Z(11.1n[a.1h],"1h",b.1u.2p);11.1n[a.1p]&&11.4Z(11.1n[a.1p],"1p",b.1u.2p)},5n:12(){17 a=11,b=a.1j,c=a.14,d=1f;1a(b.6e&&!a.1j.7e){17 e=b.1B,f=g("1b.19-1B-23",e),l=g("1b.19-1B-6d",f),k=0;l.8t("36").4e();g.1X(a.1n,12(h,m){17 p=b.1o==h?"19-5k":"",x=b.1o==h?c.1B.8c:c.1B.8e,t=m.14.2j,r=g(\'<1b 1v="19-2j">\'),s=g(\'<1b 1v="19-2j-7c">\');r.1C({2O:0}).1D(p);"1H"!=m.1k&&"2t"!=m.1k||"2N"!=1d m.14.7c?m.14.7c&&(s.1D("19-2j-"+m.14.7c),r.1K(s)):(s.1D("19-2j-1H"),r.1K(s));t&&a.4k(t,12(b){k++;b?r.1A({2s:b.1c,2q:b.1e}).1K(\'<7l 2i="\'+t+\'" 49="0" />\'):r.1A({2s:c.1B.8g,2q:c.1B.8h});4P(d);d=2E(12(){a.5J(e,f,l)},20);2E(12(){r.ay(c.2C.5B,x)},20*k)});l.1K(r)});a.1j.7e=!0}},5J:12(a,b,c){17 d=11,e=d.1j,f=d.14,l=J(),k=f.3y.1Y();a||(a=e.1B);b||(b=g("1b.19-1B-23",a));c||(c=g("1b.19-1B-6d",b));17 h=g(".19-2j",c),e="1G"==k?l.1c-f.1M.5I:h.eq(0).3j()-f.1M.5I,l="1G"==k?h.eq(0).2m()-f.1M.5H:l.1e-f.1M.5H,m="1G"==k?0:e,p="1G"==k?l:0,x=g(".19-5k",c),t={};3>2R.1g&&(h.1C({2O:f.1B.8e}),x.1C({2O:f.1B.8c}));h.1X(12(a){a=g(11);17 b=a.1A(),c="1G"==k?0:f.1B.8g;1e="1G"==k?f.1B.8h:0;8o=d.5E(c,1e,b.2s,b.2q,!0);a.1C({1c:8o.1c,1e:8o.1e});"1G"==k&&a.1C({"dK":"1w"});"1G"==k?m+=a.3j():p+=a.2m()});t={1c:m,1e:p};c.1C(t);17 t={},h=c.3d(),r=x.1g?x.3d():{1y:1i(l/2),1w:1i(e/2)};h.1y-=E.4J();h.1w-=E.4s();r.1y=r.1y-h.1y-E.4J();r.1w=r.1w-h.1w-E.4s();"1G"==k?(t.1y=0,t.1w=1i(e/2-r.1w-x.3j()/2)):(t.1y=1i(l/2-r.1y-x.2m()/2),t.1w=0);3>2R.1g?c.1Z().2u(t,f.2C.5C,"2U"):c.1C(t)},4k:12(a,b){g.3J(a)||(a=[a]);17 c=11,d=a.1g;0d?b.25("1h"):0v.5v-w.5v&&I(w.2k[0]-v.2k[0])>k&&I(w.2k[1]-v.2k[1])<8K?w.2k[0]>v.2k[0]?c.1o!=c.1Q-1||d.2S?(c.34=!0,b.25("1h")):m():0!=c.1o||d.2S?(c.34=!0,b.25("1p")):m():"9t"==e&&9s>v.5v-w.5v&&I(w.2k[1]-v.2k[1])>k&&I(w.2k[0]-v.2k[0])<8K?w.2k[1]>v.2k[1]?c.1o!=c.1Q-1||d.2S?(c.34=!0,b.25("1h")):m():0!=c.1o||d.2S?(c.34=!0,b.25("1p")):m():m());w=v=R})}})},4h:12(a){17 b=11,c=b.1j,d=b.14,e=a-c.1o;d.2S&&(a==c.1Q-1&&0==c.1o&&(e=-1),c.1o==c.1Q-1&&0==a&&(e=1));1a(1==e)b.25("1h");2f 1a(-1==e)b.25("1p");2f{1a(c.3O||c.3N)18!1;"12"==1d d.1l.6w&&d.1l.6w.1m(b,b.1I);d.2w&&(c.3C=!0,n.31.4o=d.2w+"/"+a);b.1n[a]&&(b.1n[a].14.3V?b.1j.4j=!1:c.4j=!0,c.53=b.1n[a].14.3U?!1:!0);g.1X([c.1O,c.2K,c.2I],12(a,b){b.1C(C,H).3X(d.2C.5B)});c.1o=a;c.1h=a+1;c.1p=a-1;b.5l();2E(12(){b.5r()},d.2C.5B+50);g(".19-2j",c.1B).2G("19-5k").eq(a).1D("19-5k");b.5J();d.2w&&2E(12(){c.3C=!1},55);d.2S||(c.2D.2d(c.2n).2d(c.43).2d(c.41).2G("3R"),0==c.1o&&c.2n.2d(c.43).1D("3R"),c.1o>=c.1Q-1&&c.2D.2d(c.41).1D("3R"));b.7G();"12"==1d d.1l.6x&&d.1l.6x.1m(b,b.1I)}},25:12(a){17 b=11,c=b.1j,d=b.14,e=d.3y.1Y(),f=J(),l=d.2C.9x;1a(c.3O||c.3N)18!1;17 k="1h"==a?c.1h:c.1p;d.2w&&(c.3C=!0,n.31.4o=d.2w+"/"+k);1a("1h"==a){1a(!b.1n[k])18!1;17 h=c.2K,m=c.1O,p=c.2I,x="19-1p",t="19-1h"}2f 1a("1p"==a){1a(!b.1n[k])18!1;h=c.2I;m=c.1O;p=c.2K;x="19-1h";t="19-1p"}"12"==1d d.1l.6w&&d.1l.6w.1m(b,b.1I);"1h"==a?c.3O=!0:c.3N=!0;17 r=g("1b.19-1S",m),s=g("1b.19-1T",m);r.1g&&r.1Z().3X(l,12(){g(11).4E()});s.1g&&s.1Z().3X(l,12(){g(11).4E()});b.1n[k].1S&&(b.84(b.1n[k],h),r=g("1b.19-1S",h),s=1i(r.2m()/h.2m()*2l),d.1S.2Y&&50>=s&&r.33(l));1a(r=b.1n[k].14.1T)b.88(r,b.1n[k].1s,h),d.1T.2Y&&g("1b.19-1T",h).33(d.2C.5K);g.1X([h,m,p],12(a,b){b.2G("19-1h 19-1p")});17 u=h.1A("3d"),r=f.1c-d.1M.5I,f=f.1e-d.1M.5H,s=u.5D.1c,y=u.5D.1e,q=u.9A,u=u.7K,w=1i(f/2-y/2-u.H-q.H/2),u=1i(r/2-s/2-u.W-q.W/2);h.1C(C,H).2u({1y:w,1w:u,2O:1},l,c.34?"2U":"5q",12(){h.1C(C,"")});g("1b.19-23",h).2u({1c:s,1e:y},l,c.34?"2U":"5q");17 y=m.1A("3d"),v=y.3q,u=y.7K,s=y.5D.1c,y=y.5D.1e,s=1i(s*d.1M["1h"==a?"5F":"5G"]),y=1i(y*d.1M["1h"==a?"5F":"5G"]),w="1G"==e?1i(f/2-v.5p-y/2-u.H-q.H/2):1i(f-v.4R-u.H-q.H/2);"1p"==a?u="1G"==e?1i(r-v.4R-u.W-q.W/2):1i(r/2-s/2-u.W-v.5p-q.W/2):(w="1G"==e?w:1i(v.4R-u.H-y-q.H/2),u="1G"==e?1i(v.4R-u.W-s-q.W/2):1i(r/2-v.5p-s/2-u.W-q.W/2));g("1b.19-23",m).2u({1c:s,1e:y},l,c.34?"2U":"5q");m.1D(x).1C(C,H).2u({1y:w,1w:u,2O:d.1M.6M},l,c.34?"2U":"5q",12(){m.1C(C,"");g(".19-2j",c.1B).2G("19-5k").eq(k).1D("19-5k");b.5J();b.1n[k]&&(c.4j=b.1n[k].14.3V?!1:!0,c.53=b.1n[k].14.3U?!1:!0);c.34=!1;"1h"==a?(c.2K=p,c.2I=m,c.1O=h,c.2K.1U(),c.1h+=1,c.1p=c.1o,c.1o+=1,d.2S&&(c.1o>c.1Q-1&&(c.1o=0),c.1o==c.1Q-1&&(c.1h=0),0==c.1o&&(c.1p=c.1Q-1)),b.5l(),b.1n[c.1h]?b.4Z(b.1n[c.1h],"1h"):c.3O=!1):(c.2I=p,c.2K=m,c.1O=h,c.2I.1U(),c.1h=c.1o,c.1o=c.1p,c.1p=c.1o-1,d.2S&&(c.1o==c.1Q-1&&(c.1h=0),0==c.1o&&(c.1p=c.1Q-1)),b.5l(),b.1n[c.1p]?b.4Z(b.1n[c.1p],"1p"):c.3N=!1);d.2w&&2E(12(){c.3C=!1},55);d.2S||(c.2D.2d(c.2n).2d(c.43).2d(c.41).2G("3R"),0==c.1o&&c.2n.2d(c.43).1D("3R"),c.1o>=c.1Q-1&&c.2D.2d(c.41).1D("3R"));b.3i();b.7G();"12"==1d d.1l.6x&&d.1l.6x.1m(b,b.1I)});w="1G"==e?F(p,"1y"):"1h"==a?1i(-(f/2)-p.2m()):1i(2*w);u="1G"==e?"1h"==a?1i(-(r/2)-p.3j()):1i(2*u):F(p,"1w");p.1C(C,H).2u({1y:w,1w:u,2O:d.1M.6F},l,c.34?"2U":"5q",12(){p.1C(C,"")}).1D(t)},84:12(a,b){17 c=g(\'<1b 1v="19-1S">\');a.1S&&(c.2J(a.1S),g("1b.19-23",b).1K(c))},9H:12(a,b){17 c=11.14,d=n.31.2V;g.1X(a,12(e,f){1a(!f)18!0;17 l,g;4d(e.1Y()){1r"9I":l="3e://5m.9I.3l/9J.7X?v=4&2i=bm&u={1s}";g="4Q 1R do";1z;1r"9N":l="3e://9N.3l/dn?5j={1s}";g="4Q 1R dm";1z;1r"dl":l="dj://di.dh.3l/9J?2h={1s}";g="4Q 1R dg+";1z;1r"9W":l="3e://9W.3l/df?2h={1s}";g="4Q 1R de";1z;1r"9Y":l="3e://9Y.3l/9Z?dd=2&2h={1s}";g="4Q 1R dc";1z;1r"83":l="3e://83.3l/9Z?2h={1s}",g="4Q 1R 83"}a[e]={1s:f.1s&&N(d,f.1s)||c.2w&&n.31.2V||"3p"!==1d b&&d||b&&N(d,b)||d,4y:f.4y||l||f.1s&&N(d,f.1s)||b&&N(d,b),2P:f.2P||g||"4Q 1R "+e,1c:"2N"==1d f.1c||bt(f.1c)?db:1i(f.1c),1e:f.1e||d9}});18 a},88:12(a,b,c){17 d=g(\'<1b 1v="19-1T">\'),e="";a=11.9H(a,b);g.1X(a,12(a,b){a.1Y();17 c=b.4y.1q(/\\{1s\\}/g,7U(b.1s).1q(/!/g,"%21").1q(/\'/g,"%27").1q(/\\(/g,"%28").1q(/\\)/g,"%29").1q(/\\*/g,"%2A").1q(/%20/g,"+"));e+=\'\'});e+="";d.2J(e);g("1b.19-23",c).1K(d)},4V:12(){z.5z?z.8d()?z.4W(1x.3B):z.6V(1x.3B):11.7s()},7s:12(){17 a=11.1j,b=J(),c=11.14;1a(c.3z){17 d=a.1O,e=11.1n[a.1o],f=b.1c,l=b.1e,k=[d,a.2K,a.2I,a.2D,a.2n,a.1V,a.1P,a.1B,a.2r],b=[a.2K,a.2I,a.2D,a.2n,a.2r,a.1B];1a(a.2y)a.2y=a.5x=a.4j=a.53=!1,a.1V.1C({2O:11.14.1V.2O}),g.1X(b,12(a,b){b.1u()}),a.6B.2L("1J",c.2P.7W),d.1A({2s:d.1A("6X"),2q:d.1A("6Y"),6X:1f,6Y:1f}),g.1X(k,12(a,b){b.2G("19-3c")}),"12"==1d c.1l.ap&&c.1l.ap.1m(11,11.1I);2f{a.2y=a.5x=a.4j=a.53=!0;a.1V.1C({2O:1});g.1X(b,12(a,b){b.1U()});a.6B.2L("1J",c.2P.aq);1a(-1!=c.6Z.1N(e.1k))d.1A({6X:d.1A("2s"),6Y:d.1A("2q"),2s:f,2q:l});2f{17 b=e.14.4B||c.4B||"",a=f,e=l,f=d.1A("2s"),h=d.1A("2q");"d2"==b.1Y()?(e=a/f*h,ea||h>e?!0:!1),a=l.1c,e=l.1e);d.1A({6X:d.1A("2s"),6Y:d.1A("2q"),2s:a,2q:e})}g.1X(k,12(a,b){b.1D("19-3c")});"12"==1d c.1l.av&&c.1l.av.1m(11,11.1I)}}2f a.2y=a.2y?!1:!0;11.3i(!0)},32:12(){17 a=11.1j,b=11.14;O.6K(".1E");E.5u(".1E");a.2y&&z.4W(1x.3B);g(".19-1V, .19-1O, .19-1B").5u(".1E");b.1U.4f?a.1V.1Z().3X(b.1U.2p,12(){a.1V.4E();a.3o.2G("19-7I").5u(".1E")}):(a.1V.4E(),a.3o.2G("19-7I").5u(".1E"));g.1X([a.1P,a.1O,a.2K,a.2I,a.2D,a.2n,a.2r,a.1B],12(a,b){b.8t("36").4E()});a.7e=a.2y=!1;n.1E=1f;b.2w&&(a.3C=!0,fa(),2E(12(){a.3C=!1},55));"12"==1d b.1l.aw&&b.1l.aw.1m(11,11.1I)},3i:12(){17 a=11.1j,b=11.14,c=b.3y.1Y(),d=J(),e=d.1c,f=d.1e,d=a.2y&&b.3z||a.3v?0:"1G"==c?0:a.1B.3j(),l=a.3v?a.1P.2m():a.2y&&b.3z?0:"1G"==c?a.1B.2m():0,e=a.2y&&b.3z?e:e-b.1M.5I,f=a.2y&&b.3z?f:f-b.1M.5H,k="1G"==c?1i(11.1n[a.1h]||11.1n[a.1p]?2*(b.1M.63+b.1M.62):30>=e/10?30:e/10):1i(30>=e/10?30:e/10)+d,h="1G"==c?1i(30>=f/10?30:f/10)+l:1i(11.1n[a.1h]||11.1n[a.1p]?2*(b.1M.63+b.1M.62):30>=f/10?30:f/10),d={1k:"1o",1c:e,1e:f,5X:11.1n[a.1o],8m:k,8n:h,aA:d,aB:l,2u:2R.1g,1O:a.1O};11.74(d);11.1n[a.1h]&&(d=g.3x(d,{1k:"1h",5X:11.1n[a.1h],4R:b.1M.63,5p:b.1M.aD,1O:a.2K}),11.74(d));11.1n[a.1p]&&(d=g.3x(d,{1k:"1p",5X:11.1n[a.1p],4R:b.1M.62,5p:b.1M.aE,1O:a.2I}),11.74(d));b="1G"==c?{1w:1i(e/2-a.2r.3j()/2)}:{1y:1i(f/2-a.2r.2m()/2)};a.2r.1C(b)},74:12(a){17 b=11.1j,c=11.14,d=c.3y.1Y(),e="1o"==a.1k?b.2y&&c.3z?a.1c:a.1c-a.8m:a.1c-a.8m,f="1o"==a.1k?b.2y&&c.3z?a.1e:a.1e-a.8n:a.1e-a.8n,l=a.5X,k=a.5X.14,h=a.1O,m=a.4R||0,p=a.5p||0,n=a.aA,t=a.aB;"1o"==a.1k?("3g"==1d k.1c&&k.1c&&(e=b.2y&&c.3z&&(-1!=c.6Z.1N(l.1k)||k.4B||c.4B)?e:k.1c>e?e:k.1c),"3g"==1d k.1e&&k.1e&&(f=b.2y&&c.3z&&(-1!=c.6Z.1N(l.1k)||k.4B||c.4B)?f:k.1e>f?f:k.1e)):("3g"==1d k.1c&&k.1c&&(e=k.1c>e?e:k.1c),"3g"==1d k.1e&&k.1e&&(f=k.1e>f?f:k.1e));f=1i(f-g(".19-4v-1P",h).2m());b="3p"==1d k.1c&&-1!=k.1c.1N("%")?aa(1i(k.1c.1q("%","")),a.1c):h.1A("2s");l="3p"==1d k.1e&&-1!=k.1e.1N("%")?aa(1i(k.1e.1q("%","")),a.1e):h.1A("2q");l="3p"==1d k.1c&&-1!=k.1c.1N("%")||"3p"==1d k.1e&&-1!=k.1e.1N("%")?{1c:b,1e:l}:11.5E(e,f,b,l);e=g.3x({},l,{});"1p"==a.1k||"1h"==a.1k?(b=1i(l.1c*("1h"==a.1k?c.1M.5G:c.1M.5F)),l=1i(l.1e*("1h"==a.1k?c.1M.5G:c.1M.5F))):(b=l.1c,l=l.1e);f=1i((F(h,"58-1w")+F(h,"58-5T")+F(h,"49-1w-1c")+F(h,"49-5T-1c"))/2);k=1i((F(h,"58-1y")+F(h,"58-aG")+F(h,"49-1y-1c")+F(h,"49-aG-1c")+g(".19-4v-1P",h).2m())/2);4d(a.1k){1r"1o":17 r=1i(a.1e/2-l/2-k-t/2),s=1i(a.1c/2-b/2-f-n/2);1z;1r"1h":r="1G"==d?1i(a.1e/2-p-l/2-k-t/2):1i(a.1e-m-k-t/2);s="1G"==d?1i(a.1c-m-f-n/2):1i(a.1c/2-b/2-f-p-n/2);1z;1r"1p":r="1G"==d?1i(a.1e/2-p-l/2-k-t/2):1i(m-k-l-t/2),s="1G"==d?1i(m-f-b-n/2):1i(a.1c/2-p-b/2-f-n/2)}h.1A("3d",{1y:r,1w:s,5D:e,7K:{W:f,H:k},9A:{W:n,H:t},3q:a});0=c.1Q||a11.14.4O?4b=11.14.4O:4b<11.14.4D&&(4b=11.14.4D));a=11.14.8u?X(c*4b):a;b=11.14.8u?X(d*4b):b;18{1c:a,1e:b,cT:4b}},5V:12(a){11.14=g.3x(!0,11.14,a||{});11.4K()},bb:12(){17 a=1x.59("1H");11.3b={2t:0<=1i(Q.3P("aR"))||0<=1i(Q.3P("aS"))?!0:!1,2W:0<=1i(Q.3P("66"))?!0:!1,8y:!(!a.44||!a.44("1H/46").1q(/51/,"")),8z:!(!a.44||!a.44("1H/3t").1q(/51/,"")),8A:!(!a.44||!a.44("1H/5d").1q(/51/,"")),aY:!(!a.44||!a.44("1H/2W").1q(/51/,""))}},4U:12(a,b){17 c;4d(b.1k){1r"1H":17 d=!1,e=b.8k,f=b.14.2g;("1H/46"==e||"46"==b.2X||"8w"==b.2X||f.aZ)&&11.3b.8y?(b.2X="46",b.1s=f.aZ||b.1s):f.3t&&11.3b.8z?(b.2X="3t",b.1s=f.3t||b.1s):f.5d&&11.3b.8A&&(b.2X="7D",b.1s=f.5d||b.1s);!11.3b.8y||"1H/46"!=e&&"46"!=b.2X&&"8w"!=b.2X?!11.3b.8z||"1H/3t"!=e&&"3t"!=b.2X?!11.3b.8A||"1H/5d"!=e&&"7D"!=b.2X?!11.3b.aY||"1H/2W"!=e&&"9k"!=b.2X&&"cP"!=b.2X||(d=!0,e="1H/2W"):(d=!0,e="1H/5d"):(d=!0,e="1H/3t"):(d=!0,e="1H/46");d?c=g("<1H />",{1c:"2l%",1e:"2l%",6E:f.6E,5b:f.5b,b1:f.b1,2a:f.2a}).1K(g("<4y />",{2i:b.1s,1k:e})):11.3b.2W?(c=g("<3q />",{1k:"1H/2W",4L:"3e://5m.7j.3l/2W/7J"}).2L({1A:b.1s,1c:"2l%",1e:"2l%"}).1K(g("<3W />",{2e:"2i",2M:b.1s})).1K(g("<3W />",{2e:"5b",2M:"2Z"})).1K(g("<3W />",{2e:"b2",2M:"2Z"})).1K(g("<3W />",{2e:"b3",2M:"b4"})),D.6j&&(c=91(b.1s,"2l%","2l%","","cO","b4","cI","2Z","cG","2Z"))):c=g("<2o />",{"1v":"19-61",2J:11.14.5Q.8C.1q("{4L}","3e://5m.7j.3l/2W/7J").1q("{1k}","66")});1z;1r"2t":1a(11.3b.2t){17 l="",k=0;b.14.8D?g.1X(b.14.8D,12(a,b){0!=k&&(l+="&");l+=a+"="+7U(b);k++}):l=1f;c=g("<8j />").2L({1k:"68/x-7f-2t",2i:b.1s,1c:"3g"==1d b.14.1c&&b.14.1c&&"1"==11.14.4D&&"1"==11.14.4O?b.14.1c:"2l%",1e:"3g"==1d b.14.1e&&b.14.1e&&"1"==11.14.4D&&"1"==11.14.4O?b.14.1e:"2l%",cF:"cE",cD:"#cC",4A:"7g",b2:"7g",cB:"7g",cx:"cw",b3:"cv",cu:"bn",bo:"7g",8D:l,3c:"8a"})}2f c=g("<2o />",{"1v":"19-61",2J:11.14.5Q.8C.1q("{4L}","3e://5m.ct.3l/go/ce").1q("{1k}","cd aS cc")});1z;1r"4p":c=g("<4p />").2L({1c:"3g"==1d b.14.1c&&b.14.1c&&"1"==11.14.4D&&"1"==11.14.4O?b.14.1c:"2l%",1e:"3g"==1d b.14.1e&&b.14.1e&&"1"==11.14.4D&&"1"==11.14.4O?b.14.1e:"2l%",2i:b.1s,c5:0,7w:0,7r:0,c2:A?"c1":"c0",bZ:"",bU:"",bo:""});1z;1r"6L":c=g(\'<1b 1v="19-75">\').2J(g(b.1s).5S(!0));1z;1r"2J":d=b.1s,d[0].8T||(d=g(b.1s),d=d.3h?g("<1b>"+d+""):d),c=g(\'<1b 1v="19-75">\').2J(d)}g("1b.19-23",a).4e().2J(c);"1H"===c[0].8P.1Y()&&D.4q&&2E(12(){17 a=c[0].bC+"?"+M(bT*T());c[0].bC=a;c[0].2i=a});18 c},bq:12(a,b){17 c=11,d=a.1s;c.5h();ga(d,12(a){c.4a();1a(a){17 d={1g:!1};d.2h=a.2h;1a(7k==a.5j){a=a.bS;17 l=a.1k,g=a.4y;d.4y=g.2i;d.1c=g.1c&&1i(g.1c)||0;d.1e=g.1e&&1i(g.1e)||0;d.1k=l;d.2j=g.2j||a.bR[0];d.2g=a.2g||{};d.1g=!0;"68/x-7f-2t"==g.1k?d.1k="2t":-1!=g.1k.1N("1H/")?d.1k="1H":-1!=g.1k.1N("/2J")?d.1k="4p":-1!=g.1k.1N("2F/")&&(d.1k="2F")}2f 1a("2N"!=1d a.bG)5o a.bG;b.1m(11,d.1g?d:!1)}})},7P:12(a){17 b=11.1j,c=11.14;a=V(a||n.31.2V).4o;17 d=a.24("/"),e=d[1];b.3C||"#"+c.2w!=d[0]&&1{1k} 7h."},2Q:{2h:"",6U:12(a,b){},6N:!1,70:12(a,b){},6O:!1,4M:12(a,b,c){},5P:12(a,b,c){},6P:!0,6Q:!1,6R:1f,6T:1f,1k:"cf"},1l:{}},b),d=g.3J(c)||"3p"==1d c?!0:!1,c=g.3J(c)?c:[];"3p"==1d a[0]&&(c[0]=a[0]);1a(a7(g.fn.cg,"1.8",">=")){17 e=2v ea(g(11),b,c,d);18{3Z:12(){e.32()},3c:12(){e.4V()},bI:12(){e.25("1h")},8V:12(){e.25("1p")},4h:12(a){e.4h(a)},4K:12(){e.4K()},6f:12(){0<2R.1g?e.3i(!0):e.3i()},5V:12(a){e.5V(a)},94:12(){e.32();e.6h()}}}5o"8O 8L 2B ch ci cj 3A ck cl. 1E 8N 8L 1.8+";};g.1E=12(a,b){18 g.fn.1E(a,b)};g.3x(g.cm,{7O:12(a,b,c,d,e){18-d*(P(1-(b/=e)*b)-1)+c},2U:12(a,b,c,d,e){18 d*P(1-(b=b/e-1)*b)+c},5q:12(a,b,c,d,e){18 1>(b/=e/2)?-d/2*(P(1-b*b)-1)+c:d/2*(P(1-(b-=2)*b)+1)+c}});(12(){g.1X("71 aX 8l cn co 3U cp cq cr cs".24(" "),12(a,b){g.fn[b]=12(a){18 a?11.4n(b,a):11.76(b)};g.bp&&(g.bp[b]=!0)});g.4F.bl.3u={bk:12(){17 a=11,b=g(11),c,d;b.4n("71.8J",12(e){c=L();b.7E("8l.8J",12(b){d=L();b=g.4F.cy(b||n.4F);b.1k="3u";c&&d&&c.x==d.x&&c.y==d.y&&(g.4F.cz||g.4F.cA).1m(a,b);c=d=R})})},bi:12(){g(11).6K("71.8J")}}})();(12(){z={5z:!1,8d:12(){18!1},6V:12(){},4W:12(){},8I:"",3G:""};8G=["4q","bd","o","b7","cH"];1a("2N"!=1d 1x.4W)z.5z=!0;2f 1t(17 a=0,b=8G.1g;aa.1N("cR")&&/(cS)(?:.*? aM:([\\w.]+)|)/.4H(a)||[];a=b[1]||"";b=b[2]||"0";D={};a&&(D[a]=!0,D.2B=b);D.b5?D.4q=!0:D.4q&&(D.cU=!0)})();(12(){12 a(a){1t(17 e=0,f=b.1g;ed(b[c],10))18 1;1a(d(a[c],10)c;c++)1a(/^(0+)(.+)$/.1F(d[c])&&(d[c]=2z.$2),c>b||!/\\d/.1F(d[c]))d[c]="0";18 d.7b(0,4).5y(",")},$$5M:12(a){18 12(b){1a(!a.3M&&b){17 c,d,e=a.3J(b)?b:a.4G(b)?[b]:[];1t(d=0;dg&&"0"!=d[f]||e[f]!=d[f]&&(-1==g&&(g=f),"0"!=d[f]))18 b;18 c},8Y:n.dq,3Q:12(a){17 b=1f;2c{b=2v 11.8Y(a)}26(c){}18 b},bF:12(a){17 b,c,d=/^[\\$][\\$]/;1t(b 2T a)1a(d.1F(b))2c{c=b.7b(2),0b.5j)18 1f;b=b.7h;1!=b.5A&&(b.3P(1f,c,d),1f===b.5A&&(b.5A=1));a.br();18 c=(c=b.2B||b.bE)?c.1q(a.3a,a.8U):c}},br:12(){11.7S&&11.4u(n.bj)&&n.bj()},8i:12(a,b){17 c=!1,d=\'<3q 1c="1" 1e="1" 36="6g:5w" \'+a.aN(b)+">"+a.ao+11.5c+"/3q>";1a(!11.3k)18 c;11.3k.ak(1x.59("3q"),11.3k.3f);11.3k.3f.82=d;2c{11.3k.3f.6n=a.6C}26(e){}2c{11.3k.3f.3q&&(c=!0)}26(f){}2c{c&&4>11.3k.3f.ac&&(11.7S=!0)}26(g){}11.3k.67(11.3k.3f);18 c},65:12(a,b){17 c=11;1a(!c.6G||!a)18 1f;a.64&&a.64.1g&&1f!==a.64[a.64.1g-1]&&c.6b(a.64);17 d,e=a.86;1a(c.4l(b)){1a(e.5O&&e.3H&&0>=c.3S(b,e.3H))18!0;1a(e.5O&&e.3F&&0<=c.3S(b,e.3F))18!1;(d=c.8i(a,b))&&(!e.3H||0c.3S(b,e.3F))||(e.3F=b);18 d}17 f=[0,0,0,0],g=[].5N(e.8b),k=e.3H?1:0,h,m,n=12(b,d){17 e=[].5N(f);e[b]=d;18 c.8i(a,e.5y(","))};1a(e.3F){d=e.3F.24(c.3a);1t(h=0;hf[0]&&(f[0]=m[0])}1a(m&&d)1t(h=1;hf[h]&&(f[h]=m[h]);1a(e.3F)1t(h=1;he&&!(1>g[h]-f[h]);e++){d=X((g[h]+f[h])/2);1a(m["a"+d])1z;m["a"+d]=1;n(h,d)?(f[h]=d,k=1):g[h]=d}g[h]=f[h];!k&&n(h,f[h])&&(k=1);1a(!k)1z}18 k?f.5y(","):1f},9R:12(a,b){17 c;11.56(b)&&(n.9j?n.9j(a,b,!1):n.9i?n.9i("1R"+a,b):(c=n["1R"+a],n["1R"+a]=11.9h(b,c)))},9h:12(a,b){18 12(){a();"12"==1d b&&b()}},9g:[],4w:[],9Q:12(a){a.35=!0;a.6b(a.9g);a.6b(a.4w);1a(a.8p)a.8p()},35:!1,$$f4:12(a){18 12(b){a.35?a.1m(b):a.8Z(b,a.4w)}},1b:1f,72:"f6",9a:50,3r:1,93:12(){17 a,b,c,d;1a(11.1b&&11.1b.5i)1t(a=11.1b.5i.1g-1;0<=a;a--){1a((c=11.1b.5i[a])&&c.5i)1t(b=c.5i.1g-1;0<=b;b--){d=c.5i[b];2c{c.67(d)}26(e){}}1a(c)2c{11.1b.67(c)}26(f){}}!11.1b&&(a=1x.7N(11.72))&&(11.1b=a);1a(11.1b&&11.1b.7R){2c{11.1b.7R.67(11.1b)}26(g){}11.1b=1f}},7Z:[],8p:12(){17 a,b;1a(11.35&&(!11.4w||!11.4w.1g||1f===11.4w[11.4w.1g-1])){1t(a 2T 11)1a((b=11[a])&&b.6k&&(3==b.fg||b.6k.1g&&1f!==b.6k[b.6k.1g-1]))18;1t(a=0;a<11.7Z.1g;a++)11.6b(11.7Z);11.93()}},6o:12(a){18 a&&(a=a.fi||a.fj,11.5R(a))?a:-1},fk:12(a,b,c,d){17 e=a.2o,f=11.6o(e);c=c.2o;17 g=11.6o(c);b=b.2o;17 k=11.6o(b);1a(!(e&&c&&b&&11.6p(a)))18-2;1a(gf||0>g||0>k||k<=11.3r||1>11.3r)18 0;1a(f>=k)18-1;2c{1a(f==11.3r&&(!11.3M||4==11.6p(a).ac)&&(!a.35&&11.35||a.35&&11.5R(d)&&(11.5R(a.87)||(a.87=d),10<=d-a.87)))18 1}26(h){}18 0},6p:12(a,b){17 c=a?a.2o:0,d=c&&c.3f?1:0;2c{d&&b&&11.1b.fo()}26(e){}18 d?c.3f:1f},6q:12(a,b){17 c=a.36,d;1a(c&&b)1t(d=0;d.\'+11.5c+"/1b>"),c=d.7N("aT")}26(f){}1a(e=d.6c("2H")[0]||d.2H)e.ak(a,e.3f),c&&e.67(c)},aQ:12(a,b,c,d,e){e=1x;17 f,g=e.59("2o"),k,h="fu 5w fv 5w 58 54 a4 54 a1 3m".24(" ");11.4u(d)||(d="");1a(11.4G(a)&&/[^\\s]/.1F(a)){a=a.1Y().1q(/\\s/g,"");f=11.5c+a+\' 1c="\'+11.3r+\'" 1e="\'+11.3r+\'" \';f+=\'36="fz-36:5w;49-36:5w;58:54;a4:54;a1:3m;6g:6L;" \';1t(k=0;k\');f+=d+11.5c+"/"+a+">"}2f f=d;11.1b||((b=e.7N(11.72))?11.1b=b:(11.1b=e.59("1b"),11.1b.7a=11.72),11.6q(11.1b,h.5N(["1c",11.9a+"4T","1e",11.3r+3+"4T","9X",11.3r+3+"4T","95",11.3r+3+"4T","ad","9V","6g","fE"])),b||(11.6q(11.1b,"8F fF 5T 54 1y 54".24(" ")),11.b8(11.1b)));1a(11.1b&&11.1b.7R){11.6q(g,h.5N(["9X",11.3r+3+"4T","95",11.3r+3+"4T","ad","9V","6g","6L"]));2c{g.fG=f}26(m){}2c{11.1b.fH(g)}26(n){}18{2o:g,35:11.35,8P:a,82:f}}18{2o:1f,35:11.35,8P:"",82:f}},5s:{2W:{4t:["1H/2W","68/x-fJ","2F/x-fK","2F/x-2W"],3D:"fM.fN.1",fO:"66.66",6C:"6l:9f-9r-9u-9y-9B",7C:7,ao:\'<3W 2e="2i" 2M="" /><3W 2e="fP" 2M="2Z" />\',aN:12(a){18\'7d="#2B=\'+a+\'"\'},86:{3H:0,3F:0,5O:0,8b:[16,b9,b9,0]},3P:12(a){17 b=11.$,c=1f,d=1f;1a(b.3M){b.4l(a)&&(a=a.24(b.3a),3=11.7C&&0<11.7M()){11.52=11.aJ(a);11.5A=0;18}11.5A=1;!c&&b.5L>=11.7C&&(c=11.az(b.65(11)));c||(d=b.3Q(11.3D))&&d.at&&(c=d.at.89(16),c=1i(c.4g(0),16)+"."+1i(c.4g(1),16)+"."+1i(c.4g(2),16))}2f b.5M(11.4t)&&(d=3!=b.6m?b.7Q("66.*fW-?2T",0):1f)&&d.2e&&(c=b.5g(d.2e));11.52=c?1:d?0:-1;11.2B=b.3K(c,3)},7m:["7,60,0,0","0,0,0,0"],7o:["7,50,0,0",1f],7u:[12(a,b){17 c=b.24(a.$.3a);18[c[0],c[1].4g(0),c[1].4g(1),c[2]].5y()},1f],az:12(a){17 b=11.$,c,d=11.7m,e=11.7o;1a(a)1t(a=b.3K(a),c=0;cb.3S(a,d[c])&&e[c]&&0<=b.3S(a,e[c])&&11.7u[c])18 11.7u[c](11,a);18 a},7M:12(){17 a=11.$,b,c=11.7M,d=11.7m,e=11.7o;1a(!c.2M)1t(c.2M=-1,b=0;b\').1U().7E("5e",12(){f||q(a());c()}).2L("2i",f||"a8:0").gs("2H")[0].gu,b.gv=12(){2c{"1J"===4F.gw&&(e.1x.1J=b.1J)}26(a){}})};d.1Z=p;t=12(){18 a(e.31.2V)};q=12(a,c){17 d=e.1x,f=g.fn.3n.aj;a!==c&&(d.1J=b.1J,d.ab(),f&&d.aU(\'<9G>1x.aj="\'+f+\'"\\gz/9G>\'),d.3Z(),e.31.4o=a)}}();18 d}()})();4Y.48.5W||(4Y.48.5W=12(a,b){1a(1f==11)5o 2v 6W;17 c=6S(11),d=c.1g>>>0;1a("12"!=1d a)5o 2v 6W;1t(17 e=[],f=0;f>>0;1a(0===e)18-1;c=+b||0;gE===I(c)&&(c=0);1a(c>=e)18-1;1t(c=ba(0<=c?c:e-I(c),0);c>>0;1a(0===c)18-1;17 d=c;1<2R.1g&&(d=gF(2R[1]),d!=d?d=0:0!=d&&d!=1/0&&d!=-(1/0)&&(d=(0
    '); } $.ajaxyLiveSearch.loadEvents(this); }, loadResults: function(object){ options=object.options; elem=object.element; window.sf_lastElement=elem; if(jQuery(elem).val()!=""){ jQuery("body").data("live-search_results", null); var loading="
  • "+ ""+ ""+ "
  • "; jQuery("#live-search_val").html("
      "+loading+"
    "); var pos=this.bounds(elem, options); var containerPos=this.bounds('.top-nav .container' , options); if(!pos){ jQuery("#live-search_sb").hide(); return false; } if(Math.ceil(containerPos.left) + parseInt(options.width, 10) > jQuery(window).width()){ jQuery("#live-search_sb").css('width', jQuery(window).width() - containerPos.left - 20); } if(jQuery('body').hasClass("rtl")){ jQuery("#live-search_sb").css({top:pos.bottom, right:containerPos.right}); }else{ jQuery("#live-search_sb").css({top:pos.bottom, right:containerPos.left}); } jQuery("#live-search_sb").show(); var data={ action: "ajaxy_sf", sf_value: jQuery(elem).val(), search:options.search}; if(options.ajaxData){ data=window[options.ajaxData](data); } if(options.search){ var mresults=options.search.split(','); var results=[]; var m=""; var s=0; var c=[]; for(var kindex in mresults){ var dm=mresults[kindex].split(":"); if(dm.length==2){ if(dm[1].indexOf(jQuery(elem).val())==0){ results[results.length]=mresults[kindex]; }}else if(dm.length==1){ if(mresults[kindex].indexOf(jQuery(elem).val())==0){ results[results.length]=mresults[kindex]; }} } c=$.ajaxyLiveSearch.htmlArrayResults(results); m +=c[0]; s +=c[1]; var sf_selected=""; if(s==0){ sf_selected=" live-search_selected"; } m +="
  • {total} "+ tie.lang_results_found +"
  • "; m=m.replace(/{search_value_escaped}/g, jQuery(elem).val()); m=m.replace(/{search_url_escaped}/g, options.searchUrl.replace('%s', encodeURI(jQuery(elem).val()))); m=m.replace(/{search_value}/g, jQuery(elem).val()); m=m.replace(/{total}/g, s); jQuery("body").data("live-search_results", results); if(s > 0){ jQuery("#live-search_val").html("
      "+m+"
    "); }else{ jQuery("#live-search_val").html("
      "+m+"
    "); } $.ajaxyLiveSearch.loadLiveEvents(object); jQuery("#live-search_sb").show(); }else{ jQuery.post(options.ajaxUrl, data, function(resp){ var results=eval("("+ resp + ")"); var m=""; var s=0; for(var mindex in results){ var c=[]; for(var kindex in results[mindex]){ c=$.ajaxyLiveSearch.htmlResults(results[mindex][kindex], mindex, kindex); m +=c[0]; s +=c[1]; }} var sf_selected=""; if(s==0){ sf_selected=" live-search_selected"; m +="
  • "+ tie.lang_no_results +"
  • "; }else{ if(!options.callback){ m +="
  • " + sf_templates + "
  • "; } m=m.replace(/{search_value_escaped}/g, jQuery(elem).val()); m=m.replace(/{search_url_escaped}/g, options.searchUrl.replace('%s', encodeURI(jQuery(elem).val()))); } jQuery("body").data("live-search_results", results); if(s > 0){ jQuery("#live-search_val").html('
      '+m+'
    '); }else{ jQuery("#live-search_val").html('
      '+m+'
    '); } $.ajaxyLiveSearch.loadLiveEvents(object); jQuery("#live-search_sb").show(); }); }}else{ jQuery("#live-search_sb").hide(); }}, bounds: function (elem, options){ var offset=jQuery(elem).offset(); if(offset){ return {top: offset.top, left: offset.left + options.leftOffset, bottom: offset.top + jQuery(elem).innerHeight() + options.topOffset, right: offset.left - jQuery('#live-search_sb').innerWidth() + jQuery(elem).innerWidth()};}}, htmlResults: function (results, type, array_index){ var m=""; var s=0; if(typeof(results)!="undefined"){ if(results.all.length > 0){ m +="
  • " + results.title + "
    • "; for(var i=0; i < results.all.length; i ++){ s ++; m +="
    • "+ $.ajaxyLiveSearch.replaceResults(results.all[i], results.template) + "
    • "; } m +="
  • "; }} return new Array(m, s); }, htmlArrayResults: function (results){ var m=""; var s=0; if(typeof(results)!="undefined"){ if(results.length > 0){ m +="
    • "; for(var i=0; i < results.length; i ++){ var md=results[i].split(':'); var title=""; if(md.length==2){ title=md[1]; }else{ title=results[i]; } s ++; m +="
    • " + title + "
    • "; } m +="
  • "; }} return new Array(m, s); }, replaceResults: function (results, template){ for(var s in results){ template=template.replace(new RegExp("{"+s+"}", "g"), results[s]); } return template; }, loadLiveEvents: function(object){ var d={object: object}; jQuery("#live-search_val li.live-search_lnk").mouseover(function(){ jQuery(".live-search_lnk").each(function(){ jQuery(this).attr("class",jQuery(this).attr("class").replace(" live-search_selected" , "")); }); jQuery(this).attr("class", jQuery(this).attr("class") + " live-search_selected"); }); if(d.object.options.callback){ jQuery("#live-search_val li.live-search_lnk").click(function(event){ try{ window[d.object.options.callback](d.object, this); }catch(e){ alert(e); } return false; }); }}, loadEvents: function(object){ var d={object: object}; jQuery(document).click(function(){ jQuery("#live-search_sb").hide(); }); jQuery(window).resize(function(){ var pos=$.ajaxyLiveSearch.bounds(window.sf_lastElement, d.object.options); if(pos){ jQuery("#live-search_sb").css({top:pos.bottom, left:pos.left}); }}); jQuery(object.element).keyup(function(event){ if(event.keyCode!="38"&&event.keyCode!="40"&&event.keyCode!="13"&&event.keyCode!="27"&&event.keyCode!="39"&&event.keyCode!="37"){ var ajaxyObject=d.object; if(ajaxyObject.timeout!=null){ clearTimeout(ajaxyObject.timeout); } jQuery(ajaxyObject.element).attr("class", jQuery(ajaxyObject.element).attr("class").replace(" live-search_focused", "") + " live-search_focused"); var l={object:d.object}; ajaxyObject.timeout=setTimeout(function(){ jQuery.ajaxyLiveSearch.loadResults(l.object); }, d.object.options.delay); }}); jQuery(window).keydown(function(event){ if(jQuery("#live-search_sb").css("display")!="none"&&jQuery("#live-search_sb").css("display")!="undefined"&&jQuery("#live-search_sb").length > 0){ if(event.keyCode=="38"||event.keyCode=="40"){ if(jQuery.browser.webkit){ jQuery("#live-search_sb").focus(); } var s_item=null; var after_s_item=null; var s_sel=false; var all_items=jQuery("#live-search_val li.live-search_lnk"); var s_found=false; event.stopPropagation(); event.preventDefault(); for(var i=0; i < all_items.length; i++){ if(jQuery(all_items[i]).attr("class").indexOf("live-search_selected") >=0&&s_found==false){ s_sel=true; if(i < all_items.length - 1&&event.keyCode=="40"){ jQuery(all_items[i]).attr("class",jQuery(all_items[i]).attr("class").replace(" live-search_selected", "")); jQuery(all_items[i+1]).attr("class", jQuery(all_items[i+1]).attr("class")+ " live-search_selected"); i=i+1; s_found=true; } else if(i > 0&&event.keyCode=="38"){ jQuery(all_items[i]).attr("class",jQuery(all_items[i]).attr("class").replace(" live-search_selected", "")); jQuery(all_items[i-1]).attr("class", jQuery(all_items[i-1]).attr("class")+ " live-search_selected"); i=i+1; s_found=true; }}else{ jQuery(all_items[i]).attr("class",jQuery(all_items[i]).attr("class").replace(" live-search_selected", "")); }} if(s_sel==false){ if(all_items.length > 0){ jQuery(all_items[0]).attr("class", jQuery(all_items[0]).attr("class")+ " live-search_selected"); }} } else if(event.keyCode==27){ jQuery("#live-search_sb").hide(); } else if(event.keyCode==13){ var b=jQuery("#live-search_val li.live-search_selected a").attr("href"); if(typeof(b)!='undefined'&&b!=''){ if(d.object.options.callback){ d.object.options.callback(this); }else{ window.location.href=b; } return false; }else{ if(d.object.options.callback){ d.object.options.callback(this); } else if(d.object.element!=null){ window.location.href=sf_url.replace('%s', encodeURI(jQuery(d.object).val())); } return false; }} }}); jQuery(object.element).focus(function (){ if(jQuery(this).val()==d.object.options.text){ jQuery(this).val(''); jQuery(this).attr('class', jQuery(this).attr('class') + ' live-search_focused'); } if(d.object.options.expand > 0){ jQuery(d.object.element).animate({width:d.object.options.iwidth}); }}); jQuery(object.element).blur(function (){ if(jQuery(this).val()==''){ jQuery(this).val(d.object.options.text); jQuery(this).attr('class', jQuery(this).attr('class').replace(/ sf_focused/g, '')); } if(d.object.options.expand > 0){ jQuery(d.object.element).animate({width:d.object.options.expand}); }}); }}; $.ajaxyLiveSearch.defaults={ delay:500, leftOffset: 0, topOffset: 5, text: "Search For", iwidth: 180, width: 315, ajaxUrl: "", ajaxData: false, searchUrl: "", expand: false, callback: false, search: false };})(jQuery); function sf_addItem(search, title, name, name_type, value){ var items=jQuery(search).find('.live-search_ajaxy-selective-item'); var exists=false; var key=""; var md=value.split(':'); if(md.length==2){ key=md[0]; }else{ key=value; } if(items.length > 0){ for(var i=0; i < items.length; i ++){ if(jQuery(items[i]).find('input.live-search_ajaxy-selective-close-hidden').val()==key){ exists=true; break; }} } if(exists){ jQuery(search).find(".live-search_ajaxy-selective-input").val(""); jQuery('#live-search_sb').hide(); return; } var mds=title.split(':'); if(mds.length==2){ title=md[1]; } var added_item=jQuery('' + title + 'X'); if(items.length <=0){ jQuery(search).prepend(added_item); }else{ added_item.insertAfter(items[items.length - 1]); } added_item.click(function(){ jQuery(this).remove(); }); var input=jQuery(search).find(".live-search_ajaxy-selective-input"); if(input){ input.val(""); if(name_type!='array'){ input.css('visibility', 'hidden'); }else{ input.focus(); }} jQuery('#live-search_sb').hide(); };