"use strict";var debugit=false;var strongController={defaults:{method:"",universalTimer:500,observerTimer:500,containerId:"page",addedNodeId:"content",event:"",script:"",debug:false},config:{},setup:function(settings){settings.universalTimer=parseInt(settings.universalTimer);settings.observerTimer=parseInt(settings.observerTimer);settings.debug=!!settings.debug;debugit=settings.debug;this.config=jQuery.extend({},this.defaults,settings)},mutationObserver:window.MutationObserver||window.WebKitMutationObserver,eventListenerSupported:window.addEventListener,checkInit:function(){return jQuery(".strong-view[data-state='idle']").length},initSliders:function(){var sliders=jQuery(".strong-view.slider-container[data-state='idle']");if(debugit)console.log("sliders found:",sliders.length);if(sliders.length){sliders.each(function(){jQuery(this).strongSlider()})}},initPagers:function(){var pagers=jQuery(".strong-pager[data-state='idle']");if(debugit)console.log("pagers found:",pagers.length);if(pagers.length){pagers.each(function(){jQuery(this).strongPager()})}},initLayouts:function(){var grids=jQuery(".strong-view[data-state='idle'] .strong-masonry");if(debugit)console.log("Masonry found:",grids.length);if(grids.length){grids.prepend('
');grids.imagesLoaded(function(){grids.masonry({columnWidth:".grid-sizer",gutter:".gutter-sizer",itemSelector:".testimonial",percentPosition:true});grids.closest(".strong-view").attr("data-state","init")})}},initForm:function(){var forms=jQuery(".strong-form[data-state='idle']");if(debugit)console.log("forms found:",forms.length);if(forms.length){strongValidation.init()}},observer:function(obj,callback){if(this.mutationObserver){var obs=new this.mutationObserver(function(mutations){for(var i=0;i checkInit",strongController.checkInit());if(strongController.checkInit()){strongController.start()}},strongController.config.universalTimer)},newTimeout:function(){strongController.timeoutId=setTimeout(function tick(){if(debugit)console.log("tick > checkInit",strongController.checkInit());if(strongController.checkInit()){strongController.start()}},strongController.config.observerTimer)},init:function(){jQuery(document).focus();if(debugit)console.log("strongController init");var settings={};if(typeof window.strongControllerParms!=="undefined"){settings=window.strongControllerParms}else{if(debugit)console.log("settings not found")}this.setup(settings);if(debugit)console.log("config",this.config)},start:function(){if(debugit)console.log("start");strongController.initSliders();strongController.initPagers();strongController.initLayouts();strongController.initForm()},listen:function(){if(debugit)console.log("listen");switch(this.config.method){case"universal":this.newInterval();break;case"observer":this.observer(document.getElementById(this.config.containerId),this.newTimeout);break;case"event":document.addEventListener(this.config.event,this.start);break;case"script":switch(this.config.script){case"barba":if(typeof Barba==="object"&&Barba.hasOwnProperty("Dispatcher")){Barba.Dispatcher.on("transitionCompleted",this.start)}break;default:}break;default:}}};jQuery(document).ready(function($){strongController.init();strongController.start();strongController.listen()});