function handleCountdownSettings(e,t){var n=0;if("time"===e.type){var o=e.timeDateTime.replace(" ","T").replace(/(T\d{2}\:\d{2})$/,"$1:00");if(!o)return;e.timezoneOffset&&(o+=e.timezoneOffset.replace("GMT",""));var i=new Date(o);if(i&&i.getTime&&!isNaN(i.getTime())){var s=new Date;n=i.getTime()/1e3-s.getTime()/1e3}}else n+=~~e.valueSeconds,n+=60*~~e.valueMinutes,n+=60*~~e.valueHours*60,n+=60*~~e.valueDays*60*24;return n<0?n=0:(n>36e4||"manual"===e.type&&~~e.valueDays)&&(t.clockFace="DailyCounter"),n}!function(e,t,n){function o(e,t){return typeof e===t}function i(){var e,t,n,i,s,a,r;for(var l in b)if(b.hasOwnProperty(l)){if(e=[],t=b[l],t.name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;n<t.options.aliases.length;n++)e.push(t.options.aliases[n].toLowerCase());for(i=o(t.fn,"function")?t.fn():t.fn,s=0;s<e.length;s++)a=e[s],r=a.split("."),1===r.length?C[r[0]]=i:(!C[r[0]]||C[r[0]]instanceof Boolean||(C[r[0]]=new Boolean(C[r[0]])),C[r[0]][r[1]]=i),w.push((i?"":"no-")+r.join("-"))}}function s(e){var t=j.className,n=C._config.classPrefix||"";if(x&&(t=t.baseVal),C._config.enableJSClass){var o=new RegExp("(^|\\s)"+n+"no-js(\\s|$)");t=t.replace(o,"$1"+n+"js$2")}C._config.enableClasses&&(t+=" "+n+e.join(" "+n),x?j.className.baseVal=t:j.className=t)}function a(e,t){return!!~(""+e).indexOf(t)}function r(){return"function"!=typeof t.createElement?t.createElement(arguments[0]):x?t.createElementNS.call(t,"http://www.w3.org/2000/svg",arguments[0]):t.createElement.apply(t,arguments)}function l(e){return e.replace(/([a-z])-([a-z])/g,function(e,t,n){return t+n.toUpperCase()}).replace(/^-/,"")}function c(e,t){return function(){return e.apply(t,arguments)}}function u(e,t,n){var i;for(var s in e)if(e[s]in t)return n===!1?e[s]:(i=t[e[s]],o(i,"function")?c(i,n||t):i);return!1}function d(e){return e.replace(/([A-Z])/g,function(e,t){return"-"+t.toLowerCase()}).replace(/^ms-/,"-ms-")}function f(t,n,o){var i;if("getComputedStyle"in e){i=getComputedStyle.call(e,t,n);var s=e.console;if(null!==i)o&&(i=i.getPropertyValue(o));else if(s){var a=s.error?"error":"log";s[a].call(s,"getComputedStyle returning null, its possible modernizrStudio test results are inaccurate")}}else i=!n&&t.currentStyle&&t.currentStyle[o];return i}function p(){var e=t.body;return e||(e=r(x?"svg":"body"),e.fake=!0),e}function h(e,n,o,i){var s,a,l,c,u="modernizrStudio",d=r("div"),f=p();if(parseInt(o,10))for(;o--;)l=r("div"),l.id=i?i[o]:u+(o+1),d.appendChild(l);return s=r("style"),s.type="text/css",s.id="s"+u,(f.fake?f:d).appendChild(s),f.appendChild(d),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(t.createTextNode(e)),d.id=u,f.fake&&(f.style.background="",f.style.overflow="hidden",c=j.style.overflow,j.style.overflow="hidden",j.appendChild(f)),a=n(d,e),f.fake?(f.parentNode.removeChild(f),j.style.overflow=c,j.offsetHeight):d.parentNode.removeChild(d),!!a}function m(t,o){var i=t.length;if("CSS"in e&&"supports"in e.CSS){for(;i--;)if(e.CSS.supports(d(t[i]),o))return!0;return!1}if("CSSSupportsRule"in e){for(var s=[];i--;)s.push("("+d(t[i])+":"+o+")");return s=s.join(" or "),h("@supports ("+s+") { #modernizrStudio { position: absolute; } }",function(e){return"absolute"==f(e,null,"position")})}return n}function v(e,t,i,s){function c(){d&&(delete N.style,delete N.modElem)}if(s=!o(s,"undefined")&&s,!o(i,"undefined")){var u=m(e,i);if(!o(u,"undefined"))return u}for(var d,f,p,h,v,g=["modernizrStudio","tspan","samp"];!N.style&&g.length;)d=!0,N.modElem=r(g.shift()),N.style=N.modElem.style;for(p=e.length,f=0;p>f;f++)if(h=e[f],v=N.style[h],a(h,"-")&&(h=l(h)),N.style[h]!==n){if(s||o(i,"undefined"))return c(),"pfx"!=t||h;try{N.style[h]=i}catch(y){}if(N.style[h]!=v)return c(),"pfx"!=t||h}return c(),!1}function g(e,t,n,i,s){var a=e.charAt(0).toUpperCase()+e.slice(1),r=(e+" "+_.join(a+" ")+a).split(" ");return o(t,"string")||o(t,"undefined")?v(r,t,i,s):(r=(e+" "+T.join(a+" ")+a).split(" "),u(r,t,n))}function y(e,t,o){return g(e,n,n,t,o)}var w=[],b=[],S={_version:"3.5.0",_config:{classPrefix:"studio-",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){b.push({name:e,fn:t,options:n})},addAsyncTest:function(e){b.push({name:null,fn:e})}},C=function(){};C.prototype=S,C=new C;var j=t.documentElement,x="svg"===j.nodeName.toLowerCase(),k="Moz O ms Webkit",_=S._config.usePrefixes?k.split(" "):[];S._cssomPrefixes=_;var T=S._config.usePrefixes?k.toLowerCase().split(" "):[];S._domPrefixes=T;var P={elem:r("modernizrStudio")};C._q.push(function(){delete P.elem});var N={style:P.elem.style};C._q.unshift(function(){delete N.style}),S.testAllProps=g,S.testAllProps=y,C.addTest("flexbox",y("flexBasis","1px",!0)),i(),s(w),delete S.addTest,delete S.addAsyncTest;for(var E=0;E<C._q.length;E++)C._q[E]();e.ModernizrStudio=C}(window,document),function(){function e(){for(var t=1;t<arguments.length;t++)for(var n in arguments[t])arguments[t].hasOwnProperty(n)&&("object"==typeof arguments[0][n]&&"object"==typeof arguments[t][n]?e(arguments[0][n],arguments[t][n]):arguments[0][n]=arguments[t][n]);return arguments[0]}var t,n=document.currentScript;n&&(t=n.getAttribute("src"));var o=function(e){e(function(){function n(e,t){var n;try{n=JSON.parse(decodeURIComponent(e.data("component-settings")))}catch(o){return void console.log(o)}t(n)}function o(e,t){var n=document.createElement("script");n.src=e,n.onload=t;var o=document.getElementsByTagName("head")[0];o.appendChild(n)}function i(e,n){var o=document.createElement("link"),i=document.getElementsByTagName("head")[0];if(o.rel="stylesheet",n){if(!t)return;e=t.replace(/(.*)\/[a-z|0-9|\-|\.]*?\.js(\?.*?)?$/i,"$1/"+e+"$2")}o.href=e,i.appendChild(o)}function s(){e.each(l,function(e,t){t.find(".slider-on-content").slick(t.data("slider-settings"))})}function a(){e.each(u,function(e,t){var n=t.data("countdown-settings"),o={autoStart:!0,countdown:!0},i=n?handleCountdownSettings(n,o):0;o.clockFace&&t.addClass("flipclock-has-days"),t.on("click","a",function(e){e.preventDefault()}),FlipClock(t.find(".studio-countdown"),i,o)})}if(!e('link[href*="blogstudio/blocks.css"]').length){var r=e('script[src*="blogstudio-dev.js"]:eq(0), script[src*="blogstudio.dist.js"]:eq(0)').attr("src");r=r.replace(/assets\/shared\/js\/blogstudio(.dist|\-dev)?.js/,"blocks.css"),r=r.indexOf("shop=")!==-1?r:r+"?shop="+(void 0!=Shopify&&void 0!=Shopify.shop?Shopify.shop:""),e('<link rel="stylesheet" type="text/css" href="'+r+'"></link>').appendTo("head")}window.location.search.indexOf("contact_posted=true")>=0&&(e('[data-sse-sel="form_ack"]').show(),"function"==typeof window.Shoppad.apps.blogstudio.config.contactFormPostDone&&window.Shoppad.apps.blogstudio.config.contactFormPostDone()),e('.is-arrow-down a[href="#"]').click(function(t){return e(this).parents(".is-section").next().html()&&e("html,body").animate({scrollTop:e(this).parents(".is-section").next().offset().top},800),t.preventDefault(),t.stopImmediatePropagation(),!1}),e(document).on("click",'[data-sse-cmd="formsubmit"]',function(){var t=e(this).parents("form"),n=t.find("[required]").filter(function(){return""==e(this).val()});if(n.length>0)return alert("Please fill out the required fields."),!1;var o=function(){e('[data-sse-sel="form_ack"]').show(),t.get(0).reset(),"function"==typeof window.Shoppad.apps.blogstudio.config.contactFormPostDone&&window.Shoppad.apps.blogstudio.config.contactFormPostDone()};return e.post("/contact",t.serialize()).done(function(e){return"string"==typeof e&&(e.indexOf("status-code-500")>=0||e.indexOf("/challenge")>=0)?void t.get(0).submit():void o()}).fail(function(){t.get(0).submit()}),!1}),e('[data-sse-special="buynowbutton"]').each(function(){var t=this,n=e(this),o=n.find("a,button"),i=o.attr("href");if("LINK_TO_YOUR_PRODUCT"==i)return alert("Buy Now button is not setup."),!1;var s=document.createElement("a");s.href=i;var a=i.substring(i.lastIndexOf("/")+1);a=a.replace(s.search,""),e.getJSON("/products/"+a+".json").done(function(i){var s=n.find("select");if(s.length){s.html("");var a=i.product.variants.filter(function(e){return!e.inventory_management||"shopify"===e.inventory_management&&("continue"===e.inventory_policy||!("inventory_quantity"in e)||e.inventory_quantity>0)});e.each(a,function(){s.append('<option value="'+this.id+'">'+this.title+"</option>")}),0===a.length?n.hide():1===a.length&&s.hide()}o.on("click",function(){var n=s.length?s.val():i.product.variants[0].id,o="/cart/"+n+":1";return e(this).prop("disabled",!0),"_blank"==e(t).prop("target")?parent.window.open(o,"_blank"):parent.window.location.href=o,!1})}).fail(function(){alert("Buy Now button is not properly configured.")})}),e('[data-component="AdvancedScript"]').each(function(){$self=e(this),$self.html(e("textarea",$self).val())}),e('[data-component="MailChimp"]').each(function(){$self=e(this),$self.html(e("textarea",$self).val())});var l=[],c=!1;e('[data-component="ImageSlider"]').each(function(){var t=e(this);c||(o("https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.js",s),c=!0),n(t,function(e){t.data("slider-settings",e),l.push(t)})});var u=[],d=!1;e('[data-component="AdvancedCountdown"]').each(function(){var t=e(this);d||(o("https://cdnjs.cloudflare.com/ajax/libs/flipclock/0.7.8/flipclock.js",a),i("../css/flipclock-animations.css",!0),d=!0),n(t,function(e){t.data("countdown-settings",e),u.push(t)})})})};if(window.Shoppad=e({apps:{blogstudio:{config:{loadjQuery:!1,contactFormPostDone:null}}}},window.Shoppad),window.jQuery&&window.Shoppad.apps.blogstudio.config.loadjQuery===!1)o(window.jQuery);else{var i=document.createElement("script");i.src="//ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js",i.onload=function(){jQuery.noConflict(!1),o(jQuery)},document.getElementsByTagName("head")[0].appendChild(i)}}();