';
+
+ $('.thz-items-grid-categories').append($li);
+
+ }
+ });
+ }
+
+ });
+
+ self.ThzMasonryCats();
+
+ },
+
+
+ ThzMasonryNewitems: function(newItems, timeout, active_cat) {
+
+ var self = this;
+ var current_category = active_cat ? active_cat.replace('.','') : false;
+
+ if( active_cat && active_cat !='category_all' ){
+ newItems = newItems.sort(function (a, b) {
+ return $(b).hasClass(current_category) - $(a).hasClass(current_category);
+ });
+ }
+
+ newItems.imagesLoaded(function() {
+
+ newItems.find('.thz-grid-item-in').addClass('thz-new-grid-item');
+
+ if (self.settings.masonry === true) {
+
+ self.grid.append(newItems).isotope('appended', newItems);
+ self.ThzMasnorySizeItems();
+
+ } else {
+
+ if (self.grid.hasClass('thz-timeline-double')) {
+
+ newItems.each(function(index, element) {
+
+ if ($(element).hasClass('thz-timeline-item-left')) {
+
+ self.grid.find('.thz-timeline-left').append(element);
+
+ } else {
+
+ self.grid.find('.thz-timeline-right').append(element);
+
+ }
+
+ });
+
+ } else {
+
+ self.grid.append(newItems);
+ }
+
+ self.ThzPozLoader();
+
+ }
+ self.ThzMasonryItemsEffects(newItems, timeout);
+
+
+ });
+ },
+
+
+ });
+
+ $.fn[pluginName] = function(options) {
+ return this.each(function() {
+ if (!$.data(this, 'plugin_' + pluginName)) {
+ $.data(this, 'plugin_' + pluginName, new Plugin(this, options));
+ } else if (Plugin.prototype[options]) {
+ $.data(this, 'plugin_' + pluginName)[options]();
+ }
+ });
+ }
+
+
+})(jQuery, window, document); // JavaScript Document
\ No newline at end of file
diff --git a/assets/js/dev/ThzPanels.js b/assets/js/dev/ThzPanels.js
new file mode 100644
index 0000000..7efccd0
--- /dev/null
+++ b/assets/js/dev/ThzPanels.js
@@ -0,0 +1,236 @@
+ /**
+ * @plugin ThzPanels
+ * @version 1.0.0
+ * @package Thz Framework
+ * @copyright Copyright(C) since 2015 Themezly.com. All Rights Reserved.
+ * @author Themezly
+ * @license MIT License (MIT) http://www.opensource.org/licenses/mit-license.php
+ * @websites http://www.themezly.com | http://www.youjoomla.com
+ */
+;
+(function($, window, document, undefined) {
+
+ "use strict";
+
+ var pluginName = "ThzPanels",
+ defaults = {};
+
+ function Plugin(element, options) {
+ this.element = element;
+
+ this.settings = $.extend({}, defaults, options);
+ this._defaults = defaults;
+ this._name = pluginName;
+ this.init();
+ }
+
+
+ $.extend(Plugin.prototype, {
+ init: function() {
+
+ var self = this;
+
+
+ self.setPanel();
+
+ $(window).on('resize', function() {
+ self.panelResize();
+ });
+
+ },
+
+ panelResize: function () {
+
+ var self = this;
+
+ $('#thz_toppanel:not(.panelOpen)').each(function () {
+
+ var container = $(this).find('.thz-panel-content');
+ $(this).css({
+ 'height':container.height(),
+ 'top':-container.height()
+ });
+ $(this).find('.thz-panel-sizer').css('height',container.height());
+
+ });
+
+ $('#thz_botpanel:not(.panelOpen)').each(function () {
+
+ var container = $(this).find('.thz-panel-content');
+ $(this).css({
+ 'height':container.height(),
+ 'bottom':-container.height()
+ });
+ $(this).find('.thz-panel-sizer').css('height',container.height());
+
+ });
+
+ $('.panelOpen:not(#thz_sidepanel)').each(function () {
+
+ var container = $(this).find('.thz-panel-content');
+
+ $(this).stop(true).animate({
+ height: container.height()
+ });
+
+ $(this).find('.thz-panel-sizer').stop(true).animate({
+ height: container.height()
+ });
+ });
+ },
+
+
+ setPanel: function () {
+
+ var self = this;
+
+
+ $(document).on('click', function (event) {
+ event.stopImmediatePropagation();
+ if ($(event.target).parents('.panelOpen').length == 0) {
+ $('.panelOpen').find('.thz-panel-open').trigger('click');
+ }
+
+ });
+
+ $('.thz-panel-open').each(function () {
+
+ var panel = '#' +$(this).parent().attr('id');
+ var getDirection = $(panel).data('direction');
+ var tranSpeed = $(panel).data('speed');
+ var panelHeight = $(panel).find('.thz-panel-content').height();
+ var panelSizer = $(panel).find('.thz-panel-sizer');
+ var openerWidth = $(this).outerWidth();
+ var openerHeight = $(this).outerHeight();
+
+
+
+
+ switch (panel) {
+ case '#thz_toppanel':
+ case '#thz_botpanel':
+ var side = getDirection == 'top' ? 'bottom':'top';
+ $(this).css(side,- openerHeight);
+
+ $(panel).css('height', panelHeight);
+ $(panel).css(getDirection, -panelHeight);
+ $(panelSizer).css('height', panelHeight);
+ break;
+
+ case '#thz_sidepanel':
+
+ var panelWidth = $(panel).data('width');
+ $(panel).css('width', panelWidth);
+
+ if(getDirection == 'left'){
+
+ $(panel).css('left', '-'+panelWidth+'');
+
+ }else{
+
+ $(panel).css('right', '-'+panelWidth+'');
+ }
+
+ var side = getDirection == 'left' ? 'right':'left';
+ $(this).css(side,- openerWidth);
+
+ break;
+ }
+
+ $(this).click(function (e) {
+
+ e.preventDefault();
+ e.stopPropagation();
+ var getPoz = parseInt($(panel).css(getDirection));
+ switch (panel) {
+
+ case '#thz_toppanel':
+
+ if (getPoz < 0) {
+
+ $(panel).addClass('panelOpen');
+ $(panel).animate({
+ 'top': 0
+ }, tranSpeed);
+
+ } else {
+
+ $(panel).animate({
+ 'top': -$(panelSizer).height()
+ }, tranSpeed);
+
+ $(panel).removeClass('panelOpen');
+ }
+
+ break;
+
+ case '#thz_botpanel':
+
+ if (getPoz < 0) {
+ $(panel).addClass('panelOpen');
+ $(panel).animate({
+ 'bottom': 0
+ }, tranSpeed);
+ } else {
+
+ $(panel).animate({
+ 'bottom': -$(panelSizer).height()
+ }, tranSpeed);
+ $(panel).removeClass('panelOpen');
+ }
+
+ break;
+
+ case '#thz_sidepanel':
+
+ if (getPoz < 0) {
+ $(panel).addClass('panelOpen');
+ if(getDirection == 'right'){
+ $(panel).animate({
+ 'right': 0
+ }, tranSpeed);
+ }else{
+ $(panel).animate({
+ 'left': 0
+ }, tranSpeed);
+
+ }
+ } else {
+ if(getDirection == 'right'){
+ $(panel).animate({
+ 'right': -$(panel).width()
+ }, tranSpeed);
+ }else{
+ $(panel).animate({
+ 'left': -$(panel).width()
+ }, tranSpeed);
+ }
+ $(panel).removeClass('panelOpen');
+ }
+
+
+ break;
+ }
+
+ });
+
+ });
+
+ }
+
+
+
+
+ });
+
+ $.fn[pluginName] = function(options) {
+ return this.each(function() {
+ if (!$.data(this, 'plugin_' + pluginName)) {
+ $.data(this, 'plugin_' + pluginName, new Plugin(this, options));
+ } else if (Plugin.prototype[options]) {
+ $.data(this, 'plugin_' + pluginName)[options]();
+ }
+ });
+ }
+
+})(jQuery, window, document);
diff --git a/assets/js/dev/ThzParallax.js b/assets/js/dev/ThzParallax.js
new file mode 100644
index 0000000..06052fb
--- /dev/null
+++ b/assets/js/dev/ThzParallax.js
@@ -0,0 +1,374 @@
+/**
+ * @package Thz Parallax
+ * @copyright Copyright(C) FT Web Studio Inc since 2015. All Rights Reserved.
+ * @author Themezly
+ * @license MIT License (MIT) http://www.opensource.org/licenses/mit-license.php
+ * @websites http://www.themezly.com | http://www.youjoomla.com
+ */
+(function($) {
+
+ var $window = $(window);
+ var windowHeight = document.documentElement.clientHeight;
+ var windowWidth = document.documentElement.clientWidth;
+
+ $window.resize(function() {
+ windowHeight = document.documentElement.clientHeight;
+ windowWidth = document.documentElement.clientWidth;
+ });
+
+ $.fn.ThzParallax = function(options) {
+
+ var defaults = {
+ velocity: 0.3,
+ direction: 'up',
+ scale: '',
+ onmobile:0,
+ size:'full'
+ };
+ var self = this,
+ options = $.extend({}, defaults, options),
+ ThzParallaxes = [], // global array
+ scrollTopMin,
+ scrollTopMax,
+ moveMax,
+ Thz3d = ThzHas3d();
+
+
+ function Thzinit() {
+
+ if( self.length == 0){
+ return;
+ }
+
+ self.each(function(index, el) {
+
+ var $this = $(el);
+ var $c_tr = $this.ThzGetTransform({
+ current:true
+ });
+
+ options.velocity = $this.attr('data-thzplx-velocity') ? parseFloat($this.data('thzplx-velocity') / 10) : options.velocity;
+ options.direction = $this.attr('data-thzplx-direction') ? $this.data('thzplx-direction') : options.direction;
+ options.scale = $this.attr('data-thzplx-scale') ? $this.data('thzplx-scale') : options.scale;
+ options.onmobile = $this.attr('data-thzplx-onmobile') ? $this.data('thzplx-onmobile') :options.onmobile;
+ options.size = $this.attr('data-thzplx-size') ? $this.data('thzplx-size') :options.size;
+ options.in_sticky = $this.attr('data-thzplx-insticky') ? true : false;
+
+ // hide on mobiles | if set to 1 than show
+ if(navigator.userAgent.match(/Mobi/) && options.onmobile === 0){
+ $(el).addClass('thz-no-mobile-parallax');
+ return;
+
+ }
+
+ // set widths and positions
+
+ ThzSetDimensions(el, options, $c_tr);
+
+ // push all info in to global array
+ var parallaxItem = {};
+
+ parallaxItem.element = $this;
+ parallaxItem.height = $this.outerHeight();
+ parallaxItem.width = $this.outerWidth();
+ parallaxItem.parentTop = $this.parent().offset().top;
+ parallaxItem.direction = options.direction;
+ parallaxItem.velocity = options.velocity;
+ parallaxItem.scale = options.scale;
+ parallaxItem.scrollTopMin = scrollTopMin;
+ parallaxItem.scrollTopMax = scrollTopMax;
+ parallaxItem.moveMax = moveMax;
+ parallaxItem.c_tr = $c_tr ? ' ' + $c_tr : '';
+
+ ThzParallaxes.push(parallaxItem);
+
+
+ });
+
+ }
+
+
+ // set dimensions
+ function ThzSetDimensions(el, options, current_transform) {
+
+ var element = $(el);
+ var myparent = element.parent();
+ var direction = options.direction;
+ var size = options.size;
+ var velocity = options.velocity;
+ var getWidth = isNaN(parseFloat(size)) ? myparent.outerWidth() : parseFloat(size) ;
+ var getHeight = myparent.outerHeight();
+ var getTop = myparent.offset().top;
+
+
+ var upWidth = 250 * Math.abs(parseFloat(velocity));
+ var upHeight = 350 * Math.abs(parseFloat(velocity));
+
+ // var setHeight = direction == 'down' || direction == 'fixed'? (getHeight + upHeight) * 1.3 : getHeight + upHeight;
+ var setWidth = direction == 'left' || direction == 'right' ? getWidth + upWidth : getWidth;
+ var setHeight = getHeight + upHeight;
+
+ var setTop = direction == 'down' ? getHeight - setHeight : 0;
+ // var setTop = 0;
+ var setLeft = direction == 'right' ? getWidth - setWidth : 0;
+
+ var scrollTopMinV = 0;
+ var scrollTopMaxV = getTop + getHeight;
+
+ if (getTop > windowHeight) {
+ scrollTopMinV = getTop - windowHeight;
+ }
+
+ moveMax = direction == 'left' || direction == 'right' ? setWidth - getWidth : setHeight - getHeight;
+ scrollTopMin = scrollTopMinV;
+ scrollTopMax = scrollTopMaxV;
+ elemDirection = direction;
+ elemVelocity = velocity;
+
+
+ if(size === 'custom') {
+
+ element.addClass('thz-parallaxing');
+
+ }else{
+
+ element.css({
+
+ height: setHeight + 'px',
+ width: setWidth + 'px',
+ top: setTop + 'px',
+ left: setLeft + 'px',
+ 'transform': ThzTranslate('0px','0px') + current_transform
+
+ }).addClass('thz-parallaxing');
+
+ }
+
+ }
+
+ // run parallax
+ function ThzRunParallax() {
+
+ for (i = 0; i < ThzParallaxes.length; i++) {
+ ThzParallaxItems(ThzParallaxes[i]);
+ }
+
+ }
+
+ // on scroll
+ function ThzOnScroll() {
+
+ for (var i = 0, len = ThzParallaxes.length; i < len; i++) {
+
+ var $element = ThzParallaxes[i].element.parent();
+
+ // check if visible
+ if ($element.ThzIsVisible(200)) {
+ ThzParallaxItems(ThzParallaxes[i]);
+ }
+
+ }
+
+ }
+
+ // check for transform
+ function ThzHas3d() {
+
+ if (!window.getComputedStyle) {
+ return false;
+ }
+
+ var el = document.createElement('p'),
+ has3d,
+ transforms = {
+ 'webkitTransform':'-webkit-transform',
+ 'OTransform':'-o-transform',
+ 'msTransform':'-ms-transform',
+ 'MozTransform':'-moz-transform',
+ 'transform':'transform'
+ };
+
+ // Add it to the body to get the computed style.
+ document.body.insertBefore(el, null);
+
+ for (var t in transforms) {
+ if (el.style[t] !== undefined) {
+ el.style[t] = "translate3d(1px,1px,1px)";
+ has3d = window.getComputedStyle(el).getPropertyValue(transforms[t]);
+ }
+ }
+
+ document.body.removeChild(el);
+
+ return (has3d !== undefined && has3d.length > 0 && has3d !== "none");
+ }
+
+
+ // translate based on transform check. fallback to 2d
+ function ThzTranslate(x,y){
+
+ if(Thz3d){
+ return 'translate3d('+x+','+y+',0px)';
+ }
+
+ return 'translate('+x+','+y+')';
+
+ }
+
+
+ // parallax
+ function ThzParallaxItems(el) {
+
+
+ var $element = $(el.element);
+ var scrollTop = $window.scrollTop();
+ var velocity = el.velocity;
+ var direction = el.direction;
+ var current_transform = el.c_tr;
+
+ if(options.in_sticky){
+ if (direction === 'down' || direction === 'up') {
+ if(scrollTop > ($element.outerHeight() - el.moveMax)){
+ return;
+ }
+ }
+ if (direction === 'left' || direction === 'right') {
+
+ if(scrollTop > ($element.parent().outerHeight() - el.moveMax)){
+ return;
+ }
+
+ }
+ if(direction === 'fixed'){
+ return;
+ }
+ }
+
+ var scale = el.scale;
+ var elemScale = ThzParallaxScale(el, scrollTop);
+
+ var scrollPercentage = (scrollTop - el.scrollTopMin) / (el.scrollTopMax - el.scrollTopMin);
+
+ var elemMove = el.moveMax * scrollPercentage;
+ var mesunit = 'px';
+
+ if (direction === 'left' || direction === 'up') {
+ elemMove *= -1;
+ }
+
+ elemMove = Math.round(elemMove);
+
+
+ var transform = elemScale + ThzTranslate('0px',elemMove + mesunit);
+
+ if (direction === 'left' || direction === 'right') {
+
+ transform = elemScale + ThzTranslate(elemMove + mesunit,'0px');
+ }
+
+ if(direction === 'fixed'){
+
+ elemMove = Math.round((el.parentTop - scrollTop));
+ elemMove *= -1;
+
+ transform = elemScale + ThzTranslate('0px',elemMove + mesunit);
+ }
+
+ if ($element.hasClass('thz-animate')) {
+
+ $element.off("thz:animation:done").on('thz:animation:done', function(e) {
+
+ $element.addClass('thz-starting-parallax');
+
+ setTimeout(function (){
+ $element.css({
+ 'transform': transform + current_transform
+ });
+ },1);
+
+ setTimeout(function (){
+ $element.removeClass('thz-starting-parallax');
+ },401);
+
+ });
+
+ }else{
+
+ $element.css({
+ 'transform': transform + current_transform
+ });
+ }
+
+
+ }
+
+
+ // scale
+ function ThzParallaxScale(el, scrollTop) {
+
+
+ var velocity = el.velocity;
+ var direction = el.direction;
+ var elemScale = '';
+
+ if(direction === 'fixed') return elemScale;
+
+
+ var scale = el.scale;
+ if (scale === 'up') {
+ var scaleCalc = 1 + (scrollTop * 0.0002);
+ if (scaleCalc < 1) {
+ scaleCalc = 1;
+ }
+ scaleCalc = scaleCalc + 0.001;
+ elemScale = 'scale3d(' + scaleCalc + ',' + scaleCalc + ',1) ';
+ }
+
+ if (scale === 'down') {
+ var scaleCalc = 1 - (scrollTop * 0.0002);
+ if (scaleCalc > 1) {
+ scaleCalc = 1;
+ }
+
+ //scaleCalc = scaleCalc - 0.01;
+ elemScale = 'scale3d(' + scaleCalc + ',' + scaleCalc + ',1) ';
+ }
+
+ return elemScale;
+ }
+
+
+ var ThzWait = (function () {
+ var timers = {};
+ return function (callback, ms, uniqueId) {
+ if (!uniqueId) {
+ uniqueId = "Don't call this twice without a uniqueId";
+ }
+ if (timers[uniqueId]) {
+ clearTimeout (timers[uniqueId]);
+ }
+ timers[uniqueId] = setTimeout(callback, ms);
+ };
+ })();
+
+ function ThzListeners() {
+
+ $window.resize(function () {
+ ThzWait(function(){
+ Thzinit();
+ ThzRunParallax();
+ }, 150, "thzparallax resized");
+ });
+ $window.on('scroll touchmove', function() {
+ requestAnimationFrame(ThzOnScroll);
+ });
+
+ }
+
+ Thzinit();
+ ThzRunParallax();
+ ThzListeners();
+
+ };
+
+})(jQuery);
\ No newline at end of file
diff --git a/assets/js/dev/ThzParallaxOver.js b/assets/js/dev/ThzParallaxOver.js
new file mode 100644
index 0000000..92ee40b
--- /dev/null
+++ b/assets/js/dev/ThzParallaxOver.js
@@ -0,0 +1,138 @@
+/**
+ * @plugin ThzParallaxOver
+ * @version 1.0.0
+ * @package Thz Framework
+ * @copyright Copyright(C) since 2015 Themezly.com. All Rights Reserved.
+ * @author Themezly
+ * @license MIT License (MIT) http://www.opensource.org/licenses/mit-license.php
+ * @websites http://www.themezly.com | http://www.youjoomla.com
+ */
+(function($) {
+
+ var $window = $(window);
+ var windowHeight = $window.height();
+
+ $window.resize(function() {
+ windowHeight = $window.height();
+ });
+
+ $.fn.thz_parallax_over = function(effectSpeed, effectElement) {
+
+ var $this = $(this);
+
+ if( $this.length == 0 ){
+ return;
+ }
+
+ var Thz3d = ThzHas3d();
+
+ // check for transform
+ function ThzHas3d() {
+
+ if (!window.getComputedStyle) {
+ return false;
+ }
+
+ var el = document.createElement('p'),
+ has3d,
+ transforms = {
+ 'webkitTransform':'-webkit-transform',
+ 'OTransform':'-o-transform',
+ 'msTransform':'-ms-transform',
+ 'MozTransform':'-moz-transform',
+ 'transform':'transform'
+ };
+
+ // Add it to the body to get the computed style.
+ document.body.insertBefore(el, null);
+
+ for (var t in transforms) {
+ if (el.style[t] !== undefined) {
+ el.style[t] = "translate3d(1px,1px,1px)";
+ has3d = window.getComputedStyle(el).getPropertyValue(transforms[t]);
+ }
+ }
+
+ document.body.removeChild(el);
+
+ return (has3d !== undefined && has3d.length > 0 && has3d !== "none");
+ }
+
+
+ // translate based on transform check. fallback to 2d
+ function ThzTranslate(x,y){
+
+ if(Thz3d){
+ return 'translate3d('+x+','+y+',0px)';
+ }
+
+ return 'translate('+x+','+y+')';
+
+ }
+
+ function runEffect() {
+
+ var windowScroll = $window.scrollTop();
+
+ $this.each(function(index, element) {
+
+ var $element = $(this);
+ var $c_tr = $element.ThzGetTransform({
+ current:true
+ });
+
+ if ($element.attr('data-parallaxspeed')) {
+
+ effectSpeed = $element.attr('data-parallaxspeed');
+ }
+
+ var elementHeight = $element.outerHeight();
+ var elementTop = $element.offset().top;
+ var elementPoz = elementTop - windowScroll;
+ var elementVisible = elementPoz + elementHeight;
+ var moveSpeed = effectSpeed != undefined ? effectSpeed : 40;
+ var speedCalc = moveSpeed / 100;
+ var elementMove = 0;
+ var moveContainer = effectElement != undefined ? effectElement : '.thz-container';
+ var curr_transform = $c_tr ? ' ' + $c_tr : '';
+
+ if (elementVisible <= windowHeight && elementPoz <= 0) {
+ if (elementHeight > windowHeight) {
+ var elementMove = (windowHeight - elementVisible) * speedCalc;
+ } else {
+ var elementMove = -(elementPoz * speedCalc);
+ }
+ if (elementMove < 0) {
+ elementMove = 0;
+ }
+ } else {
+ elementMove = 0;
+ }
+
+ var mesunit ='px';
+ var transform = 'translate3d(0px,' + elementMove + mesunit + ',0px)';
+
+ $element.find(moveContainer).each(function(index, container) {
+
+ $(container).css({
+ // bottom: "-" + elementMove + "px"
+ 'transform': ThzTranslate('0px',elementMove + mesunit) + curr_transform
+ });
+
+ });
+
+
+ });
+
+ }
+ $(window).on('scroll', function() {
+ requestAnimationFrame(runEffect);
+ });
+ $(window).on('resize', function() {
+ requestAnimationFrame(runEffect);
+ });
+
+
+ };
+
+})(jQuery);
diff --git a/assets/js/dev/ThzScrollFade.js b/assets/js/dev/ThzScrollFade.js
new file mode 100644
index 0000000..9efbd06
--- /dev/null
+++ b/assets/js/dev/ThzScrollFade.js
@@ -0,0 +1,98 @@
+ /**
+ * @plugin ThzScrollFade
+ * @version 1.0.0
+ * @package Thz Framework
+ * @copyright Copyright(C) since 2015 Themezly.com. All Rights Reserved.
+ * @author Themezly
+ * @license MIT License (MIT) http://www.opensource.org/licenses/mit-license.php
+ * @websites http://www.themezly.com | http://www.youjoomla.com
+ */
+(function($) {
+
+ var $window = $(window);
+ var windowHeight = $window.height();
+
+ $window.resize(function() {
+ windowHeight = $window.height();
+ });
+
+ $.fn.thz_scroll_fade = function(startFadeAt) {
+
+ var $this = $(this);
+
+ if( $this.length == 0 ){
+ return;
+ }
+
+ function runEffect() {
+
+ var windowScroll = $window.scrollTop();
+
+ $this.each(function(index, element) {
+
+ var $element = $(this);
+
+ if ($element.attr('data-fadestart')) {
+
+ startFadeAt = $element.attr('data-fadestart');
+ }
+
+ var percentage = startFadeAt != undefined ? startFadeAt : 40;
+ var percentCalc = (100 - percentage) / 100;
+ var elementHeight = $element.outerHeight();
+ var elementTop = $element.offset().top;
+ var elementPoz = elementTop - windowScroll;
+ var elementBottom = elementPoz + elementHeight;
+ var elementOpacity = 1;
+ var elementVisible = windowHeight - (windowHeight * percentCalc);
+ var setOpacity = (elementVisible - elementBottom) / elementVisible;
+ var effectElement = $element;
+
+ if ($element.attr('data-whattofade')) {
+
+ effectElement = $element.find($element.attr('data-whattofade'));
+ }
+
+ if (setOpacity > 0){
+ elementOpacity = 1 - setOpacity;
+ }
+
+ var setOpacity = function(){
+
+ if (elementBottom <= elementVisible) {
+ if (elementOpacity < 0) {
+ elementOpacity = 0;
+ } else if (elementOpacity > 1) {
+ elementOpacity = 1;
+ }
+ effectElement.css({
+ 'opacity': elementOpacity
+ });
+ } else {
+ effectElement.css({
+ 'opacity': elementOpacity
+ });
+ }
+
+ }
+
+ if ($element.hasClass('thz-animate')) {
+
+ $element.on('thz:animation:done', function(e) {
+ setOpacity();
+ });
+
+ }else{
+ setOpacity();
+ }
+
+ });
+
+ }
+
+ $window.bind('scroll', runEffect).resize(runEffect);
+ runEffect();
+
+ };
+
+})(jQuery);
diff --git a/assets/js/dev/ThzSmoothScroll.js b/assets/js/dev/ThzSmoothScroll.js
new file mode 100644
index 0000000..d707786
--- /dev/null
+++ b/assets/js/dev/ThzSmoothScroll.js
@@ -0,0 +1,765 @@
+ThzSmoothScroll = function($options) {
+ //
+ // SmoothScroll for websites v1.4.6 (Balazs Galambosi)
+ // http://www.smoothscroll.net/
+ //
+ // Licensed under the terms of the MIT license.
+ //
+ // You may use it in your theme if you credit me.
+ // It is also free to use on any individual website.
+ //
+ // Exception:
+ // The only restriction is to not publish any
+ // extension for browsers or native application
+ // without getting a written permission first.
+ //
+
+ (function () {
+
+
+ var extend = function(out) {
+ out = out || {};
+ for (var i = 1; i < arguments.length; i++) {
+ if (!arguments[i])
+ continue;
+
+ for (var key in arguments[i]) {
+ if (arguments[i].hasOwnProperty(key))
+ out[key] = arguments[i][key];
+ }
+ }
+ return out;
+ };
+
+
+ // Scroll Variables (tweakable)
+ var defaultOptions = {
+
+ // Scrolling Core
+ frameRate : 150, // [Hz]
+ animationTime : 600, // [ms]
+ stepSize : 100, // [px]
+
+ // Pulse (less tweakable)
+ // ratio of "tail" to "acceleration"
+ pulseAlgorithm : true,
+ pulseScale : 4,
+ pulseNormalize : 1,
+
+ // Acceleration
+ accelerationDelta : 50, // 50
+ accelerationMax : 3, // 3
+
+ // Keyboard Settings
+ keyboardSupport : true, // option
+ arrowScroll : 50, // [px]
+
+ // Other
+ fixedBackground : true,
+ excluded : ''
+ };
+
+ var options = extend(defaultOptions, $options);
+
+ // Other Variables
+ var isExcluded = false;
+ var isFrame = false;
+ var direction = { x: 0, y: 0 };
+ var initDone = false;
+ var root = document.documentElement;
+ var activeElement;
+ var observer;
+ var refreshSize;
+ var deltaBuffer = [];
+ var isMac = /^Mac/.test(navigator.platform);
+
+ var key = { left: 37, up: 38, right: 39, down: 40, spacebar: 32,
+ pageup: 33, pagedown: 34, end: 35, home: 36 };
+ var arrowKeys = { 37: 1, 38: 1, 39: 1, 40: 1 };
+
+ /***********************************************
+ * INITIALIZE
+ ***********************************************/
+
+ /**
+ * Tests if smooth scrolling is allowed. Shuts down everything if not.
+ */
+ function initTest() {
+ if (options.keyboardSupport) {
+ addEvent('keydown', keydown);
+ }
+ }
+
+ /**
+ * Sets up scrolls array, determines if frames are involved.
+ */
+ function init() {
+
+ if (initDone || !document.body) return;
+
+ initDone = true;
+
+ var body = document.body;
+ var html = document.documentElement;
+ var windowHeight = window.innerHeight;
+ var scrollHeight = body.scrollHeight;
+
+ // check compat mode for root element
+ root = (document.compatMode.indexOf('CSS') >= 0) ? html : body;
+ activeElement = body;
+
+ initTest();
+
+ // Checks if this script is running in a frame
+ if (top != self) {
+ isFrame = true;
+ }
+
+ /**
+ * Safari 10 fixed it, Chrome fixed it in v45:
+ * This fixes a bug where the areas left and right to
+ * the content does not trigger the onmousewheel event
+ * on some pages. e.g.: html, body { height: 100% }
+ */
+ else if (isOldSafari &&
+ scrollHeight > windowHeight &&
+ (body.offsetHeight <= windowHeight ||
+ html.offsetHeight <= windowHeight)) {
+
+ var fullPageElem = document.createElement('div');
+ fullPageElem.style.cssText = 'position:absolute; z-index:-10000; ' +
+ 'top:0; left:0; right:0; height:' +
+ root.scrollHeight + 'px';
+ document.body.appendChild(fullPageElem);
+
+ // DOM changed (throttled) to fix height
+ var pendingRefresh;
+ refreshSize = function () {
+ if (pendingRefresh) return; // could also be: clearTimeout(pendingRefresh);
+ pendingRefresh = setTimeout(function () {
+ if (isExcluded) return; // could be running after cleanup
+ fullPageElem.style.height = '0';
+ fullPageElem.style.height = root.scrollHeight + 'px';
+ pendingRefresh = null;
+ }, 500); // act rarely to stay fast
+ };
+
+ setTimeout(refreshSize, 10);
+
+ addEvent('resize', refreshSize);
+
+ // TODO: attributeFilter?
+ var config = {
+ attributes: true,
+ childList: true,
+ characterData: false
+ // subtree: true
+ };
+
+ observer = new MutationObserver(refreshSize);
+ observer.observe(body, config);
+
+ if (root.offsetHeight <= windowHeight) {
+ var clearfix = document.createElement('div');
+ clearfix.style.clear = 'both';
+ body.appendChild(clearfix);
+ }
+ }
+
+ // disable fixed background
+ if (!options.fixedBackground && !isExcluded) {
+ body.style.backgroundAttachment = 'scroll';
+ html.style.backgroundAttachment = 'scroll';
+ }
+ }
+
+ /**
+ * Removes event listeners and other traces left on the page.
+ */
+ function cleanup() {
+ observer && observer.disconnect();
+ removeEvent(wheelEvent, wheel);
+ removeEvent('mousedown', mousedown);
+ removeEvent('keydown', keydown);
+ removeEvent('resize', refreshSize);
+ removeEvent('load', init);
+ }
+
+
+ /************************************************
+ * SCROLLING
+ ************************************************/
+
+ var que = [];
+ var pending = false;
+ var lastScroll = Date.now();
+
+ /**
+ * Pushes scroll actions to the scrolling queue.
+ */
+ function scrollArray(elem, left, top) {
+
+ directionCheck(left, top);
+
+ if (options.accelerationMax != 1) {
+ var now = Date.now();
+ var elapsed = now - lastScroll;
+ if (elapsed < options.accelerationDelta) {
+ var factor = (1 + (50 / elapsed)) / 2;
+ if (factor > 1) {
+ factor = Math.min(factor, options.accelerationMax);
+ left *= factor;
+ top *= factor;
+ }
+ }
+ lastScroll = Date.now();
+ }
+
+ // push a scroll command
+ que.push({
+ x: left,
+ y: top,
+ lastX: (left < 0) ? 0.99 : -0.99,
+ lastY: (top < 0) ? 0.99 : -0.99,
+ start: Date.now()
+ });
+
+ // don't act if there's a pending queue
+ if (pending) {
+ return;
+ }
+
+ var scrollWindow = (elem === document.body);
+
+ var step = function (time) {
+
+ var now = Date.now();
+ var scrollX = 0;
+ var scrollY = 0;
+
+ for (var i = 0; i < que.length; i++) {
+
+ var item = que[i];
+ var elapsed = now - item.start;
+ var finished = (elapsed >= options.animationTime);
+
+ // scroll position: [0, 1]
+ var position = (finished) ? 1 : elapsed / options.animationTime;
+
+ // easing [optional]
+ if (options.pulseAlgorithm) {
+ position = pulse(position);
+ }
+
+ // only need the difference
+ var x = (item.x * position - item.lastX) >> 0;
+ var y = (item.y * position - item.lastY) >> 0;
+
+ // add this to the total scrolling
+ scrollX += x;
+ scrollY += y;
+
+ // update last values
+ item.lastX += x;
+ item.lastY += y;
+
+ // delete and step back if it's over
+ if (finished) {
+ que.splice(i, 1); i--;
+ }
+ }
+
+ // scroll left and top
+ if (scrollWindow) {
+ window.scrollBy(scrollX, scrollY);
+ }
+ else {
+ if (scrollX) elem.scrollLeft += scrollX;
+ if (scrollY) elem.scrollTop += scrollY;
+ }
+
+ // clean up if there's nothing left to do
+ if (!left && !top) {
+ que = [];
+ }
+
+ if (que.length) {
+ requestFrame(step, elem, (1000 / options.frameRate + 1));
+ } else {
+ pending = false;
+ }
+ };
+
+ // start a new queue of actions
+ requestFrame(step, elem, 0);
+ pending = true;
+ }
+
+
+ /***********************************************
+ * EVENTS
+ ***********************************************/
+
+ /**
+ * Mouse wheel handler.
+ * @param {Object} event
+ */
+ function wheel(event) {
+
+ if (!initDone) {
+ init();
+ }
+
+ var target = event.target;
+
+ // leave early if default action is prevented
+ // or it's a zooming event with CTRL
+ if (event.defaultPrevented || event.ctrlKey) {
+ return true;
+ }
+
+ // leave embedded content alone (flash & pdf)
+ if (isNodeName(activeElement, 'embed') ||
+ (isNodeName(target, 'embed') && /\.pdf/i.test(target.src)) ||
+ isNodeName(activeElement, 'object') ||
+ target.shadowRoot) {
+ return true;
+ }
+
+ var deltaX = -event.wheelDeltaX || event.deltaX || 0;
+ var deltaY = -event.wheelDeltaY || event.deltaY || 0;
+
+ if (isMac) {
+ if (event.wheelDeltaX && isDivisible(event.wheelDeltaX, 120)) {
+ deltaX = -120 * (event.wheelDeltaX / Math.abs(event.wheelDeltaX));
+ }
+ if (event.wheelDeltaY && isDivisible(event.wheelDeltaY, 120)) {
+ deltaY = -120 * (event.wheelDeltaY / Math.abs(event.wheelDeltaY));
+ }
+ }
+
+ // use wheelDelta if deltaX/Y is not available
+ if (!deltaX && !deltaY) {
+ deltaY = -event.wheelDelta || 0;
+ }
+
+ // line based scrolling (Firefox mostly)
+ if (event.deltaMode === 1) {
+ deltaX *= 40;
+ deltaY *= 40;
+ }
+
+ var overflowing = overflowingAncestor(target);
+
+ // nothing to do if there's no element that's scrollable
+ if (!overflowing) {
+ // except Chrome iframes seem to eat wheel events, which we need to
+ // propagate up, if the iframe has nothing overflowing to scroll
+ if (isFrame && isChrome) {
+ // change target to iframe element itself for the parent frame
+ Object.defineProperty(event, "target", {value: window.frameElement});
+ return parent.wheel(event);
+ }
+ return true;
+ }
+
+ // check if it's a touchpad scroll that should be ignored
+ if (isTouchpad(deltaY)) {
+ return true;
+ }
+
+ // scale by step size
+ // delta is 120 most of the time
+ // synaptics seems to send 1 sometimes
+ if (Math.abs(deltaX) > 1.2) {
+ deltaX *= options.stepSize / 120;
+ }
+ if (Math.abs(deltaY) > 1.2) {
+ deltaY *= options.stepSize / 120;
+ }
+
+ scrollArray(overflowing, deltaX, deltaY);
+ event.preventDefault();
+ scheduleClearCache();
+ }
+
+ /**
+ * Keydown event handler.
+ * @param {Object} event
+ */
+ function keydown(event) {
+
+ var target = event.target;
+ var modifier = event.ctrlKey || event.altKey || event.metaKey ||
+ (event.shiftKey && event.keyCode !== key.spacebar);
+
+ // our own tracked active element could've been removed from the DOM
+ if (!document.body.contains(activeElement)) {
+ activeElement = document.activeElement;
+ }
+
+ // do nothing if user is editing text
+ // or using a modifier key (except shift)
+ // or in a dropdown
+ // or inside interactive elements
+ var inputNodeNames = /^(textarea|select|embed|object)$/i;
+ var buttonTypes = /^(button|submit|radio|checkbox|file|color|image)$/i;
+ if ( event.defaultPrevented ||
+ inputNodeNames.test(target.nodeName) ||
+ isNodeName(target, 'input') && !buttonTypes.test(target.type) ||
+ isNodeName(activeElement, 'video') ||
+ isInsideYoutubeVideo(event) ||
+ target.isContentEditable ||
+ modifier ) {
+ return true;
+ }
+
+ // [spacebar] should trigger button press, leave it alone
+ if ((isNodeName(target, 'button') ||
+ isNodeName(target, 'input') && buttonTypes.test(target.type)) &&
+ event.keyCode === key.spacebar) {
+ return true;
+ }
+
+ // [arrwow keys] on radio buttons should be left alone
+ if (isNodeName(target, 'input') && target.type == 'radio' &&
+ arrowKeys[event.keyCode]) {
+ return true;
+ }
+
+ var shift, x = 0, y = 0;
+ var overflowing = overflowingAncestor(activeElement);
+
+ if (!overflowing) {
+ // Chrome iframes seem to eat key events, which we need to
+ // propagate up, if the iframe has nothing overflowing to scroll
+ return (isFrame && isChrome) ? parent.keydown(event) : true;
+ }
+
+ var clientHeight = overflowing.clientHeight;
+
+ if (overflowing == document.body) {
+ clientHeight = window.innerHeight;
+ }
+
+ switch (event.keyCode) {
+ case key.up:
+ y = -options.arrowScroll;
+ break;
+ case key.down:
+ y = options.arrowScroll;
+ break;
+ case key.spacebar: // (+ shift)
+ shift = event.shiftKey ? 1 : -1;
+ y = -shift * clientHeight * 0.9;
+ break;
+ case key.pageup:
+ y = -clientHeight * 0.9;
+ break;
+ case key.pagedown:
+ y = clientHeight * 0.9;
+ break;
+ case key.home:
+ y = -overflowing.scrollTop;
+ break;
+ case key.end:
+ var scroll = overflowing.scrollHeight - overflowing.scrollTop;
+ var scrollRemaining = scroll - clientHeight;
+ y = (scrollRemaining > 0) ? scrollRemaining + 10 : 0;
+ break;
+ case key.left:
+ x = -options.arrowScroll;
+ break;
+ case key.right:
+ x = options.arrowScroll;
+ break;
+ default:
+ return true; // a key we don't care about
+ }
+
+ scrollArray(overflowing, x, y);
+ event.preventDefault();
+ scheduleClearCache();
+ }
+
+ /**
+ * Mousedown event only for updating activeElement
+ */
+ function mousedown(event) {
+ activeElement = event.target;
+ }
+
+
+ /***********************************************
+ * OVERFLOW
+ ***********************************************/
+
+ var uniqueID = (function () {
+ var i = 0;
+ return function (el) {
+ return el.uniqueID || (el.uniqueID = i++);
+ };
+ })();
+
+ var cache = {}; // cleared out after a scrolling session
+ var clearCacheTimer;
+
+ //setInterval(function () { cache = {}; }, 10 * 1000);
+
+ function scheduleClearCache() {
+ clearTimeout(clearCacheTimer);
+ clearCacheTimer = setInterval(function () { cache = {}; }, 1*1000);
+ }
+
+ function setCache(elems, overflowing) {
+ for (var i = elems.length; i--;)
+ cache[uniqueID(elems[i])] = overflowing;
+ return overflowing;
+ }
+
+ // (body) (root)
+ // | hidden | visible | scroll | auto |
+ // hidden | no | no | YES | YES |
+ // visible | no | YES | YES | YES |
+ // scroll | no | YES | YES | YES |
+ // auto | no | YES | YES | YES |
+
+ function overflowingAncestor(el) {
+ var elems = [];
+ var body = document.body;
+ var rootScrollHeight = root.scrollHeight;
+ do {
+ var cached = cache[uniqueID(el)];
+ if (cached) {
+ return setCache(elems, cached);
+ }
+ elems.push(el);
+ if (rootScrollHeight === el.scrollHeight) {
+ var topOverflowsNotHidden = overflowNotHidden(root) && overflowNotHidden(body);
+ var isOverflowCSS = topOverflowsNotHidden || overflowAutoOrScroll(root);
+ if (isFrame && isContentOverflowing(root) ||
+ !isFrame && isOverflowCSS) {
+ return setCache(elems, getScrollRoot());
+ }
+ } else if (isContentOverflowing(el) && overflowAutoOrScroll(el)) {
+ return setCache(elems, el);
+ }
+ } while (el = el.parentElement);
+ }
+
+ function isContentOverflowing(el) {
+ return (el.clientHeight + 10 < el.scrollHeight);
+ }
+
+ // typically for and
+ function overflowNotHidden(el) {
+ var overflow = getComputedStyle(el, '').getPropertyValue('overflow-y');
+ return (overflow !== 'hidden');
+ }
+
+ // for all other elements
+ function overflowAutoOrScroll(el) {
+ var overflow = getComputedStyle(el, '').getPropertyValue('overflow-y');
+ return (overflow === 'scroll' || overflow === 'auto');
+ }
+
+
+ /***********************************************
+ * HELPERS
+ ***********************************************/
+
+ function addEvent(type, fn) {
+ window.addEventListener(type, fn, false);
+ }
+
+ function removeEvent(type, fn) {
+ window.removeEventListener(type, fn, false);
+ }
+
+ function isNodeName(el, tag) {
+ return (el.nodeName||'').toLowerCase() === tag.toLowerCase();
+ }
+
+ function directionCheck(x, y) {
+ x = (x > 0) ? 1 : -1;
+ y = (y > 0) ? 1 : -1;
+ if (direction.x !== x || direction.y !== y) {
+ direction.x = x;
+ direction.y = y;
+ que = [];
+ lastScroll = 0;
+ }
+ }
+
+ var deltaBufferTimer;
+
+ if (window.localStorage && localStorage.SS_deltaBuffer) {
+ try { // #46 Safari throws in private browsing for localStorage
+ deltaBuffer = localStorage.SS_deltaBuffer.split(',');
+ } catch (e) { }
+ }
+
+ function isTouchpad(deltaY) {
+ if (!deltaY) return;
+ if (!deltaBuffer.length) {
+ deltaBuffer = [deltaY, deltaY, deltaY];
+ }
+ deltaY = Math.abs(deltaY);
+ deltaBuffer.push(deltaY);
+ deltaBuffer.shift();
+ clearTimeout(deltaBufferTimer);
+ deltaBufferTimer = setTimeout(function () {
+ try { // #46 Safari throws in private browsing for localStorage
+ localStorage.SS_deltaBuffer = deltaBuffer.join(',');
+ } catch (e) { }
+ }, 1000);
+ return !allDeltasDivisableBy(120) && !allDeltasDivisableBy(100);
+ }
+
+ function isDivisible(n, divisor) {
+ return (Math.floor(n / divisor) == n / divisor);
+ }
+
+ function allDeltasDivisableBy(divisor) {
+ return (isDivisible(deltaBuffer[0], divisor) &&
+ isDivisible(deltaBuffer[1], divisor) &&
+ isDivisible(deltaBuffer[2], divisor));
+ }
+
+ function isInsideYoutubeVideo(event) {
+ var elem = event.target;
+ var isControl = false;
+ if (document.URL.indexOf ('www.youtube.com/watch') != -1) {
+ do {
+ isControl = (elem.classList &&
+ elem.classList.contains('html5-video-controls'));
+ if (isControl) break;
+ } while (elem = elem.parentNode);
+ }
+ return isControl;
+ }
+
+ var requestFrame = (function () {
+ return (window.requestAnimationFrame ||
+ window.webkitRequestAnimationFrame ||
+ window.mozRequestAnimationFrame ||
+ function (callback, element, delay) {
+ window.setTimeout(callback, delay || (1000/60));
+ });
+ })();
+
+ var MutationObserver = (window.MutationObserver ||
+ window.WebKitMutationObserver ||
+ window.MozMutationObserver);
+
+ var getScrollRoot = (function() {
+ var SCROLL_ROOT;
+ return function() {
+ if (!SCROLL_ROOT) {
+ var dummy = document.createElement('div');
+ dummy.style.cssText = 'height:10000px;width:1px;';
+ document.body.appendChild(dummy);
+ var bodyScrollTop = document.body.scrollTop;
+ var docElScrollTop = document.documentElement.scrollTop;
+ window.scrollBy(0, 3);
+ if (document.body.scrollTop != bodyScrollTop)
+ (SCROLL_ROOT = document.body);
+ else
+ (SCROLL_ROOT = document.documentElement);
+ window.scrollBy(0, -3);
+ document.body.removeChild(dummy);
+ }
+ return SCROLL_ROOT;
+ };
+ })();
+
+
+ /***********************************************
+ * PULSE (by Michael Herf)
+ ***********************************************/
+
+ /**
+ * Viscous fluid with a pulse for part and decay for the rest.
+ * - Applies a fixed force over an interval (a damped acceleration), and
+ * - Lets the exponential bleed away the velocity over a longer interval
+ * - Michael Herf, http://stereopsis.com/stopping/
+ */
+ function pulse_(x) {
+ var val, start, expx;
+ // test
+ x = x * options.pulseScale;
+ if (x < 1) { // acceleartion
+ val = x - (1 - Math.exp(-x));
+ } else { // tail
+ // the previous animation ended here:
+ start = Math.exp(-1);
+ // simple viscous drag
+ x -= 1;
+ expx = 1 - Math.exp(-x);
+ val = start + (expx * (1 - start));
+ }
+ return val * options.pulseNormalize;
+ }
+
+ function pulse(x) {
+ if (x >= 1) return 1;
+ if (x <= 0) return 0;
+
+ if (options.pulseNormalize == 1) {
+ options.pulseNormalize /= pulse_(1);
+ }
+ return pulse_(x);
+ }
+
+
+ /***********************************************
+ * FIRST RUN
+ ***********************************************/
+
+ var userAgent = window.navigator.userAgent;
+ var isEdge = /Edge/.test(userAgent); // thank you MS
+ var isChrome = /chrome/i.test(userAgent) && !isEdge;
+ var isSafari = /safari/i.test(userAgent) && !isEdge;
+ var isMobile = /mobile/i.test(userAgent);
+ var isIEWin7 = /Windows NT 6.1/i.test(userAgent) && /rv:11/i.test(userAgent);
+ var isOldSafari = isSafari && (/Version\/8/i.test(userAgent) || /Version\/9/i.test(userAgent));
+ var isEnabledForBrowser = (isChrome || isSafari || isIEWin7) && !isMobile;
+
+ var wheelEvent;
+ if ('onwheel' in document.createElement('div'))
+ wheelEvent = 'wheel';
+ else if ('onmousewheel' in document.createElement('div'))
+ wheelEvent = 'mousewheel';
+
+ if (wheelEvent && isEnabledForBrowser) {
+ addEvent(wheelEvent, wheel);
+ addEvent('mousedown', mousedown);
+ addEvent('load', init);
+ }
+
+
+ /***********************************************
+ * PUBLIC INTERFACE
+ ***********************************************/
+
+ function SmoothScroll(optionsToSet) {
+ for (var key in optionsToSet)
+ if (defaultOptions.hasOwnProperty(key))
+ options[key] = optionsToSet[key];
+ }
+ SmoothScroll.destroy = cleanup;
+
+ if (window.SmoothScrollOptions) // async API
+ SmoothScroll(window.SmoothScrollOptions);
+
+ if (typeof define === 'function' && define.amd)
+ define(function() {
+ return SmoothScroll;
+ });
+ else if ('object' == typeof exports)
+ module.exports = SmoothScroll;
+ else
+ window.SmoothScroll = SmoothScroll;
+
+ })();
+};
\ No newline at end of file
diff --git a/assets/js/dev/ThzTextRotator.js b/assets/js/dev/ThzTextRotator.js
new file mode 100644
index 0000000..e52f9e9
--- /dev/null
+++ b/assets/js/dev/ThzTextRotator.js
@@ -0,0 +1,131 @@
+/**
+ * @package ThzTextRotator
+ * @copyright Copyright(C) since 2007 Themezly.com. All Rights Reserved.
+ * @author Themezly
+ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
+ * @websites http://www.themezly.com | http://www.youjoomla.com
+ */
+;
+(function($, window, document, undefined) {
+
+ "use strict";
+
+ var pluginName = "ThzTextRotator",
+ defaults = {
+ start_delay: 200,
+ rotation_delay: 2e3,
+ };
+
+ function Plugin(element, options) {
+ this.element = element;
+
+ this.settings = $.extend({}, defaults, options);
+ this._defaults = defaults;
+ this._name = pluginName;
+ this.init();
+ }
+
+
+ $.extend(Plugin.prototype, {
+ init: function() {
+
+ var self = this;
+ this.getlist = $(self.element).find('.text-string');
+
+ if (self.getlist.length > 0) {
+
+ if ($(self.element).attr('data-start-delay')) {
+ self.settings.start_delay = parseFloat($(self.element).attr('data-start-delay'));
+ }
+
+ if ($(self.element).attr('data-rotation-delay')) {
+ self.settings.rotation_delay = parseFloat($(self.element).attr('data-rotation-delay'));
+ }
+
+ self.slideIn(self.getlist[0]);
+ $(self.element).addClass('isactive');
+ }
+
+
+ },
+
+ resize: function(el) {
+ var self = this;
+ $(el).parent().css({
+ width: $(el).width()
+ });
+ },
+
+ slideIn: function(el) {
+
+ var self = this;
+
+ var $delay = self.settings.rotation_delay;
+ if ($(el).hasClass('first')) {
+ $delay = self.settings.start_delay;
+ }
+
+ // resize area to sliding element
+ self.resize($(el));
+ // add slide-in class
+ $(el).addClass('text-active');
+ // after 'hold' duration slide-out current item
+ // then slide in next item
+ setTimeout(function() {
+ // check to see if loop should continue
+ if (stop === true) {
+ stop = false;
+ return;
+ }
+ // slide current element out
+ self.slideOut(el);
+ // slide in next element in queue
+ self.slideIn($(el).next());
+ }, $delay);
+ },
+
+ slideOut: function(el) {
+
+ var self = this;
+ // remove current class and add slide-out transition
+ $(el).removeClass('text-active').addClass('text-inactive')
+ .removeClass('first');
+ // wait for slide tramsition to finish then
+ // call 'change' function
+ setTimeout(function() {
+ self.change();
+ }, 600);
+ },
+
+ change: function() {
+
+ var self = this;
+ // store last item index
+ var i = self.getlist.length - 1;
+ // detach element that has slide-out class
+ // put to the bottom of the list after
+ // the last item
+ //$(self.getlist).eq(i).after($('.slide-out').detach());
+
+ //console.log($(self.getlist).eq(i), $('.adj:eq(' + i + ')'));
+ var slideout = $(self.element).find('.text-inactive');
+ $(self.element).find('.text-string:eq(' + i + ')').after(slideout.detach());
+ // $('.adj:eq(' + i + ')').after($('.slide-out').detach());
+ // remove class to send element back to original position
+ self.getlist.removeClass('text-inactive');
+ },
+
+
+ });
+
+ $.fn[pluginName] = function(options) {
+ return this.each(function() {
+ if (!$.data(this, 'plugin_' + pluginName)) {
+ $.data(this, 'plugin_' + pluginName, new Plugin(this, options));
+ } else if (Plugin.prototype[options]) {
+ $.data(this, 'plugin_' + pluginName)[options]();
+ }
+ });
+ }
+
+})(jQuery, window, document);
\ No newline at end of file
diff --git a/inc/includes/builder-templates/index.html b/assets/js/dev/index.html
similarity index 100%
rename from inc/includes/builder-templates/index.html
rename to assets/js/dev/index.html
diff --git a/assets/js/dev/vendors/bootstrap.tips-popover-extend.js b/assets/js/dev/vendors/bootstrap.tips-popover-extend.js
new file mode 100644
index 0000000..d72986a
--- /dev/null
+++ b/assets/js/dev/vendors/bootstrap.tips-popover-extend.js
@@ -0,0 +1,1041 @@
+/*!
+ * Bootstrap v3.4.1 (https://getbootstrap.com/)
+ * Copyright 2011-2019 Twitter, Inc.
+ * Licensed under the MIT license
+ */
+/*!
+ * Generated using the Bootstrap Customizer (https://getbootstrap.com/docs/3.4/customize/)
+ */
+
+if (typeof jQuery === 'undefined') {
+ throw new Error('Bootstrap\'s JavaScript requires jQuery')
+}
++function ($) {
+ 'use strict';
+ var version = $.fn.jquery.split(' ')[0].split('.')
+ if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 3)) {
+ throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4')
+ }
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: tooltip.js v3.4.1
+ * https://getbootstrap.com/docs/3.4/javascript/#tooltip
+ * Inspired by the original jQuery.tipsy by Jason Frame
+ * ========================================================================
+ * Copyright 2011-2019 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn']
+
+ var uriAttrs = [
+ 'background',
+ 'cite',
+ 'href',
+ 'itemtype',
+ 'longdesc',
+ 'poster',
+ 'src',
+ 'xlink:href'
+ ]
+
+ var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i
+
+ var DefaultWhitelist = {
+ // Global attributes allowed on any supplied element below.
+ '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
+ a: ['target', 'href', 'title', 'rel'],
+ area: [],
+ b: [],
+ br: [],
+ col: [],
+ code: [],
+ div: [],
+ em: [],
+ hr: [],
+ h1: [],
+ h2: [],
+ h3: [],
+ h4: [],
+ h5: [],
+ h6: [],
+ i: [],
+ img: ['src', 'alt', 'title', 'width', 'height'],
+ li: [],
+ ol: [],
+ p: [],
+ pre: [],
+ s: [],
+ small: [],
+ span: [],
+ sub: [],
+ sup: [],
+ strong: [],
+ u: [],
+ ul: []
+ }
+
+ /**
+ * A pattern that recognizes a commonly useful subset of URLs that are safe.
+ *
+ * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
+ */
+ var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi
+
+ /**
+ * A pattern that matches safe data URLs. Only matches image, video and audio types.
+ *
+ * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
+ */
+ var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i
+
+ function allowedAttribute(attr, allowedAttributeList) {
+ var attrName = attr.nodeName.toLowerCase()
+
+ if ($.inArray(attrName, allowedAttributeList) !== -1) {
+ if ($.inArray(attrName, uriAttrs) !== -1) {
+ return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN))
+ }
+
+ return true
+ }
+
+ var regExp = $(allowedAttributeList).filter(function (index, value) {
+ return value instanceof RegExp
+ })
+
+ // Check if a regular expression validates the attribute.
+ for (var i = 0, l = regExp.length; i < l; i++) {
+ if (attrName.match(regExp[i])) {
+ return true
+ }
+ }
+
+ return false
+ }
+
+ function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
+ if (unsafeHtml.length === 0) {
+ return unsafeHtml
+ }
+
+ if (sanitizeFn && typeof sanitizeFn === 'function') {
+ return sanitizeFn(unsafeHtml)
+ }
+
+ // IE 8 and below don't support createHTMLDocument
+ if (!document.implementation || !document.implementation.createHTMLDocument) {
+ return unsafeHtml
+ }
+
+ var createdDocument = document.implementation.createHTMLDocument('sanitization')
+ createdDocument.body.innerHTML = unsafeHtml
+
+ var whitelistKeys = $.map(whiteList, function (el, i) { return i })
+ var elements = $(createdDocument.body).find('*')
+
+ for (var i = 0, len = elements.length; i < len; i++) {
+ var el = elements[i]
+ var elName = el.nodeName.toLowerCase()
+
+ if ($.inArray(elName, whitelistKeys) === -1) {
+ el.parentNode.removeChild(el)
+
+ continue
+ }
+
+ var attributeList = $.map(el.attributes, function (el) { return el })
+ var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || [])
+
+ for (var j = 0, len2 = attributeList.length; j < len2; j++) {
+ if (!allowedAttribute(attributeList[j], whitelistedAttributes)) {
+ el.removeAttribute(attributeList[j].nodeName)
+ }
+ }
+ }
+
+ return createdDocument.body.innerHTML
+ }
+ // TOOLTIP PUBLIC CLASS DEFINITION
+ // ===============================
+
+ var Tooltip = function (element, options) {
+ this.type = null
+ this.options = null
+ this.enabled = null
+ this.timeout = null
+ this.hoverState = null
+ this.$element = null
+ this.inState = null
+
+ this.init('tooltip', element, options)
+ }
+
+ Tooltip.VERSION = '3.3.7'
+
+ Tooltip.TRANSITION_DURATION = 150
+
+ Tooltip.DEFAULTS = {
+ animation: true,
+ placement: 'top',
+ selector: false,
+ template: '
',
+ trigger: 'hover focus',
+ title: '',
+ delay: 0,
+ html: false,
+ container: false,
+ viewport: {
+ selector: 'body',
+ padding: 0
+ },
+ sanitize : true,
+ sanitizeFn : null,
+ whiteList : DefaultWhitelist
+ }
+
+ Tooltip.prototype.init = function (type, element, options) {
+ this.enabled = true
+ this.type = type
+ this.$element = $(element)
+ this.options = this.getOptions(options)
+ this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))
+ this.inState = { click: false, hover: false, focus: false }
+
+ if (this.$element[0] instanceof document.constructor && !this.options.selector) {
+ throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
+ }
+
+ var triggers = this.options.trigger.split(' ')
+
+ for (var i = triggers.length; i--;) {
+ var trigger = triggers[i]
+
+ if (trigger == 'click') {
+ this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
+ } else if (trigger != 'manual') {
+ var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin'
+ var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
+
+ this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
+ this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
+ }
+ }
+
+ this.options.selector ?
+ (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
+ this.fixTitle()
+ }
+
+ Tooltip.prototype.getDefaults = function () {
+ return Tooltip.DEFAULTS
+ }
+
+ Tooltip.prototype.getOptions = function (options) {
+ options = $.extend({}, this.getDefaults(), this.$element.data(), options)
+
+ if (options.delay && typeof options.delay == 'number') {
+ options.delay = {
+ show: options.delay,
+ hide: options.delay
+ }
+ }
+
+ if (options.sanitize) {
+ options.template = sanitizeHtml(options.template, options.whiteList, options.sanitizeFn)
+ }
+
+ return options
+ }
+
+ Tooltip.prototype.getDelegateOptions = function () {
+ var options = {}
+ var defaults = this.getDefaults()
+
+ this._options && $.each(this._options, function (key, value) {
+ if (defaults[key] != value) options[key] = value
+ })
+
+ return options
+ }
+
+
+
+ Tooltip.prototype.enter = function (obj) {
+ var self = obj instanceof this.constructor ?
+ obj : $(obj.currentTarget).data('bs.' + this.type)
+
+ if (!self) {
+ self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
+ $(obj.currentTarget).data('bs.' + this.type, self)
+ }
+
+ if (obj instanceof $.Event) {
+ self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true
+ }
+
+ if (self.tip().hasClass('in') || self.hoverState == 'in') {
+ self.hoverState = 'in'
+ return
+ }
+
+ clearTimeout(self.timeout)
+
+ self.hoverState = 'in'
+
+ if (!self.options.delay || !self.options.delay.show) return self.show()
+
+ self.timeout = setTimeout(function () {
+ if (self.hoverState == 'in') self.show()
+ }, self.options.delay.show)
+ }
+
+ Tooltip.prototype.isInStateTrue = function () {
+ for (var key in this.inState) {
+ if (this.inState[key]) return true
+ }
+
+ return false
+ }
+
+ Tooltip.prototype.leave = function (obj) {
+ var self = obj instanceof this.constructor ?
+ obj : $(obj.currentTarget).data('bs.' + this.type)
+
+ if (!self) {
+ self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
+ $(obj.currentTarget).data('bs.' + this.type, self)
+ }
+
+ if (obj instanceof $.Event) {
+ self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false
+ }
+
+ if (self.isInStateTrue()) return
+
+ clearTimeout(self.timeout)
+
+ self.hoverState = 'out'
+
+ if (!self.options.delay || !self.options.delay.hide) return self.hide()
+
+ self.timeout = setTimeout(function () {
+ if (self.hoverState == 'out') self.hide()
+ }, self.options.delay.hide)
+ }
+
+ Tooltip.prototype.show = function () {
+ var e = $.Event('show.bs.' + this.type)
+
+ if (this.hasContent() && this.enabled) {
+ this.$element.trigger(e)
+
+ var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])
+ if (e.isDefaultPrevented() || !inDom) return
+ var that = this
+
+ var $tip = this.tip()
+
+ var tipId = this.getUID(this.type)
+
+ this.setContent()
+ $tip.attr('id', tipId)
+ this.$element.attr('aria-describedby', tipId)
+
+ if (this.options.animation) $tip.addClass('tip-anim')
+
+ var placement = typeof this.options.placement == 'function' ?
+ this.options.placement.call(this, $tip[0], this.$element[0]) :
+ this.options.placement
+
+ var autoToken = /\s?auto?\s?/i
+ var autoPlace = autoToken.test(placement)
+ if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
+
+ $tip
+ .detach()
+ .css({ top: 0, left: 0, display: 'block' })
+ .addClass(placement)
+ .data('bs.' + this.type, this)
+
+ this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
+ this.$element.trigger('inserted.bs.' + this.type)
+
+ var pos = this.getPosition()
+ var actualWidth = $tip[0].offsetWidth
+ var actualHeight = $tip[0].offsetHeight
+
+ if (autoPlace) {
+ var orgPlacement = placement
+ var viewportDim = this.getPosition(this.$viewport)
+
+ placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' :
+ placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' :
+ placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' :
+ placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' :
+ placement
+
+ $tip
+ .removeClass(orgPlacement)
+ .addClass(placement)
+ }
+
+ var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
+
+ this.applyPlacement(calculatedOffset, placement)
+
+ var complete = function () {
+ var prevHoverState = that.hoverState
+ that.$element.trigger('shown.bs.' + that.type)
+ that.hoverState = null
+
+ if (prevHoverState == 'out') that.leave(that)
+ }
+
+ $.support.transition && this.$tip.hasClass('tip-anim') ?
+ $tip
+ .one('bsTransitionEnd', complete)
+ .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
+ complete()
+ }
+ }
+
+ Tooltip.prototype.applyPlacement = function (offset, placement) {
+ var $tip = this.tip()
+ var width = $tip[0].offsetWidth
+ var height = $tip[0].offsetHeight
+
+ // manually read margins because getBoundingClientRect includes difference
+ var marginTop = parseInt($tip.css('margin-top'), 10)
+ var marginLeft = parseInt($tip.css('margin-left'), 10)
+
+ // we must check for NaN for ie 8/9
+ if (isNaN(marginTop)) marginTop = 0
+ if (isNaN(marginLeft)) marginLeft = 0
+
+ offset.top += marginTop
+ offset.left += marginLeft
+
+ // $.fn.offset doesn't round pixel values
+ // so we use setOffset directly with our own function B-0
+ $.offset.setOffset($tip[0], $.extend({
+ using: function (props) {
+ $tip.css({
+ top: Math.round(props.top),
+ left: Math.round(props.left)
+ })
+ }
+ }, offset), 0)
+
+ $tip.removeClass('is-hidden').addClass('in')
+
+ // check to see if placing tip in new offset caused the tip to resize itself
+ var actualWidth = $tip[0].offsetWidth
+ var actualHeight = $tip[0].offsetHeight
+
+ if (placement == 'top' && actualHeight != height) {
+ offset.top = offset.top + height - actualHeight
+ }
+
+ var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
+
+ if (delta.left) offset.left += delta.left
+ else offset.top += delta.top
+
+ var isVertical = /top|bottom/.test(placement)
+ var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
+ var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'
+
+ $tip.offset(offset)
+ this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
+ }
+
+ Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {
+ this.arrow()
+ .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
+ .css(isVertical ? 'top' : 'left', '')
+ }
+
+ Tooltip.prototype.setContent = function () {
+ var $tip = this.tip()
+ var title = this.getTitle()
+
+ if (this.options.html) {
+ if (this.options.sanitize) {
+ title = sanitizeHtml(title, this.options.whiteList, this.options.sanitizeFn)
+ }
+
+ $tip.find('.thz-tip-inner').html(title)
+ } else {
+ $tip.find('.thz-tip-inner').text(title)
+ }
+
+ $tip.removeClass('tip-anim in top bottom left right')
+ }
+
+ Tooltip.prototype.hide = function (callback) {
+ var that = this
+ var $tip = $(this.$tip)
+ var e = $.Event('hide.bs.' + this.type)
+
+ function complete() {
+ if (that.hoverState != 'in') /*$tip.detach()*/
+ if (that.$element) { // TODO: Check whether guarding this code with this `if` is really necessary.
+ that.$element
+ .removeAttr('aria-describedby')
+ .trigger('hidden.bs.' + that.type)
+ }
+ setTimeout(function(){
+ $tip.addClass('is-hidden');
+ },400);
+ callback && callback()
+ }
+
+ this.$element.trigger(e)
+
+ if (e.isDefaultPrevented()) return
+
+ $tip.removeClass('in')
+
+ $.support.transition && $tip.hasClass('tip-anim') ?
+ $tip
+ .one('bsTransitionEnd', complete)
+ .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
+ complete()
+
+ this.hoverState = null
+
+ return this
+ }
+
+ Tooltip.prototype.fixTitle = function () {
+ var $e = this.$element
+ if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {
+ $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
+ }
+ }
+
+ Tooltip.prototype.hasContent = function () {
+ return this.getTitle()
+ }
+
+ Tooltip.prototype.getPosition = function ($element) {
+ $element = $element || this.$element
+
+ var el = $element[0]
+ var isBody = el.tagName == 'BODY'
+
+ var elRect = el.getBoundingClientRect()
+ if (elRect.width == null) {
+ // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
+ elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
+ }
+ var isSvg = window.SVGElement && el instanceof window.SVGElement
+ // Avoid using $.offset() on SVGs since it gives incorrect results in jQuery 3.
+ // See https://github.com/twbs/bootstrap/issues/20280
+ var elOffset = isBody ? { top: 0, left: 0 } : (isSvg ? null : $element.offset())
+ var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
+ var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
+
+ return $.extend({}, elRect, scroll, outerDims, elOffset)
+ }
+
+ Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
+ return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
+ placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
+ placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
+ /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
+
+ }
+
+ Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {
+ var delta = { top: 0, left: 0 }
+ if (!this.$viewport) return delta
+
+ var viewportPadding = this.options.viewport && this.options.viewport.padding || 0
+ var viewportDimensions = this.getPosition(this.$viewport)
+
+ if (/right|left/.test(placement)) {
+ var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll
+ var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight
+ if (topEdgeOffset < viewportDimensions.top) { // top overflow
+ delta.top = viewportDimensions.top - topEdgeOffset
+ } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow
+ delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset
+ }
+ } else {
+ var leftEdgeOffset = pos.left - viewportPadding
+ var rightEdgeOffset = pos.left + viewportPadding + actualWidth
+ if (leftEdgeOffset < viewportDimensions.left) { // left overflow
+ delta.left = viewportDimensions.left - leftEdgeOffset
+ } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow
+ delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
+ }
+ }
+
+ return delta
+ }
+
+ Tooltip.prototype.getTitle = function () {
+ var title
+ var $e = this.$element
+ var o = this.options
+
+ title = $e.attr('data-original-title')
+ || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
+
+ return title
+ }
+
+ Tooltip.prototype.getUID = function (prefix) {
+ do prefix += ~~(Math.random() * 1000000)
+ while (document.getElementById(prefix))
+ return prefix
+ }
+
+ Tooltip.prototype.tip = function () {
+ if (!this.$tip) {
+ this.$tip = $(this.options.template)
+ if (this.$tip.length != 1) {
+ throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')
+ }
+ }
+ return this.$tip
+ }
+
+ Tooltip.prototype.arrow = function () {
+ return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))
+ }
+
+ Tooltip.prototype.enable = function () {
+ this.enabled = true
+ }
+
+ Tooltip.prototype.disable = function () {
+ this.enabled = false
+ }
+
+ Tooltip.prototype.toggleEnabled = function () {
+ this.enabled = !this.enabled
+ }
+
+ Tooltip.prototype.toggle = function (e) {
+ var self = this
+ if (e) {
+ self = $(e.currentTarget).data('bs.' + this.type)
+ if (!self) {
+ self = new this.constructor(e.currentTarget, this.getDelegateOptions())
+ $(e.currentTarget).data('bs.' + this.type, self)
+ }
+ }
+
+ if (e) {
+ self.inState.click = !self.inState.click
+ if (self.isInStateTrue()) self.enter(self)
+ else self.leave(self)
+ } else {
+ self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
+ }
+ }
+
+ Tooltip.prototype.destroy = function () {
+ var that = this
+ clearTimeout(this.timeout)
+ this.hide(function () {
+ that.$element.off('.' + that.type).removeData('bs.' + that.type)
+ if (that.$tip) {
+ that.$tip.detach()
+ }
+ that.$tip = null
+ that.$arrow = null
+ that.$viewport = null
+ that.$element = null
+ })
+ }
+
+ Tooltip.prototype.sanitizeHtml = function (unsafeHtml) {
+ return sanitizeHtml(unsafeHtml, this.options.whiteList, this.options.sanitizeFn)
+ }
+
+
+ // TOOLTIP PLUGIN DEFINITION
+ // =========================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.tooltip')
+ var options = typeof option == 'object' && option
+
+ if (!data && /destroy|hide/.test(option)) return
+ if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ var old = $.fn.tooltip
+
+ $.fn.tooltip = Plugin
+ $.fn.tooltip.Constructor = Tooltip
+
+
+ // TOOLTIP NO CONFLICT
+ // ===================
+
+ $.fn.tooltip.noConflict = function () {
+ $.fn.tooltip = old
+ return this
+ }
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: popover.js v3.4.1
+ * https://getbootstrap.com/docs/3.4/javascript/#popovers
+ * ========================================================================
+ * Copyright 2011-2019 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // POPOVER PUBLIC CLASS DEFINITION
+ // ===============================
+
+ var Popover = function (element, options) {
+ this.init('popover', element, options)
+ }
+
+ if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
+
+ Popover.VERSION = '3.3.7'
+
+ Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
+ placement: 'right',
+ trigger: 'click',
+ content: '',
+ template: '
'
+ })
+
+
+ // NOTE: POPOVER EXTENDS tooltip.js
+ // ================================
+
+ Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
+
+ Popover.prototype.constructor = Popover
+
+ Popover.prototype.getDefaults = function () {
+ return Popover.DEFAULTS
+ }
+
+ Popover.prototype.setContent = function () {
+ var $tip = this.tip()
+ var title = this.getTitle()
+ var content = this.getContent()
+
+ if (this.options.sanitize) {
+ title = this.sanitizeHtml(title)
+
+ if (typeContent === 'string') {
+ content = this.sanitizeHtml(content)
+ }
+ }
+
+ $tip.find('.thz-popover-title')[this.options.html ? 'html' : 'text'](title)
+ $tip.find('.thz-popover-content').children().detach().end()[ // we use append for html objects to maintain js events
+ this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
+ ](content)
+
+ $tip.removeClass('tip-anim top bottom left right in')
+
+ // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
+ // this manually by checking the contents.
+ if (!$tip.find('.thz-popover-title').html()) $tip.find('.thz-popover-title').hide()
+ }
+
+ Popover.prototype.hasContent = function () {
+ return this.getTitle() || this.getContent()
+ }
+
+ Popover.prototype.getContent = function () {
+ var $e = this.$element
+ var o = this.options
+
+ return $e.attr('data-content')
+ || (typeof o.content == 'function' ?
+ o.content.call($e[0]) :
+ o.content)
+ }
+
+ Popover.prototype.arrow = function () {
+ return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
+ }
+
+
+ // POPOVER PLUGIN DEFINITION
+ // =========================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.popover')
+ var options = typeof option == 'object' && option
+
+ if (!data && /destroy|hide/.test(option)) return
+ if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ var old = $.fn.popover
+
+ $.fn.popover = Plugin
+ $.fn.popover.Constructor = Popover
+
+
+ // POPOVER NO CONFLICT
+ // ===================
+
+ $.fn.popover.noConflict = function () {
+ $.fn.popover = old
+ return this
+ }
+
+}(jQuery);
+
+
+
+
+
+/* ===========================================================================
+ * tips extend
+ * ===========================================================================
+*/
+
+!function ($) {
+
+ "use strict"; // jshint ;_;
+
+
+ /* TOOLTIP-EXTENDED PUBLIC CLASS DEFINITION
+ * ======================================== */
+
+ // Save the original function object
+ var _old = $.fn.tooltip;
+
+ // Create a new constructor
+ var TooltipExtended = function (element, options) {
+ this.init('tooltip', element, options)
+ }
+
+ TooltipExtended.prototype = $.extend({}, _old.Constructor.prototype, {
+
+ constructor: TooltipExtended
+
+
+
+ , show: function () {
+ var $tip
+ , pos
+ , actualWidth
+ , actualHeight
+ , placement
+ , tp
+ , e = $.Event('show.bs.' + this.type)
+
+ if (this.hasContent() && this.enabled) {
+ this.$element.trigger(e)
+ if (e.isDefaultPrevented()) return
+ $tip = this.tip()
+ this.setContent()
+
+ if (this.options.animation) {
+ $tip.addClass('tip-anim')
+ }
+
+ placement = typeof this.options.placement == 'function' ?
+ this.options.placement.call(this, $tip[0], this.$element[0]) :
+ this.options.placement
+
+ // Detect if auto direction placement
+ var autoDirToken = /\s?auto-dir?\s?/i
+ var autoDirPlace = autoDirToken.test(placement)
+ if (autoDirPlace) placement = placement.replace(autoDirToken, '') || 'top'
+
+ $tip
+ .detach()
+ .css({ top: 0, left: 0, display: 'block' })
+ .addClass(placement)
+
+ this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
+
+ pos = this.getPosition()
+
+ actualWidth = $tip[0].offsetWidth
+ actualHeight = $tip[0].offsetHeight
+
+ // Get the overall document direction
+ var isRTL = jQuery(document.querySelector("html")).attr('dir') === 'rtl' ? true : false
+
+ // If auto-dir and the direction is RTL, the horizontal placement is reversed
+ if (autoDirPlace) {
+ var orgPlacement = placement
+ var xPlace = placement.replace(/bottom-|top-/g, '') || ''
+ var yPlace = placement.replace(/left|right/g, '') || ''
+
+ placement = xPlace == 'left' && isRTL ? yPlace + 'right' :
+ xPlace == 'right' && isRTL ? yPlace + 'left' :
+ placement
+
+ $tip
+ .removeClass(orgPlacement)
+ .addClass(placement)
+ }
+
+ switch (placement) {
+ case 'bottom':
+ tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}
+ break
+ case 'top':
+ tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}
+ break
+ case 'left':
+ tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}
+ break
+ case 'right':
+ tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}
+ break
+ // Additional positions
+ case 'bottom-left':
+ tp = {top: pos.top + pos.height, left: pos.left}
+ break
+ case 'bottom-right':
+ tp = {top: pos.top + pos.height, left: pos.left + pos.width - actualWidth}
+ break
+ case 'top-left':
+ tp = {top: pos.top - actualHeight, left: pos.left }
+ break
+ case 'top-right':
+ tp = {top: pos.top - actualHeight, left: pos.left + pos.width - actualWidth}
+ break
+ }
+
+ this.applyPlacement(tp, placement)
+
+ this.newArrow(placement, actualWidth, isRTL)
+
+ this.$element.trigger('shown.bs')
+ }
+ }
+
+ , applyPlacement: function (offset, placement) {
+ var $tip = this.tip()
+ var width = $tip[0].offsetWidth
+ var height = $tip[0].offsetHeight
+
+ // manually read margins because getBoundingClientRect includes difference
+ var marginTop = parseInt($tip.css('margin-top'), 10)
+ var marginLeft = parseInt($tip.css('margin-left'), 10)
+
+ // we must check for NaN for ie 8/9
+ if (isNaN(marginTop)) marginTop = 0
+ if (isNaN(marginLeft)) marginLeft = 0
+
+ offset.top += marginTop
+ offset.left += marginLeft
+
+ // $.fn.offset doesn't round pixel values
+ // so we use setOffset directly with our own function B-0
+ $.offset.setOffset($tip[0], $.extend({
+ using: function (props) {
+ $tip.css({
+ top: Math.round(props.top),
+ left: Math.round(props.left)
+ })
+ }
+ }, offset), 0)
+
+ $tip.removeClass('is-hidden').addClass('in')
+
+ // check to see if placing tip in new offset caused the tip to resize itself
+ var actualWidth = $tip[0].offsetWidth
+ var actualHeight = $tip[0].offsetHeight
+
+ if (placement == 'top' && actualHeight != height) {
+ offset.top = offset.top + height - actualHeight
+ }
+
+ var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
+
+ if (delta.left) offset.left += delta.left
+ else offset.top += delta.top
+
+ var isVertical = /top|bottom/.test(placement)
+ var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
+ var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'
+
+ //$tip.offset(offset)
+ this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
+ }
+
+ , newArrow: function (placement, actualWidth, isRTL) {
+ var $arrow = this.tip().find('.thz-tip-arrow')
+ , arrow_width = parseInt($arrow.css('width'), 10)
+ , arrow_height = parseInt($arrow.css('height'), 10)
+
+ var xPlace = placement.replace(/bottom-|top-/g, '') || ''
+ var yPlace = placement.replace(/left|right/g, '') || ''
+
+ if ( yPlace && xPlace == 'left' && !isRTL ) $arrow.css("left", arrow_width / 2)
+ if ( yPlace && xPlace == 'left' && isRTL ) $arrow.css("right", actualWidth - arrow_width - arrow_width / 2)
+ if ( yPlace && xPlace == 'right' ) $arrow.css("left", actualWidth - arrow_width - arrow_width / 2)
+ if ( yPlace == 'bottom-' ) $arrow.css("top", arrow_height)
+ if ( yPlace == 'top-' ) $arrow.css("bottom", arrow_height)
+ },
+
+ tip: function () {
+ if (!this.$tip) {
+ this.$tip = $(this.options.template)
+ if (this.$tip.length != 1) {
+ throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')
+ }
+ }
+ return this.$tip
+ },
+ });
+
+
+ /* TOOLTIP-EXTENDED PLUGIN DEFINITION
+ * ================================== */
+
+ var old = $.fn.tooltip
+
+ // Override the old initialization with the new constructor
+ $.fn.tooltip = $.extend(function ( option ) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('bs.tooltip')
+ , options = $.extend({}, TooltipExtended.defaults, $this.data(), typeof option == 'object' && option)
+ if (!data) $this.data('bs.tooltip', (data = new TooltipExtended(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }, $.fn.tooltip )
+
+
+ /* TOOLTIP-EXTENDED NO CONFLICT
+ * ============================ */
+
+ $.fn.tooltip.noConflict = function () {
+ $.fn.tooltip = old
+ return this
+ };
+
+}(window.jQuery);
\ No newline at end of file
diff --git a/assets/js/dev/vendors/cells-by-row.js b/assets/js/dev/vendors/cells-by-row.js
new file mode 100644
index 0000000..bb9ec3a
--- /dev/null
+++ b/assets/js/dev/vendors/cells-by-row.js
@@ -0,0 +1,66 @@
+/*!
+ * cellsByRows layout mode for Isotope
+ * v1.1.3
+ * http://isotope.metafizzy.co/layout-modes/cellsbyrow.html
+ */
+
+/*jshint browser: true, devel: false, strict: true, undef: true, unused: true */
+
+( function( window, factory ) {
+ // universal module definition
+ /* jshint strict: false */ /*globals define, module, require */
+ if ( typeof define === 'function' && define.amd ) {
+ // AMD
+ define( [
+ 'isotope/js/layout-mode'
+ ],
+ factory );
+ } else if ( typeof exports === 'object' ) {
+ // CommonJS
+ module.exports = factory(
+ require('isotope-layout/js/layout-mode')
+ );
+ } else {
+ // browser global
+ factory(
+ window.Isotope.LayoutMode
+ );
+ }
+
+}( window, function factory( LayoutMode ) {
+ 'use strict';
+
+ var CellsByRow = LayoutMode.create( 'cellsByRow' );
+ var proto = CellsByRow.prototype;
+
+ proto._resetLayout = function() {
+ // reset properties
+ this.itemIndex = 0;
+ // measurements
+ this.getColumnWidth();
+ this.getRowHeight();
+ // set cols
+ this.cols = Math.floor( this.isotope.size.innerWidth / this.columnWidth );
+ this.cols = Math.max( this.cols, 1 );
+ };
+
+ proto._getItemLayoutPosition = function( item ) {
+ item.getSize();
+ var col = this.itemIndex % this.cols;
+ var row = Math.floor( this.itemIndex / this.cols );
+ // center item within cell
+ var x = ( col + 0.5 ) * this.columnWidth - item.size.outerWidth / 2;
+ var y = ( row + 0.5 ) * this.rowHeight - item.size.outerHeight / 2;
+ this.itemIndex++;
+ return { x: x, y: y };
+ };
+
+ proto._getContainerSize = function() {
+ return {
+ height: Math.ceil( this.itemIndex / this.cols ) * this.rowHeight
+ };
+ };
+
+ return CellsByRow;
+
+}));
diff --git a/assets/js/dev/vendors/circle-progress.js b/assets/js/dev/vendors/circle-progress.js
new file mode 100644
index 0000000..051a0e8
--- /dev/null
+++ b/assets/js/dev/vendors/circle-progress.js
@@ -0,0 +1,560 @@
+/**
+ * jquery-circle-progress - jQuery Plugin to draw animated circular progress bars:
+ * {@link http://kottenator.github.io/jquery-circle-progress/}
+ *
+ * @author Rostyslav Bryzgunov
+ * @version 1.2.0
+ * @licence MIT
+ * @preserve
+ */
+// UMD factory - https://github.com/umdjs/umd/blob/d31bb6ee7098715e019f52bdfe27b3e4bfd2b97e/templates/jqueryPlugin.js
+// Uses CommonJS, AMD or browser globals to create a jQuery plugin.
+(function(factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module.
+ define(['jquery'], factory);
+ } else if (typeof module === 'object' && module.exports) {
+ // Node/CommonJS
+ module.exports = function(root, jQuery) {
+ if (jQuery === undefined) {
+ // require('jQuery') returns a factory that requires window to
+ // build a jQuery instance, we normalize how we use modules
+ // that require this pattern but the window provided is a noop
+ // if it's defined (how jquery works)
+ if (typeof window !== 'undefined') {
+ jQuery = require('jquery');
+ } else {
+ jQuery = require('jquery')(root);
+ }
+ }
+ factory(jQuery);
+ return jQuery;
+ };
+ } else {
+ // Browser globals
+ factory(jQuery);
+ }
+})(function($) {
+ /**
+ * Inner implementation of the circle progress bar.
+ * The class is not exposed _yet_ but you can create an instance through jQuery method call.
+ *
+ * @param {object} config - You can customize any class member (property or method).
+ * @class
+ * @alias CircleProgress
+ */
+ function CircleProgress(config) {
+ this.init(config);
+ }
+
+ CircleProgress.prototype = {
+ //--------------------------------------- public options ---------------------------------------
+ /**
+ * This is the only required option. It should be from `0.0` to `1.0`.
+ * @type {number}
+ * @default 0.0
+ */
+ value: 0.0,
+
+ /**
+ * Size of the canvas in pixels.
+ * It's a square so we need only one dimension.
+ * @type {number}
+ * @default 100.0
+ */
+ size: 100.0,
+
+ /**
+ * Initial angle for `0.0` value in radians.
+ * @type {number}
+ * @default -Math.PI
+ */
+ startAngle: -Math.PI,
+
+ /**
+ * Width of the arc in pixels.
+ * If it's `'auto'` - the value is calculated as `[this.size]{@link CircleProgress#size} / 14`.
+ * @type {number|string}
+ * @default 'auto'
+ */
+ thickness: 'auto',
+
+ /**
+ * Fill of the arc. You may set it to:
+ *
+ * - solid color:
+ * - `'#3aeabb'`
+ * - `{ color: '#3aeabb' }`
+ * - `{ color: 'rgba(255, 255, 255, .3)' }`
+ * - linear gradient _(left to right)_:
+ * - `{ gradient: ['#3aeabb', '#fdd250'], gradientAngle: Math.PI / 4 }`
+ * - `{ gradient: ['red', 'green', 'blue'], gradientDirection: [x0, y0, x1, y1] }`
+ * - `{ gradient: [["red", .2], ["green", .3], ["blue", .8]] }`
+ * - image:
+ * - `{ image: 'http://i.imgur.com/pT0i89v.png' }`
+ * - `{ image: imageObject }`
+ * - `{ color: 'lime', image: 'http://i.imgur.com/pT0i89v.png' }` -
+ * color displayed until the image is loaded
+ *
+ * @default {gradient: ['#3aeabb', '#fdd250']}
+ */
+ fill: {
+ gradient: ['#3aeabb', '#fdd250']
+ },
+
+ /**
+ * Color of the "empty" arc. Only a color fill supported by now.
+ * @type {string}
+ * @default 'rgba(0, 0, 0, .1)'
+ */
+ emptyFill: 'rgba(0, 0, 0, .1)',
+
+ /**
+ * jQuery Animation config.
+ * You can pass `false` to disable the animation.
+ * @see http://api.jquery.com/animate/
+ * @type {object|boolean}
+ * @default {duration: 1200, easing: 'circleProgressEasing'}
+ */
+ animation: {
+ duration: 1200,
+ easing: 'circleProgressEasing'
+ },
+
+ /**
+ * Default animation starts at `0.0` and ends at specified `value`. Let's call this _direct animation_.
+ * If you want to make _reversed animation_ - set `animationStartValue: 1.0`.
+ * Also you may specify any other value from `0.0` to `1.0`.
+ * @type {number}
+ * @default 0.0
+ */
+ animationStartValue: 0.0,
+
+ /**
+ * Reverse animation and arc draw.
+ * By default, the arc is filled from `0.0` to `value`, _clockwise_.
+ * With `reverse: true` the arc is filled from `1.0` to `value`, _counter-clockwise_.
+ * @type {boolean}
+ * @default false
+ */
+ reverse: false,
+
+ /**
+ * Arc line cap: `'butt'`, `'round'` or `'square'` -
+ * [read more]{@link https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.lineCap}.
+ * @type {string}
+ * @default 'butt'
+ */
+ lineCap: 'butt',
+
+ /**
+ * Canvas insertion mode: append or prepend it into the parent element?
+ * @type {string}
+ * @default 'prepend'
+ */
+ insertMode: 'prepend',
+
+ //------------------------------ protected properties and methods ------------------------------
+ /**
+ * Link to {@link CircleProgress} constructor.
+ * @protected
+ */
+ constructor: CircleProgress,
+
+ /**
+ * Container element. Should be passed into constructor config.
+ * @protected
+ * @type {jQuery}
+ */
+ el: null,
+
+ /**
+ * Canvas element. Automatically generated and prepended to [this.el]{@link CircleProgress#el}.
+ * @protected
+ * @type {HTMLCanvasElement}
+ */
+ canvas: null,
+
+ /**
+ * 2D-context of [this.canvas]{@link CircleProgress#canvas}.
+ * @protected
+ * @type {CanvasRenderingContext2D}
+ */
+ ctx: null,
+
+ /**
+ * Radius of the outer circle. Automatically calculated as `[this.size]{@link CircleProgress#size} / 2`.
+ * @protected
+ * @type {number}
+ */
+ radius: 0.0,
+
+ /**
+ * Fill of the main arc. Automatically calculated, depending on [this.fill]{@link CircleProgress#fill} option.
+ * @protected
+ * @type {string|CanvasGradient|CanvasPattern}
+ */
+ arcFill: null,
+
+ /**
+ * Last rendered frame value.
+ * @protected
+ * @type {number}
+ */
+ lastFrameValue: 0.0,
+
+ /**
+ * Init/re-init the widget.
+ *
+ * Throws a jQuery event:
+ *
+ * - `circle-inited(jqEvent)`
+ *
+ * @param {object} config - You can customize any class member (property or method).
+ */
+ init: function(config) {
+ $.extend(this, config);
+ this.radius = this.size / 2;
+ this.initWidget();
+ this.initFill();
+ this.draw();
+ this.el.trigger('circle-inited');
+ },
+
+ /**
+ * Initialize `
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/inc/includes/auto-setup/views/system_info.php b/inc/includes/auto-setup/views/system_info.php
index bd6836c..5dceeec 100644
--- a/inc/includes/auto-setup/views/system_info.php
+++ b/inc/includes/auto-setup/views/system_info.php
@@ -289,6 +289,11 @@
?>