Deprecated: ord(): Passing null to parameter #1 ($character) of type string is deprecated in /home/smith5555/dev.ambientbp.com/min/lib/JSMin.php on line 333

Deprecated: ord(): Passing null to parameter #1 ($character) of type string is deprecated in /home/smith5555/dev.ambientbp.com/min/lib/JSMin.php on line 333

Warning: Cannot modify header information - headers already sent by (output started at /home/smith5555/dev.ambientbp.com/min/lib/JSMin.php:333) in /home/smith5555/dev.ambientbp.com/min/lib/Minify.php on line 348

Warning: Cannot modify header information - headers already sent by (output started at /home/smith5555/dev.ambientbp.com/min/lib/JSMin.php:333) in /home/smith5555/dev.ambientbp.com/min/lib/Minify.php on line 348

Warning: Cannot modify header information - headers already sent by (output started at /home/smith5555/dev.ambientbp.com/min/lib/JSMin.php:333) in /home/smith5555/dev.ambientbp.com/min/lib/Minify.php on line 348

Warning: Cannot modify header information - headers already sent by (output started at /home/smith5555/dev.ambientbp.com/min/lib/JSMin.php:333) in /home/smith5555/dev.ambientbp.com/min/lib/Minify.php on line 348

Warning: Cannot modify header information - headers already sent by (output started at /home/smith5555/dev.ambientbp.com/min/lib/JSMin.php:333) in /home/smith5555/dev.ambientbp.com/min/lib/Minify.php on line 348

Warning: Cannot modify header information - headers already sent by (output started at /home/smith5555/dev.ambientbp.com/min/lib/JSMin.php:333) in /home/smith5555/dev.ambientbp.com/min/lib/Minify.php on line 348

Warning: Cannot modify header information - headers already sent by (output started at /home/smith5555/dev.ambientbp.com/min/lib/JSMin.php:333) in /home/smith5555/dev.ambientbp.com/min/lib/Minify.php on line 348
/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */ !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):i==t?this.pause().cycle():this.slide(idocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},s.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},s.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:t},m.prototype.init=function(t,e,i){if(this.enabled=!0,this.type=t,this.$element=g(e),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&g(document).find(g.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},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!");for(var o=this.options.trigger.split(" "),n=o.length;n--;){var s=o[n];if("click"==s)this.$element.on("click."+this.type,this.options.selector,g.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",r="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,g.proxy(this.enter,this)),this.$element.on(r+"."+this.type,this.options.selector,g.proxy(this.leave,this))}}this.options.selector?this._options=g.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},m.prototype.getDefaults=function(){return m.DEFAULTS},m.prototype.getOptions=function(t){var e=this.$element.data();for(var i in e)e.hasOwnProperty(i)&&-1!==g.inArray(i,o)&&delete e[i];return(t=g.extend({},this.getDefaults(),e,t)).delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t.sanitize&&(t.template=n(t.template,t.whiteList,t.sanitizeFn)),t},m.prototype.getDelegateOptions=function(){var i={},o=this.getDefaults();return this._options&&g.each(this._options,function(t,e){o[t]!=e&&(i[t]=e)}),i},m.prototype.enter=function(t){var e=t instanceof this.constructor?t:g(t.currentTarget).data("bs."+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e)),t instanceof g.Event&&(e.inState["focusin"==t.type?"focus":"hover"]=!0),e.tip().hasClass("in")||"in"==e.hoverState)e.hoverState="in";else{if(clearTimeout(e.timeout),e.hoverState="in",!e.options.delay||!e.options.delay.show)return e.show();e.timeout=setTimeout(function(){"in"==e.hoverState&&e.show()},e.options.delay.show)}},m.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},m.prototype.leave=function(t){var e=t instanceof this.constructor?t:g(t.currentTarget).data("bs."+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e)),t instanceof g.Event&&(e.inState["focusout"==t.type?"focus":"hover"]=!1),!e.isInStateTrue()){if(clearTimeout(e.timeout),e.hoverState="out",!e.options.delay||!e.options.delay.hide)return e.hide();e.timeout=setTimeout(function(){"out"==e.hoverState&&e.hide()},e.options.delay.hide)}},m.prototype.show=function(){var t=g.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var e=g.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!e)return;var i=this,o=this.tip(),n=this.getUID(this.type);this.setContent(),o.attr("id",n),this.$element.attr("aria-describedby",n),this.options.animation&&o.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,r=a.test(s);r&&(s=s.replace(a,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?o.appendTo(g(document).find(this.options.container)):o.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var l=this.getPosition(),h=o[0].offsetWidth,d=o[0].offsetHeight;if(r){var p=s,c=this.getPosition(this.$viewport);s="bottom"==s&&l.bottom+d>c.bottom?"top":"top"==s&&l.top-dc.width?"left":"left"==s&&l.left-ha.top+a.height&&(n.top=a.top+a.height-l)}else{var h=e.left-s,d=e.left+s+i;ha.right&&(n.left=a.left+a.width-d)}return n},m.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},m.prototype.getUID=function(t){for(;t+=~~(1e6*Math.random()),document.getElementById(t););return t},m.prototype.tip=function(){if(!this.$tip&&(this.$tip=g(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},m.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},m.prototype.enable=function(){this.enabled=!0},m.prototype.disable=function(){this.enabled=!1},m.prototype.toggleEnabled=function(){this.enabled=!this.enabled},m.prototype.toggle=function(t){var e=this;t&&((e=g(t.currentTarget).data("bs."+this.type))||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e))),t?(e.inState.click=!e.inState.click,e.isInStateTrue()?e.enter(e):e.leave(e)):e.tip().hasClass("in")?e.leave(e):e.enter(e)},m.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})},m.prototype.sanitizeHtml=function(t){return n(t,this.options.whiteList,this.options.sanitizeFn)};var e=g.fn.tooltip;g.fn.tooltip=function i(o){return this.each(function(){var t=g(this),e=t.data("bs.tooltip"),i="object"==typeof o&&o;!e&&/destroy|hide/.test(o)||(e||t.data("bs.tooltip",e=new m(this,i)),"string"==typeof o&&e[o]())})},g.fn.tooltip.Constructor=m,g.fn.tooltip.noConflict=function(){return g.fn.tooltip=e,this}}(jQuery),function(n){"use strict";var s=function(t,e){this.init("popover",t,e)};if(!n.fn.tooltip)throw new Error("Popover requires tooltip.js");s.VERSION="3.4.1",s.DEFAULTS=n.extend({},n.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),((s.prototype=n.extend({},n.fn.tooltip.Constructor.prototype)).constructor=s).prototype.getDefaults=function(){return s.DEFAULTS},s.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();if(this.options.html){var o=typeof i;this.options.sanitize&&(e=this.sanitizeHtml(e),"string"===o&&(i=this.sanitizeHtml(i))),t.find(".popover-title").html(e),t.find(".popover-content").children().detach().end()["string"===o?"html":"append"](i)}else t.find(".popover-title").text(e),t.find(".popover-content").children().detach().end().text(i);t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},s.prototype.hasContent=function(){return this.getTitle()||this.getContent()},s.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},s.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var t=n.fn.popover;n.fn.popover=function e(o){return this.each(function(){var t=n(this),e=t.data("bs.popover"),i="object"==typeof o&&o;!e&&/destroy|hide/.test(o)||(e||t.data("bs.popover",e=new s(this,i)),"string"==typeof o&&e[o]())})},n.fn.popover.Constructor=s,n.fn.popover.noConflict=function(){return n.fn.popover=t,this}}(jQuery),function(s){"use strict";function n(t,e){this.$body=s(document.body),this.$scrollElement=s(t).is(document.body)?s(window):s(t),this.options=s.extend({},n.DEFAULTS,e),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",s.proxy(this.process,this)),this.refresh(),this.process()}function e(o){return this.each(function(){var t=s(this),e=t.data("bs.scrollspy"),i="object"==typeof o&&o;e||t.data("bs.scrollspy",e=new n(this,i)),"string"==typeof o&&e[o]()})}n.VERSION="3.4.1",n.DEFAULTS={offset:10},n.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},n.prototype.refresh=function(){var t=this,o="offset",n=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),s.isWindow(this.$scrollElement[0])||(o="position",n=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var t=s(this),e=t.data("target")||t.attr("href"),i=/^#./.test(e)&&s(e);return i&&i.length&&i.is(":visible")&&[[i[o]().top+n,e]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},n.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),o=this.options.offset+i-this.$scrollElement.height(),n=this.offsets,s=this.targets,a=this.activeTarget;if(this.scrollHeight!=i&&this.refresh(),o<=e)return a!=(t=s[s.length-1])&&this.activate(t);if(a&&e=n[t]&&(n[t+1]===undefined||e .active"),n=i&&r.support.transition&&(o.length&&o.hasClass("fade")||!!e.find("> .fade").length);function s(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),t.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),n?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu").length&&t.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),i&&i()}o.length&&n?o.one("bsTransitionEnd",s).emulateTransitionEnd(a.TRANSITION_DURATION):s(),o.removeClass("in")};var t=r.fn.tab;r.fn.tab=e,r.fn.tab.Constructor=a,r.fn.tab.noConflict=function(){return r.fn.tab=t,this};var i=function(t){t.preventDefault(),e.call(r(this),"show")};r(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery),function(l){"use strict";var h=function(t,e){this.options=l.extend({},h.DEFAULTS,e);var i=this.options.target===h.DEFAULTS.target?l(this.options.target):l(document).find(this.options.target);this.$target=i.on("scroll.bs.affix.data-api",l.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",l.proxy(this.checkPositionWithEventLoop,this)),this.$element=l(t),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function i(o){return this.each(function(){var t=l(this),e=t.data("bs.affix"),i="object"==typeof o&&o;e||t.data("bs.affix",e=new h(this,i)),"string"==typeof o&&e[o]()})}h.VERSION="3.4.1",h.RESET="affix affix-top affix-bottom",h.DEFAULTS={offset:0,target:window},h.prototype.getState=function(t,e,i,o){var n=this.$target.scrollTop(),s=this.$element.offset(),a=this.$target.height();if(null!=i&&"top"==this.affixed)return n").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),e=c.settings.submitHandler.call(c,c.currentForm,b),c.submitButton&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(null!=j&&null!=j.form){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(b,c){i[c]=f[c],delete f[c],"required"===c&&a(j).removeAttr("aria-required")}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g),a(j).attr("aria-required","true")),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}}),a.extend(a.expr.pseudos||a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){var c=a(b).val();return null!==c&&!!a.trim(""+c)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){!this.form&&this.hasAttribute("contenteditable")&&(this.form=a(this).closest("form")[0]);var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler),a(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)a[b]&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.hasAttribute("contenteditable")&&(this.form=a(this).closest("form")[0]),!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type;return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=b.hasAttribute("contenteditable")?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f=a(b).rules(),g=a.map(f,function(a,b){return b}).length,h=!1,i=this.elementValue(b);if("function"==typeof f.normalizer){if(i=f.normalizer.call(b,i),"string"!=typeof i)throw new TypeError("The normalizer should return a string value.");delete f.normalizer}for(d in f){e={method:d,parameters:f[d]};try{if(c=a.validator.methods[d].call(this,i,b,e.parameters),"dependency-mismatch"===c&&1===g){h=!0;continue}if(h=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(j){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",j),j instanceof TypeError&&(j.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),j}}if(!h)return this.objectLength(f)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+""),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return a.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(d,e){b[d]=a.isFunction(e)&&"normalizer"!==d?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e<=d},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var b,c={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)}),a}); ;$(document).ready(function(){'use strict';$(document).on('mouseenter','span a.spl-features-popup',function(){$('#spl-features-modal').modal({show:true,backdrop:true})});$(window).scroll(function(){header();});if($(window).width()>1100){header();} function header(){if($(window).scrollTop()>180){$('.desktop-header').addClass('compact-header');$('.site-naviation-wrapper').addClass('fadeInDown');$('.header-wrapper').addClass('header-wrapper-fixed');$('.sticky-header-phone').css('display','block');}else{$('.desktop-header').removeClass('compact-header');$('.site-naviation-wrapper').removeClass('fadeInDown');$('#header-secondary-navigation-li').removeClass('open');$('.header-wrapper').removeClass('header-wrapper-fixed');$('.sticky-header-phone').css('display','none');$('.drop-overlay').hide();}} if($(window).width()>=1300){var hoverTimeout;$(".header-top-links .dropdown-toggle, .site-navigation-dropdown .dropdown-toggle").hover(function(){var element=$(this).parent(".dropdown");hoverTimeout=setTimeout(function(){element.addClass("open");$('.drop-overlay').show();},250);$('#compact-header-search-li, #compact-header-my-account-li, #header-secondary-navigation-li').removeClass('open');$('.compact-header-search-box, .compact-header-my-account>.dropdown-menu, .header-secondary-navigation, .cart-popup').hide();},function(){clearTimeout(hoverTimeout);var element=$(this).parent(".dropdown");hoverTimeout=setTimeout(function(){element.removeClass("open");$('.drop-overlay').hide();},0);$(".dropdown-menu").hover(function(){clearTimeout(hoverTimeout);},function(){setTimeout(function(){element.removeClass("open");$('.drop-overlay').hide();},250);});});var hoverTimeout2;$(".site-secondary-navigation>li>a").hover(function(){var element=$(this).parent(".dropdown");hoverTimeout2=setTimeout(function(){element.addClass("open");$('.drop-overlay').show();},250);},function(){clearTimeout(hoverTimeout);var element=$(this).parent(".dropdown");hoverTimeout2=setTimeout(function(){element.removeClass("open");},0);$(".dropdown-menu").hover(function(){clearTimeout(hoverTimeout2);},function(){setTimeout(function(){element.removeClass("open");},250);});});$('.drop-overlay').click(function(){$('.drop-overlay').hide();$('#compact-header-search-li, #compact-header-my-account-li, #header-secondary-navigation-li').removeClass('open');$('.compact-header-search-box, .compact-header-my-account>.dropdown-menu, .header-secondary-navigation, .cart-popup').hide();});$('#compact-header-search-li>a').click(function(){$('#compact-header-search-li').toggleClass('open');if($('#compact-header-search-li').hasClass('open')){$('.drop-overlay').show();}else{$('.drop-overlay').hide();} $('.compact-header-search-box').slideToggle();$('.compact-header-my-account>.dropdown-menu, .header-secondary-navigation, .cart-popup').hide();$('#compact-header-my-account-li, #header-secondary-navigation-li').removeClass('open');});$('#compact-header-my-account-li>a').click(function(){$('#compact-header-my-account-li').toggleClass('open');if($('#compact-header-my-account-li').hasClass('open')){$('.drop-overlay').show();}else{$('.drop-overlay').hide();} $('.compact-header-my-account>.dropdown-menu').slideToggle();$('.compact-header-search-box, .header-secondary-navigation, .cart-popup').hide();$('#compact-header-search-li, #header-secondary-navigation-li').removeClass('open');});$('#header-secondary-navigation-li>a').click(function(){$('#header-secondary-navigation-li').toggleClass('open');if($('#header-secondary-navigation-li').hasClass('open')){$('.drop-overlay').show();$('.header-secondary-navigation').slideDown();}else{$('.drop-overlay').hide();$('.header-secondary-navigation').slideUp();} $('.compact-header-search-box, .compact-header-my-account>.dropdown-menu, .cart-popup').hide();$('#compact-header-search-li, #compact-header-my-account-li').removeClass('open');});} var triggered=false;$('.mobile-header .menu-icon').click(function(){$('.mobile-menu-container').addClass('open');$('.mobile-search-box').hide();$('.cart-popup').hide('fast');if($(window).width()<=1069&&!triggered){$.when($.getScript(base_url+"js/mCustomScrollbar/jquery.mCustomScrollbar.min.js")).done(function(){$("#learn-dropdown .dropdown-menu").mCustomScrollbar({setHeight:260});});triggered=true;} return false});$('.mobile-menu-header .menu-close').click(function(){$('body').removeClass('menu-open');$('.mobile-menu-container').removeClass('open');});$('.mobile-header .mobile-navigation .search-icon').click(function(){console.log('search');$('body').removeClass('menu-open');$('.mobile-menu-container').removeClass('open');$('.cart-popup').hide('fast');$('.mobile-search-box').slideToggle('fast');$('.mobile-search-box input[type="text"]').focus();});$('.navbar-toggle, .navbar .navbar-nav>.dropdown>a').click(function(event){$('.responsive-search-container').hide();});$('.navbar-toggle').click(function(){$('.cart-popup').hide('fast');});$('#silc-btn, #live-chat-btn').click(function(e){$("#siWidget-chat").toggle();$("#siWidget-chat").toggleClass("siScale");$(".silc-btn-button").toggleClass('silc-btn-button-close');});$('.mobile-top-bar-chat a').click(function(){var LC_API=window.LC_API||{};LC_API.open_chat_window();});$('.wcn-discounts').click(function(e){e.preventDefault();if($(this).hasClass("active")){$(this).removeClass("active");$(this).html("Hide Pricing");}else{$(this).addClass("active");$(this).html("Show Pricing");} var dataObj={} if(typeof trigger_wcn_discount!='undefined'&&trigger_wcn_discount==true&&e.originalEvent==undefined){dataObj={enable_discount:true}} $('.site-loader').fadeIn('fast');$.ajax({url:ajax_url+'user/update-customer-discounts.php',type:'POST',dataType:'json',data:dataObj,success:function(response){if(response.success){if(e.originalEvent!==undefined){console.log(window.location);var pathname=window.location.pathname;if(pathname.indexOf('thankyou.php')>=0){window.location.href=window.location.origin+pathname+window.location.search;}else{window.location.href=window.location.origin+pathname;}}}else{alert("Error occured. Please try again");} $('.site-loader').fadeOut('fast');},error:function(xhr){alert("Error occured. Please try again");$('.site-loader').fadeOut('fast');}});});if(typeof trigger_wcn_discount!='undefined'&&trigger_wcn_discount==true){$('.wcn-discounts').addClass("active");$('.wcn-discounts').trigger('click');} if(current_page!='checkout.php'){function updateCartVisibility(){var cartCountbtnclick=$('.cart-popup-header h4 span').text();if(parseInt(cartCountbtnclick)>0){$('a.btn.blue-button.proceed-checkout-button').show();$('.cart-popup-total-price-container').show();$('.cart-popup-footer-buttons').css({'display':'block'});}else{$('a.btn.blue-button.proceed-checkout-button').hide();$('.cart-popup-total-price-container').hide();$('.cart-popup-footer-buttons').css({'display':'flex','justify-content':'center'});}} updateCartVisibility();$('.cancel_sample').click(function(){updateCartVisibility();});$('.free-sample-button').click(function(){updateCartVisibility();});var targetNode=document.querySelector('.cart-popup-header h4 span');var config={childList:true,subtree:true,characterData:true};var callback=function(mutationsList,observer){for(var mutation of mutationsList){if(mutation.type==='characterData'||mutation.type==='childList'){updateCartVisibility();}}};var observer=new MutationObserver(callback);observer.observe(targetNode,config);} $('.desktop-header .shopping-cart-icon, .mobile-header .shopping-cart-icon').click(function(){$('.drop-overlay').show();$('#compact-header-search-li, #compact-header-my-account-li, #header-secondary-navigation-li').removeClass('open');$('.compact-header-search-box, .compact-header-my-account>.dropdown-menu, .header-secondary-navigation').hide();$('.mobile-search-box').hide();$('.mobile-menu-container').removeClass('open');var page_name=getPageName(window.location.href);if(page_name=='checkout-old'||page_name=='checkout'){if(page_name=='checkout-old'){$('html, body').animate({scrollTop:$(".checkout_head").offset().top-80},500);} if(page_name=='checkout'){$('html, body').animate({scrollTop:$(".checkout-steps-container").offset().top-100},500);}}else{$('.responsive-search-container').hide('fast');$('#navbar').removeClass('in');if(!$('.cart-popup').is(':visible')){$('.cart-popup').slideToggle('fast');} $.ajax({url:cart_ajax_url+'show-cart.php',type:'POST',dataType:"json",success:function(response){if(response.success==true){$('.cart-popup .cart-popup-content').html(response.cart_html);$('.cart-popup .cart-popup-header h4 span').html(response.cart_count);$('#cart-popup-total-price').html(response.cart_total);$('.header-cart-btn .cart-total').html(response.cart_total);if(response.more_than_5_flooring_samples){$('.cart-limit-sample').show();}else{$('.cart-limit-sample').hide();} if(response.more_than_25_flooring_samples){$('.cart-limit-sample-wholesale-customer').show();}else{$('.cart-limit-sample-wholesale-customer').hide();}}else{alert(response.error_message);}}})}});$('.cart-popup .cart-popup-close-icon').click(function(){$('.cart-popup').slideToggle('fast');$('.drop-overlay').hide();});$('.continue-shopping-button').click(function(){$('.cart-popup').slideToggle('fast');});$('.cart-popup').on('keydown','input[name="quantity"]',function(e){if($.inArray(e.keyCode,[46,8,9,27,13,110,190])!==-1||(e.keyCode==65&&(e.ctrlKey===true||e.metaKey===true))||(e.keyCode>=35&&e.keyCode<=40)){return;} if((e.shiftKey||(e.keyCode<48||e.keyCode>57))&&(e.keyCode<96||e.keyCode>105)){e.preventDefault();}});var update_quantity_action='';$('.cart-popup').on('click','.cart-product-quantity-plus-button',function(){var quantity=parseInt($(this).closest('.cart-product').find('.cart-product-quantity-input').val());update_quantity_action='increase';var productId=$(this).closest('.cart-product').attr('id');var cart_product=$(this).closest('.cart-product');var max_quantity=parseInt(cart_product.attr('data-max-quantity'));if(!isNaN(max_quantity)&&max_quantity>0&&quantity>=max_quantity){cart_product.find('.cart-product-quantity-input').val(max_quantity);alertify.alert("I'm sorry but the quantity you require is not available. We currently have "+max_quantity+" in stock. If this is not sufficient please call us at "+site_phone_toll_free+" and we will reserve these items out of the next incoming shipment for you.");return false;} $(this).closest('.cart-product-quantity').find(".cart-product-quantity-input").trigger("change");});$('.cart-popup').on('click','.cart-product-quantity-minus-button',function(){update_quantity_action='decrease';var productId=$(this).closest('.cart-product').attr('id');var quantity=parseInt($(this).closest('.cart-product').find('.cart-product-quantity-input').val());if(quantity>=2){$(this).closest('.cart-product-quantity').find(".cart-product-quantity-input").trigger("change");}else{$(this).closest('.cart-product').find(".cart-product-delete-icon i").trigger("click");$("#add-to-cart").attr("disabled","disabled");}});$(".cart-popup").on("change","input[name=quantity]",function(){var cart_id=$(this).closest('.cart-product').attr('id').replace("cart-","");var product_id=$(this).closest('.cart-product').attr('data-product-id');var category_id=$(this).closest('.cart-product').attr('data-category-id');var product_user_type=$(this).closest('.cart-product').attr('data-product-type');var quantity=$(this).val();if(quantity==0){$(this).closest('.cart-product').find(".cart-product-delete-icon i").trigger("click");$("#add-to-cart").attr("disabled","disabled");return false;} if(product_user_type=='FREE'&&quantity>=10) {if(update_quantity_action=='increase'){alertify.alert("I'm sorry but there is a limit of 10 samples per item. If you need more than 10 samples please contact our support team at "+site_phone_toll_free+". Thank you!");return false;} else {if(update_quantity_action==''&&quantity>10) {alertify.alert("I'm sorry but there is a limit of 10 samples per item. If you need more than 10 samples please contact our support team at "+site_phone_toll_free+". Thank you!");return false;}}} var cart_product=$(this).closest('.cart-product');var max_quantity=parseInt(cart_product.attr('data-max-quantity'));if(!isNaN(max_quantity)&&max_quantity>0&&parseInt(quantity)>max_quantity){cart_product.find('.cart-product-quantity-input').val(max_quantity);alertify.alert("I'm sorry but the quantity you require is not available. We currently have "+max_quantity+" in stock. If this is not sufficient please call us at "+site_phone_toll_free+" and we will reserve these items out of the next incoming shipment for you.");quantity=max_quantity;} $.ajax({url:cart_ajax_url+'update-quantity.php',type:'POST',dataType:'json',data:{cart_id:cart_id,quantity:quantity,action:update_quantity_action},success:function(response){if(response.success==true){update_quantity_action='';$('#cart-'+cart_id).find('.cart-product-quantity-input').val(response.quantity);$('#cart-'+cart_id).find('.cart-product-price').html(response.product_price);$('#cart-'+cart_id).find('.cart-product-unit-price').html(response.product_unit_price);$('#cart-'+cart_id).find('.cart-product-coverage .cart-product-text').html(response.coverage);$('#cart-popup-total-price').html(response.cart_total);$('.header-cart-btn .cart-total').html(response.cart_total);$('#sample-price-text').text(response.additional_sample_price);if(response.additional_sample_price!=null){$("#sample-price-text").text(response.additional_sample_price);$('#sample_price').show();}else{$('#sample_price').hide();} if(response.exceed_free_floring_sample_limit){$('.cart-limit-sample').show();$('#sample_price').show();}else{$('.cart-limit-sample').hide();$('#sample_price').hide();} if(response.exceed_free_floring_sample_limit_customer){$('.cart-limit-sample-wholesale-customer').show();}else{$('.cart-limit-sample-wholesale-customer').hide();} if($('#products-listing').length>0){if(category_id=='1'||category_id=='3'||category_id=='4'||category_id=='5'||category_id=='6'||category_id=='8'){$('.products').find('[data-product-id="'+product_id+'"]').find(".quick-product-quantity").val(response.quantity);}else if(category_id=='2'||category_id=='7'){$('.products').find('div[data-product-id="'+product_id+'"]').find('[data-sample-length="'+response.sample_length+'"]').val(response.quantity);}} if($('#product-section').length>0){if(category_id=='2'||category_id=='7'){$('.samples-section').find('div[data-product-id="'+product_id+'"]').find('[data-sample-length="'+response.sample_length+'"]').val(response.quantity);}else{$('[data-product-id="'+response.product_id+'"]').find('.matching-product-quantity').val(response.quantity);$('[data-product-id="'+response.product_id+'"]').find('.quick-product-quantity').val(response.quantity);}} if($('#cleaner-products-section').length>0){$('[data-product-id="'+response.product_id+'"]').find('.product-quantity').val(response.quantity);} if(response.discount_message!=''&&response.discount_message!=null){alertify.alert(response.discount_message);} if(response.quantity_out_of_stock_message){alertify.alert(response.quantity_out_of_stock_message);} if(response.instock_edit_mode==true&&response.quantity_out_of_stock_edit_mode_message!=''){alertify.alert(response.quantity_out_of_stock_edit_mode_message);}}else{alertify.alert(response.error_message);} $('.site-loader').fadeOut('fast');}});}) $(".cart-popup").on("click",".cart-product-delete-icon i",function(b){$("#add-to-cart").attr("disabled","disabled");$('.site-loader').fadeIn('fast');var product_id=$(this).closest('.cart-product').attr('data-product-id');var category_id=$(this).closest('.cart-product').attr('data-category-id');var product_type=$(this).closest('.cart-product').attr('data-product-type');var sample_length=$(this).closest('.cart-product').attr('data-sample-length');$.ajax({url:cart_ajax_url+"remove-product.php",type:"POST",data:{id:product_id,type:product_type,sample_length:sample_length},dataType:"json",success:function(response){if(response.success==true){$('.cart-popup').find('[data-product-id="'+product_id+'"][data-product-type="'+product_type+'"][data-sample-length="'+sample_length+'"]').slideUp();$('.cart-popup-header h4 span').html(response.total_items_in_cart);$('.shopping-cart-icon span.count').html(response.total_items_in_cart);if(response.total_items_in_cart<1){cart_contains_product=false;$('.cart-popup .cart-popup-content').html('
There are no items in your cart.
');} $('#cart-popup-total-price').html(response.cart_total);$('.header-cart-btn .cart-total').html(response.cart_total);if(response.additional_sample_price!=null){$("#sample-price-text").text(response.additional_sample_price);$('#sample_price').show();}else{$('#sample_price').hide();} if(response.exceed_free_floring_sample_limit){$('.cart-limit-sample').show();}else{$('.cart-limit-sample').hide();} if(response.exceed_free_floring_sample_limit_customer){$('.cart-limit-sample-wholesale-customer').show();}else{$('.cart-limit-sample-wholesale-customer').hide();} if($('#cleaner-products-section').length>0){$('[data-product-id="'+product_id+'"]').find('.product-quantity').val('0');} if(response.free_sample){if($('#products-listing').length>0){var button=$('.products .product-buttons').find('[data-product-id="'+product_id+'"]');if(category_id=='1'||category_id=='3'||category_id=='4'||category_id=='5'||category_id=='6'||category_id=='8'){if(category_id=='8'){button.text("GET SAMPLE ($1)");}else{button.text("GET SAMPLE ($3)");} $('.products').find('[data-product-id="'+product_id+'"]').find(".quick-product-quantity").val(0);$('.products').find('[data-product-id="'+product_id+'"]').find(".product-in-cart").remove();}else if(category_id=='2'||category_id=='7'){$('.products').find('div[data-product-id="'+product_id+'"]').find('[data-sample-length="'+sample_length+'"]').val('0');var els=$('.product[data-product-id="'+product_id+'"] :input[type="text"]').filter(function(){return this.value!==""&&this.value!=="0";});if(els.length==0){var button_text='';if(category_id=='2'){button_text='FREE SAMPLE';}else if(category_id=='7'){button_text='GET A SAMPLE';} if(button_text){$('div[data-product-id="'+product_id+'"]').find('.cancel_sample').removeClass('cancel_sample').addClass('free-sample-button').html(' '+button_text);}}}else{if($('.category-free-bamboo-flooring-samples').length>0){$('[data-product-id="'+product_id+'"]').find('.matching-product-quantity').val(0);$('[data-product-id="'+product_id+'"]').find('.product-in-cart').remove();}else{button.html(" FREE SAMPLE");}} if($('.category-free-bamboo-flooring-samples').length==0&&$('.product-samples').length==0){button.addClass('free-sample-button').removeClass("cancel_sample");}} if($('#product-section').length>0){if(category_id=='5'||category_id=='6'||category_id=='8'){if(category_id=='6'||category_id=='8'){$('#product-'+product_id).text("SHIP ME A SAMPLE ($1)");}else{$('#product-'+product_id).text("SHIP ME A SAMPLE ($3)");}}else if(category_id=='2'||category_id=='7'){$('.samples-section').find('div[data-product-id="'+product_id+'"]').find('[data-sample-length="'+sample_length+'"]').val('0');var els=$('.product[data-product-id="'+product_id+'"] :input[type="text"]').filter(function(){return this.value!==""&&this.value!=="0";});if(els.length==0){if(category_id=='2'){var sample_button_text="SHIP ME A FREE SAMPLE";} if(category_id=='7'){var sample_button_text="SHIP ME A SAMPLE ($1)";} $('div[data-product-id="'+product_id+'"]').find('.cancel_sample').removeClass('cancel_sample').addClass('free-sample-button').html(sample_button_text);}}else{$('#product-'+product_id).html("SHIP ME A FREE SAMPLE");} if(category_id!='2'&&category_id!='7'){$('#product-'+product_id).removeClass('cancel_sample').addClass('free-sample-button');$('[data-product-id="'+product_id+'"]').find('.product-in-cart').remove();$('[data-product-id="'+product_id+'"]').find('.matching-product-quantity').val('0');}} if($('#product-sample-page').length>0){var sample_button_text;switch(category_id){case'2':sample_button_text='GET 4" SAMPLE FREE!';if($('#product-sample-page').length>0){$('#product-sample-page .sample-link').addClass('add-sample').removeClass('cancel-sample').html('Add 8" sample to cart');} break;case'5':case'8':sample_button_text='SHIP ME A SAMPLE ($3)';break;case'6':case'7':sample_button_text='SHIP ME A SAMPLE ($1)';break;default:sample_button_text='SHIP ME A SAMPLE';break;} $('#product-'+product_id).html(sample_button_text);} var gallery_photo=$('#gallery').find('[data-product-id="'+product_id+'"]');if(gallery_photo){gallery_photo.removeAttr('data-added');} if($('#order-free-sample-container').length>0){if(category_id=='2'){$('#order-free-sample-container .btn').removeClass('cancel-sample-button').addClass('order-free-sample-button').text("ORDER A FREE SAMPLE");}}} else {$('[data-product-id="'+product_id+'"]').find('.product-in-cart').remove();$('[data-product-id="'+product_id+'"]').find('.matching-product-quantity').val('0');if(category_id=='1'||category_id=='3'||category_id=='4'||category_id=='5'||category_id=='6'||category_id=='7'||category_id=='8'){$('.products').find('[data-product-id="'+product_id+'"]').find(".quick-product-quantity").val(0);$('.products').find('[data-product-id="'+product_id+'"]').find(".product-in-cart").remove();}}} if($('#product-section').length>0){$("#add-to-cart").prop("disabled",false);} $('.site-loader').fadeOut('fast');}});});var alertify_loaded=false;$(document).on("click",".free-sample-button",function(e){if(navigator.cookieEnabled){$('.cart-popup').hide();var button=$(this);if(button.hasClass('disallow-sample')){var next_available=" until "+$(this).data('next-available');var today=new Date();var nextAvailableDate=$(this).data('next-available');if(!(nextAvailableDate)||(nextAvailableDate&&nextAvailableDate',{rel:'stylesheet',type:'text/css',href:base_url+'css/alertify/alertify.min.css'}).appendTo('head'),$.getScript(base_url+"js/alertify/alertify.min.js")).done(function(){alertify.alert("I'm sorry but we are back-ordered in this product (including samples)"+next_available+". Please check the website again at that time to get samples.");alertify_loaded=true;});}else{alertify.alert("I'm sorry but we are back-ordered in this product (including samples)"+next_available+". Please check the website again at that time to get samples.");} return false;} if($('.product-samples').length&&!button.closest('.samples-section').length&&e.originalEvent){$('.product-samples').slideToggle({direction:"up"},400);return false;}else if($('.product-samples').length&&button.closest('.samples-section').length&&e.originalEvent){$('.product-samples').slideToggle({direction:"up"},400);return false;} $.ajax({url:ajax_url+'cart/add-sample.php',type:'POST',data:{id:$(this).attr('data-product-id'),category:$(this).attr('data-product-category'),price:$(this).attr('data-product-price')},dataType:'json',success:function(response){if(response.success==true){button.removeClass('free-sample-button').addClass('cancel_sample').html('SAMPLE IN CART');var product_id=button.attr('data-product-id');if(button.hasClass('gallery')){$('.gallery_image[data-product-id="'+product_id+'"]').attr('data-added',true);button.html('Added to Cart');} $('.header-cart-btn .cart-total').html(response.cart_total);$('.shopping-cart-icon').find('span.count').html(response.total_items_in_cart);}else{alertify.alert(response.error_message);}}});}else{if(navigator.userAgent.indexOf('Safari')!=-1&&navigator.userAgent.indexOf('Chrome')==-1){alertify.alert('We noticed you are using a Safari browser with cookies disabled which may result in the inability to add samples or products to our shopping cart due to SSL certificate requirements. To enable the cart you must enable cookies on your browser. Please visit this link for instructions: https://m.wikihow.com/Enable-Cookies-in-Safari. Once this is completed you must refresh the page. Thank you! The Ambient Team '+site_phone_toll_free+'.');}else{alertify.alert('Please enable cookies in your browser so that you can continue with your order. Please reload the page after enabling cookies. Thank you! The Ambient Team '+site_phone_toll_free+'.');}}});$(document).on("click",".cancel_sample",function(e){$('.cart-popup').hide();var button=$(this);if($('.product-samples').length&&!button.closest('.samples-section').length&&e.originalEvent){var selected_product_samples_dropdown=$(this).closest('.product').find('.product-samples');$('.product-samples').not(selected_product_samples_dropdown).slideUp();selected_product_samples_dropdown.stop(true,true).slideToggle();return false;}else if($('.product-samples').length&&button.closest('.samples-section').length&&e.originalEvent){$('.product-samples').slideToggle({direction:"up"},400);return false;}});$("#news-letter-form .submit-newsletter-button").click(function(){var email=$('#news-letter-email').val();if(email!=''){if(validateEmail(email)){const settings={"async":true,"crossDomain":true,"url":"https://mailcheck.p.rapidapi.com/?domain="+email,"method":"GET","headers":{"x-rapidapi-key":"116c2d6957msh7eab32dad2c2ff7p1e8a7ejsnd08ce62caddd","x-rapidapi-host":"mailcheck.p.rapidapi.com"}};$.ajax(settings).done(function(response){if(response.block==true) {$('#news-letter-email-error-message').text('That email doesn\'t look right').show();} else {$('#news-letter-email-error-message').hide();$('#news-letter-form')[0].submit();}});}else{$('#news-letter-email-error-message').text('That email doesn\'t look right').show();}}else{$('#news-letter-email-error-message').text('Please enter email address').show();}});$("body").on('change','#signup-form input[name="user_type"]',function(){$("#signup-customer-type-error-message").hide();$('.customer-type-form-group').removeClass('invalid-radio');});function isValidEmail(email){var regex=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;return regex.test(email);} $("#signup-email").on("keyup",function(){if(!isValidEmail($(this).val())){$('#signup-email-error-message').show();$('#signup-email').addClass('invalid-email').removeClass('valid-email');}else{$('#signup-email-error-message').hide();$('#signup-email').addClass('valid-email').removeClass('invalid-email');}});$("body").on('click',"#signup-form .submit-newsletter-button",function(e){e.preventDefault();let signup_form_error_flag=false;if($('#signup-form input[name="user_type"]:checked').length>0){$("#signup-customer-type-error-message").hide();$('.customer-type-form-group').removeClass('invalid-radio');}else{signup_form_error_flag=true;$('#signup-customer-type-error-message').show();$('.customer-type-form-group').addClass('invalid-radio');} const email=$('#signup-email').val();if(!isValidEmail(email)){signup_form_error_flag=true;$('#signup-email-error-message').show();$('#signup-email').addClass('invalid-email').removeClass('valid-email');}else{$('#signup-email-error-message').hide();$('#signup-email').addClass('valid-email').removeClass('invalid-email');} if(signup_form_error_flag===false){const settings={async:true,crossDomain:true,url:"https://mailcheck.p.rapidapi.com/?domain="+email,method:"GET",headers:{"x-rapidapi-key":"116c2d6957msh7eab32dad2c2ff7p1e8a7ejsnd08ce62caddd","x-rapidapi-host":"mailcheck.p.rapidapi.com"}};$.ajax(settings).done(function(response){if(response&&response.block===true){$('#signup-email-error-message').show();}else{$('#signup-email-error-message').hide();window.location.href=base_url+"newsletter-confirmation.php";}});}});function show_signup_popup(){console.log("inside");$("#sign-up-section").show();var date=new Date();date.setTime(date.getTime()+(3*60*60*1000));var expiry='expires='+date.toUTCString();document.cookie='popup=true; '+expiry+'; path=/';var myVariable="true";sessionStorage['popup']=myVariable;} var user_ip=localStorage.getItem('user_ip');var readValue=sessionStorage['popup'];if(is_submitted===undefined){var is_submitted=false;} var page=window.location.pathname.split('/').pop();var cookies;function readCookie(name,c,C,i){if(cookies){return cookies[name];} c=document.cookie.split('; ');cookies={};for(i=c.length-1;i>=0;i--){C=c[i].split('=');cookies[C[0]]=C[1];} return cookies[name];} var hasPopupCookie=readCookie('popup');if(is_submitted!=true&&user_ip==null&&page!='checkout.php'&&hasPopupCookie==null&&!readValue){if(show_free_samples_popup==true){setTimeout(show_signup_popup,600000);}else{setTimeout(show_signup_popup,300000);}} $(document).on('click','#sign-up-section .no-thanks-link',function(e){$("#sign-up-section").hide();});$(document).on('click','#sign-up-section',function(e){var container=$("#sign-up-section .section-wrapper");if(!container.is(e.target)&&container.has(e.target).length===0){$("#sign-up-section").hide();}});$(".scroll-to-top").click(function(){$('html, body').animate({scrollTop:0},800);return false;});$(window).scroll(function(){if($(this).scrollTop()>300){$('.scroll-to-top').fadeIn();}else{$('.scroll-to-top').fadeOut();}});var emp_edit_mode_modal_present=document.getElementById("emp_edit_mode_modal");if(emp_edit_mode_modal_present){alertify.dialog('customModal',function factory(){return{main:function(content){this.setContent(content);},setup:function(){return{options:{basic:false,maximizable:false,resizable:false,padding:false,closable:true,title:'Alertify Custom Modal'}};}};});alertify.customModal(document.getElementById('emp_edit_mode_modal'));document.getElementsByClassName('ajs-footer')[0].style.display='none';document.getElementById("emp_edit_mode_modal").style.display="block";} $('#emp_edit_mode_form').submit(function(e){e.preventDefault();$('.site-loader').fadeIn('fast');$.ajax({url:ajax_url+'checkout/enable-employee-editmode.php',type:'POST',data:{name:$("#name").val(),password:$("#password").val(),reason_for_login:$("#reason_for_login").val()},dataType:'json',success:function(response){if(response.success==true){location.reload();} else{alertify.alert("Unauthorized Access!");}}});});jQuery(".survey-question .radio input[type=radio]").change(function(){if(jQuery(this).find('input[type="radio"]:checked').attr('id')!='question-one-other-option1'){jQuery('#survey-popup-form .btn-continue').click();}});var all_answered=true;jQuery('#survey-popup-form .survey-question').each(function(){if(!jQuery(this).find('input[type="radio"]:checked').val()&&!jQuery(this).find('textarea').val()){all_answered=false;jQuery(".survey-question").removeClass('active');jQuery(this).addClass('active');jQuery('#survey-popup-form .back-btn').removeClass('hide');if(jQuery(this).find('input[name="install_date"]').length>0){jQuery('#survey-popup-form .btn-continue').addClass('hide');jQuery('#survey-popup-form .btn-submit').removeClass('hide');}else if(jQuery(this).find('input[name="purpose"]').length>0){jQuery('#survey-popup-form .back-btn').addClass('hide');} return false;}});if(all_answered==false){jQuery("#myModal").modal('show');} jQuery("#suerveyModalQuit .btn-quit-continue").click(function(){jQuery("#myModal").modal('show');jQuery("#suerveyModalQuit").modal('hide');});jQuery("#myModal .survey-close").click(function(){if(!jQuery('input[name="installer_type"]:checked').val()){jQuery('.survey-quetion-one .hide input[name="installer_type"]').prop('checked',true);} if(!jQuery('input[name="purpose"]:checked').val()){jQuery('.survey-quetion-two .hide input[name="purpose"]').prop('checked',true);} if(!jQuery('input[name="sq_ft"]:checked').val()){jQuery('.survey-quetion-three .hide input[name="sq_ft"]').prop('checked',true);} if(!jQuery('input[name="install_date"]:checked').val()){jQuery('.survey-quetion-four .hide input[name="install_date"]').prop('checked',true);} var form_data=jQuery("#survey-popup-form").serialize();var urlParams="";var query=window.location.search.substring(1);var vars=query.split('&');for(var i=0;i600){mobile_search_box_position=(cookie_top_bar_height+60)+'px';cart_popup_position=(cookie_top_bar_height+60)+'px';page_wrapper_position=(cookie_top_bar_height+60)+'px';}else{mobile_search_box_position=(cookie_top_bar_height+85)+'px';cart_popup_position=(cookie_top_bar_height+85)+'px';page_wrapper_position=(cookie_top_bar_height+85)+'px';}} function set_cookie_confirm(){var date=new Date();date.setTime(date.getTime()+(30*60*60*1000));var cookie="cookie_policy=true; ";var expiry='expires='+date.toUTCString();document.cookie=cookie+expiry+'; path=/';var date=new Date();} var readValue=sessionStorage['session_policy'];var hasCookiePolicy=readCookie('cookie_policy');if(!readValue&&hasCookiePolicy==null){$(".cookie-top-bar").show();$('.desktop-header').css('margin-top',cookie_top_bar_height+'px');if($('.desktop-header').hasClass('compact-header')){$('.site-navigation-wrapper').css('top',cookie_top_bar_height);}else{$('.site-navigation-wrapper').css('top','0px');} $('.mobile-header, .mobile-menu-container').css('top',cookie_top_bar_height+'px');$('.mobile-search-box').css('top',mobile_search_box_position);$('.cart-popup').css('top',cart_popup_position);$('.wrapper').css('margin-top',page_wrapper_position);var myVariable="true";sessionStorage['session_policy']=myVariable;} $(window).scroll(function(){if($(".cookie-top-bar").is(":visible")){if($('.desktop-header').hasClass('compact-header')){$('.site-navigation-wrapper').css('top',cookie_top_bar_height);}else{$('.site-navigation-wrapper').css('top','0px');}}else{$('.site-navigation-wrapper').css('top','0px');} if($(window).width()>=1300){$('.wrapper').css('margin-top','0px');if($('.desktop-header').hasClass('compact-header')){$('.cart-popup').css('top','0px');}else{$('.cart-popup').css('top','-70px');}}});$("#confirmation-button").on("click",function(){set_cookie_confirm();$('.desktop-header').css('margin-top','0px');$('.site-navigation-wrapper').css('top','0px');$('.mobile-header, .mobile-menu-container').css('top','0px');if($(window).width()>600){$('.mobile-search-box').css('top','60px');$('.wrapper').css('margin-top','60px');if($('.desktop-header').hasClass('compact-header')){$('.cart-popup').css('top','70px');}else{$('.cart-popup').css('top','-75px');$('.wrapper').css('margin-top','0px');} if($(window).width()<=1299){$('.cart-popup').css('top','60px');}}else{$('.mobile-search-box').css('top','85px');$('.cart-popup').css('top','85px');$('.wrapper').css('margin-top','85px');} $('.cookie-top-bar').slideUp('fast');});$('.desktop-header .logout, .mobile-menu-navigation .logout, .account-navigation .logout,#header-my-account-ul .logout').click(function(e){e.preventDefault();$('.site-loader').fadeIn('fast');$.ajax({url:ajax_url+'user/logout.php',type:"GET",dataType:"text",success:function(result){if(result=="success"){var pathname=window.location.pathname;window.location.href=window.location.origin+pathname;$('.site-loader').fadeOut('fast');}else{$('.site-loader').fadeOut('fast');alertify.alert("Error! Please try again.");}}});});$('.products .input-number').keydown(function(e){if($.inArray(e.keyCode,[46,8,9,27,13,110,190])!==-1||(e.keyCode==65&&(e.ctrlKey===true||e.metaKey===true))||(e.keyCode>=35&&e.keyCode<=40)){return;} if((e.shiftKey||(e.keyCode<48||e.keyCode>57))&&(e.keyCode<96||e.keyCode>105)){e.preventDefault();}});});function wrapperHeight(event){var banner_min_height=56;var header_min_margin=90;var screen_width=$(window).width();if(screen_width<=500){header_min_margin=110;}else if(screen_width>500&&screen_width<768){header_min_margin=60;}else if(screen_width>767&&screen_width<1100){header_min_margin=70;} var banner_height=$(".holidays-message").innerHeight();if(banner_height>banner_min_height){var banner_extra_height=banner_height-banner_min_height;header_min_margin=header_min_margin+banner_min_height+banner_extra_height;$("body > .wrapper").attr('style','margin-top: '+header_min_margin+'px !important');}else{$("body > .wrapper").addClass('holiday');if(event=='resize'){$("body > .wrapper").removeAttr("style");}}} if($('.holidays-message').length){} function as_seen_trusted(){try{if($('.as-seen-on-trusted-by-section').length>0){if($(window).width()>1100){$('.trusted-by-container .flexslider').flexslider({animation:"slide",slidshow:true,slideshowSpeed:5000,controlNav:false,itemWidth:100,itemMargin:30,minItems:2,maxItems:4,start:function(slider){slider.css('min-height','auto');slider.css('max-height','none');}});} if($(window).width()>=768&&$(window).width()<=1100){$('.trusted-by-container .flexslider').flexslider({animation:"slide",slidshow:true,slideshowSpeed:5000,controlNav:false,itemWidth:70,itemMargin:30,minItems:2,maxItems:4,start:function(slider){slider.css('min-height','auto');slider.css('max-height','none');}});} if($(window).width()>=425&&$(window).width()<=768){$('.trusted-by-container .flexslider').flexslider({animation:"slide",slidshow:true,slideshowSpeed:5000,controlNav:false,itemWidth:70,itemMargin:0,minItems:2,maxItems:2,start:function(slider){slider.css('min-height','auto');slider.css('max-height','none');}});} if($(window).width()<425){$('.trusted-by-container .flexslider').flexslider({animation:"slide",slidshow:true,slideshowSpeed:5000,controlNav:false,itemWidth:70,itemMargin:0,minItems:1,maxItems:1,start:function(slider){slider.css('min-height','auto');slider.css('max-height','none');}});}}}catch(e){}} as_seen_trusted();function checktotalcoverage(){$.ajax({url:ajax_url+"/ajax.php",type:"POST",dataType:"json",data:{fun:"checkoutRefresh"},success:function(g){if(!g.type_flooring_box){}else{var lnt=parseInt($('#cart_tbl thead tr th').length);if(lnt<=6){}}}});} function formatNumber(e,c,h,b,n,m,g,f){var l=Math.round(e*Math.pow(10,c));if(l>=0){g=f=""} var k=(""+Math.abs(l)).split("");var j=k.length-c;if(j<0){j--} for(var d=j;d<0;d++){k.unshift("0")} if(j<0){j=1} k.splice(j,0,b);if(k[0]==b){k.unshift("0")} while(j>3){j-=3;k.splice(j,0,h)} var a=n+g+k.join("")+f+m;return a} function getPageName(url){var index=url.lastIndexOf("/")+1;var filenameWithExtension=url.substr(index);var filename=filenameWithExtension.split(".")[0];return filename;} if(typeof jQuery.validator!=="undefined"){jQuery.validator.addMethod("validate_email",function(value,element){return validateEmail(value);},"Please enter a valid email address");} let allowedExtensions=[];fetch('https://data.iana.org/TLD/tlds-alpha-by-domain.txt').then(response=>response.text()).then(text=>{const lines=text.trim().split(/\r?\n/);lines.shift();allowedExtensions=lines.map(ext=>ext.trim().toLowerCase());}).catch(err=>{console.error(err);});function validateEmail(sEmail){const match=sEmail.match(/@[^@]+\.(\w+)$/);const extension=match?match[1].toLowerCase():null;if(!extension){return false;} if(allowedExtensions.includes(extension)){return true;}else{return false;}} function format_price(number){if(number&&number>0){var number=parseFloat(number);number=number.toFixed(2);var parts=number.toString().split(".");parts[0]=parts[0].replace(/\B(?=(\d{3})+(?!\d))/g,",");return parts.join(".");}else{return"0.00";}} function printInvoice(elementName){var printContents=document.getElementById(elementName).innerHTML;var originalContents=document.body.innerHTML;document.body.innerHTML=printContents;window.print();document.body.innerHTML=originalContents;} function changeURL(data) {var browser_url=window.location.href.replace(window.location.search,'');browser_url=browser_url.replace(/#.*$/,'').replace(/\?.*$/,'').replace(/\/$/,"");var paramString=createParamString(data);return browser_url+"?"+paramString;} function createParamString(jsonObject) {var paramString="";$.each(jsonObject,function(key,val){if(val!=""&&val!=undefined) {paramString+=""+key+"="+encodeURIComponent(val)+"&";}});paramString=paramString.substr(0,paramString.length-1);return paramString;} function getUrlVars() {var vars=[],hash;var hashes=window.location.href.slice(window.location.href.indexOf('?')+1).split('&');for(var i=0;i1){quantity--;}else{if(quantity==1){remove_quick_product(product_id);}else{$('.site-loader').fadeOut('fast');} return false;}} else{if(quantity==0){remove_quick_product(product_id);return false;}} $.ajax({url:cart_ajax_url+'add-product.php',type:'POST',data:{id:product_id,quantity:quantity},dataType:'json',success:function(response){if(response.success==true){quick_update_quantity_action='';$('[data-product-id="'+product_id+'"]').find('.quick-product-quantity').val(quantity);$('.shopping-cart-icon span.count').html(response.total_items_in_cart);$('.header-cart-btn .cart-total').html(response.cart_total);if(response.price_updated==1){$('.category-plywood [data-product-id="'+product_id+'"]').find('.discounted-price .product-price').html("$"+response.product_price);$('.category-plywood [data-product-id="'+product_id+'"]').find('.discounted-price .price-type').html("/ panel");$('.category-plywood [data-product-id="'+product_id+'"]').find('.discounted-price .discount-text').html(response.percentage_applied+"% Volume discount applied!");$('.category-plywood [data-product-id="'+product_id+'"]').find('.product-price-number-final span').addClass("price-strike");$('.category-plywood [data-product-id="'+product_id+'"]').find('.discounted-price').removeClass("hide");$('.category-plywood [data-product-id="'+product_id+'"]').find('.price-saved').addClass("hide");}else{$('.category-plywood [data-product-id="'+product_id+'"]').find('.discounted-price').addClass("hide");$('.category-plywood [data-product-id="'+product_id+'"]').find('.product-price-number-final span').removeClass("price-strike");$('.category-plywood [data-product-id="'+product_id+'"]').find('.price-saved ').removeClass("hide");} if(!$('[data-product-id="'+product_id+'"]').find('.product-in-cart').length){$('[data-product-id="'+product_id+'"]').find('.quick-update-product-quantity').append('');$('.category-installation-supplies [data-product-id="'+product_id+'"]').height('460px');} if((response.instock_next_available_date==true||response.instock_edit_mode==true)&&response.success_message!=''){alertify.alert(response.success_message);} if(response.discount_message!=''&&response.discount_message!=null){alertify.alert(response.discount_message);}}else{alertify.alert(response.error_message);} $('.site-loader').fadeOut('fast');}});});function remove_quick_product(product_id){$.ajax({url:cart_ajax_url+"remove-product.php",type:"POST",data:{id:product_id,'type':'PAID'},dataType:"json",success:function(response){if(response.success==true){quick_update_quantity_action='';$('.cart-popup-header h4 span').html(response.total_items_in_cart);$('.shopping-cart-icon span.count').html(response.total_items_in_cart);if(response.total_items_in_cart<1){cart_contains_product=false;$('.cart-popup .cart-popup-content').html('
There are no items in your cart.
');} $('[data-product-id="'+product_id+'"]').find('.product-in-cart').remove();$('[data-product-id="'+product_id+'"]').find('.quick-product-quantity').val(0);$('.category-installation-supplies [data-product-id="'+product_id+'"]').height('420px');} $('.site-loader').fadeOut('fast');}});} function get_location(){if(is_loc_loaded===false){$.ajax({url:ajax_url+'get_loc.php'+window.location.search,type:'GET',dataType:'text',data:'',success:function(response){if(response=="success"){is_loc_loaded='';if($('.price_hide').length!=0){$("div").removeClass("price_hide");}}else{is_loc_loaded=true;if($('.why-not-florida.hide').length!=0&&(product_category=='2'||product_category=='3')){$('.why-not-florida').removeClass('hide');} $(".price_hide").addClass("off");}}});}else if(is_loc_loaded!=true){if($('.price_hide').length!=0){$("div").removeClass("price_hide");}}else{if($('.why-not-florida.hide').length!=0&&(product_category=='2'||product_category=='3')){$('.why-not-florida').removeClass('hide');} $(".price_hide").addClass("off");}} get_location();function stringfromurl(text){var punc={"'":'','`':'','=':'','*':'','^':'','$':'','@':'','!':'','<':'','>':'','?':'','[':'',']':'','{':'','}':'',':':'','|':''};var length=text.length;for(var i=0;i',{rel:'stylesheet',type:'text/css',href:base_url+'css/alertify/alertify.min.css'}).appendTo('head'),$.getScript(base_url+"js/alertify/alertify.min.js")} jQuery('a').each(function(){var href=jQuery(this).attr('href');var target=jQuery(this).attr('target');if(typeof href=='undefined'){jQuery(this).attr('href','javascript:void(0)');href='#';} if(isExternal(href)&&href!='https://ambient.chameleonpower.com/'){if(typeof jQuery(this).attr('aria-label')==="undefined"||typeof jQuery(this).attr('title')==="undefined"){var text='';if(jQuery(this).text().trim()!==''){text=jQuery(this).text().trim()+' - ';}else{text=jQuery(this).attr('href')+' - ';} if(typeof jQuery(this).attr('aria-label')==="undefined"){jQuery(this).attr('aria-label',text+'External site that opens in a new window');}} jQuery(this).click(function(event){var loc=$(this).attr('href');alertify.confirm("You are being redirected to an external website. Ambient makes no representations nor has any supervision or control over the quality, content, reliability or security of the third party website, nor shall Ambient be liable for its use.",function(e){if(e){window.open(loc,'_blank');}});return false;});} else {if(target=='_blank') {var text='';if(jQuery(this).text().trim()!==''){text=jQuery(this).text().trim()+' - ';}else{text=jQuery(this).attr('href')+' - ';} if(typeof jQuery(this).attr('aria-label')==="undefined"){jQuery(this).attr('aria-label',text+'link that opens in a new window');}}}});$(document).on("click",".mobile-top-bar-chat a",function(){$('.si-livechat .silc-btn').trigger("click");});});$(document).on("click",function(event){var target=$(event.target);if(!$(target).closest(".samples-section").length){$(".samples-section .product-samples").slideUp();} if(!target.closest('.product-samples').length&&!target.is('.product-samples')){$('.product-samples').slideUp();}});if($(window).width()<=767){$(document).on("click",".footer-links-heading",function(){$(this).next(".footer-links-content").slideToggle();});} (function(){var QUOTE_PANEL_BREAKPOINT=1300;var quotePanelAssetsPromise=null;var quotePanelContentPromise=null;function loadAssetOnce(tag,url){var attr=tag==='link'?'href':'src';var existing=document.querySelector(tag+'['+attr+'="'+url+'"]');if(existing){return $.Deferred().resolve().promise();} var deferred=$.Deferred();var el=document.createElement(tag);if(tag==='link'){el.rel='stylesheet';el.href=url;}else{el.src=url;} el.onload=function(){deferred.resolve();};el.onerror=function(){deferred.reject();};(tag==='link'?document.head:document.body).appendChild(el);return deferred.promise();} function loadQuotePanelAssets(){if(quotePanelAssetsPromise){return quotePanelAssetsPromise;} var v=window.quote_panel_asset_version;var cssBundle=base_url+'min/?v='+v+'&b=css&f=ambient-theme.css,get-quote.css,get-quote-panel.css';var jsBundle=base_url+'min/?v='+v+'&b=js&f=validation/jquery.validate.min.js,place-autocomplete-helper.js,zip-db-validate.js,get-quote.js';loadAssetOnce('link',cssBundle);var chain=loadAssetOnce('script',jsBundle);chain=chain.then(function(){return loadAssetOnce('script','https://maps.googleapis.com/maps/api/js?key='+quote_panel_google_maps_key+'&libraries=places&callback=initAutocomplete');});chain=chain.then(function(){if(typeof captcha_provider!=='undefined'&&captcha_provider==='2'){return loadAssetOnce('script','https://challenges.cloudflare.com/turnstile/v0/api.js');} if(typeof recaptcha_site_key!=='undefined'){return loadAssetOnce('script','https://www.google.com/recaptcha/enterprise.js?render='+recaptcha_site_key);} return $.Deferred().resolve().promise();});quotePanelAssetsPromise=chain;return chain;} function loadQuotePanelContent(){if(quotePanelContentPromise){return quotePanelContentPromise;} quotePanelContentPromise=$.get({url:ajax_url+'get-quote-panel.php',dataType:'json'}).done(function(response){window.quote_panel_google_maps_key=response.google_maps_key;window.restricted_location=response.restricted_location;window.quote_panel_asset_version=response.asset_version;if(response.recaptcha_site_key){window.recaptcha_site_key=response.recaptcha_site_key;} $('#quote-panel-body').html(response.html);});return quotePanelContentPromise;} function openQuotePanel(){$('#quote-panel-overlay').show();$('#quote-panel-container').addClass('open');$('body').addClass('quote-panel-open');loadQuotePanelContent().then(loadQuotePanelAssets).done(function(){$('#quote-panel-body .quote-panel-loading').remove();});} function closeQuotePanel(){$('#quote-panel-container').removeClass('open');$('#quote-panel-overlay').hide();$('body').removeClass('quote-panel-open');} $(document).on('click','.js-get-quote-trigger',function(e){if($(window).width()