window.theme = {}; window.theme.fn = { getOptions: function(opts) { if (typeof(opts) == 'object') { return opts; } else if (typeof(opts) == 'string') { try { return JSON.parse(opts.replace(/'/g, '"').replace(';', '')); } catch (e) { return {}; } } else { return {}; } }, execPluginFunction: function(functionName, context) { var args = Array.prototype.slice.call(arguments, 2); var namespaces = functionName.split("."); var func = namespaces.pop(); for (var i = 0; i < namespaces.length; i++) { context = context[namespaces[i]]; } return context[func].apply(context, args); }, intObs: function(selector, functionName, intObsOptions, alwaysObserve) { var $el = document.querySelectorAll(selector); var intersectionObserverOptions = { rootMargin: '0px 0px 200px 0px' } if (Object.keys(intObsOptions).length) { intersectionObserverOptions = $.extend(intersectionObserverOptions, intObsOptions); } var observer = new IntersectionObserver(function(entries) { for (var i = 0; i < entries.length; i++) { var entry = entries[i]; if (entry.intersectionRatio > 0) { if (typeof functionName === 'string') { var func = Function('return ' + functionName)(); } else { var callback = functionName; callback.call($(entry.target)); } if (!alwaysObserve) { observer.unobserve(entry.target); } } } }, intersectionObserverOptions); $($el).each(function() { observer.observe($(this)[0]); }); }, intObsInit: function(selector, functionName) { var $el = document.querySelectorAll(selector); var intersectionObserverOptions = { rootMargin: '200px' } var observer = new IntersectionObserver(function(entries) { for (var i = 0; i < entries.length; i++) { var entry = entries[i]; if (entry.intersectionRatio > 0) { var $this = $(entry.target), opts; var pluginOptions = theme.fn.getOptions($this.data('plugin-options')); if (pluginOptions) opts = pluginOptions; theme.fn.execPluginFunction(functionName, $this, opts); observer.unobserve(entry.target); } } }, intersectionObserverOptions); $($el).each(function() { observer.observe($(this)[0]); }); }, dynIntObsInit: function(selector, functionName, pluginDefaults) { var $el = document.querySelectorAll(selector); $($el).each(function() { var $this = $(this), opts; var pluginOptions = theme.fn.getOptions($this.data('plugin-options')); if (pluginOptions) opts = pluginOptions; var mergedPluginDefaults = theme.fn.mergeOptions(pluginDefaults, opts) var intersectionObserverOptions = { rootMargin: theme.fn.getRootMargin(functionName, mergedPluginDefaults), threshold: 0 } if (!mergedPluginDefaults.forceInit) { var observer = new IntersectionObserver(function(entries) { for (var i = 0; i < entries.length; i++) { var entry = entries[i]; if (entry.intersectionRatio > 0) { theme.fn.execPluginFunction(functionName, $this, mergedPluginDefaults); observer.unobserve(entry.target); } } }, intersectionObserverOptions); observer.observe($this[0]); } else { theme.fn.execPluginFunction(functionName, $this, mergedPluginDefaults); } }); }, getRootMargin: function(plugin, pluginDefaults) { switch (plugin) { case 'themePluginCounter': return pluginDefaults.accY ? '0px 0px ' + pluginDefaults.accY + 'px 0px' : '0px 0px 200px 0px'; break; case 'themePluginAnimate': return pluginDefaults.accY ? '0px 0px ' + pluginDefaults.accY + 'px 0px' : '0px 0px 200px 0px'; break; case 'themePluginIcon': return pluginDefaults.accY ? '0px 0px ' + pluginDefaults.accY + 'px 0px' : '0px 0px 200px 0px'; break; case 'themePluginRandomImages': return pluginDefaults.accY ? '0px 0px ' + pluginDefaults.accY + 'px 0px' : '0px 0px 200px 0px'; break; default: return '0px 0px 200px 0px'; break; } }, mergeOptions: function(obj1, obj2) { var obj3 = {}; for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; } for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; } return obj3; }, execOnceTroughEvent: function($el, event, callback) { var self = this, dataName = self.formatDataName(event); $($el).on(event, function() { if (!$(this).data(dataName)) { callback.call($(this)); $(this).data(dataName, true); $(this).off(event); } }); return this; }, execOnceTroughWindowEvent: function($el, event, callback) { var self = this, dataName = self.formatDataName(event); $($el).on(event, function() { if (!$(this).data(dataName)) { callback(); $(this).data(dataName, true); $(this).off(event); } }); return this; }, formatDataName: function(name) { name = name.replace('.', ''); return name; }, isElementInView: function($el) { var rect = $el[0].getBoundingClientRect(); return (rect.top <= (window.innerHeight / 3)); }, getScripts: function(arr, path) { var _arr = $.map(arr, function(scr) { return $.getScript((path || "") + scr); }); _arr.push($.Deferred(function(deferred) { $(deferred.resolve); })); return $.when.apply($, _arr); }, showErrorMessage: function(title, content) { $('.modalThemeErrorMessage').remove(); $('body').append(''); var modalThemeErrorMessage = document.getElementById('modalThemeErrorMessage'); var modalThemeErrorMessage = bootstrap.Modal.getOrCreateInstance(modalThemeErrorMessage); modalThemeErrorMessage.show(); } }; (function($) { try { if ("file://" === location.origin) { if ($('[data-icon]').length || $('iframe').length) { theme.fn.showErrorMessage('Local Environment Warning', 'SVG Objects, Icons, YouTube and Vimeo Videos might not show correctly on local environment. For better result, please preview on a server.'); } } } catch (e) {} $.extend({ browserSelector: function() { (function(a) { (jQuery.browser = jQuery.browser || {}).mobile = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4)) })(navigator.userAgent || navigator.vendor || window.opera); var hasTouch = 'ontouchstart' in window || navigator.msMaxTouchPoints; var u = navigator.userAgent, ua = u.toLowerCase(), is = function(t) { return ua.indexOf(t) > -1; }, g = 'gecko', w = 'webkit', s = 'safari', o = 'opera', h = document.documentElement, b = [(!(/opera|webtv/i.test(ua)) && /msie\s(\d)/.test(ua)) ? ('ie ie' + parseFloat(navigator.appVersion.split("MSIE")[1])) : is('firefox/2') ? g + ' ff2' : is('firefox/3.5') ? g + ' ff3 ff3_5' : is('firefox/3') ? g + ' ff3' : is('gecko/') ? g : is('opera') ? o + (/version\/(\d+)/.test(ua) ? ' ' + o + RegExp.jQuery1 : (/opera(\s|\/)(\d+)/.test(ua) ? ' ' + o + RegExp.jQuery2 : '')) : is('konqueror') ? 'konqueror' : is('chrome') ? w + ' chrome' : is('iron') ? w + ' iron' : is('applewebkit/') ? w + ' ' + s + (/version\/(\d+)/.test(ua) ? ' ' + s + RegExp.jQuery1 : '') : is('mozilla/') ? g : '', is('j2me') ? 'mobile' : is('iphone') ? 'iphone' : is('ipod') ? 'ipod' : is('mac') ? 'mac' : is('darwin') ? 'mac' : is('webtv') ? 'webtv' : is('win') ? 'win' : is('freebsd') ? 'freebsd' : (is('x11') || is('linux')) ? 'linux' : '', 'js']; c = b.join(' '); if ($.browser.mobile) { c += ' mobile'; } if (hasTouch) { c += ' touch'; } h.className += ' ' + c; var isEdge = /Edge/.test(navigator.userAgent); if (isEdge) { $('html').removeClass('chrome').addClass('edge'); } if ($('body').hasClass('dark')) { $('html').addClass('dark'); } if ($('body').hasClass('boxed')) { $('html').addClass('boxed'); } } }); $.browserSelector(); if (/iPad|iPhone|iPod/.test(navigator.platform)) { $(document).ready(function($) { $('.thumb-info').attr('onclick', 'return true'); }); } if ($('a[data-bs-toggle="tab"]').length) { $('a[data-bs-toggle="tab"]').on('shown.bs.tab', function(e) { var $tabPane = $($(e.target).attr('href')); if ($tabPane.length) { $tabPane.find('.owl-carousel').trigger('refresh.owl.carousel'); } $(this).parents('.nav-tabs').find('.active').removeClass('active'); $(this).addClass('active').parent().addClass('active'); }); if (window.location.hash) { $(window).on('load', function() { if (window.location.hash !== '*' && $(window.location.hash).get(0)) { new bootstrap.Tab($('a.nav-link[href="' + window.location.hash + '"]:not([data-hash])')[0]).show(); } }); } } if (!$('html').hasClass('disable-onload-scroll') && window.location.hash && !['#*'].includes(window.location.hash)) { window.scrollTo(0, 0); $(window).on('load', function() { setTimeout(function() { var target = window.location.hash, offset = ($(window).width() < 768) ? 180 : 90; if (!$(target).length) { return; } if ($("a[href$='" + window.location.hash + "']").is('[data-hash-offset]')) { offset = parseInt($("a[href$='" + window.location.hash + "']").first().attr('data-hash-offset')); } else if ($("html").is('[data-hash-offset]')) { offset = parseInt($("html").attr('data-hash-offset')); } if (isNaN(offset)) { offset = 0; } $('body').addClass('scrolling'); $('html, body').animate({ scrollTop: $(target).offset().top - offset }, 600, 'easeOutQuad', function() { $('body').removeClass('scrolling'); }); }, 1); }); } $.fn.extend({ textRotator: function(options) { var defaults = { fadeSpeed: 500, pauseSpeed: 100, child: null }; var options = $.extend(defaults, options); return this.each(function() { var o = options; var obj = $(this); var items = $(obj.children(), obj); items.each(function() { $(this).hide(); }) if (!o.child) { var next = $(obj).children(':first'); } else { var next = o.child; } $(next).fadeIn(o.fadeSpeed, function() { $(next).delay(o.pauseSpeed).fadeOut(o.fadeSpeed, function() { var next = $(this).next(); if (next.length == 0) { next = $(obj).children(':first'); } $(obj).textRotator({ child: next, fadeSpeed: o.fadeSpeed, pauseSpeed: o.pauseSpeed }); }) }); }); } }); var $noticeTopBar = { $wrapper: $('.notice-top-bar'), $closeBtn: $('.notice-top-bar-close'), $header: $('#header'), $body: $('.body'), init: function() { var self = this; if (!$.cookie('portoNoticeTopBarClose')) { self.build().events(); } else { self.$wrapper.parent().prepend(''); self.$wrapper.remove(); } return this; }, build: function() { var self = this; $(window).on('load', function() { setTimeout(function() { self.$body.css({ 'margin-top': self.$wrapper.outerHeight(), 'transition': 'ease margin 300ms' }); $('#noticeTopBarContent').textRotator({ fadeSpeed: 500, pauseSpeed: 5000 }); if (['absolute', 'fixed'].includes(self.$header.css('position'))) { self.$header.css({ 'top': self.$wrapper.outerHeight(), 'transition': 'ease top 300ms' }); } $(window).trigger('notice.top.bar.opened'); }, 1000); }); return this; }, events: function() { var self = this; self.$closeBtn.on('click', function(e) { e.preventDefault(); self.$body.animate({ 'margin-top': 0, }, 300, function() { self.$wrapper.remove(); self.saveCookie(); }); if (['absolute', 'fixed'].includes(self.$header.css('position'))) { self.$header.animate({ top: 0 }, 300); } if (self.$header.hasClass('header-effect-shrink')) { self.$header.find('.header-body').animate({ top: 0 }, 300); } $(window).trigger('notice.top.bar.closed'); }); return this; }, checkCookie: function() { var self = this; if ($.cookie('portoNoticeTopBarClose')) { return true; } else { return false; } return this; }, saveCookie: function() { var self = this; $.cookie('portoNoticeTopBarClose', true); return this; } } if ($('.notice-top-bar').length) { $noticeTopBar.init(); } if ($('.image-hotspot').length) { $('.image-hotspot').append('').append(''); } if ($('.progress-reading').length) { function updateScrollProgress() { var pixels = $(document).scrollTop() pageHeight = $(document).height() - $(window).height() progress = 100 * pixels / pageHeight; $('.progress-reading .progress-bar').width(parseInt(progress) + "%"); } $(document).on('scroll ready', function() { updateScrollProgress(); }); $(document).ready(function() { $(window).afterResize(function() { updateScrollProgress(); }); }); } if ($('body[data-plugin-page-transition]').length) { var link_click = false; $(document).on('click', 'a', function(e) { link_click = $(this); }); $(window).on("beforeunload", function(e) { if (typeof link_click === 'object') { var href = link_click.attr('href'); if (href.indexOf('mailto:') != 0 && href.indexOf('tel:') != 0 && !link_click.data('rm-from-transition')) { $('body').addClass('page-transition-active'); } } }); $(window).on("pageshow", function(e) { if (e.persisted || e.originalEvent.persisted) { if ($('html').hasClass('safari')) { window.location.reload(); } $('body').removeClass('page-transition-active'); } }); } if ($('[data-clone-element]').length) { $('[data-clone-element]').each(function() { var $el = $(this), content = $el.html(), qty = $el.attr('data-clone-element'); for (var i = 0; i < qty; i++) { $el.html($el.html() + content); } }); } $('.thumb-info-floating-caption').each(function() { $(this).addClass('thumb-info-floating-element-wrapper').append('' + $(this).data('title') + ''); if ($(this).data('type')) { $('.thumb-info-floating-caption-title', $(this)).append('
' + $(this).data('type') + '
').css({ 'padding-bottom': 22 }); } if ($(this).hasClass('thumb-info-floating-caption-clean')) { $('.thumb-info-floating-element', $(this)).addClass('bg-transparent'); } }); if ($('.thumb-info-floating-element-wrapper').length) { if (typeof gsap !== 'undefined') { $('.thumb-info-floating-element-wrapper').on('mouseenter', function(e) { if (!$(this).data('offset')) { $(this).data('offset', 0); } var offset = parseInt($(this).data('offset')); $('.thumb-info-floating-element-clone').remove(); $('.thumb-info-floating-element', $(this)).clone().addClass('thumb-info-floating-element-clone p-fixed p-events-none').attr('style', 'transform: scale(0.1);').removeClass('d-none').appendTo('body'); $('.thumb-info-floating-element-clone').css({ left: e.clientX + (offset), top: e.clientY + (offset) }).fadeIn(300); gsap.to('.thumb-info-floating-element-clone', 0.5, { css: { scaleX: 1, scaleY: 1 } }); $(document).off('mousemove').on('mousemove', function(e) { gsap.to('.thumb-info-floating-element-clone', 0.5, { css: { left: e.clientX + (offset), top: e.clientY + (offset) } }); }); }).on('mouseout', function() { gsap.to('.thumb-info-floating-element-clone', 0.5, { css: { scaleX: 0.5, scaleY: 0.5, opacity: 0 } }); }); } else { theme.fn.showErrorMessage('Failed to Load File', 'Failed to load: GSAP - Include the following file(s): (vendor/gsap/gsap.min.js)'); } } $(window).on('load', function() { $('.thumb-info-wrapper-direction-aware').each(function() { $(this).hoverdir({ speed: 300, easing: 'ease', hoverDelay: 0, inverse: false, hoverElem: '.thumb-info-wrapper-overlay' }); }); }); $('.thumb-info-container-full-img').each(function() { var $container = $(this); $('[data-full-width-img-src]', $container).each(function() { var uniqueId = 'img' + Math.floor(Math.random() * 10000); $(this).attr('data-rel', uniqueId); $container.append('
'); }); $('.thumb-info', $container).on('mouseenter', function(e) { $('.thumb-info-container-full-img-large').removeClass('active'); $('#' + $(this).attr('data-rel')).addClass('active'); }); }); $('[data-toggle-text-click]').on('click', function() { $(this).text(function(i, text) { return text === $(this).attr('data-toggle-text-click') ? $(this).attr('data-toggle-text-click-alt') : $(this).attr('data-toggle-text-click'); }); }); $('[data-toggle-class]').on('click', function(e) { e.preventDefault(); $(this).toggleClass($(this).data('porto-toggle-class')); }); if ($('.shape-divider').length) { aspectRatioSVG(); $(window).on('resize', function() { aspectRatioSVG(); }); } if ($('.shape-divider-horizontal-animation').length) { theme.fn.intObs('.shape-divider-horizontal-animation', function() { for (var i = 0; i <= 1; i++) { var svgClone = $(this).find('svg:nth-child(1)').clone(); $(this).append(svgClone) } $(this).addClass('start'); }, {}); } function aspectRatioSVG() { if ($(window).width() < 1950) { $('.shape-divider svg[preserveAspectRatio]').each(function() { if (!$(this).parent().hasClass('shape-divider-horizontal-animation')) { $(this).attr('preserveAspectRatio', 'xMinYMin'); } else { $(this).attr('preserveAspectRatio', 'none'); } }); } else { $('.shape-divider svg[preserveAspectRatio]').each(function() { $(this).attr('preserveAspectRatio', 'none'); }); } } $('[data-content-switcher]').on('change', function(e, v) { var switcherRel = ($(this).is(':checked') ? '1' : '2'), switcherId = $(this).attr('data-content-switcher-content-id'); $('[data-content-switcher-id=' + switcherId + ']').addClass('initialized').removeClass('active'); var $activeEl = $('[data-content-switcher-id=' + switcherId + '][data-content-switcher-rel=' + switcherRel + ']'); $activeEl.addClass('active'); $activeEl.parent().css('height', $activeEl.height()); }); $('[data-content-switcher]').trigger('change'); var $window = $(window); $window.on('resize dynamic.height.resize', function() { $('[data-dynamic-height]').each(function() { var $this = $(this), values = JSON.parse($this.data('dynamic-height').replace(/'/g, '"').replace(';', '')) if ($window.width() < 576) { $this.height(values[4]); } if ($window.width() > 575 && $window.width() < 768) { $this.height(values[3]); } if ($window.width() > 767 && $window.width() < 992) { $this.height(values[2]); } if ($window.width() > 991 && $window.width() < 1200) { $this.height(values[1]); } if ($window.width() > 1199) { $this.height(values[0]); } }); }); if ($window.width() < 992) { $window.trigger('dynamic.height.resize'); } if ($('[data-trigger-play-video]').length) { theme.fn.execOnceTroughEvent('[data-trigger-play-video]', 'mouseover.trigger.play.video', function() { var $video = $($(this).data('trigger-play-video')); $(this).on('click', function(e) { e.preventDefault(); if ($(this).data('trigger-play-video-remove') == 'yes') { $(this).animate({ opacity: 0 }, 300, function() { $video[0].play(); $(this).remove(); }); } else { setTimeout(function() { $video[0].play(); }, 300); } }); }); } if ($('video[data-auto-play]').length) { $(window).on('load', function() { $('video[data-auto-play]').each(function() { var $video = $(this); setTimeout(function() { if ($('#' + $video.attr('id')).length) { if ($('[data-trigger-play-video="#' + $video.attr('id') + '"]').data('trigger-play-video-remove') == 'yes') { $('[data-trigger-play-video="#' + $video.attr('id') + '"]').animate({ opacity: 0 }, 300, function() { $video[0].play(); $('[data-trigger-play-video="#' + $video.attr('id') + '"]').remove(); }); } else { setTimeout(function() { $video[0].play(); }, 300); } } }, 100); }); }); } if ($('[data-remove-min-height]').length) { $(window).on('load', function() { $('[data-remove-min-height]').each(function() { $(this).css({ 'min-height': 0 }); }); }); } document.addEventListener('lazybeforeunveil', function(e) { var bg = e.target.getAttribute('data-bg-src'); if (bg) { e.target.style.backgroundImage = 'url(' + bg + ')'; } }); if ($('[data-title-border]').length) { var $pageHeaderTitleBorder = $(''), $pageHeaderTitle = $('[data-title-border]'), $window = $(window); $pageHeaderTitle.before($pageHeaderTitleBorder); var setPageHeaderTitleBorderWidth = function() { $pageHeaderTitleBorder.width($pageHeaderTitle.width()); } $window.afterResize(function() { setPageHeaderTitleBorderWidth(); }); setPageHeaderTitleBorderWidth(); $pageHeaderTitleBorder.addClass('visible'); }(function($) { var $footerReveal = { $wrapper: $('.footer-reveal'), init: function() { var self = this; self.build(); self.events(); }, build: function() { var self = this, footer_height = self.$wrapper.outerHeight(true), window_height = ($(window).height() - $('.header-body').height()); if (footer_height > window_height) { $('#footer').removeClass('footer-reveal'); $('body').css('margin-bottom', 0); } else { $('#footer').addClass('footer-reveal'); $('body').css('margin-bottom', footer_height); } }, events: function() { var self = this, $window = $(window); $window.on('load', function() { $window.afterResize(function() { self.build(); }); }); } } if ($('.footer-reveal').length) { $footerReveal.init(); } })(jQuery); if ($('[data-reinit-plugin]').length) { $('[data-reinit-plugin]').on('click', function(e) { e.preventDefault(); var pluginInstance = $(this).data('reinit-plugin'), pluginFunction = $(this).data('reinit-plugin-function'), pluginElement = $(this).data('reinit-plugin-element'), pluginOptions = theme.fn.getOptions($(this).data('reinit-plugin-options')); $(pluginElement).data(pluginInstance).destroy(); setTimeout(function() { theme.fn.execPluginFunction(pluginFunction, $(pluginElement), pluginOptions); }, 1000); }); } if ($('[data-copy-to-clipboard]').length) { theme.fn.intObs('[data-copy-to-clipboard]', function() { var $this = $(this); $this.wrap('
'); var $copyButton = $('COPY'); $this.parent().prepend($copyButton); $copyButton.on('click', function(e) { e.preventDefault(); var $btn = $(this), $temp = $('