{"version":3,"sources":["assets/js/script.js"],"names":["$","window","fitVids","document","undefined","pageCalculations","onEvent","addEventListener","func","innerWidth","innerHeight","blogIsotope","trigger","length","each","this","isotope","layoutMode","masonry","columnWidth","on","img_sel","parent_sel","wpc_add_img_bg","_this","$imgDataHidden","data","$parent","closest","parent","css","src","addClass","show","hide","footerH","toggleClass","slideToggle","fadeOut","footer","paddValue","outerHeight","bind","calcPaddingMainWrapper","setTimeout","adminBarPositionFix","headerH","errorH","height","errorPageHeight"],"mappings":"cAAC,SAAWA,EAAGC,GAKV,GAFsB,mBAAZC,SAHbF,EAAA,QAAaC,QAAQE,CAAAA,OAAUC,gHAK5B,mBAAAC,EAAA,CAQG,IAAgBA,EAAkBC,EAAUL,EAAOM,kBAEnDF,EAAmB,SAAUG,GAElBP,EAAOQ,WACPR,EAAOS,YALlBF,IAAgBH,EAAAA,OAAhBG,GAAA,GAAkCF,EAAUL,SAAOM,GAAAA,GAW/CD,EAAQ,oBAAqBE,GAAM,MAJxB,WAEXF,MAwBC,SAHDK,IAKMX,EAACY,wBAAPC,QACHb,EAAA,wBAAAc,KAAA,WACJd,EAAAe,MAMgBC,QAAQ,CAJhBL,aAAc,oBACbM,WAAD,UACCC,QAAA,CACeC,YAAb,yBA/BJb,EAAAA,GAAQc,GAAA,OAAA,YAgCS,SAAbC,EAAAC,GAFJ,IAAAD,EAUH,OAGL,IAASE,EAAAA,EAAwBD,EACzBtB,EAACqB,GAASP,KAAA,WACVU,EAAAxB,EAAAe,MACHU,EAAAD,EAAAE,KAAA,aAEGC,GAIAA,EAAUH,EAAMI,QAAQN,IAJfG,OAAbE,EAAAH,EAAAK,UAMYC,IAAI,mBAAoB,OAASf,KAAKgB,IAAM,KAAKC,SAAS,iBAL3DlB,GACGU,EAAVM,IAAA,aAAA,UACAL,EAAcQ,QAGNH,EAAII,SApDbX,CAAA,YAuECvB,EAAA,wCAEkCmC,GAArB,QAFb,WAKHnC,EAAAe,MAAAqB,YAAA,UACJpC,EAAA,iCAAAa,QAOOb,EAAE,iCAAiCqC,gBAAnCrC,EAAAA,GAAEoB,GAAA,OAAA,WACLpB,EAAA,oBAAAsC,QAAA,OAIHrC,EAAAA,GAAFmB,GAAa,gCAAoB,YAvF7Bf,WAAA,GAAAL,EAAA,iBAAAa,OAAA,CAGH,IAAA0B,EAAAvC,EAAA,iBAUWwC,EAAYD,EAAOE,cAP3BlB,EAAemB,KAAA,eAAf,WADJ1C,EAAA,QAAA8B,IAAA,iBAAAU,KAOYD,EAASvC,QAAE,iBA4EjB2C,GADNC,WAAAjC,EAAA,KApCQX,EAIK,eAAAa,QACDW,EAAMU,eAANJ,IAAA,WAAA,SAWZ,WANA,GAASe,EAAAA,sBAAsBhC,OAAA,CACrB,IAAAsB,EAAetB,EAAAA,iBAAQA,OAAAb,EAAA,iBAAAyC,cAAA,EACvBK,EAAF9C,EAAqB,uBAArBa,OAAAb,EAAA,uBAAAyC,cAAA,EACHM,EAAA/C,EAAAC,GAAA+C,SAAAb,EAAAW,EASG9C,EAAE,sBAAsByC,YAAYM,IAkBxCJ,KAvHP,CA0HOM,OAAAA,OAAe9C","file":"script.min.js","sourcesContent":[";(function ($, window, document, undefined) {\n 'use strict';\n\n if (typeof fitVids === 'function') {\n $('body').fitVids({ignore: '.vimeo-video, .youtube-simple-wrap iframe, .iframe-video.for-btn iframe, .post-media.video-container iframe'});\n }\n\n /*=================================*/\n /* PAGE CALCULATIONS */\n /*=================================*/\n\n if (typeof pageCalculations !== 'function') {\n\n var winW, winH, pageCalculations, onEvent = window.addEventListener;\n\n pageCalculations = function (func) {\n\n winW = window.innerWidth;\n winH = window.innerHeight;\n\n if (!func) return;\n\n onEvent('load', func, true); // window onload\n onEvent('resize', func, true); // window resize\n onEvent(\"orientationchange\", func, false); // window orientationchange\n\n }; // end pageCalculations\n\n pageCalculations(function () {\n pageCalculations();\n });\n }\n\n $(window).on('load', function () {\n wpc_add_img_bg('.js-bg');\n });\n\n function calcPaddingMainWrapper() {\n\n if ($('.custo-footer').length) {\n var footer = $('.custo-footer');\n var paddValue = footer.outerHeight();\n\n footer.bind('heightChange', function () {\n $('body').css('padding-bottom', paddValue);\n\n });\n\n footer.trigger('heightChange');\n }\n }\n\n function blogIsotope() {\n if ($('.custo-blog--isotope').length) {\n $('.custo-blog--isotope').each(function () {\n var self = $(this);\n self.isotope({\n itemSelector: '.custo-blog--post',\n layoutMode: 'masonry',\n masonry: {\n columnWidth: '.custo-blog--post'\n }\n });\n });\n }\n }\n\n function wpc_add_img_bg(img_sel, parent_sel) {\n if (!img_sel) {\n return false;\n }\n\n var $parent, $imgDataHidden, _this;\n $(img_sel).each(function () {\n _this = $(this);\n $imgDataHidden = _this.data('s-hidden');\n $parent = _this.closest(parent_sel);\n $parent = $parent.length ? $parent : _this.parent();\n $parent.css('background-image', 'url(' + this.src + ')').addClass('s-back-switch');\n if ($imgDataHidden) {\n _this.css('visibility', 'hidden');\n _this.show();\n }\n else {\n _this.hide();\n }\n });\n }\n\n function adminBarPositionFix() {\n if ($('#wpadminbar').length) {\n $('#wpadminbar').css('position', 'fixed');\n }\n }\n\n function errorPageHeight() {\n if ($('.custo-error--wrap').length) {\n var footerH = $('.custo-footer').length ? $('.custo-footer').outerHeight() : 0,\n headerH = $('.custo-header--wrap').length ? $('.custo-header--wrap').outerHeight() : 0,\n errorH = $(window).height() - footerH - headerH;\n\n $('.custo-error--wrap').outerHeight(errorH);\n }\n }\n\n\n $('.custo-blog--single__comments-button').on('click', function () {\n\n $(this).toggleClass('active');\n if ($('.custo-blog--single__comments').length) {\n $('.custo-blog--single__comments').slideToggle();\n }\n });\n\n\n $(window).on('load', function () {\n $('.custo-preloader').fadeOut(200);\n });\n $(window).on('load resize orientationchange', function () {\n calcPaddingMainWrapper();\n setTimeout(blogIsotope, 200);\n adminBarPositionFix();\n errorPageHeight();\n });\n\n})(jQuery, window, document);"]}