/*! * imagesLoaded PACKAGED v4.1.4 * JavaScript is all like "You images are done yet or what?" * MIT License */ ! function(e, t) { "function" == typeof define && define.amd ? define("ev-emitter/ev-emitter", t) : "object" == typeof module && module.exports ? module.exports = t() : e.EvEmitter = t() }("undefined" != typeof window ? window : this, function() { function e() {} var t = e.prototype; return t.on = function(e, t) { if (e && t) { var i = this._events = this._events || {}, n = i[e] = i[e] || []; return n.indexOf(t) == -1 && n.push(t), this } }, t.once = function(e, t) { if (e && t) { this.on(e, t); var i = this._onceEvents = this._onceEvents || {}, n = i[e] = i[e] || {}; return n[t] = !0, this } }, t.off = function(e, t) { var i = this._events && this._events[e]; if (i && i.length) { var n = i.indexOf(t); return n != -1 && i.splice(n, 1), this } }, t.emitEvent = function(e, t) { var i = this._events && this._events[e]; if (i && i.length) { i = i.slice(0), t = t || []; for (var n = this._onceEvents && this._onceEvents[e], o = 0; o < i.length; o++) { var r = i[o], s = n && n[r]; s && (this.off(e, r), delete n[r]), r.apply(this, t) } return this } }, t.allOff = function() { delete this._events, delete this._onceEvents }, e }), function(e, t) { "use strict"; "function" == typeof define && define.amd ? define(["ev-emitter/ev-emitter"], function(i) { return t(e, i) }) : "object" == typeof module && module.exports ? module.exports = t(e, require("ev-emitter")) : e.imagesLoaded = t(e, e.EvEmitter) }("undefined" != typeof window ? window : this, function(e, t) { function i(e, t) { for (var i in t) e[i] = t[i]; return e } function n(e) { if (Array.isArray(e)) return e; var t = "object" == typeof e && "number" == typeof e.length; return t ? d.call(e) : [e] } function o(e, t, r) { if (!(this instanceof o)) return new o(e, t, r); var s = e; return "string" == typeof e && (s = document.querySelectorAll(e)), s ? (this.elements = n(s), this.options = i({}, this.options), "function" == typeof t ? r = t : i(this.options, t), r && this.on("always", r), this.getImages(), h && (this.jqDeferred = new h.Deferred), void setTimeout(this.check.bind(this))) : void a.error("Bad element for imagesLoaded " + (s || e)) } function r(e) { this.img = e } function s(e, t) { this.url = e, this.element = t, this.img = new Image } var h = e.jQuery, a = e.console, d = Array.prototype.slice; o.prototype = Object.create(t.prototype), o.prototype.options = {}, o.prototype.getImages = function() { this.images = [], this.elements.forEach(this.addElementImages, this) }, o.prototype.addElementImages = function(e) { "IMG" == e.nodeName && this.addImage(e), this.options.background === !0 && this.addElementBackgroundImages(e); var t = e.nodeType; if (t && u[t]) { for (var i = e.querySelectorAll("img"), n = 0; n < i.length; n++) { var o = i[n]; this.addImage(o) } if ("string" == typeof this.options.background) { var r = e.querySelectorAll(this.options.background); for (n = 0; n < r.length; n++) { var s = r[n]; this.addElementBackgroundImages(s) } } } }; var u = { 1: !0, 9: !0, 11: !0 }; return o.prototype.addElementBackgroundImages = function(e) { var t = getComputedStyle(e); if (t) for (var i = /url\((['"])?(.*?)\1\)/gi, n = i.exec(t.backgroundImage); null !== n;) { var o = n && n[2]; o && this.addBackground(o, e), n = i.exec(t.backgroundImage) } }, o.prototype.addImage = function(e) { var t = new r(e); this.images.push(t) }, o.prototype.addBackground = function(e, t) { var i = new s(e, t); this.images.push(i) }, o.prototype.check = function() { function e(e, i, n) { setTimeout(function() { t.progress(e, i, n) }) } var t = this; return this.progressedCount = 0, this.hasAnyBroken = !1, this.images.length ? void this.images.forEach(function(t) { t.once("progress", e), t.check() }) : void this.complete() }, o.prototype.progress = function(e, t, i) { this.progressedCount++, this.hasAnyBroken = this.hasAnyBroken || !e.isLoaded, this.emitEvent("progress", [this, e, t]), this.jqDeferred && this.jqDeferred.notify && this.jqDeferred.notify(this, e), this.progressedCount == this.images.length && this.complete(), this.options.debug && a && a.log("progress: " + i, e, t) }, o.prototype.complete = function() { var e = this.hasAnyBroken ? "fail" : "done"; if (this.isComplete = !0, this.emitEvent(e, [this]), this.emitEvent("always", [this]), this.jqDeferred) { var t = this.hasAnyBroken ? "reject" : "resolve"; this.jqDeferred[t](this) } }, r.prototype = Object.create(t.prototype), r.prototype.check = function() { var e = this.getIsImageComplete(); return e ? void this.confirm(0 !== this.img.naturalWidth, "naturalWidth") : (this.proxyImage = new Image, this.proxyImage.addEventListener("load", this), this.proxyImage.addEventListener("error", this), this.img.addEventListener("load", this), this.img.addEventListener("error", this), void(this.proxyImage.src = this.img.src)) }, r.prototype.getIsImageComplete = function() { return this.img.complete && this.img.naturalWidth }, r.prototype.confirm = function(e, t) { this.isLoaded = e, this.emitEvent("progress", [this, this.img, t]) }, r.prototype.handleEvent = function(e) { var t = "on" + e.type; this[t] && this[t](e) }, r.prototype.onload = function() { this.confirm(!0, "onload"), this.unbindEvents() }, r.prototype.onerror = function() { this.confirm(!1, "onerror"), this.unbindEvents() }, r.prototype.unbindEvents = function() { this.proxyImage.removeEventListener("load", this), this.proxyImage.removeEventListener("error", this), this.img.removeEventListener("load", this), this.img.removeEventListener("error", this) }, s.prototype = Object.create(r.prototype), s.prototype.check = function() { this.img.addEventListener("load", this), this.img.addEventListener("error", this), this.img.src = this.url; var e = this.getIsImageComplete(); e && (this.confirm(0 !== this.img.naturalWidth, "naturalWidth"), this.unbindEvents()) }, s.prototype.unbindEvents = function() { this.img.removeEventListener("load", this), this.img.removeEventListener("error", this) }, s.prototype.confirm = function(e, t) { this.isLoaded = e, this.emitEvent("progress", [this, this.element, t]) }, o.makeJQueryPlugin = function(t) { t = t || e.jQuery, t && (h = t, h.fn.imagesLoaded = function(e, t) { var i = new o(this, e, t); return i.jqDeferred.promise(h(this)) }) }, o.makeJQueryPlugin(), o }); /*!/wp-content/themes/salient/js/init.js*/ (function(e, t, a) { "use strict"; function n() { Ie(), _e(), ba(), kt(), m() } function i() { ve(), Ie(), g(), ct(), ki.usingMobileBrowser || _e() } function s() { e(".flex-gallery").each(function() { if (e().flexslider) { var t = e(this); imagesLoaded(e(this), function() { t.flexslider({ animation: "fade", smoothHeight: !1, animationSpeed: 500, useCSS: !1, touch: !0 }), e(".flex-gallery .flex-direction-nav li a.flex-next").html(''), e(".flex-gallery .flex-direction-nav li a.flex-prev").html('') }) } }) } function r(e, t) { this.lastX = ki.clientX, this.lastY = ki.clientY, this.$el = e, this.iconType = t, this.timeout = !1, this.overEl = !1, this.$dragEl = "", this.$viewEl = "", this.$closeEl = "", this.lerpDamp = .18, this.createMarkup(), this.mouseBind() } function o() { e('.wpb_gallery_slidesflickity_static_height_style .cell[data-lazy="true"]').each(function() { e(this).css({ height: "", width: "" }); var t = parseInt(e(this).find("img").attr("height")), a = parseInt(e(this).find("img").attr("width")), n = A(a, t, 2e3, parseInt(e(this).find("img").height())); e(this).css({ height: n.height + "px", width: n.width + "px" }) }) } function l() { e('.wpb_gallery_slidesflickity_static_height_style .cell[data-lazy="true"]').length > 0 && (o(), En.on("smartresize", o)) } function d() { if (0 == e(".nectar-flickity:not(.masonry)").length) return !1; ai = [], ni = [], e(".nectar-flickity:not(.masonry)").each(function(t) { e(this).removeClass(function(e, t) { return (t.match(/(^|\s)instance-\S+/g) || []).join(" ") }), e(this).addClass("instance-" + t); var a = !(!e(this).is("[data-free-scroll]") || "true" != e(this).attr("data-free-scroll")), n = !0, i = !0, s = .025, o = !1, l = !0, d = "center"; e(this).is('[data-format="fixed_text_content_fullwidth"]') && (d = "left", n = !1, i = !1, s = .02, e(this).parent().is('[data-alignment="right"]') && (d = "right")), 1 == a && (n = !1), e(this).attr("data-controls").length > 0 && "next_prev_arrows" == e(this).attr("data-controls") || e(this).attr("data-controls").length > 0 && "next_prev_arrows_overlaid" == e(this).attr("data-controls") ? (o = !1, l = !0) : (o = !0, l = !1), e(this).attr("data-controls").length > 0 && "none" == e(this).attr("data-controls") && (o = !1, l = !1); var c = !1; e(this).is("[data-autoplay]") && "true" == e(this).attr("data-autoplay") && (c = !0, e(this).is("[data-autoplay-dur]") && e(this).attr("data-autoplay-dur").length > 0 && parseInt(e(this).attr("data-autoplay-dur")) > 100 && parseInt(e(this).attr("data-autoplay-dur")) < 3e4 && (c = parseInt(e(this).attr("data-autoplay-dur")))); var u = e(this), p = !(e("body.vc_editor").length > 0), f = e("body.vc_editor").length > 0, g = "", m = !e(this).is("[data-wrap]") || "no-wrap" != e(this).attr("data-wrap"), v = !1; e(this).is('[data-adaptive-height="true"]') && (v = !0); var b = !!e(this).find("img[data-flickity-lazyload]") && 1; e(this).find("img[data-flickity-lazyload]") && e(this).is('[data-overflow="visible"]') && e(this).is('[data-wrap="no-wrap"]') && (b = 2); var w, y, _ = !!Hn.hasClass("rtl"); if (g = e(this).attr("data-controls").length > 0 && "next_prev_arrows_overlaid" == e(this).attr("data-controls") || e(this).attr("data-controls").length > 0 && "touch_total" == e(this).attr("data-controls") ? { x0: 10, x1: 60, y1: 50, x2: 70, y2: 40, x3: 30 } : { x0: 20, x1: 70, y1: 30, x2: 70, y2: 25, x3: 70 }, ai[t] = new Flickity(".nectar-flickity.instance-" + t, { contain: i, draggable: p, lazyLoad: b, imagesLoaded: !0, percentPosition: !0, adaptiveHeight: v, cellAlign: d, groupCells: n, prevNextButtons: l, freeScroll: a, pageDots: o, resize: !0, selectedAttraction: s, autoPlay: c, rightToLeft: _, pauseAutoPlayOnHover: f, setGallerySize: !0, wrapAround: m, accessibility: !1, arrowShape: g }), e(this).is('[data-controls="touch_total"]')) { 0 == e(this).find(".visualized-total").length && (e(this).parents(".full-width-content").length > 0 && e(this).parents(".vc_col-sm-12").length > 0 ? e(this).append('
') : e(this).append('
')), ki.usingMobileBrowser || (ni[t] = new r(e(this), "horizontal-movement"), ai[t].on("dragMove", function(e, t) { ki.clientY = t.clientY, ki.clientX = t.clientX }), ai[t].on("pointerDown", function(t, a) { e(".nectar-drag-indicator").addClass("pointer-down") }), ai[t].on("pointerUp", function(t, a) { e(".nectar-drag-indicator").removeClass("pointer-down") })); var C = e(this).find(".flickity-page-dots li").length, x = e(this).find(".visualized-total span"), k = 1, T = e(this).find(".visualized-total").width(); En.on("smartresize", function() { setTimeout(function() { C = u.find(".flickity-page-dots li").length, T = u.find(".visualized-total").width(), k = T / C * u.find(".flickity-page-dots .is-selected").index(), x.css("width", 100 / C + "%"), x.css({ x: k + "px" }) }, 200) }), setTimeout(function() { C = u.find(".flickity-page-dots li").length, T = u.find(".visualized-total").width(), x.css("width", 100 / C + "%") }, 200), ai[t].on("change", function(e, t) { k = T / C * u.find(".flickity-page-dots .is-selected").index(), x.css({ x: k + "px" }) }) } if (e(this).is('[data-format="fixed_text_content_fullwidth"]') && !ki.usingFrontEndEditor) { var I = ki.usingMobileBrowser; ai[t].on("scroll", function() { if (!I) { var a = u.find(".cell").outerWidth() + 25, n = e('body[data-header-format="left-header"]').length > 0 && En.width() > 1e3 ? 275 : 0, i = (En.width() + n - u.parents(".main-content").width()) / 2; i += parseInt(u.css("margin-left")) + 2, ai[t].slides.forEach(function(n, s) { var r = 1, o = 0, l = 0, d = 10, c = 1, h = e(n.cells[0].element).offset().left, u = e(".nectar-flickity.instance-" + t + " .cell:nth-child(" + (s + 1) + ")"); h - i < 0 && h - i > -1 * a ? (r = 1 + (h - i) / 1500, c = 1 + (h - i + 70) / 550, o = -1 * (h - i), l = (h - i) / 25 * -1) : (r = 1, c = 1, o = 0, l = 0), d = h + 5 - i < 0 && h - i > -1 * a ? 5 : 10, u.css({ "z-index": d }), u.find(".inner-wrap-outer").css({ transform: "perspective(800px) translateX(" + o + "px) rotateY(" + l + "deg) translateZ(0)", opacity: c }), u.find(".inner-wrap").css({ transform: "scale(" + r + ") translateZ(0)" }) }) } }) } ai[t].on("dragStart", function() { clearTimeout(w), clearTimeout(y), u.addClass("is-dragging"), u.addClass("is-moving"), u.find(".flickity-prev-next-button").addClass("hidden") }), ai[t].on("dragEnd", function() { u.removeClass("is-dragging"), w = setTimeout(function() { u.removeClass("is-moving"), u.find(".flickity-prev-next-button").removeClass("hidden") }, 600), y = setTimeout(function() { u.removeClass("is-moving") }, 300) }), e(".flickity-prev-next-button").on("click", function() { clearTimeout(w), e(this).parents(".nectar-flickity").find(".flickity-prev-next-button").addClass("hidden"), w = setTimeout(function() { u.find(".flickity-prev-next-button").removeClass("hidden") }, 600) }), u.hasClass("nectar-carousel") && imagesLoaded(u, function() { h(u) }) }); var t = e(".nectar-carousel.nectar-flickity:not(.masonry)").length > 0; t && En.on("resize", c) } function c() { e(".nectar-carousel.nectar-flickity:not(.masonry)").each(function() { h(e(this)) }) } function h(t) { var a = 0; t.find(".flickity-slider > .cell").css("height", "auto"), t.find(".flickity-slider > .cell").each(function() { e(this).height() > a && (a = e(this).height()) }), a < 10 && (a = "auto"), t.find(".flickity-slider > .cell").css("height", a + "px") } function u() { e(".twentytwenty-container").each(function() { var t = e(this); 0 == t.find(".twentytwenty-handle").length && e(this).imagesLoaded(function() { t.twentytwenty() }) }) } function p() { } function f() { var t = En.width(), a = e("header#top > .container").width(); e("header#top nav > ul > li.megamenu > .sub-menu").css({ "padding-left": (t - a) / 2 + "px", "padding-right": (t + 2 - a) / 2 + "px", width: a, left: "-" + (t - a) / 2 + "px" }) } function g() { ki.winW < 1e3 && "1" == Hn.attr("data-responsive") ? (Hn.addClass("mobile"), e("header#top nav").css("display", "none")) : (Hn.removeClass("mobile"), e("header#top nav").css("display", ""), e(".slide-out-widget-area-toggle #toggle-nav .lines-button").removeClass("close")) } function m() { e("#header-outer .sf-menu > li:not(.megamenu) > ul > li > ul").each(function() { e(this).removeClass("on-left-side"), e(this).offset().left + e(this).outerWidth() > En.width() ? (e(this).addClass("on-left-side"), e(this).find("ul").addClass("on-left-side")) : (e(this).removeClass("on-left-side"), e(this).find("ul").removeClass("on-left-side")) }) } function v() { 0 != e(".carousel").length && ("undefined" != typeof SalientRecentProjectsCarousel && e("ul.carousel.portfolio-items").each(function(t) { gi[t] = new SalientRecentProjectsCarousel(e(this)) }), e('ul.carousel:not(".clients"):not(.portfolio-items)').each(function() { var a, n, i = e(this), s = "true" == e(this).parents(".carousel-wrap").attr("data-full-width") ? "auto" : 3, r = "true" == e(this).parents(".carousel-wrap").attr("data-full-width") ? "auto" : "", o = "true" == e(this).parents(".carousel-wrap").attr("data-full-width") ? 500 : 453, l = "true" == e(this).attr("data-autorotate"), d = !0, c = !0; e("body.ascend").length > 0 && "true" != e(this).parents(".carousel-wrap").attr("data-full-width") || e("body.material").length > 0 && "true" != e(this).parents(".carousel-wrap").attr("data-full-width") ? e(this).find("li").length % 3 == 0 ? (d = !0, c = !0) : (d = !1, c = !0) : (d = !0, c = !0), a = parseInt(e(this).attr("data-scroll-speed")) ? parseInt(e(this).attr("data-scroll-speed")) : 700, n = e(this).is("[data-easing]") ? e(this).attr("data-easing") : "linear"; var h = i; 0 == i.find("img").length && (h = Hn), imagesLoaded(h, function() { i.carouFredSel({ circular: d, infinite: c, height: "auto", responsive: !0, items: { width: o, visible: { min: 1, max: s } }, swipe: { onTouch: !0, onMouse: !0, options: { excludedElements: "button, input, select, textarea, .noSwipe", tap: function(a, n) { !e(n).attr("href") || e(n).is('[target="_blank"]') || e(n).is('[rel^="prettyPhoto"]') || e(n).is(".magnific-popup") || e(n).is(".magnific") || t.open(e(n).attr("href"), "_self") } }, onBefore: function() { i.find(".work-item").trigger("mouseleave"), i.find(".work-item .work-info a").trigger("mouseup") } }, scroll: { items: r, easing: n, duration: a, onBefore: function() { (e("body.ascend").length > 0 && "true" != i.parents(".carousel-wrap").attr("data-full-width") || e("body.material").length > 0 && "true" != i.parents(".carousel-wrap").attr("data-full-width")) && i.parents(".carousel-wrap").find(".item-count .total").html(Math.ceil(i.find("> li").length / i.triggerHandler("currentVisible").length)) }, onAfter: function() { (e("body.ascend").length > 0 && "true" != i.parents(".carousel-wrap").attr("data-full-width") || e("body.material").length > 0 && "true" != i.parents(".carousel-wrap").attr("data-full-width")) && (i.parents(".carousel-wrap").find(".item-count .current").html(i.triggerHandler("currentPage") + 1), i.parents(".carousel-wrap").find(".item-count .total").html(Math.ceil(i.find("> li").length / i.triggerHandler("currentVisible").length))) } }, prev: { button: function() { return i.parents(".carousel-wrap").find(".carousel-prev") } }, next: { button: function() { return i.parents(".carousel-wrap").find(".carousel-next") } }, auto: { play: l } }, { transition: !0 }).animate({ opacity: 1 }, 1300), i.parents(".carousel-wrap").wrap('