{"version":3,"file":"/sites/all/themes/sparkly/js/forhome.js","sources":["webpack:////sites/all/themes/sparkly/js/forhome.js"],"sourcesContent":["!function(e){function t(n){if(o[n])return o[n].exports;var a=o[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var o={};t.m=e,t.c=o,t.d=function(e,o,n){t.o(e,o)||Object.defineProperty(e,o,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,\"a\",o),o},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p=\"\",t(t.s=287)}({287:function(e,t,o){e.exports=o(288)},288:function(e,t,o){\"use strict\";var n=o(289),a=function(e){return e&&e.__esModule?e:{default:e}}(n);o(290);!function(e){function t(e,t){return Math.floor(Math.random()*(t-e+1))+e}var o=e(\"a.hybridauth-widget-provider\").attr(\"href\");e(\"#facebook\").attr(\"href\",o),e(document).ajaxComplete(function(t,o,n){e(\".alert.alert-block.alert-danger\").length}),(new WOW).init(),e(\".carousel-inner .item\").animate({\"background-position\":\"50% 100%\"},5e4,\"linear\"),e(\"body\").once(function(){e(window).width()>1024&&e.scrollify({section:\".section\",sectionName:\"filters\",before:function(t,o){0==t&&e(\"#diamondSection .inner\").addClass(\"topShowContent\"),1==t&&e(\"#diamondSection .inner\").removeClass(\"topShowContent\"),5==t&&e(\".videoBlock\").height(e(\".videoBlock\").closest(\".homeSection\").height()-e(\".homeFooter\").outerHeight())}}),e(\"select, .nailColorCheckboxes input[type=checkbox], .shapeCheckboxes input[type=checkbox]\").styler(),e(\".caratSlider\").slider({min:\"0\",max:\"15\",step:\"0.01\",value:[0,15]}),e(\".ringSize\").slider({min:\"0\",max:\"15\",step:\"0.01\",value:[0,15]})}),e(\"body\").once(function(){var o,n,a=t(0,15),i=t(0,15),r=t(0,15),l=t(0,15);o=Math.random()-.5>0?.1:-.1,n=Math.random()-.5>0?.1:-.1,intervalID=setInterval(function(){a<0&&(a=0,o=.1),a>15&&(a=15,o=-.1),i<0&&(i=0,n=.1),i>15&&(i=15,n=-.1),r<0&&(r=0,o=.1),r>15&&(r=15,o=-.1),l<0&&(l=0,n=.1),l>15&&(l=15,n=-.1);var c=t(0,5),s=t(0,5);e(\".shapeCheckboxes label:eq(\"+c+\") .jq-checkbox\").addClass(\"checked\"),e(\".shapeCheckboxes label:eq(\"+s+\") .jq-checkbox\").removeClass(\"checked\");var u=t(0,7),d=t(0,7);e(\".nailColorCheckboxes label:eq(\"+u+\") .jq-checkbox\").addClass(\"checked\"),e(\".nailColorCheckboxes label:eq(\"+d+\") .jq-checkbox\").removeClass(\"checked\")},1500),slider2=setInterval(function(){a>=0&&a<=15&&i>=0&&i<=15&&(e(\".caratSlider\").slider(\"setValue\",[a,i]),a=0&&r<=15&&l>=0&&l<=15&&(e(\".ringSize\").slider(\"setValue\",[r,l]),r0?(0,a.default)(e):window.localStorage.setItem(\"repeatPopup\",String(!1))})}(jQuery),document.addEventListener(\"DOMContentLoaded\",function(){window.localStorage.getItem(\"scrollItems\")&&window.localStorage.removeItem(\"scrollItems\")})},289:function(e,t,o){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){function t(){window.localStorage.setItem(\"repeatPopup\",String(!1)),setTimeout(function(){l.modal(\"hide\")},i)}function o(e){return!e.includes(\"alert\")}function n(e){return!!/^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(String(e))}function a(t,o){e.ajax({method:\"POST\",url:\"https://api2.autopilothq.com/v1/contact\",dataType:\"json\",contentType:\"application/json\",headers:{autopilotapikey:o},data:JSON.stringify({contact:{Email:t}}),success:function(n,a,i){mixpanel.track(\"Contact added From Newsletter\",{\"User Email\":t}),fbq(\"track\",\"Lead\");e.ajax({method:\"POST\",headers:{autopilotapikey:o},url:\"https://api2.autopilothq.com/v1/list/contactlist_46188104-42CE-4625-98AF-14710A921121/contact/\"+t,success:function(e,t,o){},error:function(e,t,o){}})},error:function(e,t,o){}})}var i=2e3,r=!1,l=e(\"#newsletter-popup\"),c=(Math.round(1e3*Math.random()),!1),s=\"\",u=(window.innerHeight,!1);window.localStorage.getItem(\"repeatPopup\")||window.localStorage.setItem(\"repeatPopup\",String(!0)),e(\"#resiterPopup, #loginPopup\").on(\"hidden.bs.modal\",function(){r=!1}).on(\"show.bs.modal\",function(){r=!0}),\"true\"===window.localStorage.getItem(\"repeatPopup\")&&setTimeout(function(){r||l.modal(\"show\"),c=!0},9e4),e(function(){e(\"#webform-client-form-29621 button\").click(function(){s=document.querySelector(\"#webform-client-form-29621 #edit-submitted-email\").value}),e(document).ajaxSuccess(function(e,i,r){\"/system/ajax\"===r.url&&\"op\"===r.extraData._triggering_element_name&&\"Keep browsing\"===r.extraData._triggering_element_value&&n(s)&&o(i.responseText)&&(a(s,\"3883f696e9e34165b3a2e9f1f68c1a84\"),t())}),e(\"#newsletter-popup\").on(\"show.bs.modal\",function(){u=!0}).on(\"hide.bs.modal\",function(){u=!1})})}},290:function(e,t,o){\"use strict\";function n(e,t,o){var n=new Date;return n.setTime(+n+60*o*60*1e3),window.document.cookie=e+\"=\"+t+\"; expires=\"+n.toGMTString()+\"; path=/\",t}Object.defineProperty(t,\"__esModule\",{value:!0}),t.writeCookie=n}});\n\n\n// WEBPACK FOOTER //\n// /sites/all/themes/sparkly/js/forhome.js"],"mappings":"AAAA","sourceRoot":""}