function validateEmail(n){return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(n)}function authenticate(){var t="",n;document.getElementById("username")!=null&&(t=$("#username").val());n="";document.getElementById("password")!=null&&(n=$("#password").val());$.ajax({type:"POST",url:"/Account/Login",data:JSON.stringify({email:t,password:n}),contentType:"application/json; charset=utf-8",success:function(n){n.IsAuthenticated?location.href=n.RedirectURL:document.getElementById("lblAuthenticationMessage")!=null&&(document.getElementById("lblAuthenticationMessage").innerHTML=n.ResponseMessage)},failure:function(n){n.IsAuthenticated||document.getElementById("lblAuthenticationMessage")!=null&&(document.getElementById("lblAuthenticationMessage").innerHTML=n.ResponseMessage)},async:!0,processData:!1,cache:!1,dataType:"json"})}function add_chatinline(){var n=document.createElement("script"),t;n.async=!0;n.src="https://mylivechat.com/chatinline.aspx?hccid=83635795";t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(n,t)}function formatCurrency(n){var r,i,t;for(typeof n=="undefined"&&(n=""),n=n.toString().replace(/\$|\,/g,""),isNaN(n)&&(n="0"),r=n==(n=Math.abs(n)),n=Math.floor(n*100+.50000000001),i=n%100,n=Math.floor(n/100).toString(),i<10&&(i="0"+i),t=0;t<Math.floor((n.length-(1+t))/3);t++)n=n.substring(0,n.length-(4*t+3))+","+n.substring(n.length-(4*t+3));return(r?"":"-")+"$"+n+"."+i}function RemoveFromCart(n){$.ajax({url:"/api/CartItem/"+n,type:"DELETE",success:function(n){SetCartSummary(n)},error:function(n,t,i){alert("error alert: "+i+" -- status: "+t)}})}function SetHeaderMessage(n){n.showHeaderMessage?($("#divHeaderMessage").show(),$("#lblHeaderMessage").text(n.headerMessage)):($("#divHeaderMessage").hide(),$("#lblHeaderMessage").length||$("#lblHeaderMessage").val(""))}function botCheck(){var n=new RegExp("(googlebot/|Googlebot-Mobile|Googlebot-Image|Google favicon|Mediapartners-Google|bingbot|slurp|java|wget|curl|Commons-HttpClient|Python-urllib|libwww|httpunit|nutch|phpcrawl|msnbot|jyxobot|FAST-WebCrawler|FAST Enterprise Crawler|biglotron|teoma|convera|seekbot|gigablast|exabot|ngbot|ia_archiver|GingerCrawler|webmon |httrack|webcrawler|grub.org|UsineNouvelleCrawler|antibot|netresearchserver|speedy|fluffy|bibnum.bnf|findlink|msrbot|panscient|yacybot|AISearchBot|IOI|ips-agent|tagoobot|MJ12bot|dotbot|woriobot|yanga|buzzbot|mlbot|yandexbot|purebot|Linguee Bot|Voyager|CyberPatrol|voilabot|baiduspider|citeseerxbot|spbot|twengabot|postrank|turnitinbot|scribdbot|page2rss|sitebot|linkdex|Adidxbot|blekkobot|ezooms|dotbot|Mail.RU_Bot|discobot|heritrix|findthatfile|europarchive.org|NerdByNature.Bot|sistrix crawler|ahrefsbot|Aboundex|domaincrawler|wbsearchbot|summify|ccbot|edisterbot|seznambot|ec2linkfinder|gslfbot|aihitbot|intelium_bot|facebookexternalhit|yeti|RetrevoPageAnalyzer|lb-spider|sogou|lssbot|careerbot|wotbox|wocbot|ichiro|DuckDuckBot|lssrocketcrawler|drupact|webcompanycrawler|acoonbot|openindexspider|gnam gnam spider|web-archive-net.com.bot|backlinkcrawler|coccoc|integromedb|content crawler spider|toplistbot|seokicks-robot|it2media-domain-crawler|ip-web-crawler.com|siteexplorer.info|elisabot|proximic|changedetection|blexbot|arabot|WeSEE:Search|niki-bot|CrystalSemanticsBot|rogerbot|360Spider|psbot|InterfaxScanBot|Lipperhey SEO Service|CC Metadata Scaper|g00g1e.net|GrapeshotCrawler|urlappendbot|brainobot|fr-crawler|binlar|SimpleCrawler|Livelapbot|Twitterbot|cXensebot|smtbot|bnf.fr_bot|A6-Indexer|ADmantX|Facebot|Twitterbot|OrangeBot|memorybot|AdvBot|MegaIndex|SemanticScholarBot|ltx71|nerdybot|xovibot|BUbiNG|Qwantify|archive.org_bot|Applebot|TweetmemeBot|crawler4j|findxbot|SemrushBot|yoozBot|lipperhey|y!j-asr|Domain Re-Animator Bot|AddThis)","i"),t=navigator.userAgent;return n.test(t)?!0:!1}function SetCartSummary(n){n.totalQuantity==0?$("#lblCart").hide():($("#lblCart").show(),$(".allprice").html(n.totalQuantity))}var appInsights,isOnAdminPage;!function(n,t,i,r){var u=n(t);n.fn.lazyload=function(f){function s(){var t=0;o.each(function(){var i=n(this);if((!e.skip_invisible||i.is(":visible"))&&!n.abovethetop(this,e)&&!n.leftofbegin(this,e))if(n.belowthefold(this,e)||n.rightoffold(this,e)){if(++t>e.failure_limit)return!1}else i.trigger("appear"),t=0})}var h,o=this,e={threshold:0,failure_limit:0,event:"scroll",effect:"show",container:t,data_attribute:"original",skip_invisible:!1,appear:null,load:null,placeholder:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC"};return f&&(r!==f.failurelimit&&(f.failure_limit=f.failurelimit,delete f.failurelimit),r!==f.effectspeed&&(f.effect_speed=f.effectspeed,delete f.effectspeed),n.extend(e,f)),h=e.container===r||e.container===t?u:n(e.container),0===e.event.indexOf("scroll")&&h.bind(e.event,function(){return s()}),this.each(function(){var i=this,t=n(i);i.loaded=!1;(t.attr("src")===r||t.attr("src")===!1)&&t.is("img")&&t.attr("src",e.placeholder);t.one("appear",function(){if(!this.loaded){if(e.appear){var r=o.length;e.appear.call(i,r,e)}n("<img />").bind("load",function(){var r=t.attr("data-"+e.data_attribute),u,f;t.hide();t.is("img")?t.attr("src",r):t.css("background-image","url('"+r+"')");t[e.effect](e.effect_speed);i.loaded=!0;u=n.grep(o,function(n){return!n.loaded});(o=n(u),e.load)&&(f=o.length,e.load.call(i,f,e))}).attr("src",t.attr("data-"+e.data_attribute))}});0!==e.event.indexOf("scroll")&&t.bind(e.event,function(){i.loaded||t.trigger("appear")})}),u.bind("resize",function(){s()}),/(?:iphone|ipod|ipad).*os 5/gi.test(navigator.appVersion)&&u.bind("pageshow",function(t){t.originalEvent&&t.originalEvent.persisted&&o.each(function(){n(this).trigger("appear")})}),n(i).ready(function(){s()}),this};n.belowthefold=function(i,f){var e;return e=f.container===r||f.container===t?(t.innerHeight?t.innerHeight:u.height())+u.scrollTop():n(f.container).offset().top+n(f.container).height(),e<=n(i).offset().top-f.threshold};n.rightoffold=function(i,f){var e;return e=f.container===r||f.container===t?u.width()+u.scrollLeft():n(f.container).offset().left+n(f.container).width(),e<=n(i).offset().left-f.threshold};n.abovethetop=function(i,f){var e;return e=f.container===r||f.container===t?u.scrollTop():n(f.container).offset().top,e>=n(i).offset().top+f.threshold+n(i).height()};n.leftofbegin=function(i,f){var e;return e=f.container===r||f.container===t?u.scrollLeft():n(f.container).offset().left,e>=n(i).offset().left+f.threshold+n(i).width()};n.inviewport=function(t,i){return!(n.rightoffold(t,i)||n.leftofbegin(t,i)||n.belowthefold(t,i)||n.abovethetop(t,i))};n.extend(n.expr[":"],{"below-the-fold":function(t){return n.belowthefold(t,{threshold:0})},"above-the-top":function(t){return!n.belowthefold(t,{threshold:0})},"right-of-screen":function(t){return n.rightoffold(t,{threshold:0})},"left-of-screen":function(t){return!n.rightoffold(t,{threshold:0})},"in-viewport":function(t){return n.inviewport(t,{threshold:0})},"above-the-fold":function(t){return!n.belowthefold(t,{threshold:0})},"right-of-fold":function(t){return n.rightoffold(t,{threshold:0})},"left-of-fold":function(t){return!n.rightoffold(t,{threshold:0})}})}(jQuery,window,document);appInsights=window.appInsights||function(n){function r(n){t[n]=function(){var i=arguments;t.queue.push(function(){t[n].apply(t,i)})}}var t={config:n},u=document,e=window,o="script",s=u.createElement(o),i,f;for(s.src=n.url||"//az416426.vo.msecnd.net/scripts/a/ai.0.js",u.getElementsByTagName(o)[0].parentNode.appendChild(s),t.cookie=u.cookie,t.queue=[],i=["Event","Exception","Metric","PageView","Trace","Ajax"];i.length;)r("track"+i.pop());return r("setAuthenticatedUserContext"),r("clearAuthenticatedUserContext"),n.disableExceptionTracking||(i="onerror",r("_"+i),f=e[i],e[i]=function(n,r,u,e,o){var s=f&&f(n,r,u,e,o);return s!==!0&&t["_"+i](n,r,u,e,o),s}),t}({instrumentationKey:"a605e0a8-f7c3-48c4-96a0-28439a9a9922"});window.appInsights=appInsights;appInsights.trackPageView();appInsights=window.appInsights||function(n){function t(n){i[n]=function(){var t=arguments;i.queue.push(function(){i[n].apply(i,t)})}}var i={config:n},u=document,e=window,r,f;setTimeout(function(){var t=u.createElement("script");t.src=n.url||"https://az416426.vo.msecnd.net/scripts/a/ai.0.js";u.getElementsByTagName("script")[0].parentNode.appendChild(t)});try{i.cookie=u.cookie}catch(n){}for(i.queue=[],r=["Event","Exception","Metric","PageView","Trace","Dependency"];r.length;)t("track"+r.pop());return(t("setAuthenticatedUserContext"),t("clearAuthenticatedUserContext"),t("startTrackEvent"),t("stopTrackEvent"),t("startTrackPage"),t("stopTrackPage"),t("flush"),n.disableExceptionTracking)||(r="onerror",t("_"+r),f=e[r],e[r]=function(n,t,u,e,o){var s=f&&f(n,t,u,e,o);return!0!==s&&i["_"+r](n,t,u,e,o),s}),i}({instrumentationKey:"@Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration.Active.InstrumentationKey"});window.appInsights=appInsights;appInsights.queue&&0===appInsights.queue.length&&appInsights.trackPageView();!function(n,t,i,r,u,f,e){n.fbq||(u=n.fbq=function(){u.callMethod?u.callMethod.apply(u,arguments):u.queue.push(arguments)},n._fbq||(n._fbq=u),u.push=u,u.loaded=!0,u.version="2.0",u.queue=[],f=t.createElement(i),f.async=!0,f.src=r,e=t.getElementsByTagName(i)[0],e.parentNode.insertBefore(f,e))}(window,document,"script","https://connect.facebook.net/en_US/fbevents.js");fbq("init","336238137278953");fbq("track","PageView");$(function(){function n(){var n=$(this),t=n.find(".modal-dialog");n.css("display","block");t.css("margin-top",Math.max(0,($(window).height()-t.height())/2))}$(window).on("resize",function(){$(window).width()<1024&&$(".modal:visible").each(n)})});$(function(){$("[id^=modal-]").on("show.bs.modal",function(){$(this).find(".lazy").each(function(){$(this).attr("src",$(this).attr("data-original"))})})});$(function(){!function(n,t,i,r){var u=n(t);n.fn.lazyload=function(f){function s(){var t=0;o.each(function(){var i=n(this);if((!e.skip_invisible||i.is(":visible"))&&!n.abovethetop(this,e)&&!n.leftofbegin(this,e))if(n.belowthefold(this,e)||n.rightoffold(this,e)){if(++t>e.failure_limit)return!1}else i.trigger("appear"),t=0})}var h,o=this,e={threshold:0,failure_limit:0,event:"scroll",effect:"show",container:t,data_attribute:"original",skip_invisible:!1,appear:null,load:null,placeholder:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC"};return f&&(r!==f.failurelimit&&(f.failure_limit=f.failurelimit,delete f.failurelimit),r!==f.effectspeed&&(f.effect_speed=f.effectspeed,delete f.effectspeed),n.extend(e,f)),h=e.container===r||e.container===t?u:n(e.container),0===e.event.indexOf("scroll")&&h.bind(e.event,function(){return s()}),this.each(function(){var i=this,t=n(i);i.loaded=!1;(t.attr("src")===r||t.attr("src")===!1)&&t.is("img")&&t.attr("src",e.placeholder);t.one("appear",function(){if(!this.loaded){if(e.appear){var r=o.length;e.appear.call(i,r,e)}n("<img />").bind("load",function(){var r=t.attr("data-"+e.data_attribute),u,f;t.hide();t.is("img")?t.attr("src",r):t.css("background-image","url('"+r+"')");t[e.effect](e.effect_speed);i.loaded=!0;u=n.grep(o,function(n){return!n.loaded});(o=n(u),e.load)&&(f=o.length,e.load.call(i,f,e))}).attr("src",t.attr("data-"+e.data_attribute))}});0!==e.event.indexOf("scroll")&&t.bind(e.event,function(){i.loaded||t.trigger("appear")})}),u.bind("resize",function(){s()}),/(?:iphone|ipod|ipad).*os 5/gi.test(navigator.appVersion)&&u.bind("pageshow",function(t){t.originalEvent&&t.originalEvent.persisted&&o.each(function(){n(this).trigger("appear")})}),n(i).ready(function(){s()}),this};n.belowthefold=function(i,f){var e;return e=f.container===r||f.container===t?(t.innerHeight?t.innerHeight:u.height())+u.scrollTop():n(f.container).offset().top+n(f.container).height(),e<=n(i).offset().top-f.threshold};n.rightoffold=function(i,f){var e;return e=f.container===r||f.container===t?u.width()+u.scrollLeft():n(f.container).offset().left+n(f.container).width(),e<=n(i).offset().left-f.threshold};n.abovethetop=function(i,f){var e;return e=f.container===r||f.container===t?u.scrollTop():n(f.container).offset().top,e>=n(i).offset().top+f.threshold+n(i).height()};n.leftofbegin=function(i,f){var e;return e=f.container===r||f.container===t?u.scrollLeft():n(f.container).offset().left,e>=n(i).offset().left+f.threshold+n(i).width()};n.inviewport=function(t,i){return!(n.rightoffold(t,i)||n.leftofbegin(t,i)||n.belowthefold(t,i)||n.abovethetop(t,i))};n.extend(n.expr[":"],{"below-the-fold":function(t){return n.belowthefold(t,{threshold:0})},"above-the-top":function(t){return!n.belowthefold(t,{threshold:0})},"right-of-screen":function(t){return n.rightoffold(t,{threshold:0})},"left-of-screen":function(t){return!n.rightoffold(t,{threshold:0})},"in-viewport":function(t){return n.inviewport(t,{threshold:0})},"above-the-fold":function(t){return!n.belowthefold(t,{threshold:0})},"right-of-fold":function(t){return n.rightoffold(t,{threshold:0})},"left-of-fold":function(t){return!n.rightoffold(t,{threshold:0})}})}(jQuery,window,document);$("img.lazy").lazyload()});$("body").on("shown.bs.modal",".modal",function(){$(window).width()<1024&&$(this).css({top:"50%","margin-top":function(){return-($(this).height()/2)}})});if(isOnAdminPage=window.location.href.toLowerCase().indexOf("/admin/")>-1,$(document).ready(function(){isOnAdminPage||$.ajax({type:"GET",url:"/api/Cart",data:{summaryOnly:!0},dataType:"json",traditional:!0,success:function(n){SetCartSummary(n);SetHeaderMessage(n)},error:function(){}})}),!isOnAdminPage&&!$("#logout").length){if(add_chatinline(),function(n,t,i,r,u,f,e){n.GoogleAnalyticsObject=u;n[u]=n[u]||function(){(n[u].q=n[u].q||[]).push(arguments)};n[u].l=1*new Date;f=t.createElement(i);e=t.getElementsByTagName(i)[0];f.async=1;f.src=r;e.parentNode.insertBefore(f,e)}(window,document,"script","//www.google-analytics.com/analytics.js","ga"),window.location.hostname!="localhost"){window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments)}gtag("js",new Date);gtag("config","G-3VQTV16CJJ")}if(botCheck()==!1){var sc_project=10304697,sc_invisible=1,sc_security="7bc2eaec",scJsHost="https:"==document.location.protocol?"https://secure.":"http://www.";window.location.hostname!="localhost"&&document.write("<script type='text/javascript' src='"+scJsHost+"statcounter.com/counter/counter.js'><\/script>")}!function(n,t,i,r,u,f,e){n.fbq||(u=n.fbq=function(){u.callMethod?u.callMethod.apply(u,arguments):u.queue.push(arguments)},n._fbq||(n._fbq=u),u.push=u,u.loaded=!0,u.version="2.0",u.queue=[],f=t.createElement(i),f.async=!0,f.src=r,e=t.getElementsByTagName(i)[0],e.parentNode.insertBefore(f,e))}(window,document,"script","https://connect.facebook.net/en_US/fbevents.js");fbq("init","233875950696702");fbq("track","PageView")}