1function getCookie(n){for(var r,u,i=document.cookie.split(";"),t=0;t<i.length;t++)if(r=i[t].substring(0,i[t].indexOf("=")),u=i[t].substring(i[t].indexOf("=")+1),r=r.replace(/^\s+|\s+$/g,""),r==n&&window.nescape)return window.unescape(u)}function delete_cookie(n){document.cookie=n+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;"}function setCookie(n,t,i){var r=new Date,u;r.setDate(r.getDate()+i);u=escape(t)+(i==null?"":";Path=/;Expires="+r.toUTCString());document.cookie=n+"="+u}function fxLoadDependentScripts(n,t,i){handler=function(){};i&&(handler=i);t<n.length&&(handler=jQuery.getScript(n[t],function(){fxLoadDependentScripts(n,t+1,handler)}))}function loadJsFiles(n,t,i){$.when.apply($,$.map(n,function(n){n&&n.length>0&&$("<script type='text/javascript' src='"+n+"' ><\/script>").appendTo("head")})).then(function(){typeof t=="function"&&t()}).fail(function(){typeof i=="function"&&i()})}function LoadDependentScripts(n){loadJsFiles(n,function(){},function(){})}function asyncCoreJsLoad(){if(typeof loadAllMobJs!="undefined"&&loadAllMobJs==!0&&typeof asyncJsFilesToLoad!="undefined"){var n=800;typeof loadDelayAllMobJs!="undefined"&&loadDelayAllMobJs>0&&(n=loadDelayAllMobJs);window.setTimeout(function(){asyncJsFilesToLoad.length>0&&asyncJsFilesToLoad[0].length>0?$.get(asyncJsFilesToLoad[0],function(){LoadDependentScripts(asyncJsFilesToLoad);typeof asyncJsFilesToLoad2!="undefined"&&asyncJsFilesToLoad2.length>0?loadJsFiles(asyncJsFilesToLoad2,function(){typeof loadPageJsFiles=="function"&&loadPageJsFiles()},function(){}):typeof loadPageJsFiles=="function"&&loadPageJsFiles()}):(LoadDependentScripts(asyncJsFilesToLoad),typeof asyncJsFilesToLoad2!="undefined"&&asyncJsFilesToLoad2.length>0&&LoadDependentScripts(asyncJsFilesToLoad2),typeof loadPageJsFiles=="function"&&loadPageJsFiles())},n)}else typeof loadPageJsFiles=="function"&&loadPageJsFiles()}function loadCssFiles(n,t,i){$.when.apply($,$.map(n,function(n){$("<link rel='stylesheet' href='"+n+"' />").appendTo("head")})).then(function(){typeof t=="function"&&t()}).fail(function(){typeof i=="function"&&i()})}function asyncCoreCssLoad(){if(typeof loadAllMobCss!="undefined"&&loadAllMobCss==!0&&typeof asynCssFlsToLoad!="undefined"){var n=700;typeof loadDelayAllMobCss!="undefined"&&loadDelayAllMobCss>0&&(n=loadDelayAllMobCss);window.setTimeout(function(){asynCssFlsToLoad.length>0&&$.get(asynCssFlsToLoad[0],function(){loadCssFiles(asynCssFlsToLoad,function(){typeof asynCssFlsToLoad2!="undefined"&&asynCssFlsToLoad2.length>0?loadCssFiles(asynCssFlsToLoad2,function(){typeof loadPageCssFiles=="function"&&loadPageCssFiles()},function(){}):typeof loadPageCssFiles=="function"&&loadPageCssFiles()},function(){})})},n)}else typeof loadPageCssFiles=="function"&&loadPageCssFiles()}function getBasketCount(){$.ajax({url:"/home/fx/getbasketcount",cache:!1,success:function(n){$("#btnShowBasketMob .topbasketcountmob").html("");n&&n.length>0&&$("#btnShowBasketMob .topbasketcountmob").html(n)}})}function updMnuOfrTxt(){if(typeof currentOfferBnrName!="undefined"){var n=$(".lblsg-clearance ,.lblgls-clearance");switch(currentOfferBnrName){case"PRE_BLACK_FRIDAY":n.html("Black Friday Sale");break;case"BLACK_FRIDAY":n.html("Black Friday Sale");break;case"CYBER_MONDAY":n.html("Cyber Monday Sale");break;case"XMAS_SALE":n.html("Christmas Sale");break;case"BOXING_DAY":n.html("Boxing Day Sale");break;case"JAN_SALE":n.html("January Sale")}}}function TabContents(n,t,i){function e(n){u.removeClass(i).eq(n).addClass(i);r.removeClass("display").addClass("nodisplay");r.eq(n).addClass("display")}var u=$("#"+n+" ul.hmTb li"),r=$("#"+n+" div."+t),f;u.first().addClass(i);r.addClass("nodisplay");r.first().removeClass("nodisplay").addClass("display");u.click(function(){$(this).hasClass(i)||(LazyloadHiddenImage(),f=$(this).index(),e(f))})}function CataloguePageTabContents(n,t,i,r){function o(n){f.removeClass(r).eq(n).addClass(r);u.removeClass("display").addClass("nodisplay");u.eq(n).removeClass("nodisplay").addClass("display")}var f=$("#"+t+" ul.hmTb li"),u=$("#"+n+" div."+i),e;f.first().addClass(r);u.addClass("nodisplay");u.first().removeClass("nodisplay").addClass("display");f.click(function(){$(this).hasClass(r)||(LazyloadHiddenImage(),loadLazyImage($(".catelogue-description-text")),e=$(this).index(),o(e))})}function RefreshCaptchaCode(n,t){return showLoader(!0),$.ajax({url:"/staticpages/getcaptcha"+(t&&t.length>0?"?rctp="+t:""),type:"post",contentType:"application/json; charset=utf-8",success:function(t){var r=typeof n=="string"?$("#"+n):n,i;r.html("");t&&t.StatusCode==1&&t.ResultData&&t.ResultData.length>0&&(i=document.createElement("img"),i.src="data:image/png;base64,"+t.ResultData,r.append(i));showLoader(!1)},error:function(){showLoader(!1);$("#lblSuccessFooter").hide();$("#lblErrorFooter").show();$("#lblErrorFooter").text("Error while loading captcha image")}}).done(function(){showLoader(!0)}),showLoader(!1),!1}function getCountryChngePp(){function n(){return fetch("https://api.ipify.org?format=json").then(function(n){if(!n.ok)throw new Error("HTTP error!");return n.json()}).then(function(n){return $.ajax({url:"/countrychangepupup",data:JSON.stringify({ip:n.ip}),type:"post",contentType:"application/json; charset=utf-8",success:function(n){n&&n.ResultData&&$("body").append(n.ResultData)}}),n.ip}).catch(function(n){return console.error("Error:",n),""})}window.setTimeout(function(){n()},200)}function backtopage(n){document&&document.referrer&&document.referrer.length>0&&document.referrer.indexOf($("#hdnSitedomain").val())!=-1?history.back():n&&(window.location=n)}function GotoDescriptionSection(){goToByScrollAfterSticky("pageDescription")}function goToByScroll(n){n=n.replace("link","");$("html,body").animate({scrollTop:$("#"+n).offset().top},"slow")}function goToByScrollManageAddress(n){n=n.replace("link","");$("html,body").animate({scrollTop:$("#"+n).offset().top-100},"slow")}function goToByScrollExistingAddress(n){n=n.replace("link","");$("html,body").animate({scrollTop:$("#"+n).offset().top-100},"slow")}function goToByScrollAfterSticky(n){n=n.replace("link","");$("html,body").animate({scrollTop:$("#"+n).offset().top-100},"slow")}function open_invoice_popup(n,t){window.open(n,t,"")}function printPage(){window.print?window.print():alert("To print this page please go to the file menu and select print.")}function openAutoTermsPopup(n){return window.open(n,"Terms & Conditions","height=260,width=370,status=no,scrollbars=yes,resizable=yes,menubar=no,toolbar=no,top=50,left=50"),!1}function openpopup(n,t){OpenDialogPopUps(n,800,600,!1,!0,t,"stpopup")}function CheckValidators(n,t){var i,r;if(typeof Page_Validators!="undefined"){for(i=0;i<Page_Validators.length;i++)if(r=Page_Validators[i],r.validationGroup==n&&r.isvalid==!1&&$("#"+t).length>0){$("#"+t).hide();$("#"+t+"Footer").length>0&&$("#"+t+"Footer").hide();break}Page_IsValid=!0}}function ClientValidateOnForGotPassword(){$("#pForgottenPwd").length>0&&$("#pForgottenPwd").hide();$("#pSuccess").length>0&&$("#pSuccess").hide()}function number_field(){e=window.event;key=e.keyCode;key>47&&key<58||(e.keyCode="")}function MM_preloadImages(){var n=document,t,r,i;if(n.images)for(n.MM_p||(n.MM_p=[]),r=n.MM_p.length,i=MM_preloadImages.arguments,t=0;t<i.length;t++)i[t].indexOf("#")!=0&&(n.MM_p[r]=new Image,n.MM_p[r++].src=i[t])}function MM_findObj(n,t){var u,r,i;for(t||(t=document),(u=n.indexOf("?"))>0&&parent.frames.length&&(t=parent.frames[n.substring(u+1)].document,n=n.substring(0,u)),(i=t[n])||!t.all||(i=t.all[n]),r=0;!i&&r<t.forms.length;r++)i=t.forms[r][n];for(r=0;!i&&t.layers&&r<t.layers.length;r++)i=MM_findObj(n,t.layers[r].document);return!i&&t.getElementById&&(i=t.getElementById(n)),i}function MM_swapImage(){var t,r=0,n,i=MM_swapImage.arguments;for(document.MM_sr=[],t=0;t<i.length-2;t+=3)(n=MM_findObj(i[t]))!=null&&(document.MM_sr[r++]=n,n.oSrc||(n.oSrc=n.src),n.src=i[t+2])}function SetHomePageJSFunctions(){$(document).ready(function(){function n(){var n=t.
1width();n<768?IsWindowSmall==0&&(IsWindowSmall=1,$(".trustpilot-widget").attr("data-style-height","275px")):IsWindowSmall=0}var t=$(window);n();$(window).resize(n)})}function goToByScrollAfterSticky2(n){var t=50;(IsWindowSmall!=undefined||IsWindowSmall=="1")&&(t=200);n=n.replace("link","");$("html,body").animate({scrollTop:$("#"+n).offset().top-t},"slow")}function SetGlobalSearch(){$("#cmdMainSearch").click(FireGlobalSearch)}function FireGlobalSearch(){var i=$("#hdnSitedomain").val().trim(),n=$("#txtMainSearchTop").val().trim(),t;n.length>0&&n!=$("#txtMainSearchTop").data("dflt-value")&&(n=n.replace(/<\/?[a-z][a-z0-9]*[^<>]*>/ig,"").replace(/'/g,"").replace("?","").replace("<","").replace(">","").replace(/"/g,""),t=i+"/search/index?keywords="+encodeURIComponent(n),window.location=encodeURI(t))}function SetAllDropDowns(){$(document).ready(function(){SetDropDownStyle()})}function SetBasketPageControls(){$(document).ready(function(){SetDropDownStyle();InitializeDeleteConfirmation("deleteConfirmationDialog");InitializeAplConfirmation("aplDialog")})}function BillingAddressRadioOption(n){$("#"+n).length>0&&($("#"+n+" label").click(function(){var t=$(this).find("input").attr("group");$("#"+n+" label").each(function(){t==$(this).find("input").attr("group")&&$(this).removeClass("checked")});$(this).addClass("checked")}),$("#"+n+" label").each(function(){$(this).find("input").is(":checked")&&$(this).addClass("checked")}))}function SetReminderAndReorderControls(){$(document).ready(function(){SetDropDownStyle();ReorderAndReminders()})}function ReorderAndReminders(){$("fieldset.reminders").length!=0&&($("input#rbReminder").prop("checked",!0),$("input#rbReorder").prop("checked",!1),$("fieldset.reminders > label").click(function(n){$(this).parent().hasClass("checked")||n.target.nodeName=="INPUT"&&($("fieldset.reminders").each(function(){$(this).removeClass("checked");$(this).children("div.checked").fadeOut(200);$(this).children("div.unchecked").fadeIn(200);$(this).children(".checkbox").children("span.checked").fadeOut(200);$(this).children(".checkbox").children("span.unchecked").fadeIn(200)}),$(this).parent().addClass("checked"),$(this).parent().children("div.unchecked").fadeOut(200),$(this).parent().children("div.checked").fadeIn(200),$(this).children("span.unchecked").fadeOut(200),$(this).children("span.checked").fadeIn(200))}),$("fieldset.reminders > label").each(function(){$(this).find("input").is(":checked")&&$(this).parent().addClass("checked")}))}function ValidateReminderPage(){$("#rbReorder").is(":checked")?Page_ClientValidate("reorder"):$("#rbReminder").is(":checked")&&Page_ClientValidate("reminder")}function SetManageDeliveryAddresControls(){$(document).ready(function(){BillingAddressRadioOption("gvDeliveryAddressList");InitializeDeleteConfirmation("deleteConfirmationDialog")})}function SetDropDownStyle(){$("select").length!=0&&$("select").each(function(){var n,t;$(this).attr("class")!="selectpicker"&&$(this).hasClass("ddl-applied")==!1&&($(this).addClass("ddl-applied"),n="",n=$("option:selected",this).val()!=""?$("option:selected",this).text():$("option:selected",this).html(),$(this).css("z-index",10),$(this).css("opacity",0),$(this).css("-khtml-appearance","none"),t=$(this).parent().find("span.select"),t.length==0?($(this).data("prefixtext")&&$(this).data("prefixtext").trim().length>0&&(n=$(this).data("prefixtext")+" "+n),$(this).closest("div.select").hasClass("basket-page-select")?$(this).after('<span class="select">Delivery Country - '+n+"<\/span>"):$(this).after('<span class="select '+($("option:selected",this).data("css")||"")+'">'+n+"<\/span>")):($(this).data("prefixtext")&&$(this).data("prefixtext").trim().length>0&&(n=$(this).data("prefixtext")+" "+n),t.text(n)),$(this).change(function(){dispText=$("option:selected",this).text();$(this).closest("div.select").hasClass("basket-page-select")&&(dispText="Delivery Country - "+dispText);$(this).data("prefixtext")&&$(this).data("prefixtext").trim().length>0&&(dispText=$(this).data("prefixtext")+" "+dispText);var n=$(this).parent().find("span.select");n.length>0?n.text(dispText):$(this).parent().add('<span class="select ">'+dispText+"<\/span>");$(this).next().removeClass("red blue");$(this).next().addClass($("option:selected",this).data("css")||"")}))})}function SetDropDownStyleInContainer(n){$("."+n+" select").length!=0&&$("."+n+" select").each(function(){var n="",t;n=$("option:selected",this).val()!=""?$("option:selected",this).text():$("option:selected",this).html();$(this).css("z-index",10);$(this).css("opacity",0);$(this).css("-khtml-appearance","none");t=$(this).parent().find("span.select");t.length==0?($(this).data("prefixtext")&&$(this).data("prefixtext").trim().length>0&&(n=$(this).data("prefixtext")+" "+n),$(this).after('<span class="select">'+n+"<\/span>")):($(this).data("prefixtext")&&$(this).data("prefixtext").trim().length>0&&(n=$(this).data("prefixtext")+" "+n),t.text(n));$(this).change(function(){val=$("option:selected",this).text();$(this).data("prefixtext")&&$(this).data("prefixtext").trim().length>0&&(val=$(this).data("prefixtext")+" "+val);$(this).next().text(val)})})}function SetManageAdressControls(){InitializeDeleteConfirmation("deleteConfirmationDialog")}function SetRewardCtrls(){$("#aRewardTerms").length>0&&$("#aRewardTerms").click(OpenRewardPointsTermsPopup)}function OpenRewardPointsTermsPopup(){OpenDialogPopUps("/popups/rewardpointstermsconditions",700,600,!1,!0,"Terms and Conditions")}function SetSeletedRadioButton(n){var t=!1,i=0;$("."+n+" input").each(function(){i++;this.checked&&(t=!0)});i==1?$("."+n+" input").attr("checked",!0):t||$("."+n+" input:first").length>0&&$("."+n+" input:first").attr("checked",!0)}
1function ResetAllRadioButtonSelection(n,t){$("."+t+" input:checked").each(function(){this.checked&&(this.checked=!1)});n.checked=!0}function ResetAllLabelelection(n,t,i){$("."+i+" input:checked").each(function(){this.checked&&$(this).prop("checked",!1)});$("#"+n).attr("checked","checked")}function BackToPreviousPage(n){n.length>0&&(window.location.href=n)}function OpenRecommendFriendPopup(){OpenDialogPopUps("/popups/recommendfriendterms",700,350,!1,!0,"Terms and Conditions")}function InitializeDeleteConfirmation(n){$("#"+n).dialog({autoOpen:!1,resizable:!1,width:300,modal:!0,dialogClass:"no-close",buttons:{Delete:function(){$(this).dialog("close")},Cancel:function(){$(this).dialog("close")}}})}function ShowDeleteConfirmationDialogue(n,t,i){return $("#"+t).val(n),$("#"+i).click(),!1}function AlertBeforeCancelOrder(n){return $("#commonDialog").html("Are you sure, want to cancel this order?"),$("#hdCancelOrderId").val("0"),$("#commonDialog").dialog({title:"",modal:!0,buttons:{Yes:function(){return $(this).dialog("close"),$("#hdCancelOrderId").val(n),$("#btnCancelOrder").click(),!0},No:function(){return $(this).dialog("close"),!1}}}),$("#commonDialog").dialog("open"),!1}function OpenOrderTrackingUrl(n){if(n&&n.length>0){var t=window.open(n,"_blank");!t||t.closed||typeof t.closed=="undefined"?alert("Unable to open popup for order tracking. Kindly allow popup windows from your browser settings."):t.focus()}}function SetDefaultDelAddressMyAccount(n,t,i,r,u){if(console.log(n+"-"+t+"-"+i+"-"+r+"-"+u),$("#"+t).val(n),r=="True")$("#setDefaultConfirmationDialog").html("Do you want to set this address as Default Address for your Auto-Reorder order also?"),$("#setDefaultConfirmationDialog").dialog({title:"",width:"300px",autoOpen:!1,resizable:!1,dialogClass:"no-close",modal:!0,buttons:{Yes:function(){return $("#"+u).val("1"),$(this).dialog("close"),$("#"+i).click(),!1},No:function(){return $(this).dialog("close"),$("#"+i).click(),!1}}}),$("#setDefaultConfirmationDialog").dialog("open");else return $("#"+i).click(),!1}function SetDefaultDelAddressExisting(n,t,i){return $("#"+t).val(n),$("#"+i).click(),!1}function LoadProductRatingControls(){$(document).ready(function(){SetProductRatingControls()})}function SetProductRatingControls(){$("div.productRating").length>0&&$("div.productRating img").each(function(){$(this).click(function(){SelectDeSelectProductRatings(this)})})}function SelectDeSelectProductRatings(n){var t=new String(n.id),u,i,r;for(t=t.substring(t.indexOf("imgR")+4,t.indexOf("imgR")+5),u=parseInt(t),i=$(n).parent().parent().prop("id"),$("#"+i+" input[type=text]").length>0&&$("#"+i).find("input[type=text]").val(u),$("#"+i+" img").each(function(){$(this).attr("src","/images/pr-un-selected-star.png")}),r=1;r<=u;r++)$("#"+i+" img").each(function(){t=new String(this.id);t=t.substring(t.indexOf("imgR")+4,t.indexOf("imgR")+5);t==r&&$(this).attr("src","/images/pr-selected-star.png")})}function SetsunglassHeadControls(){$(".sunglassHead.drop").each(function(){$(this).hasClass("contracted")?$(this).next("tr").slideUp("slow"):$(this).next("tr").slideDown("slow")});$(".sunglassHead.drop").bind("click",function(n){n.stopPropagation();n.stopImmediatePropagation();$(this).hasClass("contracted")?($(this).stop().next("tr").slideDown("slow"),$(this).removeClass("contracted"),$(this).find("span").addClass("minus")):$(this).next("tr").slideUp("slow",function(){$(this).prev("tr.drop").addClass("contracted");$(this).prev("tr").find("span").removeClass("minus");$(this).prev("tr").find("span").addClass("plus")})})}function OpenDialogPopUps(n,t,i,r,u,f,e){var o,s;$("#ifrPopUp").attr("src",n);$("#ifrPopUp").css("display","block");o="show-close ";e&&e.length>0&&(o=o+e);s=$("#popUp").dialog({modal:u,height:i,maxWidth:700,width:"90%",resizable:r,title:f,dialogClass:o,close:function(){$("#ifrPopUp").css("display","none");$("#ifrPopUp").attr("src","")}});$("#popUp").animate({scrollTop:0},"fast")}function OpenDialogPopUpsInvoice(n,t,i,r,u,f){$("#ifrPopUp").attr("src",n);$("#ifrPopUp").css("display","block");$("#popUp").dialog({modal:u,height:i,maxWidth:700,width:"100%",overflow:scroll,resizable:r,title:f,dialogClass:"show-close",close:function(){$("#ifrPopUp").css("display","none");$("#ifrPopUp").attr("src","")}});$("#popUp").animate({scrollTop:0},"fast")}function designDropDown(){$(".selectpicker").selectpicker()}function scrollToTop(){var t=220,n=500;jQuery(window).scroll(function(){jQuery(this).scrollTop()>t?jQuery("#back-to-top").fadeIn(n):jQuery("#back-to-top").hide()});jQuery("#back-to-top").click(function(t){return t.preventDefault(),jQuery("html, body").animate({scrollTop:0},n),!1})}function InitializeAplConfirmation(n){$("#"+n).dialog({autoOpen:!1,resizable:!1,width:300,modal:!0,dialogClass:"no-close",buttons:{Proceed:function(){$(this).dialog("close");$("#MainContent_cntMain_hdnConfirmCnC").val("1");$("#MainContent_cntMain_btnProceedCheckout").click()},Cancel:function(){$("#MainContent_cntMain_hdnConfirmCnC").val("0");$(this).dialog("close")}}})}function ValidateOnlyNumber(n){var t,u,r;if(n==null||n.value==""||n.value==null)return!0;for(t=new String(n.value),u=t,i=0;i<u.length&&u.charCodeAt(i)==48;i++);for(t=t.substring(i),r="",i=0;i<t.length;i++)t.charCodeAt(i)>=48&&t.charCodeAt(i)<=58&&(r=r+t.charAt(i));return t.length>0&&r.length==0?(n.value=t,!1):r.length!=10?(n.value=r,!1):(n.value=r,!0)}function fnTextHighlight(){var n=$("#hidSort").val();n!=""?n==1?$("#poplr").addClass("sortArraw"):n==2?$("#alpha").addClass("sortArraw"):n==3?$("#low").addClass("sortArraw"):n==4&&$("#high").addClass("sortArraw"):$("#poplr").addClass("sortArraw")}function updMnuOfrTxt(){if(typeof currentOfferBnrName!="undefined"){var n=$(".lblsg-clearance ,.lblgls-clearance");switch(currentOfferBnrName){case"PRE_BLACK_FRIDAY":n.html("Black Friday Sale");break;case"BLACK_FRIDAY":n.html("Black Friday Sale");break;case"CYBER_MONDAY":n.html("Cyber Monday Sale");break;case"XMAS_SALE":n.html("Christmas Sale");break;case"BOXING_DAY":n.html("Boxing Day Sale");break;case"JAN_SALE":n.html("January Sale")}}}function SetGlobalFunctions(){$(document).ready(function(){GlobalFunctions();typeof uspMobileSlider=="function"&&uspMobileSlider()})}function GlobalFunctions(){SetCustomSelectBox();SetDatePickerControl();SettingCustomFunctions();SetGlobalSearch();SetMenuSection()}function checkWindowWidth(){var n=$window.width();n>767&&n<1100?IsWindowTab==0&&(IsWindowTab=1,$(".main-tab:not('.helpTblog')").attr("href","javascript:void(0);")):IsWindowTab=0}function SetMenuSection(){checkWindowWidth();$(window).resize(checkWindowWidth);$(".main-tabs").mouseover(function(){$(".brands li img").each(function(){var n=$(this).attr("data-src");$(this).attr("src",n)})});$(".contactTb").click(function(){MenuArrowRorate(this,"contact-lenses-wrapper")});$(".solTb").click(function(){MenuArrowRorate(this,"solutions-wrapper")});$(".careTb").click(function(){MenuArrowRorate(this,"eyecare-wrapper")});$(".sunTb").click(function(){MenuArrowRorate(this,"sunglasses-wrapper")});$(".helpTb").click(function(){MenuArrowRorate(this,"helpnews-wrapper")})}function MenuArrowRorate(n,t){IsWindowTab==1&&($("."+t).toggle(),$("."+t+"+.arrow").toggle(),$(n).parent().siblings("li").find("span").hasClass("arrow-rotate")&&($(n).parent().siblings("li").find("span").removeClass("arrow-rotate"),$(n).parent().siblings("li").find("span").addClass("arrow-normal")),$(n).find("span").hasClass("arrow")?($("."+t).hide(),$(n).find("span").removeClass("arrow"),$(n).find("span").addClass("arrow-normal")):$(n).find("span").hasClass("arrow-normal")?($(n).find("span").removeClass("arrow-normal"),$(n).find("span").addClass("arrow-rotate"),$(".arrow-tab").show()):$(n).find("span").hasClass("arrow-rotate")&&($(n).find("span").removeClass("arrow-rotate"),$(n).find("span").addClass("arrow-normal")))}
1function SetGlobalLoadProductImageGallery(){$(document).ready(function(){GlobalLoadProductImageGallery()})}function GlobalLoadProductImageGallery(){LoadProductImageGallery()}function LoadImagesOnLoad(){$("#content.home .slider").length!=0&&MM_preloadImages("img/slide-onthego.jpg","img/slide-prices.jpg","img/slide-reviews.jpg","img/dispatched-slide.jpg")}function SetCustomSelectBox(){$("div.selectBox").length!=0&&$("div.selectBox").each(function(){$(this).children("span.selected").html($(this).children("div.selectOptions").children("span.selectOption:first").html());$(this).attr("data-value",$(this).children("div.selectOptions").children("span.selectOption:first").attr("data-value"));$(this).children("span.selected,span.selectArrow").click(function(){$(this).parent().children("div.selectOptions").slideToggle(1e3)});$(this).find("span.selectOption").click(function(){$(this).parent().css("display","none");$(this).closest("div.selectBox").attr("data-value",$(this).attr("data-value"));$(this).parent().siblings("span.selected").html($(this).html());var n=$(this).attr("data-name"),t=$(this).attr("data-value");$("input[name="+n+"]").length!=0&&(t!=null?$("input[name="+n+"]").val(t):$("input[name="+n+"]").removeAttr("data-value"))})})}function SetDatePickerControl(){$(".datepicker.myaccountdate:not(.disabled)").length!=0?$(".datepicker.myaccountdate:not(.disabled)").each(function(){$(this).datepicker({showOn:"both",buttonImage:"/img/calen-icon-myaccount.png",buttonImageOnly:!0,buttonText:"Calendar",dateFormat:"dd/mm/yy",beforeShow:function(n){$(n).data("maxdt")!=undefined&&$(n).datepicker("option","maxDate",$(n).data("maxdt"))}})}):$(".datepicker:not(.disabled)").length!=0&&$(".datepicker:not(.disabled)").each(function(){$(this).datepicker({showOn:"both",buttonImage:"/img/content-icon-calendar.png",buttonImageOnly:!0,buttonText:"Calendar",dateFormat:"dd/mm/yy",beforeShow:function(n){$(n).data("maxdt")!=undefined&&$(n).datepicker("option","maxDate",$(n).data("maxdt"))}})})}function SettingCustomFunctions(){if($("input.replace").each(function(){$(this).data("label",$(this).val()).focus(function(){$(this).val()==$(this).data("label")&&$(this).removeClass("replace").val("")}).blur(function(){$(this).val()||$(this).addClass("replace").val($(this).data("label"))})}),$("textarea.replace").length!=0&&$("textarea.replace").each(function(){$(this).data("label",$(this).val()).focus(function(){$(this).val()==$(this).text()&&$(this).removeClass("replace").val("")}).blur(function(){$(this).val()||$(this).addClass("replace").val($(this).data("label"))})}),$("#tabs").length!=0&&$("#tabs").tabs(),$("#homeTabs").length!=0&&$("#homeTabs").tabs(),$("#tabsSub").length!=0&&$("#tabsSub").tabs(),$("#tabsMob").length!=0&&$("#tabsMob").tabs(),$("#lensesTabsMob").length!=0&&$("#lensesTabsMob").tabs(),$("#glassesTabsMob").length!=0&&$("#glassesTabsMob").tabs(),$("table.details").length!=0&&$("table.details .overlaytrigger").hover(function(){var n=$(this).attr("id");$("ul.thumbs li:nth-child(2)").click();hideGalleryOverlays();$("#content.detail .gallery-overlay li."+n).fadeIn(200)},function(){hideGalleryOverlays()}),$(".stars").length!=0&&$(".stars").each(function(){var t=parseFloat($(this).html()),r=readonly=checked=split=name="",n,i;for($(this).attr("id")!="undefined"&&$(this).attr("id")!=!1&&(name=$(this).attr("id")),$(this).hasClass("readonly")&&(readonly='disabled="disabled" '),n=1,t!=""&&Math.round(t)-t==.5?(i=.5,split=" {split:2}",n-=i):i=1;n<=5;)checked="",n==t&&(checked='checked="checked"'),r+='<input class="star'+split+'" type="radio" name="'+name+'" value="'+n+'" '+readonly+checked+"/>",n+=i;$(this).html(r)}),$("div.validate").length!=0){jQuery.validator.addMethod("alwaysvalid",function(){return!0},"");jQuery.validator.addMethod("telephone",function(n){return n.length>=6&&n.match(/^([()0-9-+\s]+)$/)?!0:!1},"");var n=1;$(".not-value").each(function(){var t;t=$(this).is("textarea")?$(this).html():$(this).val();$(this).addClass("geneneratedvalidation_"+n);jQuery.validator.addMethod("geneneratedvalidation_"+n,function(n){return n==t?!1:!0},"");n++});$(".validationtoggle").each(function(){var n=$(this).nextAll("input"),t=n.attr("class");$(this).bind("click",function(){n.hasClass("alwaysvalid")?(n.removeClass(),n.addClass(t)):(n.removeClass(),n.addClass("alwaysvalid"))})});
1$("form").each(function(){$(this).validate({errorPlacement:function(){},ignore:[],invalidHandler:function(n,t){var i=t.numberOfInvalids();i?setTimeout(function(){$("select.errormark").each(function(){$(this).parent().addClass("errormark")})},100):setTimeout(function(){$("select").each(function(){$(this).hasClass("errormark")||$(this).parent().removeClass("errormark")})},100)}});$("select.required").bind("click",function(){$(this).val()==""?$(this).parent().addClass("errormark"):$(this).parent().removeClass("errormark")})})}$(".auto-submit").length!=0&&$(".auto-submit").change(function(){$(this).closest("form").submit()});0||$("input.file").each(function(){$(this).hide();$(this).after('<div class="file"><\/div>');$(this).next(".file").click(function(){$(this).prev("input").trigger("click")});$(this).change(function(){$(this).next(".file").html($(this).val())})});$("span.topLinktext").bind("click",function(){$(this).parent().hasClass("homePageMenuLink")?window.location="/":$(this).parent().hasClass("topHmLink arrowDisplay")&&($(this).parent().find("img.mobMenuArrowIcon").first().trigger("click"),$("span.topHmLink").addClass("homePageMenuLink"))});$(".mobMenuHomeIcon").bind("click",function(){window.location="/"})}function hideGalleryOverlays(){$("#content.detail .gallery-overlay li").each(function(){$(this).fadeOut(200)})}function openAutoTermsPopup(){OpenDialogPopUps("/popups/autoreplenish-terms-and-condition",700,350,!1,!0,"Auto-Reorder Terms and Conditions","AutoReplenishTandCPop")}function SetCustomToolTips(){$(".promotionaltooltip").length>0&&($(".promotionaltooltip").unbind("click"),$(".promotionaltooltip").bind("click",function(n){var t,u,s,i,h,l,f;if(n&&n.target&&($(n.target).parent().hasClass("lbl")||$(n.target).hasClass("close-btn"))&&n.preventDefault(),$(".promotionaltooltip").each(function(){$(this).removeClass("tooltiphover");$(this).find(".tTip, a").children("span").hide()}),$(this).find(".tTip, a").children("span").is(":visible"))$(this).removeClass("tooltiphover"),$(this).find(".tTip, a").children("span").hide();else{$(this).addClass("tooltiphover");t=$(this).find(".tTip, a").children("span");u=$(this).find(".tTip, a");$(this).find(".tooltip-glasses").length>0&&(t=$(this).find(".tooltip-glasses span"),u=$(this));s="";i=$(this).closest(".listoption-4-18").find(".tTip").children("span");t.show();var o=t.width()/2,w=$(this).width()/2,d=$window.width()/2,r=u.offset().left-60+w,a="left: -"+r+"px!important;",c=!0,v=$(window).width(),e=v-(t.offset().left+t[0].offsetWidth);e>0&&e>o&&u.offset().left>o?r=o:t.offset().left>1&&e>o&&u.offset().left>o?c=!1:t.offset().left<-1?r=Math.abs(t.position().left-t.offset().left+30):e<-1?r=t.position().left<0?(t.position().left+e)*-1+20:t.position().left-e-20:e>1&&v>t.offset().left+t[0].offsetWidth?c=!1:(r=u.offset().left-(30+o),r<0&&(r=40));a="left: -"+r+"px!important;";var b=$(this).closest("#lns-prescription-warpper:visible").length>0?25:20,k="top:"+(-t.height()-b)+"px!important; right:unset !important; bottom: unset !important;",y=!0,p=t.find("strong").first();c&&($(this).closest(".moreInfoTxt ").length==0&&$(t).attr("style",k+a),i&&i.length>0&&(i.show(),h=t.height()/2,l="top:"+-h+"px!important; right:unset !important; bottom: unset !important;",isMobileView==!1&&(largeLeftSpace="left: 30px!important;",$(i).attr("style",l+largeLeftSpace),f="left:-10px!important; right:unset !Important;-webkit-transform: rotate(0deg) scale(1) skew(1deg) translate(0) !important;",s="top:"+h+"px!important;",$(p).attr("style",s+f),y=!1)));y&&(f=u.offset().left-4,f=t.position().left<0?t.position().left*-1+4:0,f="left: "+f+"px!important; right:unset !Important;",$(p).attr("style",f));$(this).closest("#lns-prescription-warpper:visible").length>0&&$(this).find("a").attr("style","float:left;");t.find(".close-btn").unbind("click");i.find(".close-btn").unbind("click");t.find(".close-btn").bind("click",function(){$("body").trigger("click")});i.find(".close-btn").bind("click",function(){$("body").trigger("click")});i.find(".close-btn").unbind("click");i.find(".close-btn").bind("click",function(){$("body").trigger("click")})}}),$(document).click(function(n){$(n.target).hasClass("promotionaltooltip")==!1&&$(".promotionaltooltip").each(function(){$(this).find(".tTip, a").children("span").is(":visible")&&($(this).removeClass("tooltiphover"),$(this).find(".tTip, a").children("span").hide());$(this).find(".tooltip-glasses").children("span").is(":visible")&&($(this).removeClass("tooltiphover"),$(this).find(".tooltip-glasses").children("span").hide())})}))}function CheckMobileNumeric10Digit(n,t){var u=document.getElementById(n.controltovalidate),r,e,f;if(u==null||u.value==""||u.value==null)t.IsValid=!0;else{for(r=new String(u.value),e=r,i=0;i<e.length&&e.charCodeAt(i)==48;i++);for(r=r.substring(i),f="",i=0;i<r.length;i++)r.charCodeAt(i)>=48&&r.charCodeAt(i)<=58&&(f=f+r.charAt(i));r.length>0&&f.length==0?(u.value=r,u.focus(),t.IsValid=!1):f.length!=10?(u.value=f,u.focus(),t.IsValid=!1):(u.value=f,t.IsValid=!0)}}function ShowTopBasketAnimation(){typeof fxRunShowTopBasketAnimation=="function"&&fxRunShowTopBasketAnimation()}function fxRunShowTopBasketAnimation(){var i,n,t;typeof isAutoHideTopBasket!="undefined"&&(i=isIphone()||isAndroid(),n=$("#basket #itemDetails"),i?(n=$("#basketMob"),document.getElementById("btnShowBasketMob")!=null&&document.getElementById("btnShowBasketMob").click(),n.slideDown(1e3,function(){window.setTimeout(function(){isAutoHideTopBasket==!0&&(document.getElementById("btnShowBasketMob").click(),$(".container-mob .overally.ovrActv-main").removeClass("ovrActv-main"))},6e3)}),n.unbind("touchstart mouseleave"),n.bind("touchstart",function(){isAutoHideTopBasket=!1})):(n.slideDown(1e3,function(){window.setTimeout(function(){isAutoHideTopBasket==!0&&n.slideUp("slow")},6e3)}),n.unbind("mouseenter mouseleave"),n.bind("mouseenter",function(){isAutoHideTopBasket=!1;n.unbind("mouseleave")}),n.bind("mouseleave",function(){isAutoHideTopBasket=!0;window.setTimeout(function(){n.unbind("mouseleave");n.slideUp("slow")},500)})),t=document.getElementById("hdProductTypeId"),t!=null&&(t.value!="1"?($("#btnSolutionAddtoBasket").show(),$("#imgplzwaitforSolution").hide()):t.value=="5"?($("#btnSunglassAddtoBasket").show(),$("#imgplzwait").hide()):($("#btnAddToBasket").show(),$("#imgplzwait").hide())))}function callFbqTopBsketCheckedout(n){if(typeof fbqTopBasketChecked=="function")try{fbqTopBasketChecked()}catch(t){console.log(t)}window.location=n}function fxAsyncLoadJavascriptFile(n){if(n&&typeof n=="string"&&n.length>0)$.getScript(n);else{var t=undefined;
1scripts.forEach(function(n){t?t.done(function(){t=$.getScript(n)}):t=$.getScript(n)})}}function ShowHideOrderEyeFrameGlassDetails(n){var t=$(n).next(".divLensDtl");t.is(":visible")?(t.slideUp(),$(n).find(".glyphicon").removeClass("glyphicon-chevron-up").addClass("glyphicon-chevron-down")):(t.slideDown(),$(n).find(".glyphicon").removeClass("glyphicon-chevron-down").addClass("glyphicon-chevron-up"))}function ConfirmBox(n,t,i,r,u,f){return(!t||t<200)&&(t=300),$("<div>"+n+"<\/div>").dialog({title:f||"",autoOpen:!0,resizable:!1,width:t,modal:!0,dialogClass:"no-close auto-confirmbox",open:function(n){$(n.target).dialog("widget").css({position:"fixed"}).position({my:"center",at:"center",of:window})},buttons:{Proceed:function(){$(this).data("value","1");$(this).dialog("close");$(this).dialog("destroy");typeof i=="function"&&i(u,1)},Cancel:function(){$(this).data("value","0");$(this).dialog("close");$(this).dialog("destroy");typeof r=="function"&&r(u,0)}}})}function MessageBox(n,t,i,r){return(!t||t<200)&&(t=300),$("<div>"+n+"<\/div>").dialog({autoOpen:!0,resizable:!1,width:t,modal:!0,dialogClass:"no-close auto-confirmbox",open:function(n){$(n.target).dialog("widget").css({position:"fixed"}).css({zIndex:"999999"}).position({my:"center",at:"center",of:window})},buttons:{OK:function(){$(this).data("value","1");$(this).dialog("close");$(this).dialog("destroy");typeof i=="function"&&i(r,1)}}})}function showLoading(n){LazyloadHiddenImage("wrpAjaxLoader");var t=$("#loaderOverly"),i=$("#wrpAjaxLoader");if(n&&n==!0){i.hide();t.hide();return}i.show();t.show()}function createTooltip(n,t){$(".tooltipBubble").remove();$('<div class="tooltip tooltipBubble">'+t+"<\/div>").appendTo("body");positionTooltip(n)}function deleteTooltip(n){$(n).remove()}function deleteAllTooltip(){$(".tooltipBubble").remove()}function positionTooltip(n){var r=$("#wrapper").offset(),u=n.offset(),t,i;relativeOffset={top:u.top-r.top,left:u.left-r.left};t=relativeOffset.left;i=relativeOffset.top-40;(n[0].id.indexOf("power_")!=-1||n[0].id.indexOf("colour_")!=-1)&&(i=relativeOffset.top+$(n).height()-10,t=relativeOffset.left-5);$("div.tooltipBubble").css({top:i,left:t})}function BindVirtualTryOnEventForAll(n,t,i,r,u){var e=0,s=t,o="https://cdn.camweara.com/camweara_virtual_tryon/?company_name=feelgoodcontacts_new&skus="+s,f;r&&r.length>0&&(o=o+","+r);f=$(document).find("#iFrameVirtualTry");f.attr("src",o);f.css("display","block");$("body").addClass("no-scroll");window.addEventListener("message",function(t){var h,r,s,o;if(~t.origin.indexOf("https://cdn.camweara.com")){if(e=u,t.data=="closeIframe")r=document.getElementById("iFrameVirtualTry"),r.contentWindow.location.replace(""),r.style.display="none",f.attr("src",""),$("body").removeClass("no-scroll");else if(t.data.includes("buynow")){r=document.getElementById("iFrameVirtualTry");r.contentWindow.location.replace("");r.style.display="none";f.attr("src","");$("body").removeClass("no-scroll");let u=t.data.split("-");u.length>1&&(s=u[1],e==5?(s=btoa(s),h=new FormData,h.append("pdpId",s),jQuery.ajax({type:"POST",url:"/sunglassproductpage/vrtryaddtobasket",data:h,cache:!1,contentType:!1,processData:!1,success:function(){window.location=$("#hdnSitedomain").val()!="undefined"?$("#hdnSitedomain").val()+"/my-account/basket":"/my-account/basket"}}).done(function(){})):e==7&&(o=$(n).closest("a").find(".img_thumb_flex").find("img"),o!="undefined"&&o.length>0?o.each(function(n,t){$(t).data("pid")==s&&(window.location=$(t).data("href"))}):window.location=i))}else if(t.data.includes("view")){r=document.getElementById("iFrameVirtualTry");r.contentWindow.location.replace("");r.style.display="none";f.attr("src","");$("body").removeClass("no-scroll");let u=t.data.split("-");u.length>1&&(s=u[1],o=$(n).closest("a").find(".img_thumb_flex").find("img"),o!="undefined"&&o.length>0?o.each(function(n,t){$(t).data("pid")==s&&(window.location=$(t).data("href"))}):window.location=i)}else if(t.data=="requestParentUrl"){t.source.postMessage({type:"requestParentUrl",url:window.location.href},t.origin);return}removeTryOnIframe();addTryOnIframe();$("body").removeClass("no-scroll")}else{$("body").removeClass("no-scroll");return}})}function removeTryOnIframe(){let n=document.getElementById("iFrameVirtualTry");n.parentNode.removeChild(n)}function addTryOnIframe(){document.querySelector("#iFrameVirtualTry")||document.querySelector("body").insertAdjacentHTML("afterend",'<iframe id="iFrameVirtualTry" allow="camera *; web-share;" src="about:blank" style="display:none;"><\/iframe>')}function addAnalyticsSnippets(){let n=document.createElement("script");n.text="
vendor: 325 bytes, line 1
1(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','
1GTM-P9FG4SV
vendor: 3 bytes, line 1
1');
1";document.head.appendChild(n);let t=document.createElement("noscript");t.innerHTML='<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-P9FG4SV" height="0" width="0"><\/iframe>';document.body.append(t)}function callNativeApp(){try{webkit.messageHandlers.callbackHandler.postMessage("documentLoaded")}catch(n){}}function ios_makeEle(n,t){var i=document.createElement(n);return i.setAttribute("class",t),i}function ios_removeElement(n){var t=document.querySelector(n);if(t)return t.parentNode.removeChild(t)}function ios_hideElement(n){var t=document.querySelector(n);if(t)return t.className+=" hidden"}function isAndroid(){var n=navigator.userAgent.toLowerCase(),t=n.indexOf("android")>-1;return t&&typeof Android!="undefined"||isIphone()==!1&&typeof isMobileDevice!="undefined"&&isMobileDevice&&isMobileDevice.toLocaleLowerCase()==="true"?!0:!1}function isIphone(){var n=navigator.userAgent.toLowerCase(),t=n.indexOf("iphone")>-1||n.indexOf("ipad")>-1||n.indexOf("macintosh")>-1;return t?!0:!1}function gotoURL(n){linkKey=leftAndRightTrim(n);var t=linkReposatory[linkKey];if(t)return Android.navigateWebView(t),!0}function leftAndRightTrim(n){return n=n.replace(/^\s+/,""),n.replace(/\s+$/,"")}function waitForElement(n,t){var i=setInterval(function(){document.querySelector(n)&&(clearInterval(i),t())},100)}function mobilePaymentStatus(n){typeof window.ReactNativeWebView!="undefined"&&typeof window.ReactNativeWebView.postMessage=="function"&&window.ReactNativeWebView.postMessage(JSON.stringify(n));isIphone()?n&&n==!0?webkit.messageHandlers.callbackHandler.postMessage("paymentSuccess"):webkit.messageHandlers.callbackHandler.postMessage("paymentFailed"):isAndroid()&&(n&&n==!0?Android.paymentSuccess(!0):Android.paymentSuccess(!1))}function virtualTryClosed(){setTimeout(function(){isIphone()?webkit.messageHandlers.callbackHandler.postMessage("virtualTryClosed"):isAndroid()&&Android.virtualTryClosed()},1e3)}function virtualTryViewProduct(n,t,i){setTimeout(function(){if(isIphone()){var r={action:"view",productid:n,issunglasses:t,showsteps:i};webkit.messageHandlers.callbackHandler.postMessage(JSON.stringify(r))}else isAndroid()&&Android.virtualTryViewProduct(n,t,i)},1e3)}function virtualTryAddProductToBasket(n,t){setTimeout(function(){if(isIphone()){var i={action:"addtobasket",productid:n,issunglasses:t};webkit.messageHandlers.callbackHandler.postMessage(JSON.stringify(i))}else isAndroid()&&Android.virtualTryAddProductToBasket(n,t)},1e3)}function LazyloadHiddenImage(n){var u=$("#content"),r,t,i;for(n&&n.length>0&&(u="#"+n),r=document.querySelectorAll("img.lazypost[data-src-placeholder]"),i=0;i<r.length;i++)t=r[i],t.getAttribute("data-src-placeholder")&&t.getAttribute("data-src-placeholder")!==null&&(t.src=t.getAttribute("data-src-placeholder"),t.removeAttribute("data-src-placeholder"))}function getTopBasket(n,t){t=t&&t==!0;var i=$("#basket #itemDetails");$("#basket #itemDetails").length>0?i.show():$.ajax({url:"/home/fx/gettopbasketitems?html="+t,cache:!1,type:"POST",success:function(n){if(n&&n.length>0){var i=$("#basket");i.html(n);i.unbind("click");localStorage.BasketCount=$(n).find(".bsktCntDflt").text().trim();t==!0&&(i.find("#itemDetails").show(),i.find("#topBasketCloseBtn").click(function(){i.find("#itemDetails").hide()}));i.bind("click",function(n){$(n.target).hasClass("topBasketCloseBtn")?i.find("#itemDetails").hide():getTopBasket(!1,!0)})}}})}function loadLazyImage(n){var t=$("body");n&&n.length>0&&(t=$(n));t.find("img.lazy:not([data-src-placeholder]):not([img-sync])").each(function(){$(this).attr("img-sync",!0);$(this).attr("src",$(this).data("src-placeholder"))});t.find("img.lazy[data-src]:not([data-sync])").each(function(){$(this).attr("img-sync",!0);$(this).attr("src",$(this).data("src"))})}function loadLazyDelay(n){window.innerWidth<=991?$(n).find(".lazy-delay[data-style-mob-src]:not([img-sync]").each(function(){$(this).attr("img-sync",!0);$(this).attr("style","background-image:url("+$(this).data("style-mob-src")+")!important;")}):$(n).find(".lazy-delay[data-style-src]:not([img-sync]").each(function(){$(this).attr("img-sync",!0);$(this).attr("style","background-image:url("+$(this).data("style-src")+")!important;")});$(n).find("img.lazy-delay:not([img-sync])").each(function(){$(this).attr("img-sync",!0);$(this).attr("src",$(this).data("src"))})}function IsDoubleClicked(n){var i=!1,t;return dbClickTime==0?dbClickTime=(new Date).getTime():(t=(new Date).getTime()-dbClickTime,(!n||n<10)&&(n=800),t>10&&t<n?(dbClickTime=0,i=!0):dbClickTime=(new Date).getTime()),i}function my_f(){var n=$("#header");n.find("#main_nav")&&n.find("#main_nav").hasClass("active")&&$("#main_nav").toggleClass("active");n.find("#offer")&&n.find("#offer").hasClass("active")&&($("#offer").toggleClass("active"),$(".offer_dropdown").toggleClass("on"))}function nav_f(){$("#target").hide()}function och(){$(".hmBnerLinksLst").addClass("showMob")}function ochCross(){$(".hmBnerLinksLst").removeClass("showMob")}function fxDtMovActions(){window.innerWidth<=1100?($(".navbar .subnav > a, .navbar .subnav.help > a").unbind("mouseover focus"),$(".navbar .subnav > .subnav-content").each(function(n,t){var i=$(t).parent().find(".subnavbtn");i&&i.length&&(i.unbind("click"),i.bind("click",function(n){$(n.target).closest(".subnav").hasClass("active")?$(n.target).closest(".subnav").removeClass("active"):($(".navbar .subnav").removeClass("active"),$(n.target).closest(".subnav").addClass("active"))}))})):($(".navbar .subnav > a[data-href]").each(function(n,t){var i=$(t);i&&i.length&&(i.attr("href",aHrefVal),i.removeAttr("data-href"),i.unbind("click"))}),$(".navbar .subnav > a").bind("mouseover focus",function(n){$(n.target).closest(".subnav").hasClass("active")||($(".navbar .subnav").removeClass("active"),$(n.target).parent().addClass("active"))}),$(".navbar .subnav.help > a").bind("mouseover focus",function(n){$(n.target).closest(".subnav").hasClass("active")||($(".navbar .subnav").removeClass("active"),$(n.target).closest(".subnav").addClass("active"))}));var n=$("#trustpilot-home iframe");n&&n.length&&(window.innerWidth<551?n.css("height","300px"):n.css("height","140px"))}function GetAllBrandsCat(){const n=$(".navbar .s_nxt").next(".showOff");n.find("a[class*='brandsPage']").unbind("click");localStorage.removeItem("allBrandscat");n.find("a[class*='brandsPage']").bind("click",function(){if($(this).attr("id")&&$(this).attr("id").length>0){var n=$(this).attr("id");localStorage.setItem("allBrandscat",n)}})}function ShowSearchArea(){return $("#SearchMenuBox").hasClass("show")?$("#SearchMenuBox").removeClass("show"):($(".ac_input").addClass("show"),$("#SearchMenuBox").addClass("show")),!1}
1function topLoginEnterPress(n,t){t&&(t.keyCode&&t.keyCode==13||t.which&&t.which==13)&&CheckLogInOrForgotPassword(!0)}function CheckLogInOrForgotPassword(n){var t;if($("input").attr("required",!1),$("#hdTopFormType").val()=="0")$("#txtTopLoginEmail").prop("required",!0),$("#txtTopLoginPassword").prop("required",!0);else if($("#hdTopFormType").val()=="1")$("#txtTopLoginEmail").prop("required",!0);else if($("#hdTopFormType").val()=="2")return $("#btnTopLogin").val("Log In"),$("#aCancel").hide(),$("#divTopPassword").show(),$("#btnTonRegister").fadeIn(),$("#aTopforgotPassword").fadeIn(),$("#hdTopFormType").val("0"),$("#divHeaderTextForgotPassword").hide(),$("#divForgotPwdSuccessMsg").hide(),$("#divforgotpwdEmail").show(),$("#divforgotPwdCancelBtn").show(),$("#ulTopLoginPanel").hide(),!1;var r=$("#pnlTopLogin"),i=$("#txtTopLoginEmail").val(),u=$("#txtTopLoginPassword").val();if($.trim(i).length==0)return $("#txtTopLoginEmail").addClass("input-validation-error"),$("#txtTopLoginEmail").focus(),!1;if(!validateTopLoginEmail(i))return $("#txtTopLoginEmail").addClass("input-validation-error"),$("#txtTopLoginEmail").focus(),$("#commonDialog").html("Please enter a valid email."),$("#commonDialog").dialog({autoOpen:!1,resizable:!1,width:300,modal:!0,dialogClass:"no-close",buttons:{OK:function(){$(this).dialog("close");$("#ulTopLoginPanel").show();$("#txtTopLoginEmail").focus()}}}),$("#commonDialog").dialog("open"),!1;if($("#hdTopFormType").val()=="0"){if($.trim(u).length==0)return $("#txtTopLoginPassword").addClass("input-validation-error"),$("#txtTopLoginPassword").focus(),!1;if(($.trim($("#txtTopLoginPassword").val()).length<4||$.trim($("#txtTopLoginPassword").val()).length>16)&&($("#txtTopLoginPassword").addClass("input-validation-error"),$("#txtTopLoginPassword").focus(),returnresult=!1),r.find(".LoginFailedCaptchaCover:visible").length>0&&$.trim($("#txtSecurityCode").val()).length==0)return $("#txtSecurityCode").addClass("input-validation-error"),$("#txtSecurityCode").focus(),!1}return $("#txtTopLoginEmail").removeClass("input-validation-error"),$("#txtTopLoginPassword").removeClass("input-validation-error"),$.trim(i).length>0&&($("#hdTopFormType").val()=="1"||$.trim(u).length>0)?(t={},t.userId=i,t.password=u,t.setreminder=$("#divTopOrderReminder:visible #chkTopNewsletterSubscribe").is(":checked"),t.hdTopFormType=$("#hdTopFormType").val(),t.Captcha=$("#txtSecurityCode").val(),$.ajax({url:$("#hdnSitedomain").val().trim()+"/servicepage/loginandforgotpassword",type:"POST",data:JSON.stringify(t),contentType:"application/json; charset=utf-8",dataType:"json",cache:!1,success:function(t){var i,u;if(r.find(".LoginFailedCaptchaCover").hide(),t&&t.Message&&t.Message!=""&&t.Message=="True")if($("#hdTopFormType").val()=="0"){if(document.URL.toLowerCase().indexOf("/my-account/basket")>0?window.location.reload():document.URL.toLowerCase().indexOf("/userlogin")>0&&(window.location.href="/"),$("#litUserName").text(t.UserName+" "+t.LastName),$("#txtAbandonBasketEmail").length>0&&($("#txtAbandonBasketEmail").val(t.Email),$("#txtAbandonBasketEmail").attr("disabled","disabled")),$("#aTopMyAccountIndex").attr("href",$("#hdnSitedomain").val().trim()+"/my-account/index"),$("#ulTopLoginPanel").hide(),$("#itemDetails").hide(),$("#hdTopMenuLoginType").val()=="1")window.location=$("#aTopOrderhistory").attr("href");else{LoadBasketForDeskTop();try{i=isIphone()||isAndroid();i?$("#btnRefreshMobBaskte").length>0&&$("#btnRefreshMobBaskte").click():$("#btnRefreshTopBaskte").length>0&&$("#btnRefreshTopBaskte").click()}catch(f){}$("#ulTopLogedPanel").show();$("#litUserName").length>0&&$(".greenLogin").addClass("dot")}n&&n==!0&&getTopBasket(!1);u=$(".showWishlistItem");t.WishListCount!=undefined&&t.WishListCount!=null&&parseInt(t.WishListCount)>=0?t.WishListCount>0&&(localStorage.WishListCount=t.WishListCount,u.text(t.WishListCount)):getTopWishListCount();t&&t.SFLoginScript&&t.SFLoginScript.length>0&&($("body").append(t.SFLoginScript),sfLoginTracking())}else $("#hdTopFormType").val()=="1"&&($("#btnTopLogin").val("OK, THANKS!"),$("#hdTopFormType").val("2"),$("#divforgotpwdEmail").hide(),$("#divforgotPwdCancelBtn").hide(),$("#divForgotPwdSuccessMsg").show());else return t.Message!=""&&t.LoginAttempts!=0&&parseInt(t.LoginAttempts)>=NumberOfFailedAttempts&&(RefreshCaptchaCode($(".cptWrpTplog23S32")),r.find(".LoginFailedCaptchaCover").show()),$("#commonDialog").html(t.Message),$("#commonDialog").dialog({autoOpen:!1,resizable:!1,width:300,modal:!0,dialogClass:"no-close",buttons:{OK:function(){$(this).dialog("close");$("#ulTopLoginPanel").show();$("#txtTopLoginEmail").focus()}}}),$("#commonDialog").dialog("open"),!1},error:function(){}}),!1):void 0}function validateTopLoginEmail(n){return/^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,9}|[0-9]{1,3})(\]?)$/.test(n)?!0:!1}
1function LoadBasketForDeskTop(){var n={};return n.fromDevice="desktop",$.ajax({url:$("#hdnSitedomain").val().trim()+"/servicepage/getcurrentbasket",type:"POST",cache:!1,data:JSON.stringify(n),contentType:"application/json; charset=utf-8",dataType:"json",success:function(n){var r=$("#showItem"),i,t;n&&n!=""&&(i=n,t=i.split("|"),r.html(t[0]),$("#topbasketdetail").html(t[1]))},error:function(){}}),!1}function TopBasketDeleteAndPopulateBasket(n){if($("#hdEditCustomerBasketID").val()!=undefined&&$("#hdTopEditBasketId").val($("#hdEditCustomerBasketID").val()),n!=""){var t={};return t.customerBasketId=n,t.topEditBasketId=$("#hdTopEditBasketId").val(),t.currentUrl=window.location.href,t.fromDevice="desktop",$.ajax({url:"/servicepage/deletebasketandfetchbasket",type:"POST",cache:!1,data:JSON.stringify(t),contentType:"application/json; charset=utf-8",dataType:"json",success:function(n){var i;if(localStorage.BasketCount=0,n!=null&&n!="")if(i=n,i.indexOf("URL:")>-1)window.location.href=i.substr(4);else{var u=$("#showItem"),t=i.split("|"),r=$("#basket");localStorage.BasketCount=t[0];u.html(t[0]);$(".bsktCntDflt").html(t[0]);t[0]&&parseInt(t[0])>0?r.find(".minishopBgPrc").html(t[2]):($("#itemDetails").hide(),r.find(".minishopBgPrc").html(""));$("#topbasketdetail").html(t[1]);$("#topsubtotalprice").text(t[2])}},error:function(){}}),!1}return!1}function setTopSearchEvents(){}function getTopWishListCount(){$.ajax({url:"/home/fx/gettopwishlistcount",cache:!1,success:function(n){localStorage.WishListCount="0";var t=$(".showWishlistItem");n&&n.ResultData!=undefined&&n.ResultData.TotalWistListCount!=undefined&&parseInt(n.ResultData.TotalWistListCount)>0&&(localStorage.WishListCount=n.ResultData.TotalWistListCount,t.text(n.ResultData.TotalWistListCount));settpbsktdt()},error:function(){localStorage.WishListCount="0";settpbsktdt()}})}function settpbsktdt(){const n=document.getElementsByClassName("bsktCntDflt");for(let t=0;t<n.length;t++)n[t].innerHTML=localStorage&&localStorage.BasketCount&&localStorage.BasketCount>0?localStorage.BasketCount:"0";const t=document.getElementsByClassName("showWishlistItem");for(let n=0;n<t.length;n++)t[n].innerHTML=localStorage&&localStorage.WishListCount&&localStorage.WishListCount>0?localStorage.WishListCount:"0"}function AddRemoveWishList(n,t,i,r){showLoader();var u={};u.productId=t;u.wishListId=i;$.ajax({url:"/home/fx/addremovewishlist",type:"POST",contentType:"application/json; charset=utf-8",data:JSON.stringify(u),cache:!1,success:function(i){if(i!="")if(i.StatusCode!=undefined&&i.StatusCode==1){showLoader(!0);var u=$(".showWishlistItem");i.ResultData.TotalWistList!=undefined&&parseInt(i.ResultData.TotalWistList)>0?(localStorage.WishListCount=i.ResultData.TotalWistList,u.text(i.ResultData.TotalWistList)):(localStorage.WishListCount=i.ResultData.TotalWistList,u.text(i.ResultData.TotalWistList));r?i.ResultData.IsDelete&&i.ResultData.IsDelete==!0?($(n).removeClass("activewishlistProductPage"),$(n).addClass("wishlistProductPage"),$(n).attr("onclick","AddRemoveWishList(this, "+t+",0,false);")):i.ResultData.IsDelete!=undefined&&i.ResultData.IsDelete==!1&&($(n).removeClass("wishlistProductPage"),$(n).addClass("activewishlistProductPage")):i.ResultData.IsDelete&&i.ResultData.IsDelete==!0?($(n).removeClass("activewishlist"),$(n).addClass("wishlist"),$(n).attr("onclick","AddRemoveWishList(this, "+t+",0,false);")):i.ResultData.IsDelete!=undefined&&i.ResultData.IsDelete==!1&&($(n).removeClass("wishlist"),$(n).addClass("activewishlist"))}else showLoader(!0);else showLoader(!0)},error:function(n,t){console.log(n);console.log(t)}}).done(function(){})}function RemoveWishList(n,t,i){showLoader();var r={};r.productId=i;r.wishListId=t;$.ajax({url:"/home/fx/addremovewishlist",type:"POST",contentType:"application/json; charset=utf-8",data:JSON.stringify(r),cache:!1,success:function(t){if(t!="")if(t.StatusCode!=undefined&&t.StatusCode==1){showLoader(!0);var i=$(".showWishlistItem");t.ResultData.TotalWistList!=undefined&&parseInt(t.ResultData.TotalWistList)>0&&(localStorage.WishListCount=t.ResultData.TotalWistList,i.text(t.ResultData.TotalWistList));t.ResultData.IsDelete&&t.ResultData.IsDelete==!0&&(n!=""&&$("#"+n).remove(),parseInt(t.ResultData.TotalWistList)>
11?$("#h1TotalCount").text(t.ResultData.TotalWistList+" items"):$("#h1TotalCount").text(t.ResultData.TotalWistList+" item"),parseInt(t.ResultData.TotalWistList)==0&&(localStorage.WishListCount=t.ResultData.TotalWistList,$("#divwishListContainer").remove(),showLoader(),window.location.href=window.location.href))}else showLoader(!0);else showLoader(!0)},error:function(n,t){console.log(n);console.log(t)}}).done(function(){})}function showLoader(n){var t=$("#wrpLoader");t!=null&&t!=undefined&&(n&&n==!0?t.hide():t.show())}function binItemListClickEvent(){const n=$(".prod_cont .prod_list_item");n.find(".products-list_item-title a").unbind("click");n.find(".products-list_item-title a").bind("click",function(n){if($(this).closest(".PdpLstBox").data("querydata")&&$(this).closest(".PdpLstBox").data("querydata").length>0&&$(this).attr("href")){var t=$(this).attr("href");t=t.indexOf("?")>0?t+"&"+$(this).closest(".PdpLstBox").data("querydata"):t+"?"+$(this).closest(".PdpLstBox").data("querydata");window.location.href=encodeURI(t);n.preventDefault()}});n.find(".nboxBdr a").unbind("click");n.find(".nboxBdr a").bind("click",function(n){var i,s,u;if(n.target&&(n.target.tagName=="SPAN"&&n.target.id=="favHeart"&&$(n.target).hasClass("add_fav")&&$(n.target).hasClass("fav-heart")?n.preventDefault():n.target.tagName=="SPAN"&&n.target.id=="favHeart"&&$(n.target).hasClass("add_fav")&&$(n.target).hasClass("fav-heart")?n.preventDefault():$(n.target).hasClass("wish")||$(n.target).hasClass("nonwish")||$(n.target).hasClass("navarrow")||$(n.target).hasClass("pdp-img")||$(n.target).hasClass("colour-thumbnail")?n.preventDefault():$(n.target.tagName=="SPAN"&&n.target).parent().hasClass("plItem-vTry")||n.target.tagName=="DIV"&&$(n.target).hasClass("plItem-vTry")?n.preventDefault():$(this).data("querydata")&&$(this).data("querydata").length>0&&$(this).attr("href")&&(i=$(this).attr("href"),i=i.indexOf("?")>0?i+"&"+$(this).data("querydata"):i+"?"+$(this).data("querydata"),window.location.href=encodeURI(i),n.preventDefault())),$(n.target).hasClass("navarrow")){var f=$(n.target).closest(".img_thumb_cover"),h=f.find("#img_thumb img"),e=f.find("span.img_thumb_flex"),t=parseInt(e.data("imgindex"))||0,c=h.first(),l=c[0].offsetWidth+2*h.last().css("margin-left").replace("px",""),a=0,v=e.width(),o=0,y=0,r=0;o=parseInt(v/l);s=h.length-o;y=v-l*o;r=y/o/2;r=r<0?0:r;a=l+r*2;$(n.target).parent().hasClass("lft_arrow")?(t>0&&(t=t-1,u=-(t*a),c.css("margin-left",u+"px"),f.find(".rgt_arrow img").removeClass("disabled")),t<=0&&(t=0,$(n.target).addClass("disabled")),e.data("imgindex",t)):(t<s&&(t=t+1,u=-(t*a),c.css("margin-left",u+"px"),f.find(".lft_arrow img").removeClass("disabled")),t>=s&&(t=s,$(n.target).addClass("disabled")),e.data("imgindex",t))}});n.find(".PdpLstBox .img_thumb_cover").unbind("click");n.find(".PdpLstBox .img_thumb_cover").bind("click",function(n){var o,r;if($(n.target).hasClass("navarrow")){var u=$(n.target).closest(".img_thumb_cover"),s=u.find("#img_thumb img"),f=u.find("span.img_thumb_flex"),t=parseInt(f.data("imgindex"))||0,h=s.first(),c=h[0].offsetWidth+2*s.last().css("margin-left").replace("px",""),l=0,a=f.width(),e=0,v=0,i=0;e=parseInt(a/c);o=s.length-e;v=a-c*e;i=v/e/2;i=i<0?0:i;l=c+i*2;$(n.target).parent().hasClass("lft_arrow")?(t>0&&(t=t-1,r=-(t*l),h.css("margin-left",r+"px"),u.find(".rgt_arrow img").removeClass("disabled")),t<=0&&(t=0,$(n.target).addClass("disabled")),f.data("imgindex",t)):(t<o&&(t=t+1,r=-(t*l),h.css("margin-left",r+"px"),u.find(".lft_arrow img").removeClass("disabled")),t>=o&&(t=o,$(n.target).addClass("disabled")),f.data("imgindex",t))}})}function fxLogoutClearData(){localStorage&&(localStorage.BasketCount="0",localStorage.WishListCount="0")}function OpSmPdpUrl(n){n&&$(n).data("href")&&$(n).data("href").length>0&&(window.location.href=$(n).data("href"))}var fdatasrc,flagCountryShow,IsWindowSmall,IsWindowTab,$window,dbClickTime;$(document).ready(function(){typeof echo!="undefined"&&echo.init();var t=window.location.href,n="";navigator&&navigator.userAgent&&(n=navigator.userAgent.toLowerCase())});$(document).on("dialogopen",function(n){$dialogBox=$(n.target).parent();
1$dialogBox&&($dialogBox.find(".ui-dialog-titlebar button").hide(),$dialogBox.find(".ui-dialog-title").text().trim().length>0&&$dialogBox.find(".ui-dialog-titlebar").show(),$dialogBox.hasClass("show-close")&&($dialogBox.find(".ui-dialog-titlebar button").show(),$dialogBox.find(".ui-dialog-titlebar button").text("X")))});Date.prototype.dddmmmddyyyy=function(){var n=this.getFullYear().toString(),t=this.getDate().toString(),i=this.getDay();return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][i]+", "+["January","February","March","April","May","June","July","August","September","October","November","December"][this.getMonth()]+" "+t+", "+n};fdatasrc=function(){typeof echo!="undefined"&&echo!=null&&echo.init({offset:window.location.pathname=="/"||window.location.pathname.toLowerCase()==""?10:100,throttle:100,unload:!0})};$(".TitleCase").on("keyup",function(){var n=$(this).val();n=n.substring(0,1).toUpperCase()+n.substring(1);$(this).val(n)});$(".UpperCase").on("keyup",function(){var n=$(this).val();n=n.toUpperCase();$(this).val(n)});flagCountryShow=0;IsWindowSmall=0;$.fn.hasAttr=function(n){return this.attr(n)!==undefined};$(window).on("load",function(){var n=window.location.href,i=$("#hdnSitedomain").val()+"/",t;n!=i&&n.indexOf("conditions")<=0&&n.indexOf("#")<=0&&n.indexOf("/catalogue")<=0&&n.indexOf("/sunglasses")<=0&&n.indexOf("/contact-lenses")<=0&&n.indexOf("#rpterm")<=0?(t=$(this).scrollTop(),t>0&&(event.preventDefault(),typeof doNotScrollTop=="undefined"&&jQuery("html, body").animate({scrollTop:0},"fast"))):isMobileView&&isMobileView==!0&&(t=$(this).scrollTop(),t>0&&(event.preventDefault(),typeof doNotScrollTop=="undefined"&&jQuery("html, body").animate({scrollTop:t+200},"fast")))});jQuery(document).ready(function(){var t=new Swiper(".swiperForStaticPages, .swiperForStaticPages2, .swiperForStaticPages3",{slidesPerView:2,spaceBetween:0,freeMode:!0,loop:!0,rewind:!0,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},breakpoints:{768:{slidesPerView:3,spaceBetween:30},1200:{slidesPerView:4,spaceBetween:30}}}),n;$(".faqTitle").click(function(){$(this).next("div").is(":hidden")?($(this).next("div").slideDown("fast"),$(this).parent(".faqBox").addClass("bgW"),$(this).parent(".faqBox").addClass("aftrClick")):($(this).next("div").slideUp("fast"),$(this).parent(".faqBox").removeClass("bgW"),$(this).parent(".faqBox").removeClass("aftrClick"))});$(".searchClose").click(function(){$(".s_offer").removeClass("searchOn");$(".ac_results").hide()});jQuery("#back-to-top").fadeOut();jQuery("#back-to-top").click(function(n){return n.preventDefault(),jQuery("html, body").animate({scrollTop:0},500),!1});n=$("#header");$(window).scroll(function(){var t=jQuery(this).scrollTop();t>=200&&(n.find(".arrBlack").fadeOut(),n.find(".blkToolTip").fadeOut())})});jQuery(window).scroll(function(){jQuery(this).scrollTop()>600?jQuery("#back-to-top").fadeIn(500):jQuery("#back-to-top").hide()});$(document).ready(function(){var t,r,i,n;updMnuOfrTxt();$("#basket").click(function(n){if(n.target&&n.target.id=="basket"&&window.location.href.toLocaleLowerCase().indexOf("/my-account/basket")==-1){var t=parseInt($(this).find(".top-small-basket a span").text().trim())|0;t>0&&!isIphone()&&!isAndroid()&&(window.location="/my-account/basket")}});fdatasrc();$(".topnavBg .navbar > .subnav > a , .topnavBg .subnav > .subnavbtn").on("click mouseover focus",function(){$(this).closest(".subnav").find("img.lazy-delay:not([img-sync])").each(function(){$(this).attr("img-sync",!0);$(this).attr("src",$(this).data("src"))})});SetCustomToolTips();t=$(window);r=t.width();$("#tStrip").length>0&&(i=document.querySelector("#tStrip"),stripH=i.clientHeight);$(".topnavBg").offset()!=undefined&&$(".topnavBg").offset()!=null&&$(window).scroll(function(){var n=jQuery(this).scrollTop();n>=65?($("#tStrip").length>0&&($("#tStrip").addClass("fixed"),$(".topnavBg").css("top",stripH)),$(".topnavBg").addClass("fixed")):($("#tStrip").length>0&&$("#tStrip").removeClass("fixed"),$(".topnavBg").removeClass("fixed"))});$("div.brandsHover input[type='image']").on("hover",function(){var t=$(this).attr("id"),n="";switch(t){case"ImgAcuvue":n="img/acuvueO.jpg";break;case"ImgAcuvueOasys":n="img/acuvue-oasysO.jpg";break;case"ImgAirOptix":n="img/air-optixO.png";break;
1case"ImgDailies":n="img/dailiesO.png";break;case"ImgFreshLook":n="img/freshlookO.png";break;case"ImgPureVision":n="img/purevisionO.jpg"}t=="ImgAcuvue"&&(n="img/acuvueO.jpg");$(this).attr("src",n)});$("div.brandsHover input[type='image']").on("mouseleave",function(){var t=$(this).attr("id"),n="";switch(t){case"ImgAcuvue":n="img/acuvue.jpg";break;case"ImgAcuvueOasys":n="img/acuvue-oasys.jpg";break;case"ImgAirOptix":n="img/air-optix.png";break;case"ImgDailies":n="img/dailies.png";break;case"ImgFreshLook":n="img/freshlook.png";break;case"ImgPureVision":n="img/purevision.jpg"}$(this).attr("src",n)});fnTextHighlight();$("input[type='text']").blur(function(){var n=new String($(this).val());n=n.replace(/<\/?[a-z][a-z0-9]*[^<>]*>/ig,"").replace("?","").replace("<","").replace(">","");$(this).val(n)});$("input[type='textarea']").blur(function(){var n=new String($(this).val());n=n.replace(/<\/?[a-z][a-z0-9]*[^<>]*>/ig,"").replace("?","").replace("<","").replace(">","");$(this).val(n)});n=$("#header");n.find("#srchTpLnk").click(function(){window.TopOfferMenu&&window.TopOfferMenu.is(":visible")&&window.TopOfferMenu.dialog("close");n.find("#blKCoverSearchBk").hasClass("hideSrchMob")&&(n.find("#blKCoverSearchBk").removeClass("hideSrchMob"),n.find(".mobile-search-reorder-container").removeClass("hideSrchMob"),n.find(".mobile-search-reorder-container").find("img.lazy:not([img-sync])").each(function(){$(this).attr("img-sync",!0);$(this).attr("src",$(this).data("src"))}),n.find("#srchTpLnk").addClass("hide"),n.find(".bkBtnTpSrch").removeClass("hide"),n.find(".arrBlack").hide(),n.find(".blkToolTip").hide())});n.find("#blKCoverSearchBk").click(function(){n.find("#blKCoverSearchBk").addClass("hideSrchMob");n.find(".mobile-search-reorder-container").addClass("hideSrchMob");n.find(".mobile-search-reorder-container").find("img.lazy:not([img-sync])").each(function(){$(this).attr("img-sync",!0);$(this).attr("src",$(this).data("src"))});n.find("#srchTpLnk").removeClass("hide");n.find(".bkBtnTpSrch").addClass("hide")});n.find(".bkBtnTpSrch").click(function(){n.find("#blKCoverSearchBk").addClass("hideSrchMob");n.find(".mobile-search-reorder-container").addClass("hideSrchMob");n.find("#srchTpLnk").removeClass("hide");n.find(".bkBtnTpSrch").addClass("hide")});typeof customertype!="undefined"&&customertype=="repeat"&&$("ul.offersSubMenu li.firstOrderOff").remove();n.find(".offersSubMenuCover").click(function(t){$(t.target).hasClass("offersSubMenuCover")&&(LazyloadHiddenImage("offerWhiteIconMob"),n.find(".offersSubMenuCover").hide())});$(".footer-h3").click(function(){$(this).position().top>100&&jQuery("html, body").animate({scrollTop:$(this).position().top-100},500)})});IsWindowTab=0;$window=$(window);$(window).on("popstate",function(){(window.location.href.toLocaleLowerCase().indexOf("sunglasses")>0||window.location.href.toLocaleLowerCase().indexOf("glasses")>0)&&window.location.reload()});window.performance&&window.performance.navigation.type==window.performance.navigation.TYPE_BACK_FORWARD&&(window.location.href.toLocaleLowerCase().indexOf("sunglasses")>0||window.location.href.toLocaleLowerCase().indexOf("glasses")>0)&&(window.location.href=window.location.href),function(){isAndroid()?waitForElement(".container.footer-main",function(){typeof Android!="undefined"&&Android.removeHeaderElements()}):callNativeApp();$(document).ready(function(){document.getElementById("appDownloadIcon")&&(typeof doCheckoutUrl=="undefined"||!doCheckoutUrl)&&(document.getElementById("appDownloadIcon").innerHTML=isIphone()?isIEWebsite==!0?'<a href="https://apps.apple.com/gb/app/feel-good-contacts/id1191834493" target="_blank"><img src="'+imgPrfix+'/images/svg/appStoreIcon-top.svg" class="appStoreTop" alt="Download feelgoodcontacts app" width="110" height="36"><\/a>':'<a href="https://apps.apple.com/gb/app/feel-good-contacts/id1191834493" target="_blank"><img src="'+imgPrfix+'/images/svg/appStoreIcon-top.svg" class="appStoreTop" alt="Download feelgoodcontacts app" width="110" height="36"><\/a>':isIEWebsite==!0?'<a href="https://play.google.com/store/apps/details?id=a.feelgoodcontacts.ie.feelgoodcontacts" target="_blank"><img src="'+imgPrfix+'/images/svg/androidStoreicon-top.svg" class="appStoreTop" alt="Download feelgoodcontacts app" width="110" height="36"><\/a>':'<a href="https://play.google.com/store/apps/details?id=app.feelgoodcontacts.com.feelgoodcontact" target="_blank"><img src="'+imgPrfix+'/images/svg/androidStoreicon-top.svg" class="appStoreTop" alt="Download feelgoodcontacts app" width="110" height="36"><\/a>')})}(),function(n,t){typeof define=="function"&&define.amd?define(function(){return t(n)}):typeof exports=="object"?module.exports=t:n.echo=t(n)}(this,function(n){var t={},f=function(){},r,u,e,o,s,h=function(n){return n.offsetParent===null},c=function(n,t){if(h(n))return!1;var i=n.getBoundingClientRect();return i.right>=t.l&&i.bottom>=t.t&&i.left<=t.r&&i.top<=t.b},i=function(){(o||!u)&&(clearTimeout(u),u=setTimeout(function(){t.render();u=null},e))};return t.init=function(u){u=u||{};var c=u.offset||0,l=u.offsetVertical||c,a=u.offsetHorizontal||c,h=function(n,t){return parseInt(n||t,10)};r={t:h(u.offsetTop,l),b:h(u.offsetBottom,l),l:h(u.offsetLeft,a),r:h(u.offsetRight,a)};e=h(u.throttle,250);o=u.debounce!==!1;s=!!u.unload;f=u.callback||f;t.render();document.addEventListener?(n.addEventListener("scroll",i,!1),n.addEventListener("load",i,!1)):(n.attachEvent("onscroll",i),n.attachEvent("onload",i))},t.render=function(i){for(var e=(i||document).querySelectorAll("img.lazy[data-src], .lazy-style[data-style-src]"),o=e.length,h,u,l={l:0-r.l,t:0-r.t,b:(n.innerHeight||document.documentElement.clientHeight)+r.b,r:(n.innerWidth||document.documentElement.clientWidth)+r.r},f=0;f<o;f++)u=e[f],c(u,l)&&(u.getAttribute("data-style-src")!==null?(u.style.backgroundImage="url("+u.getAttribute("data-style-src")+")",u.removeAttribute("data-style-src")):u.getAttribute("data-src")!==null&&u.src!==(h=u.getAttribute("data-src"))&&(u.src=h,u.removeAttribute("data-src")),s||(u.removeAttribute("data-src"),u.removeAttribute("data-style-src")));o||t.detach()},t.detach=function(){document.removeEventListener?n.removeEventListener("scroll",i):n.detachEvent("onscroll",i);clearTimeout(u)},t});dbClickTime=0;$(document).ready(function(){$(".topnavBg .navbar > .subnav > a , .topnavBg .subnav > .subnavbtn").on("click mouseover focus",function(){$(this).closest(".subnav").find("img.lazy-delay:not([img-sync])").each(function(){$(this).attr("img-sync",!0);$(this).attr("src",$(this).data("src"))})});SetGlobalFunctions();$("#lifav, #showWishlistItem, #favimage").click(function(n){if(n.target&&($(n.target).hasClass("fa-heart")||n.target.id=="lifav"||n.target.id=="showWishlistItem"||n.target.id=="favimage")&&window.location.href.toLocaleLowerCase().indexOf("/favourites")==-1){var t=parseInt($("#showWishlistItem").text().trim())|0;t>0&&(window.location="/favourites")}});var n=$("#header");$(window).scroll(function(){var t=jQuery(this).scrollTop();t>=200&&(n.find(".arrBlack").fadeOut(),n.find(".blkToolTip").fadeOut())})});$(document).ready(function(){var t=$window.width(),n;t<=1100&&function(){function i(){++t;n.eq(t%n.length).fadeIn(500).delay(2e3).fadeOut(500,i)}var n=$(".top-usp-quote"),t=-1;i()}();$(".searchClose").click(function(){$(".s_offer").removeClass("searchOn");$(".ac_results").hide()});fxDtMovActions();$(window).resize(function(){fxDtMovActions()});$(document).bind("mouseover",function(n){($(n.target).closest(".
1navbar").length==0||$(n.target).closest(".menu-rgt_sec").length==1)&&$(".navbar .subnav").removeClass("active")});$(".toggle").click(function(){$("#target").toggle();$(".navbar .subnav").removeClass("active")});$("#target .close_btn").on("click",function(){$("#target").toggle()});$(".s_mob-offer").click(function(){$(".offer_dropdown").toggleClass("on")});$(".navbar .s_nxt,.for_mob").click(function(){var n=$(this).next(".showOff,.divInner");n.is(":visible")?(n.hide(),$(this).find("span").removeClass("openSubmenu")):(n.fadeIn(450),$(this).find("span").addClass("openSubmenu"));loadLazyImage(n)});$(".s_mob a#main_nav").click(function(){$(".s_mob a#main_nav").toggleClass("active")});$("#offer").click(function(){$("#offer").toggleClass("active")});$(window).scroll(function(){var n=jQuery(this).scrollTop();n>=90?($(".topnavBg").addClass("fixed"),$("#mainTabsSearch").show()):($(".topnavBg").removeClass("fixed"),$("#mainTabsSearch").hide())});loadLazyDelay($("#pressLogos"));loadLazyDelay($("#idtopblogsdiv"));loadLazyDelay($("#brandsLogos"));$(".callFilter").click(function(){$(".proOverlay").addClass("on");$(".proFilterContainer").addClass("on");loadLazyDelay($(".proFilterContainer"))});$(".hideFilter, #spnPdpCount").click(function(){$(".proOverlay").removeClass("on");$(".proFilterContainer").removeClass("on")});$(".tabProList").click(function(){$(".tabContentProListing").show();$(".tabProList").addClass("active");$(".tabContentInsight").hide();$(".tabProDes").removeClass("active");$(".tabContentProListing").closest(".grid_cont").removeClass("whiteBack")});$(".tabProDes").click(function(){$(".tabContentProListing").hide();$(".tabProList").removeClass("active");$(".tabContentInsight").show();$(".tabProDes").addClass("active");$(".tabContentProListing").closest(".grid_cont").addClass("whiteBack");typeof LoadBrandsOfContactLenses=="function"&&LoadBrandsOfContactLenses()});new Swiper(".mainBtnSliderHmMulti",{slidesPerView:7,slidesPerGroup:1,loopFillGroupWithBlank:!1,navigation:{nextEl:".swiperBtnNext",prevEl:".swiperBtnPrev"},spaceBetween:8,freeMode:!0,loop:!1,rewind:!1,breakpoints:{376:{slidesPerView:2,slidesPerGroup:1,spaceBetween:8},550:{slidesPerView:2,slidesPerGroup:1,spaceBetween:8},767:{slidesPerView:2,slidesPerGroup:1,spaceBetween:10},992:{slidesPerView:3,slidesPerGroup:1,spaceBetween:10},1400:{slidesPerView:4,slidesPerGroup:1,spaceBetween:20}}});new Swiper(".mainBtnSliderHmMulti-6",{slidesPerView:6,slidesPerGroup:1,loopFillGroupWithBlank:!1,navigation:{nextEl:".swiperBtnNext",prevEl:".swiperBtnPrev"},spaceBetween:8,freeMode:!0,loop:!1,rewind:!1,breakpoints:{376:{slidesPerView:2,slidesPerGroup:1,spaceBetween:8},550:{slidesPerView:2,slidesPerGroup:1,spaceBetween:8},767:{slidesPerView:2,slidesPerGroup:1,spaceBetween:10},992:{slidesPerView:3,slidesPerGroup:1,spaceBetween:10},1400:{slidesPerView:4,slidesPerGroup:1,spaceBetween:20}}});new Swiper(".mainBtnSliderHmMulti-5",{slidesPerView:5,slidesPerGroup:1,loopFillGroupWithBlank:!1,navigation:{nextEl:".mainBtnSliderHmMulti-5-next",prevEl:".mainBtnSliderHmMulti-5-prev"},spaceBetween:10,freeMode:!0,loop:!1,rewind:!1,breakpoints:{376:{slidesPerView:1,slidesPerGroup:1,spaceBetween:10},767:{slidesPerView:2,slidesPerGroup:1,spaceBetween:10},992:{slidesPerView:3,slidesPerGroup:1,spaceBetween:10},1400:{slidesPerView:4,slidesPerGroup:1,spaceBetween:20},550:{slidesPerView:2,slidesPerGroup:1,spaceBetween:10},992:{slidesPerView:3,slidesPerGroup:1,spaceBetween:10},1400:{slidesPerView:4,slidesPerGroup:1,spaceBetween:20}}});new Swiper(".mainBtnSliderHmMulti-3",{slidesPerView:3,slidesPerGroup:1,loopFillGroupWithBlank:!1,navigation:{nextEl:".mainBtnSliderHmMulti-3-next",prevEl:".mainBtnSliderHmMulti-3-prev"},spaceBetween:8,freeMode:!0,loop:!1,rewind:!1,breakpoints:{376:{slidesPerView:1,slidesPerGroup:1,spaceBetween:10},767:{slidesPerView:2,slidesPerGroup:1,spaceBetween:10},992:{slidesPerView:3,slidesPerGroup:1,spaceBetween:10},1400:{slidesPerView:4,slidesPerGroup:1,spaceBetween:20},550:{slidesPerView:2,slidesPerGroup:1,spaceBetween:10},992:{slidesPerView:3,slidesPerGroup:1,spaceBetween:10},1400:{slidesPerView:4,slidesPerGroup:1,spaceBetween:20}}});new Swiper(".mainBtnSliderHmMulti-3a",{slidesPerView:3,slidesPerGroup:1,loopFillGroupWithBlank:!1,navigation:{nextEl:".swiperBtnNext",prevEl:".swiperBtnPrev"},spaceBetween:8,freeMode:!0,loop:!1,rewind:!1,breakpoints:{376:{slidesPerView:1,slidesPerGroup:1,spaceBetween:10},767:{slidesPerView:2,slidesPerGroup:1,spaceBetween:10},992:{slidesPerView:3,slidesPerGroup:1,spaceBetween:10},1400:{slidesPerView:4,slidesPerGroup:1,spaceBetween:20},550:{slidesPerView:2,slidesPerGroup:1,spaceBetween:10},992:{slidesPerView:3,slidesPerGroup:1,spaceBetween:10},1400:{slidesPerView:4,slidesPerGroup:1,spaceBetween:20}}});new Swiper(".mainBtnSliderEyeDrops",{slidesPerView:5,slidesPerGroup:1,loopFillGroupWithBlank:!1,navigation:{nextEl:".mainBtnSliderEyeDrops-next",prevEl:".mainBtnSliderEyeDrops-prev"},spaceBetween:8,freeMode:!0,loop:!1,rewind:!1,breakpoints:{376:{slidesPerView:2,slidesPerGroup:1,spaceBetween:8},767:{slidesPerView:2,slidesPerGroup:1,spaceBetween:10},992:{slidesPerView:3,slidesPerGroup:1,spaceBetween:10},1400:{slidesPerView:4,slidesPerGroup:1,spaceBetween:20},550:{slidesPerView:2,slidesPerGroup:1,spaceBetween:10},992:{slidesPerView:3,slidesPerGroup:1,spaceBetween:10},1400:{slidesPerView:4,slidesPerGroup:1,spaceBetween:20}}});new Swiper(".mainBtnSliderSolutions",{slidesPerView:5,slidesPerGroup:1,loopFillGroupWithBlank:!1,navigation:{nextEl:".mainBtnSliderSolutions-next",prevEl:".mainBtnSliderSolutions-prev"},spaceBetween:8,freeMode:!0,loop:!1,rewind:!1,breakpoints:{376:{slidesPerView:2,slidesPerGroup:1,spaceBetween:8},767:{slidesPerView:2,slidesPerGroup:1,spaceBetween:10},992:{slidesPerView:3,slidesPerGroup:1,spaceBetween:10},1400:{slidesPerView:4,slidesPerGroup:1,spaceBetween:20},550:{slidesPerView:2,slidesPerGroup:1,spaceBetween:8},992:{slidesPerView:3,slidesPerGroup:1,spaceBetween:10},1400:{slidesPerView:4,slidesPerGroup:1,spaceBetween:20}}});new Swiper(".mainBtnSliderSunglasses",{slidesPerView:2,slidesPerGroup:1,loopFillGroupWithBlank:!1,spaceBetween:5,breakpoints:{550:{slidesPerView:2,slidesPerGroup:1,spaceBetween:5},768:{slidesPerView:2,slidesPerGroup:1,spaceBetween:5},992:{slidesPerView:2,slidesPerGroup:1,spaceBetween:5}}});new Swiper(".mainBtnSliderGlasses",{slidesPerView:2,slidesPerGroup:1,loopFillGroupWithBlank:!1,spaceBetween:5,breakpoints:{550:{slidesPerView:2,slidesPerGroup:1,spaceBetween:5},768:{slidesPerView:2,slidesPerGroup:1,spaceBetween:5},992:{slidesPerView:2,slidesPerGroup:1,spaceBetween:5}}});new Swiper("#topUsp",{slidesPerView:1,spaceBetween:7,freeMode:!0,autoplay:!1,navigation:{nextEl:"#sprusp23n",prevEl:"#sprusp23p"},breakpoints:{1100:{slidesPerView:4,spaceBetween:7,enabled:!1}}});new Swiper("#homeAdsBanner",{slidesPerView:3,slidesPerGroup:1,spaceBetween:10,freeMode:!0,loop:!1,pagination:{el:".hmAdsBan",clickable:!0},breakpoints:{550:{slidesPerView:1,slidesPerGroup:1,spaceBetween:20,loop:!0},768:{slidesPerView:2,slidesPerGroup:1,spaceBetween:30,loop:!0},1200:{slidesPerView:3,slidesPerGroup:1,spaceBetween:30,loop:!1,pagination:!1}}});new Swiper("#homeAdsBanner2",{slidesPerView:5,slidesPerGroup:1,spaceBetween:10,freeMode:!0,loop:!1,pagination:{el:".hmAdsBan",clickable:!0},breakpoints:{550:{slidesPerView:1,slidesPerGroup:1,spaceBetween:20,loop:!0},768:{slidesPerView:2,slidesPerGroup:1,spaceBetween:30,loop:!0},1200:{slidesPerView:3,slidesPerGroup:1,spaceBetween:30,loop:!1,pagination:!1}}});swprPressLogos=new Swiper("#pressLogos",{slidesPerView:6,spaceBetween:10,freeMode:!0,loop:!0,autoplay:{delay:1500,disableOnInteraction:!1},breakpoints:{768:{slidesPerView:1,spaceBetween:30},1450:{slidesPerView:3,spaceBetween:30},1700:{slidesPerView:6,spaceBetween:25}}});$("#pressLogos").on("mouseenter",function(){swprPressLogos.autoplay.stop()});$("#pressLogos").on("mouseleave",function(){swprPressLogos.autoplay.start()});if($(document).ready(function(){new Swiper(".LensesBrandLogos",{slidesPerView:6,spaceBetween:10,freeMode:!0,loop:!0,autoplay:{delay:1500,disableOnInteraction:!1},breakpoints:{768:{slidesPerView:1,spaceBetween:30},1450:{slidesPerView:3,spaceBetween:30},1700:{slidesPerView:6,spaceBetween:25}}})}),new Swiper("#btnSliderHmLenses",{slidesPerView:2.2,spaceBetween:7,freeMode:!0,breakpoints:{640:{slidesPerView:3.2,spaceBetween:30},992:{slidesPerView:4.2,spaceBetween:20}}}),new Swiper("#btnSliderHmGlasses",{slidesPerView:2.2,spaceBetween:7,freeMode:!0,breakpoints:{640:{slidesPerView:3.2,spaceBetween:30},992:{slidesPerView:4.2,spaceBetween:20}}}),new Swiper("#btnSliderHmSolution",{slidesPerView:1,slidesPerGroup:1,loopFillGroupWithBlank:!1,navigation:{nextEl:".swiperBtnNext",prevEl:".swiperBtnPrev"},spaceBetween:20,freeMode:!0,loop:!0,rewind:!0,breakpoints:{375:{slidesPerView:2,slidesPerGroup:2},768:{slidesPerView:3,spaceBetween:3},992:{slidesPerView:4.2,spaceBetween:20}}}),new Swiper("#btnSliderHmEyeCare",{slidesPerView:1,slidesPerGroup:1,loopFillGroupWithBlank:!1,navigation:{nextEl:".swiperBtnNext",prevEl:".swiperBtnPrev"},spaceBetween:10,freeMode:!0,loop:!0,rewind:!0,breakpoints:{375:{slidesPerView:2,slidesPerGroup:2},768:{slidesPerView:3,spaceBetween:3},992:{slidesPerView:4.2,spaceBetween:20}}}),new Swiper("#ProLstSldre",{slidesPerView:2,spaceBetween:7,freeMode:!0,breakpoints:{640:{slidesPerView:3.2,spaceBetween:30},992:{slidesPerView:4,spaceBetween:20}}}),new Swiper("#ProLstSldrSungls",{slidesPerView:2,spaceBetween:7,freeMode:!0,breakpoints:{640:{slidesPerView:3.2,spaceBetween:30},992:{slidesPerView:4,spaceBetween:20}}}),new Swiper("#ProLstSldrPresSungls",{slidesPerView:2,spaceBetween:7,freeMode:!0,breakpoints:{640:{slidesPerView:3.2,spaceBetween:30},992:{slidesPerView:4,spaceBetween:20}}}),typeof Swiper!="undefined"){n=new Swiper("#ProLstSldr",{slidesPerView:3,slidesPerGroup:1,loopFillGroupWithBlank:!1,pagination:{el:".swiper-pagination"},spaceBetween:20,freeMode:!1,loop:!1,rewind:!1,initialSlide:0,breakpoints:{768:{slidesPerView:1,slidesPerGroup:1,loopFillGroupWithBlank:!1,spaceBetween:20,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}},1200:{slidesPerView:3,slidesPerGroup:1,loopFillGroupWithBlank:!1,spaceBetween:20,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}},1700:{slidesPerView:3,slidesPerGroup:1,loopFillGroupWithBlank:!1,spaceBetween:20,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}}}});n.on("slideChange",function(){loadLazyDelay($("#ProLstSldr"))});n.on("tap",function(){loadLazyDelay($("#ProLstSldr"))});n.on("click",function(){binItemListClickEvent()})}$(".tab").click(function(){var n=$(this).data("tab");$(".tab").removeClass("active");$(".tab-content").removeClass("active");$(this).addClass("active");$(this).closest(".blogContainer").find("#"+n).addClass("active")});n=new Swiper("#clBrandSldr",{slidesPerView:6,slidesPerGroup:1,navigation:{nextEl:".LensesBrandLogo-next",prevEl:".
1LensesBrandLogo-prev"},spaceBetween:5,freeMode:!0,loop:!0,rewind:!0,breakpoints:{550:{slidesPerView:2,slidesPerGroup:1,loopFillGroupWithBlank:!1,spaceBetween:20},768:{slidesPerView:3,slidesPerGroup:1,loopFillGroupWithBlank:!1,spaceBetween:0},1200:{slidesPerView:4,slidesPerGroup:1,loopFillGroupWithBlank:!1,spaceBetween:30}}});n.on("slideChange",function(){loadLazyDelay($("#clBrandSldr"))});n.on("tap",function(){loadLazyDelay($("#clBrandSldr"))});$(".for_mob").click(function(){$(this).hasClass("aftrClick")?$(this).removeClass("aftrClick"):$(this).addClass("aftrClick")});$(".tgl").click(function(n){n.preventDefault();$(this).siblings(".s-more, .dotss").toggle();$(this).text($(this).text()==="Read more"?"Read less":"Read more")});GetAllBrandsCat()});var _isTopLoginFocus=0,windowWidth=0,needsInit=!0;window.addEventListener("load",function(){switch(document.readyState){case"complete":fdatasrc()}});$(document).ready(function(){windowWidth=$(window).width();$("div.login-box").mouseover(function(){_isTopLoginFocus=1});$(document).click(function(n){$(n.target).hasClass("TopLogin")||$(n.target).parents(".dropdown-menu").length!==0||(_isTopLoginFocus=0)});$("#limbusricon").on("click",function(){$(".pgmyacntbd #left").show()});$(".pgmyacntbd .close_btn").on("click",function(){$(".pgmyacntbd #left").hide()});$("#tpLgnCls").on("click",function(){$("#aCancel").trigger("click");$("#ulTopLoginPanel").hide();$("#hdTopFormType").val("0");$("#litUserName").html("Login");$("#btnTopLogin").val("Log In");$("#divforgotpwdEmail").show();$("#divforgotPwdCancelBtn").show();$("#divForgotPwdSuccessMsg").hide();_isTopLoginFocus=0});$("#userLoginIcon").on("click",function(){$("#litUserName").html().trim()=="Login"?($("#hdTopFormType").val("0"),$("#itemDetails").hide(),$("#ulTopLoginPanel").show(),$("#hdTopMenuLoginType").val("0"),$("#ulTopLoginPanel").css("left","auto"),$("#ulTopLoginPanel").css("right",-10),$("#ulTopLogedPanel").hide()):($("#ulTopLoginPanel").hide(),$("#itemDetails").hide(),$("#ulTopLogedPanel").show())});$("#liTopReorder").on("click",function(){_isTopLoginFocus=0;$("#ulTopLoginPanel").hide();$("#litUserName").html().trim()=="Login"&&($("#hdTopMenuLoginType").val("1"),$("#itemDetails").hide(),$("#ulTopLoginPanel").show(),$("#ulTopLoginPanel").css("left","auto"),$("#ulTopLoginPanel").css("right",38))});$("#liTopReorder").on("click",function(){if($("#litUserName").html().trim()=="Login")return!1});if($("#hdImageStaticSitedomain").val()!=undefined&&$(".adelete").css("background-image","url("+$("#hdImageStaticSitedomain").val().trim()+"/images/delete-red-icon.png)"),$("#aTopforgotPassword").click(function(){$("#btnTopLogin").val("Reset Password");$("#divTopPassword").hide();$("#aTopforgotPassword").hide();$("#btnTonRegister").hide();$("#aCancel").show();$("#hdTopFormType").val("1");$("#txtTopLoginEmail").focus()}),$("#aCancel").click(function(){$("#btnTopLogin").val("Log In");$("#aCancel").hide();$("#divTopPassword").show();$("#btnTonRegister").fadeIn();$("#aTopforgotPassword").fadeIn();$("#hdTopFormType").val("0");$("#divHeaderTextForgotPassword").hide()}),$("#btnTopLogin").val("Log In"),$("#hdTopFormType").val()=="0"?$("#aCancel").hide():$("#hdTopFormType").val()=="1"&&($("#aCancel").show(),$("#aTopforgotPassword").fadeOut()),setTopSearchEvents(),typeof Sys!="undefined"&&Sys.WebForms&&Sys.WebForms.PageRequestManager){var n=Sys.WebForms.PageRequestManager.getInstance();n.add_endRequest(t);function t(){try{fdatasrc()}catch(n){fdatasrc()}}}binItemListClickEvent();$.isFunction(window.getTopBasket)&&getTopBasket(!1);$.isFunction(window.getTopWishListCount)&&getTopWishListCount();$("#itemDetails").hide();$(".s_mob #updTopBasket").closest("li").click(function(n){if(n.target){var t=0;t=n.target.tagName=="LI"?parseInt($(n.target).find(".bsktCntDflt").text())|0:parseInt($(n.target).closest("li").find(".bsktCntDflt").text())|0;t>0&&(window.location="/my-account/basket")}});$("basket").click(function(n){var t,i;n.target&&(n.target.id=="basket"||n.target.id=="showItem")&&window.location.href.toLocaleLowerCase().indexOf("/my-account/basket")==-1?(t=parseInt($(this).find(".top-small-basket span span").text().trim())|0,t>0):n.target&&$(n.target).hasClass("topBasketCloseBtn")?$("#itemDetails").hide():(t=parseInt($(this).find(".top-small-basket span span").text().trim())|0,t>0&&(i=$("#topbasketdetail"),i.html()&&i.html().length>100&&($("#ulTopLogedPanel").hide(),$("#ulTopLoginPanel").hide(),$("#itemDetails").show())))});$("#lifav, #showWishlistItem, #favimage").click(function(n){if(n.target&&($(n.target).hasClass("fa-heart")||n.target.id=="lifav"||n.target.id=="showWishlistItem")&&window.location.href.toLocaleLowerCase().indexOf("/favourites")==-1){var t=parseInt($("#showWishlistItem").text().trim())|0;t>0&&(window.location="/favourites")}});$(document.body).on("click",".adelete",function(){var n=$(this).closest("div"),t=n.find("input[type='hidden']").val();TopBasketDeleteAndPopulateBasket(t)})});$(document).click(function(n){$(n.target).closest("#liTopLogin").length===0&&$("#ulTopLogedPanel").hide();$(n.target).closest("#SearchMenuBox").length===0&&$("#SearchMenuBox").hasClass("show")&&$("#SearchMenuBox").removeClass("show");$(n.target).closest("#BlogSearchMenuBox").length===0&&$("#BlogSearchMenuBox").hasClass("show")&&$("#BlogSearchMenuBox").removeClass("show")}),function(n){var t;n(document).scroll(function(){n("#SearchMenuBox").hasClass("show")&&n("#SearchMenuBox").removeClass("show");windowWidth=n(window).width();windowWidth<=767&&window.matchMedia("(pointer: coarse)").matches||n(".ac_results").hide();n("#BlogSearchMenuBox").hasClass("show")&&n("#BlogSearchMenuBox").removeClass("show");n(".topBlogSearch").length==1?n("#blogTabsSearch").hide():n("#mainTabsSearch").hide()});n(document).ready(function(){function r(t){var h,i,s,c;if(t===13){if(h=n("#hdnSitedomain").val().trim(),i=n(".txtMainSearchTop").val().trim(),n(".txtMainSearchSticky").val(i),i.length==0){f("Please enter search term");return}if(i.length>2){var r=n("#srchContainer #srchResultdata .tCat"),u=r.eq(0).find(".tCat-item a").first(),e=r.eq(1).find(".tCat-item a").first(),o=r.eq(2).find(".tCat-item a").first();
1if(u&&u.hasClass("active")){window.location=u.attr("href");return}if(e&&e.hasClass("active")){window.location=e.attr("href");return}if(o&&o.hasClass("active")){window.location=o.attr("href");return}}s={" and ":"-and-"," or ":"-or-","*":" ","sleep(":" ","()":" ",xp_:" ","1=1":" ","*/":" ","/*":" ",";":" ","--":" "};i=i.replace(/<\/?[a-z][a-z0-9]*[^<>]*>/ig,"").replace(/'/g,"").replace("?","").replace("<","").replace(">","").replace(/"/g,"");Object.keys(s).forEach(function(n){var t=s[n];i.indexOf(n)>=0&&(i=i.replace(n,t))});c=h+"/search/index?keywords="+encodeURIComponent(i);window.location=decodeURIComponent(c)}}function f(t,i){return(!i||i<200)&&(i=300),n("<div>"+t+"<\/div>").dialog({autoOpen:!0,resizable:!1,width:i,modal:!0,dialogClass:"no-close auto-confirmbox topSearchMsg",open:function(t){n(t.target).dialog("widget").css({position:"fixed"}).css({zIndex:"999999"}).position({my:"center",at:"center",of:window})},buttons:{OK:function(){n(this).data("value","1");n(this).dialog("close");n(this).dialog("destroy")}}})}function i(t){var i=n("#cmdMainSearch"),r=n("#searchLoader");t&&t==!0?(r.show(),i.hide()):(r.hide(),i.show())}function e(n,t){var r="ontouchstart"in window||navigator.msMaxTouchPoints,i=r?t&&t.substr(-1)&&t.substr(-1).charCodeAt(0):n.keyCode;return i==32||i==8||i==46||i>47&&i<58||i>64&&i<91||i>96&&i<123?!0:!1}function u(){var t=n(".txtMainSearchTop").val().trim(),r,i,u;if(n(".txtMainSearchSticky").val(t),r=n("#hdnSitedomain").val().trim(),n(".txtMainSearchSticky").val(t),t.length==0){f("Please enter search term");return}i={" and ":"-and-"," or ":"-or-","*":" ","sleep(":" ","()":" ",xp_:" ","1=1":" ","*/":" ","/*":" ",";":" ","--":" "};t=t.replace(/<\/?[a-z][a-z0-9]*[^<>]*>/ig,"").replace(/'/g,"").replace("?","").replace("<","").replace(">","").replace(/"/g,"");
1Object.keys(i).forEach(function(n){var r=i[n];t.indexOf(n)>=0&&(t=t.replace(n,r))});u=r+"/search/index?keywords="+encodeURIComponent(t);window.location=decodeURIComponent(u)}n("#srchContainer .sClo").click(function(){n(".search_strip").removeClass("topSrchInptFxd");document.getElementById("srchContainer").style.display="none";n("#txtMainSearchTop").val("")});n("#txtMainSearchTop, #txtMainSearchSticky").keyup(function(f){var h=n("#hdnSitedomain").val().trim(),c=n(this).val().trim(),o=n(this).val().trim(),s;o!="Search..."&&(f.keyCode===13?(s=n("#srchContainer #srchResultdata").find(".tpRec").data("isfound"),s==!1?r(f.keyCode):u()):e(f,this.value)&&(i(!0),t&&(clearTimeout(t),t=undefined),t=setTimeout(function(){var t={" and ":"-and-"," or ":"-or-","*":" ","sleep(":" ","()":" ",xp_:" ","1=1":" ","*/":" ","/*":" ",";":" ","--":" "},r;o=o.replace(/<\/?[a-z][a-z0-9]*[^<>]*>/ig,"").replace(/'/g,"").replace("?","").replace("<","").replace(">","").replace(/"/g,"");Object.keys(t).forEach(function(n){var i=t[n];o.indexOf(n)>=0&&(o=o.replace(n,i))});r=h+"/search/productsearch?keywords="+encodeURIComponent(o);n.ajax({url:r,type:"GET",contentType:"application/json; charset=utf-8",cache:!1,success:function(t){var r,u;t!=""?(r=n("#srchContainer #srchResultdata"),n(".search_strip").hasClass("topSrchInptFxd")||(n(".search_strip").addClass("topSrchInptFxd"),r.is(":visible")||n("#srchContainer").show()),r.html(t),u=c.split(" "),n(u).each(function(t,i){if(i.length>1){var u=new RegExp(i,"gi");r.find(".tpRec a > span:not(.bdge), .lGrid a div.mb10").each(function(t,i){var r=n(i).html().match(u);r&&r.length>0&&n(i).html(n(i).html().replace(u,"<b>"+r[0]+"<\/b>"))});r.find(".tCat .tCat-item > a").each(function(t,i){var r=n(i).html().match(u);r&&r.length>0&&(n(i).html(n(i).html().replace(u,"<b>"+r[0]+"<\/b>")),n(i).closest("a").addClass("active"))})}}),i(!1)):i(!1)},error:function(n,t){console.log(n);console.log(t)}}).always(function(){i(!1)})},800)))});n("#txtMainSearchTop,#mainTabsSearcha").click(function(){var i,r,t,u;n(".search_strip").hasClass("topSrchInptFxd")||(i="ontouchstart"in window||navigator.msMaxTouchPoints,i&&n(this).blur(),r=n("#hdnSitedomain").val().trim(),t=n(".txtMainSearchTop").val().trim(),n(".txtMainSearchSticky").val(t),t=t.replace(/<\/?[a-z][a-z0-9]*[^<>]*>/ig,"").replace(/'/g,"").replace("?","").replace("<","").replace(">","").replace(/"/g,""),u=r+"/search/productsearch?keywords="+encodeURIComponent(t),n.ajax({url:u,type:"GET",contentType:"application/json; charset=utf-8",cache:!1,success:function(t){if(t!=""){n(".search_strip").addClass("topSrchInptFxd");var i=n("#srchContainer");i.show();i.find("#srchResultdata").html(t)}}}))});n(".sRsltBtn").on("click",function(){var t=n("#srchContainer #srchResultdata").find(".tpRec").data("isfound");t==!1?r(13):u()});n(".srchTopLnk").on("click",function(){var t=n("#srchContainer #srchResultdata").find(".tpRec").data("isfound");t==!1?r(13):u()});n("#txtMainSearchTop, #txtMainSearchSticky").blur(function(){var t=n(this).val()});n(".txtMainSearchTop").on("blur",function(){var t=n(".txtMainSearchTop").val().trim();n(".txtMainSearchSticky").val(t)});n(".txtMainSearchSticky").on("blur",function(){var t=n(".txtMainSearchSticky").val().trim();n(".txtMainSearchTop").val(t)});n("#txtMainSearchTopBlog").on("blur",function(){var t=n("#txtMainSearchTopBlog").val().trim();n("#txtMainSearchTopBlog").val(t)});n("#srchContainer .scrlD").scroll(function(){n(this).scrollTop()>17})})}(jQuery)
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.