/*! css 1.0.0 filename.js 2020-06-16 1:45:20 PM */ jQuery(document).ready(function($) { sticky_header(); mobile_menu(); // smooth_scroll(); slick_carousel_init(); masterslider_init(); search_trigger(); parally_header(); update_lf_placeholders(); }); function dc_animation_init() { var tb_selecter = ""; jQuery(tb_selecter).css("opacity", "0"); jQuery(tb_selecter).css("visibility", "hidden"); jQuery(tb_selecter).waypoint(function(direction) { jQuery(this.element).addClass("animated fadeInUp"); jQuery(this.element).css("opacity", "1"); jQuery(this.element).css("visibility", "visible"); }, { offset: "80%" }); } function masterslider_init() { var slider = new MasterSlider(); slider.setup("masterslider1", { width: 1300, height: 350, space: 5, layout: "fullscreen", mouse: false, swipe: false }); } function update_lf_placeholders() { jQuery(".wpgmp_search_form input").attr("placeholder", "Search postcode/suburb"); jQuery(".categories_filter > select option:first-child").text("Distance"); jQuery(".categories_filter > select").val(50); } function mobile_menu() { jQuery(".menu-toggle-wrapper").click(function() { jQuery(this).parent().find(".menu").toggleClass("active"); jQuery(this).toggleClass("active"); if (jQuery(this).hasClass("mobile-active")) {} else { jQuery(".open-sub-menu").removeClass("down"); jQuery(".sub-menu").removeClass("active"); } if (jQuery(".main_menu .menu-item-has-children > .open-sub-menu").length == 0) { jQuery(".main_menu .menu-item-has-children").append(''); } }); jQuery(document).on("click touchend", ".open-sub-menu", function(e) { e.stopPropagation(); e.preventDefault(); jQuery(this).toggleClass("down"); jQuery(this).siblings("ul").toggleClass("active"); }); jQuery(document).on("click touchend", ".menu.active ul li a", function(e) { if (location.pathname.replace(/^\//, "") == this.pathname.replace(/^\//, "") && location.hostname == this.hostname) { jQuery(".menu-toggle-wrapper").trigger("click"); } }); } function parally_header() { jQuery(".dc-titlebox.title_full .line-wrapper.left-lines .line-wrapper-para").animate({ opacity: "1" }).parally({ speed: .2, mode: "transform", outer: true, offset: -100 }); jQuery(".dc-titlebox.title_full .line-wrapper.right-lines .line-wrapper-para").animate({ opacity: "1" }).parally({ speed: -.5, mode: "transform", outer: true, offset: 0 }); jQuery(".dc-titlebox.title_tall .line-wrapper.right-lines .line-wrapper-para").animate({ opacity: "1" }).parally({ speed: -.3, mode: "transform", outer: true, offset: 170 }); jQuery(".dc-titlebox.title_short .line-wrapper.right-lines .line-wrapper-para").animate({ opacity: "1" }).parally({ speed: -.3, mode: "transform", outer: true, offset: 170 }); } (function($) { var $window = $(window), windowHeight = $window.height(); $window.resize(function() { windowHeight = $window.height(); }); $.fn.parally = function(params) { defaults = { speed: .2, mode: "background", xpos: "50%", outer: true, offset: 0 }; function getHeight(el) { return params.outer ? el.outerHeight(true) : el.height(); } params = $.extend({}, defaults, params); $(this).each(function() { var $this = $(this), firstTop = $this.offset().top; function update() { var pos = $window.scrollTop(), top = $this.offset().top, height = getHeight($this), ypos = 0; if (top + height < pos || top > pos + windowHeight) { return; } ypos = (firstTop - pos) * params.speed + params.offset; if (params.mode == "background") { $this.css("background-position", params.xpos + " " + ypos + "px"); } else if (params.mode == "transform") { $this.css({ "-webkit-transform": "translate(0," + ypos + "px)", "-moz-transform": "translate(0," + ypos + "px)", "-ms-transform": "translate(0," + ypos + "px)", transform: "translate(0," + ypos + "px)" }); } else if (typeof params.mode === "function") { params.mode(params.xpos, ypos); } } $window.bind("scroll", update).resize(update); update(); }); }; })(jQuery); !function(e) { if ("object" == typeof exports && "undefined" != typeof module) module.exports = e(); else if ("function" == typeof define && define.amd) define([], e); else { var f; "undefined" != typeof window ? f = window : "undefined" != typeof global ? f = global : "undefined" != typeof self && (f = self), f.ProgressBar = e(); } }(function() { var define, module, exports; return function e(t, n, r) { function s(o, u) { if (!n[o]) { if (!t[o]) { var a = typeof require == "function" && require; if (!u && a) return a(o, !0); if (i) return i(o, !0); var f = new Error("Cannot find module '" + o + "'"); throw f.code = "MODULE_NOT_FOUND", f; } var l = n[o] = { exports: {} }; t[o][0].call(l.exports, function(e) { var n = t[o][1][e]; return s(n ? n : e); }, l, l.exports, e, t, n, r); } return n[o].exports; } var i = typeof require == "function" && require; for (var o = 0; o < r.length; o++) s(r[o]); return s; }({ 1: [ function(require, module, exports) { (function(root) { if (typeof SHIFTY_DEBUG_NOW === "undefined") { SHIFTY_DEBUG_NOW = function() { return +new Date(); }; } var Tweenable = function() { "use strict"; var formula; var DEFAULT_SCHEDULE_FUNCTION; var DEFAULT_EASING = "linear"; var DEFAULT_DURATION = 500; var UPDATE_TIME = 1e3 / 60; var _now = Date.now ? Date.now : function() { return +new Date(); }; var now = SHIFTY_DEBUG_NOW ? SHIFTY_DEBUG_NOW : _now; if (typeof window !== "undefined") { DEFAULT_SCHEDULE_FUNCTION = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || window.mozCancelRequestAnimationFrame && window.mozRequestAnimationFrame || setTimeout; } else { DEFAULT_SCHEDULE_FUNCTION = setTimeout; } function noop() {} function each(obj, fn) { var key; for (key in obj) { if (Object.hasOwnProperty.call(obj, key)) { fn(key); } } } function shallowCopy(targetObj, srcObj) { each(srcObj, function(prop) { targetObj[prop] = srcObj[prop]; }); return targetObj; } function defaults(target, src) { each(src, function(prop) { if (typeof target[prop] === "undefined") { target[prop] = src[prop]; } }); } function tweenProps(forPosition, currentState, originalState, targetState, duration, timestamp, easing) { var normalizedPosition = (forPosition - timestamp) / duration; var prop; for (prop in currentState) { if (currentState.hasOwnProperty(prop)) { currentState[prop] = tweenProp(originalState[prop], targetState[prop], formula[easing[prop]], normalizedPosition); } } return currentState; } function tweenProp(start, end, easingFunc, position) { return start + (end - start) * easingFunc(position); } function applyFilter(tweenable, filterName) { var filters = Tweenable.prototype.filter; var args = tweenable._filterArgs; each(filters, function(name) { if (typeof filters[name][filterName] !== "undefined") { filters[name][filterName].apply(tweenable, args); } }); } var timeoutHandler_endTime; var timeoutHandler_currentTime; var timeoutHandler_isEnded; function timeoutHandler(tweenable, timestamp, duration, currentState, originalState, targetState, easing, step, schedule) { timeoutHandler_endTime = timestamp + duration; timeoutHandler_currentTime = Math.min(now(), timeoutHandler_endTime); timeoutHandler_isEnded = timeoutHandler_currentTime >= timeoutHandler_endTime; if (tweenable.isPlaying() && !timeoutHandler_isEnded) { schedule(tweenable._timeoutHandler, UPDATE_TIME); applyFilter(tweenable, "beforeTween"); tweenProps(timeoutHandler_currentTime, currentState, originalState, targetState, duration, timestamp, easing); applyFilter(tweenable, "afterTween"); step(currentState); } else if (timeoutHandler_isEnded) { step(targetState); tweenable.stop(true); } } function composeEasingObject(fromTweenParams, easing) { var composedEasing = {}; if (typeof easing === "string") { each(fromTweenParams, function(prop) { composedEasing[prop] = easing; }); } else { each(fromTweenParams, function(prop) { if (!composedEasing[prop]) { composedEasing[prop] = easing[prop] || DEFAULT_EASING; } }); } return composedEasing; } function Tweenable(opt_initialState, opt_config) { this._currentState = opt_initialState || {}; this._configured = false; this._scheduleFunction = DEFAULT_SCHEDULE_FUNCTION; if (typeof opt_config !== "undefined") { this.setConfig(opt_config); } } Tweenable.prototype.tween = function(opt_config) { if (this._isTweening) { return this; } if (opt_config !== undefined || !this._configured) { this.setConfig(opt_config); } this._start(this.get()); return this.resume(); }; Tweenable.prototype.setConfig = function(config) { config = config || {}; this._configured = true; this._pausedAtTime = null; this._start = config.start || noop; this._step = config.step || noop; this._finish = config.finish || noop; this._duration = config.duration || DEFAULT_DURATION; this._currentState = config.from || this.get(); this._originalState = this.get(); this._targetState = config.to || this.get(); this._timestamp = now(); var currentState = this._currentState; var targetState = this._targetState; defaults(targetState, currentState); this._easing = composeEasingObject(currentState, config.easing || DEFAULT_EASING); this._filterArgs = [ currentState, this._originalState, targetState, this._easing ]; applyFilter(this, "tweenCreated"); return this; }; Tweenable.prototype.get = function() { return shallowCopy({}, this._currentState); }; Tweenable.prototype.set = function(state) { this._currentState = state; }; Tweenable.prototype.pause = function() { this._pausedAtTime = now(); this._isPaused = true; return this; }; Tweenable.prototype.resume = function() { if (this._isPaused) { this._timestamp += now() - this._pausedAtTime; } this._isPaused = false; this._isTweening = true; var self = this; this._timeoutHandler = function() { timeoutHandler(self, self._timestamp, self._duration, self._currentState, self._originalState, self._targetState, self._easing, self._step, self._scheduleFunction); }; this._timeoutHandler(); return this; }; Tweenable.prototype.stop = function(gotoEnd) { this._isTweening = false; this._isPaused = false; this._timeoutHandler = noop; if (gotoEnd) { shallowCopy(this._currentState, this._targetState); applyFilter(this, "afterTweenEnd"); this._finish.call(this, this._currentState); } return this; }; Tweenable.prototype.isPlaying = function() { return this._isTweening && !this._isPaused; }; Tweenable.prototype.setScheduleFunction = function(scheduleFunction) { this._scheduleFunction = scheduleFunction; }; Tweenable.prototype.dispose = function() { var prop; for (prop in this) { if (this.hasOwnProperty(prop)) { delete this[prop]; } } }; Tweenable.prototype.filter = {}; Tweenable.prototype.formula = { linear: function(pos) { return pos; } }; formula = Tweenable.prototype.formula; shallowCopy(Tweenable, { now: now, each: each, tweenProps: tweenProps, tweenProp: tweenProp, applyFilter: applyFilter, shallowCopy: shallowCopy, defaults: defaults, composeEasingObject: composeEasingObject }); if (typeof SHIFTY_DEBUG_NOW === "function") { root.timeoutHandler = timeoutHandler; } if (typeof exports === "object") { module.exports = Tweenable; } else if (typeof define === "function" && define.amd) { define(function() { return Tweenable; }); } else if (typeof root.Tweenable === "undefined") { root.Tweenable = Tweenable; } return Tweenable; }(); (function() { Tweenable.shallowCopy(Tweenable.prototype.formula, { easeInQuad: function(pos) { return Math.pow(pos, 2); }, easeOutQuad: function(pos) { return -(Math.pow(pos - 1, 2) - 1); }, easeInOutQuad: function(pos) { if ((pos /= .5) < 1) { return .5 * Math.pow(pos, 2); } return -.5 * ((pos -= 2) * pos - 2); }, easeInCubic: function(pos) { return Math.pow(pos, 3); }, easeOutCubic: function(pos) { return Math.pow(pos - 1, 3) + 1; }, easeInOutCubic: function(pos) { if ((pos /= .5) < 1) { return .5 * Math.pow(pos, 3); } return .5 * (Math.pow(pos - 2, 3) + 2); }, easeInQuart: function(pos) { return Math.pow(pos, 4); }, easeOutQuart: function(pos) { return -(Math.pow(pos - 1, 4) - 1); }, easeInOutQuart: function(pos) { if ((pos /= .5) < 1) { return .5 * Math.pow(pos, 4); } return -.5 * ((pos -= 2) * Math.pow(pos, 3) - 2); }, easeInQuint: function(pos) { return Math.pow(pos, 5); }, easeOutQuint: function(pos) { return Math.pow(pos - 1, 5) + 1; }, easeInOutQuint: function(pos) { if ((pos /= .5) < 1) { return .5 * Math.pow(pos, 5); } return .5 * (Math.pow(pos - 2, 5) + 2); }, easeInSine: function(pos) { return -Math.cos(pos * (Math.PI / 2)) + 1; }, easeOutSine: function(pos) { return Math.sin(pos * (Math.PI / 2)); }, easeInOutSine: function(pos) { return -.5 * (Math.cos(Math.PI * pos) - 1); }, easeInExpo: function(pos) { return pos === 0 ? 0 : Math.pow(2, 10 * (pos - 1)); }, easeOutExpo: function(pos) { return pos === 1 ? 1 : -Math.pow(2, -10 * pos) + 1; }, easeInOutExpo: function(pos) { if (pos === 0) { return 0; } if (pos === 1) { return 1; } if ((pos /= .5) < 1) { return .5 * Math.pow(2, 10 * (pos - 1)); } return .5 * (-Math.pow(2, -10 * --pos) + 2); }, easeInCirc: function(pos) { return -(Math.sqrt(1 - pos * pos) - 1); }, easeOutCirc: function(pos) { return Math.sqrt(1 - Math.pow(pos - 1, 2)); }, easeInOutCirc: function(pos) { if ((pos /= .5) < 1) { return -.5 * (Math.sqrt(1 - pos * pos) - 1); } return .5 * (Math.sqrt(1 - (pos -= 2) * pos) + 1); }, easeOutBounce: function(pos) { if (pos < 1 / 2.75) { return 7.5625 * pos * pos; } else if (pos < 2 / 2.75) { return 7.5625 * (pos -= 1.5 / 2.75) * pos + .75; } else if (pos < 2.5 / 2.75) { return 7.5625 * (pos -= 2.25 / 2.75) * pos + .9375; } else { return 7.5625 * (pos -= 2.625 / 2.75) * pos + .984375; } }, easeInBack: function(pos) { var s = 1.70158; return pos * pos * ((s + 1) * pos - s); }, easeOutBack: function(pos) { var s = 1.70158; return (pos = pos - 1) * pos * ((s + 1) * pos + s) + 1; }, easeInOutBack: function(pos) { var s = 1.70158; if ((pos /= .5) < 1) { return .5 * (pos * pos * (((s *= 1.525) + 1) * pos - s)); } return .5 * ((pos -= 2) * pos * (((s *= 1.525) + 1) * pos + s) + 2); }, elastic: function(pos) { return -1 * Math.pow(4, -8 * pos) * Math.sin((pos * 6 - 1) * (2 * Math.PI) / 2) + 1; }, swingFromTo: function(pos) { var s = 1.70158; return (pos /= .5) < 1 ? .5 * (pos * pos * (((s *= 1.525) + 1) * pos - s)) : .5 * ((pos -= 2) * pos * (((s *= 1.525) + 1) * pos + s) + 2); }, swingFrom: function(pos) { var s = 1.70158; return pos * pos * ((s + 1) * pos - s); }, swingTo: function(pos) { var s = 1.70158; return (pos -= 1) * pos * ((s + 1) * pos + s) + 1; }, bounce: function(pos) { if (pos < 1 / 2.75) { return 7.5625 * pos * pos; } else if (pos < 2 / 2.75) { return 7.5625 * (pos -= 1.5 / 2.75) * pos + .75; } else if (pos < 2.5 / 2.75) { return 7.5625 * (pos -= 2.25 / 2.75) * pos + .9375; } else { return 7.5625 * (pos -= 2.625 / 2.75) * pos + .984375; } }, bouncePast: function(pos) { if (pos < 1 / 2.75) { return 7.5625 * pos * pos; } else if (pos < 2 / 2.75) { return 2 - (7.5625 * (pos -= 1.5 / 2.75) * pos + .75); } else if (pos < 2.5 / 2.75) { return 2 - (7.5625 * (pos -= 2.25 / 2.75) * pos + .9375); } else { return 2 - (7.5625 * (pos -= 2.625 / 2.75) * pos + .984375); } }, easeFromTo: function(pos) { if ((pos /= .5) < 1) { return .5 * Math.pow(pos, 4); } return -.5 * ((pos -= 2) * Math.pow(pos, 3) - 2); }, easeFrom: function(pos) { return Math.pow(pos, 4); }, easeTo: function(pos) { return Math.pow(pos, .25); } }); })(); (function() { function cubicBezierAtTime(t, p1x, p1y, p2x, p2y, duration) { var ax = 0, bx = 0, cx = 0, ay = 0, by = 0, cy = 0; function sampleCurveX(t) { return ((ax * t + bx) * t + cx) * t; } function sampleCurveY(t) { return ((ay * t + by) * t + cy) * t; } function sampleCurveDerivativeX(t) { return (3 * ax * t + 2 * bx) * t + cx; } function solveEpsilon(duration) { return 1 / (200 * duration); } function solve(x, epsilon) { return sampleCurveY(solveCurveX(x, epsilon)); } function fabs(n) { if (n >= 0) { return n; } else { return 0 - n; } } function solveCurveX(x, epsilon) { var t0, t1, t2, x2, d2, i; for (t2 = x, i = 0; i < 8; i++) { x2 = sampleCurveX(t2) - x; if (fabs(x2) < epsilon) { return t2; } d2 = sampleCurveDerivativeX(t2); if (fabs(d2) < 1e-6) { break; } t2 = t2 - x2 / d2; } t0 = 0; t1 = 1; t2 = x; if (t2 < t0) { return t0; } if (t2 > t1) { return t1; } while (t0 < t1) { x2 = sampleCurveX(t2); if (fabs(x2 - x) < epsilon) { return t2; } if (x > x2) { t0 = t2; } else { t1 = t2; } t2 = (t1 - t0) * .5 + t0; } return t2; } cx = 3 * p1x; bx = 3 * (p2x - p1x) - cx; ax = 1 - cx - bx; cy = 3 * p1y; by = 3 * (p2y - p1y) - cy; ay = 1 - cy - by; return solve(t, solveEpsilon(duration)); } function getCubicBezierTransition(x1, y1, x2, y2) { return function(pos) { return cubicBezierAtTime(pos, x1, y1, x2, y2, 1); }; } Tweenable.setBezierFunction = function(name, x1, y1, x2, y2) { var cubicBezierTransition = getCubicBezierTransition(x1, y1, x2, y2); cubicBezierTransition.x1 = x1; cubicBezierTransition.y1 = y1; cubicBezierTransition.x2 = x2; cubicBezierTransition.y2 = y2; return Tweenable.prototype.formula[name] = cubicBezierTransition; }; Tweenable.unsetBezierFunction = function(name) { delete Tweenable.prototype.formula[name]; }; })(); (function() { function getInterpolatedValues(from, current, targetState, position, easing) { return Tweenable.tweenProps(position, current, from, targetState, 1, 0, easing); } var mockTweenable = new Tweenable(); mockTweenable._filterArgs = []; Tweenable.interpolate = function(from, targetState, position, easing) { var current = Tweenable.shallowCopy({}, from); var easingObject = Tweenable.composeEasingObject(from, easing || "linear"); mockTweenable.set({}); var filterArgs = mockTweenable._filterArgs; filterArgs.length = 0; filterArgs[0] = current; filterArgs[1] = from; filterArgs[2] = targetState; filterArgs[3] = easingObject; Tweenable.applyFilter(mockTweenable, "tweenCreated"); Tweenable.applyFilter(mockTweenable, "beforeTween"); var interpolatedValues = getInterpolatedValues(from, current, targetState, position, easingObject); Tweenable.applyFilter(mockTweenable, "afterTween"); return interpolatedValues; }; })(); function token() {} (function(Tweenable) { var formatManifest; var R_NUMBER_COMPONENT = /(\d|\-|\.)/; var R_FORMAT_CHUNKS = /([^\-0-9\.]+)/g; var R_UNFORMATTED_VALUES = /[0-9.\-]+/g; var R_RGB = new RegExp("rgb\\(" + R_UNFORMATTED_VALUES.source + /,\s*/.source + R_UNFORMATTED_VALUES.source + /,\s*/.source + R_UNFORMATTED_VALUES.source + "\\)", "g"); var R_RGB_PREFIX = /^.*\(/; var R_HEX = /#([0-9]|[a-f]){3,6}/gi; var VALUE_PLACEHOLDER = "VAL"; var getFormatChunksFrom_accumulator = []; function getFormatChunksFrom(rawValues, prefix) { getFormatChunksFrom_accumulator.length = 0; var rawValuesLength = rawValues.length; var i; for (i = 0; i < rawValuesLength; i++) { getFormatChunksFrom_accumulator.push("_" + prefix + "_" + i); } return getFormatChunksFrom_accumulator; } function getFormatStringFrom(formattedString) { var chunks = formattedString.match(R_FORMAT_CHUNKS); if (!chunks) { chunks = [ "", "" ]; } else if (chunks.length === 1 || formattedString[0].match(R_NUMBER_COMPONENT)) { chunks.unshift(""); } return chunks.join(VALUE_PLACEHOLDER); } function sanitizeObjectForHexProps(stateObject) { Tweenable.each(stateObject, function(prop) { var currentProp = stateObject[prop]; if (typeof currentProp === "string" && currentProp.match(R_HEX)) { stateObject[prop] = sanitizeHexChunksToRGB(currentProp); } }); } function sanitizeHexChunksToRGB(str) { return filterStringChunks(R_HEX, str, convertHexToRGB); } function convertHexToRGB(hexString) { var rgbArr = hexToRGBArray(hexString); return "rgb(" + rgbArr[0] + "," + rgbArr[1] + "," + rgbArr[2] + ")"; } var hexToRGBArray_returnArray = []; function hexToRGBArray(hex) { hex = hex.replace(/#/, ""); if (hex.length === 3) { hex = hex.split(""); hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2]; } hexToRGBArray_returnArray[0] = hexToDec(hex.substr(0, 2)); hexToRGBArray_returnArray[1] = hexToDec(hex.substr(2, 2)); hexToRGBArray_returnArray[2] = hexToDec(hex.substr(4, 2)); return hexToRGBArray_returnArray; } function hexToDec(hex) { return parseInt(hex, 16); } function filterStringChunks(pattern, unfilteredString, filter) { var pattenMatches = unfilteredString.match(pattern); var filteredString = unfilteredString.replace(pattern, VALUE_PLACEHOLDER); if (pattenMatches) { var pattenMatchesLength = pattenMatches.length; var currentChunk; for (var i = 0; i < pattenMatchesLength; i++) { currentChunk = pattenMatches.shift(); filteredString = filteredString.replace(VALUE_PLACEHOLDER, filter(currentChunk)); } } return filteredString; } function sanitizeRGBChunks(formattedString) { return filterStringChunks(R_RGB, formattedString, sanitizeRGBChunk); } function sanitizeRGBChunk(rgbChunk) { var numbers = rgbChunk.match(R_UNFORMATTED_VALUES); var numbersLength = numbers.length; var sanitizedString = rgbChunk.match(R_RGB_PREFIX)[0]; for (var i = 0; i < numbersLength; i++) { sanitizedString += parseInt(numbers[i], 10) + ","; } sanitizedString = sanitizedString.slice(0, -1) + ")"; return sanitizedString; } function getFormatManifests(stateObject) { var manifestAccumulator = {}; Tweenable.each(stateObject, function(prop) { var currentProp = stateObject[prop]; if (typeof currentProp === "string") { var rawValues = getValuesFrom(currentProp); manifestAccumulator[prop] = { formatString: getFormatStringFrom(currentProp), chunkNames: getFormatChunksFrom(rawValues, prop) }; } }); return manifestAccumulator; } function expandFormattedProperties(stateObject, formatManifests) { Tweenable.each(formatManifests, function(prop) { var currentProp = stateObject[prop]; var rawValues = getValuesFrom(currentProp); var rawValuesLength = rawValues.length; for (var i = 0; i < rawValuesLength; i++) { stateObject[formatManifests[prop].chunkNames[i]] = +rawValues[i]; } delete stateObject[prop]; }); } function collapseFormattedProperties(stateObject, formatManifests) { Tweenable.each(formatManifests, function(prop) { var currentProp = stateObject[prop]; var formatChunks = extractPropertyChunks(stateObject, formatManifests[prop].chunkNames); var valuesList = getValuesList(formatChunks, formatManifests[prop].chunkNames); currentProp = getFormattedValues(formatManifests[prop].formatString, valuesList); stateObject[prop] = sanitizeRGBChunks(currentProp); }); } function extractPropertyChunks(stateObject, chunkNames) { var extractedValues = {}; var currentChunkName, chunkNamesLength = chunkNames.length; for (var i = 0; i < chunkNamesLength; i++) { currentChunkName = chunkNames[i]; extractedValues[currentChunkName] = stateObject[currentChunkName]; delete stateObject[currentChunkName]; } return extractedValues; } var getValuesList_accumulator = []; function getValuesList(stateObject, chunkNames) { getValuesList_accumulator.length = 0; var chunkNamesLength = chunkNames.length; for (var i = 0; i < chunkNamesLength; i++) { getValuesList_accumulator.push(stateObject[chunkNames[i]]); } return getValuesList_accumulator; } function getFormattedValues(formatString, rawValues) { var formattedValueString = formatString; var rawValuesLength = rawValues.length; for (var i = 0; i < rawValuesLength; i++) { formattedValueString = formattedValueString.replace(VALUE_PLACEHOLDER, +rawValues[i].toFixed(4)); } return formattedValueString; } function getValuesFrom(formattedString) { return formattedString.match(R_UNFORMATTED_VALUES); } function expandEasingObject(easingObject, tokenData) { Tweenable.each(tokenData, function(prop) { var currentProp = tokenData[prop]; var chunkNames = currentProp.chunkNames; var chunkLength = chunkNames.length; var easingChunks = easingObject[prop].split(" "); var lastEasingChunk = easingChunks[easingChunks.length - 1]; for (var i = 0; i < chunkLength; i++) { easingObject[chunkNames[i]] = easingChunks[i] || lastEasingChunk; } delete easingObject[prop]; }); } function collapseEasingObject(easingObject, tokenData) { Tweenable.each(tokenData, function(prop) { var currentProp = tokenData[prop]; var chunkNames = currentProp.chunkNames; var chunkLength = chunkNames.length; var composedEasingString = ""; for (var i = 0; i < chunkLength; i++) { composedEasingString += " " + easingObject[chunkNames[i]]; delete easingObject[chunkNames[i]]; } easingObject[prop] = composedEasingString.substr(1); }); } Tweenable.prototype.filter.token = { tweenCreated: function(currentState, fromState, toState, easingObject) { sanitizeObjectForHexProps(currentState); sanitizeObjectForHexProps(fromState); sanitizeObjectForHexProps(toState); this._tokenData = getFormatManifests(currentState); }, beforeTween: function(currentState, fromState, toState, easingObject) { expandEasingObject(easingObject, this._tokenData); expandFormattedProperties(currentState, this._tokenData); expandFormattedProperties(fromState, this._tokenData); expandFormattedProperties(toState, this._tokenData); }, afterTween: function(currentState, fromState, toState, easingObject) { collapseFormattedProperties(currentState, this._tokenData); collapseFormattedProperties(fromState, this._tokenData); collapseFormattedProperties(toState, this._tokenData); collapseEasingObject(easingObject, this._tokenData); } }; })(Tweenable); })(this); }, {} ], 2: [ function(require, module, exports) { var Tweenable = require("shifty"); var EASING_ALIASES = { easeIn: "easeInCubic", easeOut: "easeOutCubic", easeInOut: "easeInOutCubic" }; var Progress = function(container, opts) { if (arguments.length === 0) return; var svgView = this._createSvgView(opts); var element; if (isString(container)) { element = document.querySelector(container); } else { element = container; } element.appendChild(svgView.svg); var newOpts = extend({ attachment: this }, opts); this._path = new Path(svgView.path, newOpts); this.path = svgView.path; this.trail = svgView.trail; }; Progress.prototype.animate = function animate(progress, opts, cb) { this._path.animate(progress, opts, cb); }; Progress.prototype.stop = function stop() { this._path.stop(); }; Progress.prototype.set = function set(progress) { this._path.set(progress); }; Progress.prototype.value = function value() { return this._path.value(); }; Progress.prototype._createSvgView = function _createSvgView(opts) { opts = extend({ color: "#555", strokeWidth: 1, trailColor: null, fill: null }, opts); var svg = document.createElementNS("http://www.w3.org/2000/svg", "svg"); this._initializeSvg(svg, opts); var trailPath = null; if (opts.trailColor) { var trailOpts = extend({}, opts); trailOpts.color = opts.trailColor; opts.fill = null; trailPath = this._createPath(trailOpts); svg.appendChild(trailPath); } var path = this._createPath(opts); svg.appendChild(path); return { svg: svg, path: path, trail: trailPath }; }; Progress.prototype._initializeSvg = function _initializeSvg(svg, opts) { svg.setAttribute("viewBox", "0 0 100 100"); }; Progress.prototype._createPath = function _createPath(opts) { var path = document.createElementNS("http://www.w3.org/2000/svg", "path"); path.setAttribute("d", this._pathString(opts)); path.setAttribute("stroke", opts.color); path.setAttribute("stroke-width", opts.strokeWidth); if (opts.fill) { path.setAttribute("fill", opts.fill); } else { path.setAttribute("fill-opacity", "0"); } return path; }; Progress.prototype._pathString = function _pathString(opts) { throw new Error("Override this function for each progress bar"); }; var Line = function(container, options) { Progress.apply(this, arguments); }; Line.prototype = new Progress(); Line.prototype.constructor = Line; Line.prototype._initializeSvg = function _initializeSvg(svg, opts) { svg.setAttribute("viewBox", "0 0 100 " + opts.strokeWidth); svg.setAttribute("preserveAspectRatio", "none"); }; Line.prototype._pathString = function _pathString(opts) { var pathString = "M 0,{c} L 100,{c}"; var center = opts.strokeWidth / 2; pathString = pathString.replace(/\{c\}/g, center); return pathString; }; var Circle = function(container, options) { Progress.apply(this, arguments); }; Circle.prototype = new Progress(); Circle.prototype.constructor = Circle; Circle.prototype._pathString = function _pathString(opts) { var pathString = "M 50,50 m 0,-{r} a {r},{r} 0 1 1 0,{r*2} a {r},{r} 0 1 1 0,-{r*2}"; var r = 50 - opts.strokeWidth / 2; pathString = pathString.replace(/\{r\}/g, r); pathString = pathString.replace(/\{r\*2\}/g, r * 2); return pathString; }; var Square = function(container, options) { Progress.apply(this, arguments); }; Square.prototype = new Progress(); Square.prototype.constructor = Square; Square.prototype._pathString = function _pathString(opts) { var pathString = "M 0,{s/2} L {w},{s/2} L {w},{w} L {s/2},{w} L {s/2},{s}"; var w = 100 - opts.strokeWidth / 2; pathString = pathString.replace(/\{w\}/g, w); pathString = pathString.replace(/\{s\}/g, opts.strokeWidth); pathString = pathString.replace(/\{s\/2\}/g, opts.strokeWidth / 2); return pathString; }; var Path = function(path, opts) { opts = extend({ duration: 800, easing: "linear", from: {}, to: {}, step: noop }, opts); this._path = path; this._opts = opts; this._tweenable = null; var length = this._path.getTotalLength(); this._path.style.strokeDasharray = length + " " + length; this._path.style.strokeDashoffset = length; }; Path.prototype.value = function value() { var computedStyle = window.getComputedStyle(this._path, null); var offset = computedStyle.getPropertyValue("stroke-dashoffset"); offset = parseFloat(offset, 10); var length = this._path.getTotalLength(); return 1 - offset / length; }; Path.prototype.set = function set(progress) { this.stop(); var length = this._path.getTotalLength(); this._path.style.strokeDashoffset = length - progress * length; }; Path.prototype.stop = function stop() { this._stopTween(); var computedStyle = window.getComputedStyle(this._path, null); var offset = computedStyle.getPropertyValue("stroke-dashoffset"); this._path.style.strokeDashoffset = offset; }; Path.prototype.animate = function animate(progress, opts, cb) { if (isFunction(opts)) { cb = opts; opts = {}; } var defaultOpts = extend({}, this._opts); opts = extend(defaultOpts, opts); this.stop(); this._path.getBoundingClientRect(); var computedStyle = window.getComputedStyle(this._path, null); var offset = computedStyle.getPropertyValue("stroke-dashoffset"); offset = parseFloat(offset, 10); var length = this._path.getTotalLength(); var newOffset = length - progress * length; var self = this; this._tweenable = new Tweenable(); this._tweenable.tween({ from: extend({ offset: offset }, opts.from), to: extend({ offset: newOffset }, opts.to), duration: opts.duration, easing: this._easing(opts.easing), step: function(state) { self._path.style.strokeDashoffset = state.offset; opts.step(state, opts.attachment); }, finish: function(state) { self._path.style.strokeDashoffset = state.offset; opts.step(state, opts.attachment); if (isFunction(cb)) { cb(); } } }); }; Path.prototype._stopTween = function _stopTween() { if (this._tweenable !== null) { this._tweenable.stop(); this._tweenable.dispose(); this._tweenable = null; } }; Path.prototype._easing = function _easing(easing) { if (EASING_ALIASES.hasOwnProperty(easing)) { return EASING_ALIASES[easing]; } return easing; }; function noop() {} function extend(destination, source) { destination = destination || {}; source = source || {}; for (var attrName in source) { if (source.hasOwnProperty(attrName)) { destination[attrName] = source[attrName]; } } return destination; } function isString(obj) { return typeof obj === "string" || obj instanceof String; } function isFunction(obj) { return typeof obj === "function"; } module.exports = { Line: Line, Circle: Circle, Square: Square, Path: Path }; }, { shifty: 1 } ] }, {}, [ 2 ])(2); }); function search_trigger() { jQuery(".dc-search-trigger").click(function(e) { e.preventDefault(); jQuery(".dc-search-wrapper").addClass("show"); }); jQuery(".dc-search-close").click(function(e) { e.preventDefault(); jQuery(".dc-search-wrapper").removeClass("show"); }); } function slick_carousel_init() { jQuery(".post-slick-carousel").slick({ dots: false, arrows: true, infinite: true, speed: 300, slidesToShow: 3, adaptiveHeight: false, mobileFirst: false, autoplay: true, prevArrow: jQuery(".dc-back"), nextArrow: jQuery(".dc-forward"), responsive: [ { breakpoint: 850, settings: { slidesToShow: 2 } }, { breakpoint: 650, settings: { slidesToShow: 1 } } ] }); } // function smooth_scroll() { // if (window.location.hash) { // var target = window.location.hash; // if (target.length) { // jQuery("html, body").animate({ // scrollTop: jQuery(target).offset().top - 35 // }, 2e3); // } // } // jQuery('a[href*="#"].smooth-scroll, .smooth-scroll > a[href*="#"]').not('[href="#"]').not('[href="#0"]').click(function(event) { // if (location.pathname.replace(/^\//, "") == this.pathname.replace(/^\//, "") && location.hostname == this.hostname) { // var target = jQuery(this.hash); // target = target.length ? target : jQuery("[name=" + this.hash.slice(1) + "]"); // if (target.length) { // event.preventDefault(); // jQuery("html, body").animate({ // scrollTop: target.offset().top // }, 1e3, function() { // var $target = jQuery(target); // $target.focus(); // if ($target.is(":focus")) { // return false; // } else { // $target.attr("tabindex", "-1"); // $target.focus(); // } // }); // } // } // }); // } function sticky_header() { jQuery(window).scroll(function() { toggle_sticky_header(); }); toggle_sticky_header(); } function toggle_sticky_header() { if (window.innerWidth > 767) { var topamount = 100; } else { var topamount = 65; } if (jQuery(window).scrollTop() > topamount) { jQuery("body").addClass("sticky-nav"); } else { jQuery("body").removeClass("sticky-nav"); } } const videos = document.querySelectorAll(".section.video"); // Check for videos within the Array. if (videos.length > 0) { // Iterate through all videos. videos.forEach(video => { //adds button to video component const btnElement = document.createElement('button'); btnElement.classList.add('btn-play-video'); btnElement.textContent = 'Play video'; const videoWrapper = video.querySelector('.video__wrapper'); const currentVideo = video.querySelector('video'); if(!videoWrapper || !currentVideo) return; videoWrapper.insertBefore(btnElement, videoWrapper.firstChild); btnElement.onclick = function (event) { // Stop the controls in the video from receiving the tap erronously. event.stopPropagation(); // Alternate play-states depending on current state. if (currentVideo.paused) { currentVideo.play(); } else { currentVideo.pause(); } }; currentVideo.onpause = () => { btnElement.style.display = "block"; }; currentVideo.onended = () => { btnElement.style.display = "block"; currentVideo.removeAttribute('controls', 'controls'); }; currentVideo.onplay = () => { btnElement.style.display = "none"; currentVideo.setAttribute('controls', 'controls'); }; }); } var btn = document.querySelector('.btn--back-to-top'); btn.onclick = function(e){ e.preventDefault(); window.scrollTo({top: 0, behavior: 'smooth'}); }; var menuItems = document.querySelectorAll('.menu a'); menuItems.forEach(function(menuItem) { menuItem.onclick = function(e) { e.preventDefault(); // Prevent the default anchor link behavior // Extract the ID from the href attribute var targetID = menuItem.getAttribute('href').slice(1); // Remove the '#' at the start var targetElement = document.getElementById(targetID); // Get the target element by ID // If the target element exists if (targetElement) { var elementPosition = targetElement.getBoundingClientRect().top; // Get the position of the target element relative to the viewport var offsetPosition = elementPosition + window.pageYOffset - 150; // Calculate the offset position // Scroll to the target element with offset window.scrollTo({ top: offsetPosition, behavior: 'smooth' }); } }; }); document.addEventListener('DOMContentLoaded', () => { const menuItems = document.querySelectorAll('.menu .menu-item a'); menuItems.forEach(item => { item.addEventListener('click', function() { // Remove the 'active' class from all items menuItems.forEach(subItem => { subItem.classList.remove('active'); }); // Add the 'active' class to the clicked item this.classList.add('active'); }); }); });