function showimages_catphoto(n){$.ajax({url:"/review/CorporateResponse.ashx",type:"POST",contentType:"application/x-www-form-urlencoded",dataType:"text",data:{type:"catphoto",catid:n,corp:!1},responseType:"text/html",success:function(n){if(n!=""){var t=n.split("^");$("#divphotos_catphoto").html(t[0]);$("#divphotos_catphoto").lightGallery()}else $("#divphotos_catphoto").hide()},error:function(){}})}function initialize(){var n,u;if($("#ctl00_ctl00_ContentPlaceHolderFooter_ContentPlaceHolderBody_customheader_imgproduct").attr("src").indexOf("map.jpg")>-1)if(lt2=="0"||lt2=="")$("#ctl00_ctl00_ContentPlaceHolderFooter_ContentPlaceHolderBody_customheader_imgproduct").attr("src",$("#ctl00_ctl00_ContentPlaceHolderFooter_ContentPlaceHolderBody_customheader_imgproduct").attr("data-src"));else{var i=new google.maps.LatLng(lt2,lng2),r={center:i,zoom:17,mapTypeId:google.maps.MapTypeId.ROADMAP,scaleControl:!0,zoomControl:!0,zoomControlOptions:{style:google.maps.ZoomControlStyle.LARGE}},t=new google.maps.Map(document.getElementById("dealmap"),r);t.setTilt(45);n=new google.maps.Marker({position:i,map:t,draggable:!1});n.setMap(t);u=new google.maps.InfoWindow({content:"<p>Marker Location:"+n.getPosition()+"<\/p>"});google.maps.event.addListener(n,"click",function(){infowindow.open(t,n)});$("#divdealmap").show();$("#ctl00_ctl00_ContentPlaceHolderFooter_ContentPlaceHolderBody_customheader_imgproduct").hide();$(".product-images").removeClass("product-images")}}function UrlEncode(n){return n=n.replace(/\+/g,"%2b"),escape(n)}function redirectvarients(n){var t=n.options[n.selectedIndex].value;window.location.href=t}function analyseYearChanged(){var n=$("#analyse_dropdown option:selected").val(),t=$("#analyse_dropdown option:selected").text();$("#analyse_dropdown").val("-1");displayLastRatings(n,t,mergedprods)}function displayLastRatings(n,t,i){var f,u,r;$("#dvAnalyseRating").empty();f=t;openModal(".analyse-rating");u=$("#wait_icon").html();$("#dvAnalyseRating").append(u);n>=0&&(r=new CreateRequest,r.ajaxObject.onreadystatechange=function(){r.ajaxObject.readyState==4&&(document.getElementById("dvAnalyseRating").innerHTML=r.ajaxObject.responseText,$(element).append('<span class="icon-close"><\/span>'))},r.ajaxObject.open("GET","/review/reviewratings_ajax.aspx?pid="+pid+"&year="+t+"&range="+n+"&rndIe="+ReturnRndIe()+"&mergedprods="+i+"&ismerge_new="+ismerge_new+"&check_corp="+check_corp,!0),r.ajaxObject.send(null))}function clsRR(){document.getElementById("link_hide2").style.display="none"}function showspecsdiv(n){n.style.display="none";var t=document.getElementsByClassName("spec");for(i=0;i<t.length;i++)t[i].style.display="block"}function hidespecsdiv(){document.getElementById("dvshowspecs").style.display="block";var n=document.getElementsByClassName("specsdiv");for(i=0;i<n.length;i++)n[i].style.display="none";window.scrollTo(0,400)}function assignimg(n){n.indexOf("/"+CatId)>-1&&(n=imgPathForLayer);var t=new Date,i=t.getTime();n=n+"?p="+i;$("img#ph1").attr("src",n).load(function(){document.getElementById("ph1").height=getImgSize(n);document.getElementById("ph1").style.maxWidth="800px";document.getElementById("ph1").style.maxHeight="460px";document.getElementById("photolarge").style.display="";document.getElementById("photolarge").style.visibility="visible";document.getElementById("photolarge").focus();showcentre("photolarge")})}function changebtnreviewlink(n){cidOfuserreview=n}function submit_corporate(){return alert("This feature is not available for Brand Pulse"),!1}function submit_review_verified(){return alert(vdrmsg),!1}function writereview_disabled(){return alert(drmsg),!1}function writereview_discont(){return alert("Write Review is currently disabled for the Discontinued products."),!1}function writereview_closed(){return alert("Write Review is currently disabled for the Closed products."),!1}function editreview_disabled(){return alert("Editing is disabled for FAKE review, kindly contact support@mouthshut.com for any further query!"),!1}function validateEmail(n){return/^[a-zA-Z0-9.][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/i.test(n)?!0:!1}function verified_pepperfry(n){var i="",r=0,u,t;if(r=CatId,u=mshostver,n.value=="")return alert("Please enter email address"),!1;if(!validateEmail(n.value))return alert("Invalid email address"),!1;i=n.value;t=new CreateRequest;t.ajaxObject.onreadystatechange=function(){var n;if(t.ajaxObject.readyState==4)if(t.ajaxObject.responseText=="redirect")n=mshostver,window.location.href=mshostver+red_ver_url+"/"+i;else return t.ajaxObject.responseText=="login"?(n=mshostver,$("#modal-bckpep").hide(),n=mshostver+red_ver_url+"/"+i,strSession==0?ajaxLogin(n):window.location.href=mshostver+red_ver_url+"/"+i,!1):(n=mshostver,$("#modal-bckpep").hide(),n=mshostver+red_ver_url+"#writerev",strSession==0?ajaxLogin(n):window.location.href=mshostver+red_ver_url,!1)};t.ajaxObject.open("GET","/review/new_verified.aspx?email_ver="+i+"&catid_ver="+r+"",!0);t.ajaxObject.send(null)}function redirect_pepperfry(n){window.location.href=n}function AdditionalhighlightsDetails(){$("#dvpopLayer").empty();$("#pptitle").html("Additional details");$("#popuplayer1").width(625);$("#dvpopLayer").html(document.getElementById("dvhighlights").innerHTML);showcentre("popuplayer1")}function showexpresssuccess(){$("#dvpopLayer").empty();$("#dvRating").attr("class","confirmationbox");$("#dvRating").html("<span>Thank you for rating this Product<\/span>");$("#pptitle").html("&nbsp;");$("#popuplayer1").width(347);$("#popuplayer5").hide();showcentre("popuplayer1");closepptimeout("popuplayer1",3e3);var n=document.getElementById("ifrmReview");n.src=n.src}function redirecttowrite(){var n,t;window.onload&&(n="cid="+cidOfuserreview,$("#expressrev").html()==""&&(document.getElementById("writereviewpanel2").innerHTML="<iframe allowtransparency scrolling='no' frameborder='0' id='ifrmReview'  style='width: 650px; border:0;' src='/review/expressreview.aspx?"+n+"'><\/iframe>",t=$("#writereviewpanel2").html(),$("#popuplayer1").hide(),$("#expressrev").empty(),$("#expressrev").append(t)),$("#popuplayer5").show(),$("#writereviewpanel2").empty(),showcentrepop("popuplayer5"))}function editrestdetails(){$("#pptitle").html("Edit this listing");$("#dvpopLayer").empty();$("#popuplayer1").width(400);$("#dvpopLayer").append($("#restodetails").html());showcentre("popuplayer1")}function WriteReview(){cidOfuserreview1!=cidOfuserreview&&(cidOfuserreview=cidOfuserreview1);window.location.href=orderid==""?"/review/writereview_readall.aspx?cid="+cidOfuserreview:"/review/writereview_readall.aspx?cid="+cidOfuserreview+"&oid="+orderid+"&verrevid="+ver_rev_id}function setHeight(n){document.getElementById("ifrmReview").style.height=n+30+"px"}function scrollOnTop(n){var t;n==2?(t=$("#writereviewpanel2").offset().top,window.scroll(t,t)):(t=$("#writereviewpanel").offset().top,window.scroll(t,t))}function setHeight2(n){document.getElementById("ifrmReview2").style.height=n+30+"px"}function callcustom(n,t,i){var r=document.getElementById("specification"),e=document.getElementById("idspec"),f,u;r.style.display=="none"&&r.innerHTML!=""?r.style.display="":(type==0||type==2)&&(r.style.display=="block"||r.style.display=="")&&(r.style.display="none",window.scrollTo(0,0));f="";isbot=="0"&&(f="PType=spec&id="+n+"&CatName="+CatName+"&maincat="+t+"&subcat="+i,r.innerHTML==""&&(u=new CreateRequest,u.ajaxObject.onreadystatechange=function(){var t,n;u.ajaxObject.readyState==4&&(u.ajaxObject.responseText.indexOf("confirmationbox")>-1?(r.style.display="none",n=document.getElementById("ctl00_ctl00_ContentPlaceHolderFooter_ContentPlaceHolderBody_customheader_tabs1_tdSpec"),n!=null&&n.removeAttribute("class")):u.ajaxObject.responseText==""?(n.removeAttribute("class"),r.style.display="none"):(t=u.ajaxObject.responseText.split("|"),r.innerHTML=t[0],e.innerHTML=t[1],n=document.getElementById("ctl00_ctl00_ContentPlaceHolderFooter_ContentPlaceHolderBody_customheader_tabs1_tdSpec"),n!=null&&n.setAttribute("class","on"),r.style.display="block",r.style.marginTop="10px"))},u.ajaxObject.open("GET","/Comparison/compareproducts.php?"+f,!0),u.ajaxObject.send(null)))}function customSpecification(n,t,i){var r=document.getElementById("specification"),e=$(".spec"),o=$(".spec_title"),f,u;$("#specification").css("display")=="none"&&r.innerHTML!=""?r.style.display="block":(type==0||type==2)&&(r.style.display=="block"||r.style.display=="")?(r.style.display="none",window.scrollTo(0,0)):r.innerHTML!=""&&r.style.display=="block"&&(r.style.display="none");f="";isbot=="0"&&(f="PType=spec&id="+n+"&CatName="+CatName+"&maincat="+t+"&subcat="+i,r.innerHTML==""&&(u=new CreateRequest,u.ajaxObject.onreadystatechange=function(){var n,t;u.ajaxObject.readyState==4&&(r.style.display="block",n=$("#specificationa").offset().top-120,window.scrollTo(n,n),r.style.marginTop="10px",t=u.ajaxObject.responseText.split("|"),r.innerHTML=t[0],e.innerHTML=t[1])},u.ajaxObject.open("GET","/Comparison/compareproducts.php?"+f,!0),u.ajaxObject.send(null)))}function Specification(n,t){var i=document.getElementById("specification"),f="",e,u,r;t=="101"&&(f=CatId==merge_parent?"&ov=1&mpar=1":"&ov=1");CatId==merge_parent&&(f="&ov=1&mpar=1");$("#specification").css("display")=="none"?(i.style.display="block",i.style.marginTop="10px",e=$("#specificationa").offset().top-120,window.scrollTo(e,e)):(n==0||n==2)&&(i.style.display=="block"||i.style.display=="")&&(i.style.display="none",window.scrollTo(0,0));u="";isbot=="0"?(n==1?($("#specification").html(""),u="PType=spec&id="+t+"&CatName="+CatName):u=n==2?"PType=info&id="+CatId+"&CatName="+CatName.replace("&","**"):"PType=spec"+f+"&id="+t+"|1|"+CatId+"&CatName="+CatName,i.innerHTML==""&&(r=new CreateRequest,r.ajaxObject.onreadystatechange=function(){r.ajaxObject.readyState==4&&(i.innerHTML=r.ajaxObject.responseText)},r.ajaxObject.open("GET","/Comparison/compareproducts.php?"+u,!0),r.ajaxObject.send(null))):n==1&&$("#specification").html("")}function headover(n){try{for(i=1;i<=2;i++)i==n?show("link_hide"+i):hide("link_hide"+i)}catch(t){}}function headout(n,t){try{var i=drop_div(n);i.id!="link_hide"+t&&hide("link_hide"+t)}catch(n){}}function show(n){try{d_g_id(n).style.display="block"}catch(t){}}function hide(n){try{d_g_id(n).style.display="none"}catch(t){}}function d_g_id(n){try{return document.getElementById(n)}catch(t){}}function toggle(n){d_g_id(n).style.display=="none"||d_g_id(n).style.display==""||d_g_id(n).style.display==null||d_g_id(n).style.display==undefined?show(n):hide(n)}function drop_div(n){var n;return n||(n=window.event),n.relatedTarget||n.toElement}function showDiscreation(n){strSession>0?strUsrName==$("[id$=linkrevname]").text()?$("[id$=hidDiscretionExist]").val()!="0"?(document.getElementById("dvthankModal").innerHTML="<span>We have already taken your feedback. Be patient while our Support Team processes your request.<\/span>",$("#dvthankModal").show(),$("#dvfakeModal").hide(),$(".upload-file-selected").html(""),openModal(".fakeModal")):(document.getElementById("hidReviewId").value=n,document.getElementById("btnSubmitDisc").style.display="",$("#dvthankModal").hide(),$("#dvfakeModal").show(),$("#txtDAreaComm").val(""),$(".upload-file-selected").html(""),openModal(".fakeModal")):$("[id$=linkrevname]").text()=="Anonymous"&&($("[id$=hidDiscretionExist]").val()!="0"?(document.getElementById("dvthankModal").innerHTML="<span>We have already taken your feedback. Be patient while our Support Team processes your request.<\/span>",$("#dvthankModal").show(),$("#dvfakeModal").hide(),$(".upload-file-selected").html(""),openModal(".fakeModal")):(document.getElementById("hidReviewId").value=n,document.getElementById("btnSubmitDisc").style.display="",$("#dvthankModal").hide(),$("#dvfakeModal").show(),$("#txtDAreaComm").val(""),$(".upload-file-selected").html(""),openModal(".fakeModal"))):ajaxLogin("")}function setFocus(){document.getElementById("txtDAreaComm").focus()}function validateQuoteForm(){var n=$("#loader").html();if($("#lnkviewmore").hide(),$("#getQuote").append(n),$(".ajaxloader").show(),nameGetRoadPrice.value==""||emailGetRoadPrice.value==""||teleGetRoadPrice.value=="")return document.getElementById(dvqerror).style.display="block",document.getElementById(dvqerror).innerText="Fields marked with * are mandatory. ",$("#getQuote .ajaxloader").remove(),!1;if(validateEmail(emailGetRoadPrice.value)==!1)return document.getElementById(dvqerror).style.display="block",document.getElementById(dvqerror).innerText="Invalid Email ID. ",$("#getQuote .ajaxloader").remove(),!1;if(teleGetRoadPrice.value.length<10)return document.getElementById(dvqerror).style.display="block",document.getElementById(dvqerror).innerText="Invalid Mobile Number ",$("#getQuote .ajaxloader").remove(),!1;$.ajax({type:"POST",url:"/web/WebService3.asmx/SaveOnRoadPrice",data:"{Name:'"+$("#txtName").val()+"',ProdName:'"+$("#txtModel").val()+"',Email:'"+$("#txtMail").val()+"',MobileNo:'"+$("#txtMob").val()+"',City:'"+$("#txtCity").val()+"',PinCode:'"+$("[id$=txtPinCode]").val()+"',CatId:'"+CatId+"',CatName:'"+CatName+"',Parent2:'"+parent2+"',Level1:'"+Level1+"',userId:'"+userId+"',Productlaunch:'"+$("#hdnproductlaunch").val()+"'}",dataType:"json",contentType:"application/json; charset=utf-8",processData:!1,success:function(n){var t=n.d.split("|");t[0].toLowerCase().trim()=="error"?(openModal("#getQuote"),$("#dvQuoteError").css("display","block"),$("#dvQuoteError").html(t[1])):openThankYouModal()},error:function(n){$("#dvQuoteError").html(n)}})}function openPriceModal(){$("#getQuote .ajaxloader").remove();openModal("#getQuote")}function validateQuoteForm12(){return $("#getQuote1").css("display","block"),$("#dvQuoteError1").css("display","block"),$("#dvQuoteError1").html("Fields marked with * are mandatory. "),!1}function validateQuoteForm1(){if($("#txtName").val()==""||$("#txtMail").val()=="")return $("#getQuote1").css("display","block"),$("#dvQuoteError1").css("display","block"),$("#dvQuoteError1").html("Fields marked with * are mandatory. "),!1;if(validateEmail($("#txtMail").val())==!1)return $("#dvQuoteError1").css("display","block"),$("#dvQuoteError1").html("Invalid Email ID. "),$("#getQuote1").css("display","block"),!1;if($("#txtMob").val().length<10)return $("#dvQuoteError1").css("display","block"),$("#dvQuoteError1").html("Invalid Mobile Number "),$("#getQuote1").css("display","block"),!1;$.ajax({type:"POST",url:"/web/WebService3.asmx/SaveOnRoadPrice",data:"{Name:'"+$("#txtName").val()+"',ProdName:'"+$("#txtModel").val()+"',Email:'"+$("#txtMail").val()+"',MobileNo:'"+$("#txtMob").val()+"',City:'"+$("#txtCity").val()+"',PinCode:'"+$("[id$=txtPinCode]").val()+"',CatId:'"+CatId+"',CatName:'"+CatName+"',Parent2:'"+parent2+"',Level1:'"+Level1+"',userId:'"+userId+"',Productlaunch:'"+$("#hdnproductlaunch").val()+"'}",dataType:"json",contentType:"application/json; charset=utf-8",processData:!1,success:function(n){var t=n.d.split("|");t[0].toLowerCase().trim()=="error"?($("#dvQuoteError1").css("display","block"),$("#dvQuoteError1").html(t[1])):(openThankYouModal(),$("#dvQuoteError1").css("display","none"))},error:function(n){$("#dvQuoteError1").html(n)}})}function openLeadModal1(n,t){$.ajax({type:"POST",url:"/web/WebService3.asmx/GetTextDrop",data:"{CatId:'"+n+"',AdditionalField:'"+t+"'}",dataType:"json",contentType:"application/json; charset=utf-8",processData:!1,success:function(n){$("#dvLead1").html(n.d)},error:function(){}})}function validateLeadForm(){var n={Name:$("#txtName1").val(),ProdName:$("#prodName").val(),Email:$("#txtMail1").val(),MobileNo:$("#txtMob1").val(),City:$("#txtCity1").val(),PinCode:$("[id$=txtPinCode1]").val(),Values:[]};$("#dvLead .form-control").each(function(t,i){n.Values.push($(i).val())});$.ajax({type:"POST",url:"/web/WebService3.asmx/SaveLeadGeneration",data:"{Name:'"+n.Name+"',ProdName:'"+n.ProdName+"',Email:'"+n.Email+"',MobileNo:'"+n.MobileNo+"',City:'"+n.City+"',PinCode:'"+n.PinCode+"',values:"+JSON.stringify(n.Values)+",CatId:'"+CatId+"',CatName:'"+CatName+"',Parent2:'"+parent2+"',Level1:'"+Level1+"',mshost:'"+mshost+"',Ip:'"+Ip+"',userId:'"+userId+"'}",dataType:"json",contentType:"application/json; charset=utf-8",processData:!1,success:function(n){var t=n.d.split("|");t[0].toLowerCase().trim()=="error"?(openModal("#getLead"),$("#dvLeadError").css("display","block"),$("#dvLeadError").html(t[1])):openLeadThankYouModal()},error:function(n){$("#dvLeadError").html(n)}})}function validateLeadForm1(){var n={Name:$("#txtName1").val(),ProdName:$("#prodName").val(),Email:$("#txtMail1").val(),MobileNo:$("#txtMob1").val(),City:$("#txtCity1").val(),PinCode:$("[id$=txtPinCode1]").val(),Values:[]};$("#dvLead1 .field-outline").each(function(t,i){n.Values.push($(i).val())});$.ajax({type:"POST",url:"/web/WebService3.asmx/SaveLeadGeneration",data:"{Name:'"+n.Name+"',ProdName:'"+n.ProdName+"',Email:'"+n.Email+"',MobileNo:'"+n.MobileNo+"',City:'"+n.City+"',PinCode:'"+n.PinCode+"',values:"+JSON.stringify(n.Values)+",CatId:'"+CatId+"',CatName:'"+CatName+"',Parent2:'"+parent2+"',Level1:'"+Level1+"',mshost:'"+mshost+"',Ip:'"+Ip+"',userId:'"+userId+"'}",dataType:"json",contentType:"application/json; charset=utf-8",processData:!1,success:function(n){var t=n.d.split("|");t[0].toLowerCase().trim()=="error"?($("#getLead").css("display","block"),$("#dvLeadError1").css("display","block"),$("#dvLeadError1").html(t[1])):(openLeadThankYouModal(),$("#getLead").css("display","block"),$("#dvLeadError1").css("display","none"))},error:function(n){$("#dvLeadError1").html(n)}})}function openThankYouModal(){$(".black-layer").css("visibility","hidden");openModal("#dvThankQuote")}function openLeadThankYouModal(){$(".black-layer").css("visibility","hidden");openModal("#dvLeadThankQuote")}function validateEmail(n){var i=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i,t=n.split("@"),r=t[0].split("."),u=r.length;return i.test(n)&&u>2&&(t[1]=="gmail.com"||t[1]=="yahoo.com")?!1:i.test(n)?!0:void 0}function isNumberKey(n){var t=n.which?n.which:event.keyCode;return t>31&&(t<48||t>57)?!1:!0}function isNumberKey1(n){var t=n.which?n.which:event.keyCode;return t>31&&(t<48||t>57)?!1:document.getElementById("txtMob1").value.length>=10?!1:!0}function validate(){var i=document.getElementById("txtDAreaComm").value.trim(),r,n="",t="";document.getElementById("roundedOne").checked!=!0&&document.getElementById("roundedTwo").checked!=!0?n=n+"Please select any one option \n":r=document.getElementById("roundedOne").checked==!0?0:1;emai==""?n=n+"Email cannot be blank \n":validateEmail(emai)==!1&&(t=t+"Invalid E-mail ID\n");i==""&&(n=n+"Your Comments cannot be blank \n");n==""&&t==""?SendEmail(name,msid,emai,i,document.getElementById("hidReviewId").value,r):t!=""||alert(n)}function SendEmail(n,t,i,r,u,f){var e=new FormData,o=$("#fileJustifyPhoto").get(0).files,s;if(o.length!=0){if(e.append(o[0].name,o[0]),e.append("name",n),e.append("msid",t),e.append("email",i),e.append("comment",r),e.append("rid",u),e.append("gfval",f),s=$("#fileJustifyPhoto").val().split(".").pop().toLowerCase(),$.inArray(s,["gif","png","jpg","jpeg"])==-1){alert("Invalid file extension. Only files with png, jpg, jpeg and gif extensions are allowed.");return}$.ajax({url:"/review/DescritionAjax.aspx",type:"POST",contentType:!1,processData:!1,data:e,success:function(){document.getElementById("btnSubmitDisc").style.display="none";$("#dvfakeModal").hide();$("#dvthankModal").show();document.getElementById("dvthankModal").innerHTML="<span>Thank you for writing to us. Our Support Team shall look into this and get back to you soon.<\/span>";setTimeout(function(){$(".black-layer").css("visibility","hidden");$("body").css("overflow-y","auto");$("#optionpopup").hide().removeClass("modal");let n=window.location.href;if(n.length>5){let t=n.substr(n.length-5,5);t=="-fake"?window.location=n.substr(0,n.length-5):window.location.reload()}},2500)},error:function(){alert("Something error occurred")}})}else alert("At least one proof is mandatory. Please upload a purchase proof")}function changeJustifyPhoto(){if($("#fileJustifyPhoto").val()){let n=$("#fileJustifyPhoto").val().split("\\");$(".upload-file-selected").text(n[n.length-1])}}function JavaScrVars(){divMoreReviews=document.getElementById("divMoreReviews");tabMoreMemRev=document.getElementById("tabMoreMemRev");tabEditorsPick=document.getElementById("tabEditorsPick");linkMoreMemRev=document.getElementById("linkMoreMemRev");linkEditorsPick=document.getElementById("linkEditorsPick");spancomcount=document.getElementById("spancomcount");diverror=document.getElementById("diverror");MoreMemRevUrl="MoreMemberReviews="+revAuthor+"&CatId="+CatId+"&Random=";OverallRatUrl="OverallGraph="+Rid+"&u="+revAuthor+"&Random=";TrustRatUrl="TrustGraph="+revAuthor+"&Rid="+Rid+"&Random=";divTotcnt=document.getElementById("divTotcnt")}function SuspectMem(n){ChkLogin(n,"");n=="success"&&BindReason()}function Ajax(n,t){var i=new CreateRequest;i.ajaxObject.onreadystatechange=function(){i.ajaxObject.readyState==4&&n(i.ajaxObject.responseText)};i.ajaxObject.open("GET","/review/reviewajax.php?"+t,!1);i.ajaxObject.send(null)}function AjaxByHash(n,t){$.ajax({async:!0,type:"GET",url:mshost+"/review/reviewajax.php?"+t,contentType:"application/json; charset=utf-8",dataType:"text",success:function(t){n(t)}})}function Ajaxres(n,t){$.ajax({async:!0,type:"GET",url:mshost+"/review/reviewratingrestaurant.aspx?"+t,contentType:"application/json; charset=utf-8",dataType:"text",success:function(t){n(t)}})}function AjaxPost(n,t){var i=new CreateRequest;i.ajaxObject.onreadystatechange=function(){i.ajaxObject.readyState==4&&(n(i.ajaxObject.responseText),t.includes("AddCorpComment=1")&&($("#ltCommentCount").text(parseInt($("#ltCommentCount").text())+1),$("#corp_errComment").text("Comment added successfully.").css("color","#3c763d").show()))};i.ajaxObject.open("POST","/review/reviewajax.php",!0);i.ajaxObject.setRequestHeader("Content-type","application/x-www-form-urlencoded");i.ajaxObject.setRequestHeader("Content-length",t.length);i.ajaxObject.setRequestHeader("Connection","close");i.ajaxObject.send(t)}function AjaxPostRev(n,t,i,r){var u=new CreateRequest;u.ajaxObject.onreadystatechange=function(){u.ajaxObject.readyState==4&&n(u.ajaxObject.responseText,i,r)};u.ajaxObject.open("POST","/product/restaurant_ajax.aspx",!0);u.ajaxObject.setRequestHeader("Content-type","application/x-www-form-urlencoded");u.ajaxObject.setRequestHeader("Content-length",t.length);u.ajaxObject.setRequestHeader("Connection","close");u.ajaxObject.send(t)}function ChkLogin(n,t,i){n=="login"&&(urlredirect=LoginUrl+escape(t)+(i==undefined?"":i),indesof=urlredirect.indexOf("/review/"),urlredirectTo=urlredirect.substr(indesof),ajaxLogin(urlredirectTo))}function ChkLogin_Rate(n,t,i,r){n=="login"&&(urlredirect="/signup/login/login_now.php?add="+escape("/review/"+CatName+"-review-"+i+"")+escape(t)+(r==undefined?"":r),indesof=urlredirect.indexOf("/review/"),urlredirectTo=urlredirect.substr(indesof),ajaxLogin(urlredirectTo))}function ChkAlert(n,t,i){n=="login"&&(urlredirect=LoginUrl+escape(t)+(i==undefined?"":i),indesof=urlredirect.indexOf("/review/"),urlredirectTo=urlredirect.substr(indesof),ajaxalert(urlredirectTo))}function Trust(n){ChkLogin(n,"-trust-1");n=="reload"?window.location.reload():n=="success"&&(linkTrust.style.display="none",alreadyTrust.style.display="block",linkDistrust.innerHTML="Distrust this member",linkDistrust.setAttribute("href","javascript:Ajax(Distrust,'Distrust="+revAuthor+"&loadhead="+loadhead+"')"),linkDistrust.className="smallfont",TrustCount(1))}function Distrust(n){ChkLogin(n,"-trust-0");n=="reload"?window.location.reload():n=="success"&&(linkDistrust.innerHTML="Distrusted by you",linkDistrust.removeAttribute("href"),linkDistrust.className="smallfontred",linkTrust.innerHTML=="Trusted by you"&&TrustCount(-1),linkTrust.innerHTML="Trust this member",linkTrust.setAttribute("href","javascript:Ajax(Trust,'Trust="+revAuthor+"&loadhead="+loadhead+"')"),linkTrust.className="smallfont")}function TrustCount(n){var t=[];t=lblTrustBy.innerHTML.split(" ");t[0]=t[0]*1;t[0]=t[0]+n;t[1]=t[0]==1?"member":"members";lblTrustBy.innerHTML=t.join(" ")}function AlertMember(n){ChkLogin(n,"-alert-1");n=="reload"?window.location.reload():n=="success"&&(linkAlertMember.style.display="none",alreadyAlertMember.style.display="block")}function AjaxsetAlert(n){var t=new CreateRequest;t.ajaxObject.onreadystatechange=function(){t.ajaxObject.readyState==4};t.ajaxObject.open("GET","/review/reviewajax.php?"+n,!0);t.ajaxObject.send(null)}function EAlert(n){$("#alertE").html()!=""&&(n=="E"?document.getElementById("emailalerttxt").disabled=!1:n.substring(0,4)=="edit"?(document.getElementById("emailalerttxt").disabled=!0,document.getElementById("emailalerttxt").value=n.replace("edit|","")):(document.getElementById("emailalerttxt").disabled=!0,document.getElementById("emailalerttxt").value=n),chkEPA1==1&&(document.getElementById("alertreviewE").checked=!0),chkERC1==1&&(document.getElementById("alertcommentE").checked=!0))}function setAlert(n,t){var i=document.getElementById("lblSucess");if(n=="E"){var r=document.getElementById("emailalerttxt").value,u=document.getElementById("alertreviewE").checked,f=document.getElementById("alertcommentE").checked;epattern=/^[a-zA-Z0-9.@_]+$/;r!=""&&epattern.test(r)==!0?u==!0&&f==!0?(AjaxsetAlert(t+"&Email="+r+"&EAlert=Eboth"),i.className="success",i.innerText="Changes has been updated successfully",chkEPA1=1,chkERC1=1):u==!0?(AjaxsetAlert(t+"&Email="+r+"&EAlert=EReview"),i.className="success",i.innerText="Changes has been updated successfully",chkEPA1=1,chkERC1=0):f==!0?(AjaxsetAlert(t+"&Email="+r+"&EAlert=ECmt"),i.className="success",i.innerText="Changes has been updated successfully",chkEPA1=0,chkERC1=1):u==!1&&f==!1&&(AjaxsetAlert(t+"&Email="+r+"&EAlert=Ed"),i.className="success",i.innerText="Unsubscribed sucessfully",chkEPA1=0,chkERC1=0):(i.className="warning",i.innerText="*Please enter valid Email address")}}function OverallRating(n){ShowGraph(n)}function MoreProductReviews(n){divMoreReviews.innerHTML=n=="no records"?"<span class='font'>No records found.<\/span>":n;tabMoreMemRev.className="tabs_grey";tabEditorsPick.className="tabs_grey";linkMoreMemRev.setAttribute("href","javascript:Ajax(MoreMemberReviews,'"+MoreMemRevUrl+Math.random()+"')");linkEditorsPick.setAttribute("href","javascript:Ajax(EditorsPick,'EditorsPick=1&Random="+Math.random()+"')")}function MoreMemberReviews(n){divMoreReviews.innerHTML=n=="no records"?"<span class='font'>No records found.<\/span>":n;tabMoreMemRev.className="tabs_blue";tabEditorsPick.className="tabs_grey";linkMoreMemRev.removeAttribute("href");linkEditorsPick.setAttribute("href","javascript:Ajax(EditorsPick,'EditorsPick=1&Random="+Math.random()+"')")}function EditorsPick(n){divMoreReviews.innerHTML=n=="no records"?"<span class='font'>No records found.<\/span>":n;tabMoreMemRev.className="tabs_grey";tabEditorsPick.className="tabs_blue";linkEditorsPick.removeAttribute("href");linkMoreMemRev.setAttribute("href","javascript:Ajax(MoreMemberReviews,'"+MoreMemRevUrl+Math.random()+"')")}function NextPhoto(){var n=document.getElementById("RevImg"),t=n.src;n.src=n.getAttribute("nextimg");n.setAttribute("nextimg",t);imgno=imgno=="1"?"2":1}function next(){imgno==1?(imgno=2,ph1.height=Height2,ph1.style.maxWidth="800px",ph1.style.minWidth="300px",ph1.src=arrImg_user[1],document.getElementById("photolarge1").style.display="",document.getElementById("photolarge1").style.visibility="visible",document.getElementById("photolarge1").focus(),showcentre("photolarge1"),document.getElementById("nxt1").setAttribute("class","btn-next-disabled"),document.getElementById("nxt1").removeAttribute("onclick"),document.getElementById("pre1").setAttribute("class","btn-prev"),document.getElementById("pre1").setAttribute("onclick","next()"),document.getElementById("pre1").innerHTML="<a  href='javascript:void(0);'><\/a>"):(imgno=1,ph1.height=Height1,ph1.style.maxWidth="800px",ph1.style.minWidth="300px",ph1.src=arrImg_user[0],document.getElementById("photolarge1").style.display="",document.getElementById("photolarge1").style.visibility="visible",document.getElementById("photolarge1").focus(),showcentre("photolarge1"),document.getElementById("pre1").setAttribute("class","btn-prev-disabled"),document.getElementById("pre1").removeAttribute("onclick"),document.getElementById("nxt1").setAttribute("class","btn-next"),document.getElementById("nxt1").setAttribute("onclick","next()"),document.getElementById("nxt1").innerHTML="<a  href='javascript:void(0);'><\/a>")}function cls(){document.getElementById("photolarge1").style.display="none";imgno=tempno==1?1:2}function closethis1(){document.getElementById("photolarge1").style.display="none";imgno=tempno==1?1:2}function clicktozoom(){newImgSize();imgno==1?(tempno=1,document.getElementById("pre1").setAttribute("class","btn-prev-disabled"),document.getElementById("pre1").removeAttribute("onclick"),document.getElementById("nxt1").setAttribute("class","btn-next"),document.getElementById("nxt1").setAttribute("onclick","next()"),document.getElementById("nxt1").innerHTML="<a  href='javascript:void(0);'><\/a>",ph1.height=Height1,ph1.style.maxWidth="800px",ph1.style.minWidth="300px",ph1.src=arrImg_user[0]):imgno==2&imgcount==1?(tempno=1,document.getElementById("nxt1").setAttribute("class","btn-next-disabled"),document.getElementById("nxt1").removeAttribute("onclick"),document.getElementById("pre1").setAttribute("class","btn-prev"),document.getElementById("pre1").setAttribute("onclick","next()"),document.getElementById("pre1").innerHTML="<a  href='javascript:void(0);'><\/a>",ph1.height=Height1,ph1.style.maxWidth="800px",ph1.style.minWidth="300px",ph1.src=arrImg_user[0]):(tempno=2,document.getElementById("nxt1").setAttribute("class","btn-next-disabled"),document.getElementById("nxt1").removeAttribute("onclick"),document.getElementById("pre1").setAttribute("class","btn-prev"),document.getElementById("pre1").setAttribute("onclick","next()"),document.getElementById("pre1").innerHTML="<a  href='javascript:void(0);'><\/a>",ph1.height=Height2,ph1.style.maxWidth="800px",ph1.style.minWidth="300px",ph1.src=arrImg_user[1]);imgcount==1&&(document.getElementById("nxt1").setAttribute("class","btn-next-disabled"),document.getElementById("nxt1").removeAttribute("onclick"),document.getElementById("pre1").setAttribute("class","btn-prev-disabled"),document.getElementById("pre1").removeAttribute("onclick"));document.getElementById("photolarge1").style.display="block";document.getElementById("photolarge1").style.visibility="visible";document.getElementById("photolarge1").focus();showcentre("photolarge1");firstvisit=firstvisit+1}function newImgSize(){imgcount==1?(Height1=getImgSize(arrImg_user[0]),document.getElementById("nxt1").setAttribute("class","btn-next-disabled"),document.getElementById("nxt1").removeAttribute("onclick")):imgcount==2&&(Height1=getImgSize(arrImg_user[0]),Height2=getImgSize(arrImg_user[1]))}function getImgSize(n){var t=500,i=new Image;return i.src=n,t=i.height,t>=500?500:t}function FocusComments(){ShowHideError(0,"");txtComment.value="";document.getElementById("CommentHeading").innerHTML="<h2>Post a comment on this Review of "+CatName+"<\/h2>";btnSubmit.style.display="block";btnEdit.style.display="none";hidCommentId.value="";btnSubmit.focus()}function ShowComments(n){if(n!="no records"){if(n=n.replace("&lt;br/&gt;","\r\n"),$("#divComments").find("#hidCmmtCnt").remove(),$("#divComments").html(n),revCmtTotCnt.value=document.getElementById("hidCmmtCnt").value,submitclick&&parseInt(revCmtTotCnt.value)>3)$("#linkpostcomment").html("View "+(parseInt(revCmtTotCnt.value)-3)+" more comment").show(),submitclick=!1,revHidskip.value=13;else if(revHidskip.value-10<parseInt(revCmtTotCnt.value)){linkpostcomment.style.display="inline-block";var t=parseInt(revCmtTotCnt.value)-(revHidskip.value-10);t>1?$("#linkpostcomment").html("View "+t+" more comments"):t==1?$("#linkpostcomment").html("View "+t+" more comment"):linkpostcomment.style.display="none"}else linkpostcomment.style.display="none";showall=="1"&&(revHidskip.value=revCmtTotCnt.value+10);FocusOnComments==!0&&(window.location.hash="#comments");divComments.style.display="block"}else divComments.style.display="none",linkpostcomment.style.display="none"}function ShowCorpComments(n){ChkLogin(n,"","#corp_divComments");n!="login"&&(n!="no records"?(n=n.replace("&lt;br/&gt;","\r\n"),divCorpComments.innerHTML=n,buttonclicked=FindCorpButtonClicked(),buttonclicked=="edit"?($("html,body").animate({scrollTop:$("#"+editabletr).offset().top-180},"slow"),$("#corp_errComment").text("Comment updated successfully.").css("color","#3c763d").show()):$("#corp_errComment").html(""),corp_txtComment.value="",corp_btnSubmit.style.display="block",corp_btnEdit.style.display="none",DisableCorpButton(!1)):divCorpComments.style.display="none")}function ShowMoreComments(n){var t,i;hidskipval=revHidskip.value;n!="no records"&&(t=parseInt(hidskipval),revCmtTotCnt.value>t?(i=parseInt(revCmtTotCnt.value)-parseInt(hidskipval),i>1?$("#linkpostcomment").html("View "+i+" more comments"):$("#linkpostcomment").html("View "+i+" more comment")):linkpostcomment.style.display="none",t=parseInt(hidskipval)+10,revHidskip.value=t,divComments=document.getElementById("divComments"),divComments.innerHTML=n,revCmtTotCnt.value=document.getElementById("hidCmmtCnt").value,FocusOnComments==!0&&(window.location.hash="#comments"),FocusOnAddComments==!0&&document.getElementById("hidAddCommentId").value!=""&&ViewmoreFocus(),divComments.style.display="block")}function ShowMoreComments_My(n){if(hidskipval=revHidskip.value,revCmtTotCnt.value=document.getElementById("hidCmmtCnt").value,n!="no records"){if(hidskipval==1)revCmtTotCnt.value=document.getElementById("hidCmmtCnt").value,revCmtTotCnt.value>20?Add_Comment==!0?(document.getElementById("divCmtInc").style.display="none",document.getElementById("spanCommCnt").innerHTML="Showing 1 - "+parseInt($("#tblcomments").find("tr td:nth-child(2)").length)+" of "+parseInt(revCmtTotCnt.value)+" Comments"):document.getElementById("spanCommCnt").innerHTML="Showing 1 - "+ +parseInt($("#tblcomments").find("tr td:nth-child(2)").length)+" of "+parseInt(revCmtTotCnt.value)+" Comments":(document.getElementById("divCmtInc").style.display="none",document.getElementById("spanCommCnt").innerHTML="Showing 1 - "+parseInt($("#tblcomments").find("tr td:nth-child(2)").length)+" of "+parseInt(revCmtTotCnt.value)+" Comments");else{var t=parseInt(hidskipval);revCmtTotCnt.value>t?document.getElementById("spanCommCnt").innerHTML="Showing 1 - "+parseInt($("#tblcomments").find("tr td:nth-child(2)").length)+" of "+parseInt(revCmtTotCnt.value)+" Comments":(divTotcnt.style.display="none",document.getElementById("divCmtInc").style.display="none",document.getElementById("spanCommCnt").innerHTML="Showing 1 - "+parseInt($("#tblcomments").find("tr td:nth-child(2)").length)+" of "+parseInt(revCmtTotCnt.value)+" Comments");revCmtTotCnt.value=document.getElementById("hidCmmtCnt").value}divComments.style.display="block"}}function EditComment(n,t,i,r){var u=$("#"+t).html();editabletr=r;selEdit=i;u=u.replace("...","").replace("READ MORE","").replace("Read More","");u=u.replace(/<(?!br\s*\/?)[^>]+>/g,"");u=u.replace("(<(/)*p>)","<br/>");u=u.replace("(\n)","<br/>");u=u.replace("((s)*<(/)*br(/)*>(s)*){2,}","<br/><br/>");u=u.replace("(<(/)*br(/)*>)","\n");u=u.replace(/<br>/g,"\n");u=u.replace(/<BR>/g,"\n");u=u.replace(/&nbsp;/g," ");u=u.replace(/&amp;/g,"&");u=u.replace(/&lt;/g,"<");u=u.replace(/&gt;/g,">");u=u.replace(/<a target.*?>/g,"");u=u.replace(/<\/a>/g,"");u=u.replace(/<(|\n)*?>/g,"");txtComment.value=u;hidCommentId.value=n;btnSubmit.style.display="none";btnEdit.style.display="block";$("#errComment").hide();$("html,body").animate({scrollTop:$("#txtComment").offset().top-180},"slow");document.getElementById("txtComment").focus()}function EditCorpComment(n,t,i,r){var u=document.getElementById(t).innerHTML;editabletr=r;selEdit=i;u=u.replace("...","").replace("READ MORE","").replace("Read More","");u=u.replace(/<(?!br\s*\/?)[^>]+>/g,"");u=u.replace("(<(/)*p>)","<br/>");u=u.replace("(\n)","<br/>");u=u.replace("((s)*<(/)*br(/)*>(s)*){2,}","<br/><br/>");u=u.replace("(<(/)*br(/)*>)","\n");u=u.replace(/<br>/g,"\n");u=u.replace(/<BR>/g,"\n");u=u.replace(/&nbsp;/g," ");u=u.replace(/&amp;/g,"&");u=u.replace(/&lt;/g,"<");u=u.replace(/&gt;/g,">");u=u.replace(/<a target.*?>/g,"");u=u.replace(/<\/a>/g,"");u=u.replace(/<(|\n)*?>/g,"");corp_txtComment.value=u;hidCorpCommentId.value=n;corp_btnSubmit.style.display="none";corp_btnEdit.style.display="block";$("html,body").animate({scrollTop:$("#corp_txtComment").offset().top-180},"slow");document.getElementById("corp_txtComment").focus()}function UpdateComment(){if(ValidateComment(txtComment.value,Rid)==!0){DisableButton(!0);var n=hidCommentId.value;AjaxPost(AddOnlyComment,"Rid="+Rid+"&EditCommentId="+n+"&Comment="+UrlEncode(txtComment.value)+"&tr="+UrlEncode(editabletr)+"&count="+revHidskip.value)}}function AddComment(){ValidateComment(txtComment.value,Rid)==!0&&(DisableButton(!0),Rate_Comment==!1?AjaxPost(AddOnlyComment,"Rid="+Rid+"&AddComment="+UrlEncode(txtComment.value)+"&loadhead="+loadhead):AjaxPost(RateNU_Comment,"Rid="+Rid+"&RateComment="+UrlEncode(txtComment.value)+"&catname="+CatName+"&loadhead="+loadhead))}function corp_AddComment(n){ValidateCorpComment(corp_txtComment.value)==!0&&(n!=0?(DisableCorpButton(!0),AjaxPost(ShowCorpComments,"AddCorpComment=1&PostId="+PostId+"&Rid="+Rid+"&Comment="+UrlEncode(corp_txtComment.value)+"&loadhead="+loadhead)):(ajaxLogin("/review/ReviewAjax.php?AddCorpComment=1&PostId="+PostId+"&Rid="+Rid+"&Comment="+UrlEncode(corp_txtComment.value)+"&redirectToRR=1&revKey="+strRid1+"&cat_name="+CatName+"&loadhead=1&what=1"),createCookie("fbLoginRedirection1","/review/ReviewAjax.php?AddCorpComment=1&PostId="+PostId+"&Rid="+Rid+"&Comment="+UrlEncode(corp_txtComment.value)+"&redirectToRR=1&revKey="+strRid1+"&cat_name="+CatName+"&loadhead=1&what=1",30)))}function corp_UpdateComment(){if(ValidateCorpComment(corp_txtComment.value)==!0){DisableCorpButton(!0);var n=hidCorpCommentId.value;AjaxPost(ShowCorpComments,"UpdateCorpComment=1&CommentId="+n+"&PostId="+PostId+"&Comment="+UrlEncode(corp_txtComment.value))}}function AddOnlyComment(n){var t,i;ChkLogin(n,"","");n!="login"&&(n.substring(0,11).toLowerCase()=="bad word(s)"?$("#errComment").html("<span class='icon-tool-tip'><\/span> &nbsp; "+n+".").css("color","red").show():(t=FindButtonClicked(),t=="edit"?(i=hidCommentId.value,ShowComments(n),$("#errComment").text("Comment updated successfully.").css("color","#3c763d").show(),revCmtTotCnt.value=document.getElementById("hidCmmtCnt").value,$("html,body").animate({scrollTop:$("#"+editabletr).offset().top-180},"slow")):(Add_Comment=!0,$("#errComment").text("Comment posted successfully.").css("color","#3c763d").show(),ShowComments(n)),txtComment.value="",btnSubmit.style.display="block",btnEdit.style.display="none",hidCommentId.value=""));DisableButton(!1)}function ShowMyComment(n){n=n.replace("&lt;br/&gt;","\r\n");editabletr==""&&(editabletr="tr1");$("#"+editabletr).length>0?($("#"+editabletr).html(n),$(".uwpDiv").unwrap()):$("#divComments").append(n);var t=$("#"+editabletr).offset().top-135;window.scrollTo(t,t)}function RateNU_Comment(n){if(ChkLogin(n,"",""),n!="login")if(n.substring(0,11).toLowerCase()=="bad word(s)")$("#errComment").html("<span class='icon-tool-tip'><\/span> &nbsp; "+n+".").css("color","red").show();else{var t,i,r;t=n.indexOf('<p><span id="ratingText"');i=n.substring(0,t);r=n.substring(t);Add_Comment=!0;revCmtTotCnt.value=parseInt(revCmtTotCnt.value)+1;NU(r);$("html,body").animate({scrollTop:$("#pnlGraph").offset().top-180},"slow");divComments.innerHTML=i;divComments.style.display="block";DisableButton(!1);$("#errComment").html("");txtComment.value="";hidCommentId.value="";Rate_Comment=!1}DisableButton(!1)}function textCommentCounter(){txtComment&&(txtComment.value.length>2e3?($("#errComment").html("<span class='icon-tool-tip'><\/span> &nbsp; Minimum 3 words and Maximum 2000 characters").css("color","red").show(),$("#btnSubmit").prop("disabled",!0),$("#btnEdit").prop("disabled",!0)):($("#errComment").html("").hide(),$("#btnSubmit").prop("disabled",!1),$("#btnEdit").prop("disabled",!1)),txtComment.value.length>100&&$("#txtComment").css("height","152px"))}function CountWordsrr(n){var i,f,u,t;n=n.replace(/&nbsp;/gi,"");var e=n.trim(),s=e.replace(/^[^A-Za-z0-9]+/gi,""),h=rExp="",o=s.replace(h," "),i=o.split(" "),r=0;if(i.length-1<=5e3)if(i=o.split("\n"),u=0,i.length>=1)for(u=0;u<i.length;u++)for(f=i[u].split(" "),t=0;t<f.length;t++)f[t].trim()!=""&&(r=r+1);else for(t=0;t<i.length;t++)i[t].trim()!=""&&(r=r+1);else for(t=0;t<i.length;t++)i[t].trim()!=""&&(r=r+1);return e.length<2&&(r=0),r}function textResComCounter(){corp_txtComment&&(corp_txtComment.value.length>2e3?($("#corp_errComment").html("<span class='icon-tool-tip'><\/span> &nbsp; Minimum 3 words and Maximum 2000 characters").css("color","red").show(),$("#corp_btnSubmit").prop("disabled",!0),$("#corp_btnEdit").prop("disabled",!0)):($("#corp_errComment").html("").hide(),$("#corp_btnSubmit").prop("disabled",!1),$("#corp_btnEdit").prop("disabled",!1)),(corp_txtComment.value.length>25||CountWordsrr(corp_txtComment.value)>25)&&$("#corp_txtComment").css("height","152px"))}function ValidateComment(n,t){if(n.trim()=="")return $("#errComment").html("<span class='icon-tool-tip'><\/span> &nbsp; This information is required.").css("color","red").show(),!1;if(canPostComntOnReview=="False")return $("#errComment").html("<span class='icon-tool-tip'><\/span> &nbsp; Access Not Granted.").css("color","red").show(),!1;if(CountWords(n)<3){if(txtComment.value.length<=2e3)return $("#errComment").html("<span class='icon-tool-tip'><\/span> &nbsp; Minimum 3 words and Maximum 2000 characters.").css("color","red").show(),!1;if(txtComment.value.length>2e3)return $("#errComment").html("").hide(),!0}else return Rate_Comment==!0?checkRatingCountRR(Rid)?checkCommentCountRR(t)?!0:(window.parent.$("#commentpopimg").attr("src","../Images/comment_popup_desktop.png"),window.parent.$("#commentpopimg").attr("width","400px"),window.parent.$(".imgPastePrevent1,#commentpopimg").css("display","block"),window.parent.$(".black-layer").css("visibility","visible"),window.parent.$(".black-layer").css("display","block"),!1):(window.parent.$("#ratepopimg").attr("src","../Images/rate_popup_web.png"),$(".imgPastePrevent2,#ratepopimg").css("display","block"),window.parent.$(".black-layer").css("visibility","visible"),window.parent.$(".black-layer").css("display","block"),!1):checkCommentCountRR(t)?!0:(window.parent.$("#commentpopimg").attr("src","../Images/comment_popup_desktop.png"),window.parent.$("#commentpopimg").attr("width","400px"),window.parent.$(".imgPastePrevent1,#commentpopimg").css("display","block"),window.parent.$(".black-layer").css("visibility","visible"),window.parent.$(".black-layer").css("display","block"),!1)}function ValidateCorpComment(n){if($("[id$=_customer]").css("display")=="block")return $("#corp_errComment").html('<span class="icon-tool-tip"><\/span> &nbsp;Please click "YES" or "NO" to justify your comments!'),$("#corp_errComment").css("display","block"),$(".corp-box").siblings(".comment").slideDown(),!1;if(n.trim()=="")return $("#corp_errComment").html("<span class='icon-tool-tip'><\/span> &nbsp; This information is required.").css("color","red").show(),!1;if(canPostComntOnResponse=="False")return $("#corp_errComment").html("<span class='icon-tool-tip'><\/span> &nbsp; Access Not Granted.").css("color","red").show(),!1;if(CountWords(n)<3){if(txtComment.value.length<2e3)return $("#corp_errComment").html("<span class='icon-tool-tip'><\/span> &nbsp; Minimum 3 words and Maximum 2000 characters.").css("color","red").show(),!1;if(txtComment.value.length>=2e3)return $("#corp_errComment").html("").hide(),!0}else return!0}function ShowHideError(n,t){if(n==1){diverror.style.display="block";diverror.innerHTML="<span>"+t+"<\/span>";var i=FindButtonClicked();i=="add"?btnSubmit.focus():btnEdit.focus()}else diverror.style.display="none",diverror.innerHTML=""}function FindCorpButtonClicked(){return corp_btnEdit.style.display=="none"?"add":"edit"}function FindButtonClicked(){return btnEdit.style.display=="none"?"add":"edit"}function CountWords(n){var i,f,u,t;n=n.replace(/&nbsp;/gi,"");var e=n.trim(),s=e.replace(/^[^A-Za-z0-9]+/gi,""),h=rExp="",o=s.replace(h," "),i=o.split(" "),r=0;if(i.length-1<=5e3)if(i=o.split("\n"),u=0,i.length>=1)for(u=0;u<i.length;u++)for(f=i[u].split(" "),t=0;t<f.length;t++)f[t].trim()!=""&&(r=r+1);else for(t=0;t<i.length;t++)i[t].trim()!=""&&(r=r+1);else for(t=0;t<i.length;t++)i[t].trim()!=""&&(r=r+1);return e.length<2&&(r=0),r}function textCounter(){txtComment.value.length>2e3?(txtComment.value=txtComment.value.substring(0,2e3),ShowHideError(1,"Minimum 3 words and Maximum 2000 characters")):(diverror.style.display="none",diverror.innerHTML="");txtComment.value.length>65&&$(".comment-box").css("height","152px")}function ShowGraph(n){n=="Corporate Cannot Rate Reviews."?$("#ratingText").text(n).css("color","red"):document.getElementById("divRatingR").innerHTML=n}function Rating(n){if(loadhead=document.getElementById("hidpgload").value,n=="btnAjxVU")if(checkRatingCountRR(Rid))Ajaxres(VU,"rid="+Rid+"&rating=4&catname=&loadhead="+loadhead);else return window.parent.$("#ratepopimg").attr("src","../Images/rate_popup_web.png"),window.parent.$("#ratepopimg").attr("width","400px"),$(".imgPastePrevent2,#ratepopimg").css("display","block"),window.parent.$(".black-layer").css("visibility","visible"),window.parent.$(".black-layer").css("display","block"),!1;else if(n=="btnAjxU")if(checkRatingCountRR(Rid))Ajaxres(U,"rid="+Rid+"&rating=2&catname=&loadhead="+loadhead);else return window.parent.$("#ratepopimg").attr("src","../Images/rate_popup_web.png"),window.parent.$("#ratepopimg").attr("width","400px"),$(".imgPastePrevent2,#ratepopimg").css("display","block"),window.parent.$(".black-layer").css("visibility","visible"),window.parent.$(".black-layer").css("display","block"),!1;else if(n=="btnAjxNU")if(checkRatingCountRR(Rid))Ajaxres(NU,"rid="+Rid+"&rating=-4&catname=&loadhead="+loadhead);else return window.parent.$("#ratepopimg").attr("src","../Images/rate_popup_web.png"),window.parent.$("#ratepopimg").attr("width","400px"),$(".imgPastePrevent2,#ratepopimg").css("display","block"),window.parent.$(".black-layer").css("visibility","visible"),window.parent.$(".black-layer").css("display","block"),!1}function checkCommentCountRR(n){var t=!1,i;return i=CatId,$.ajax({url:"/review/CorporateResponse.ashx",contentType:"application/json; charset=utf-8",dataType:"text",async:!1,data:{type:"commentcount",corp:!1,cat_id:i,login_id:loginid,reviewid:n,corp_name:corporateName,corp_product:iscorp},responseType:"text/html",success:function(n){n=="success"&&(t=!0)}}),t}function checkRatingCountRR(n){var t=!1,i;return i=CatId,$.ajax({url:"/review/CorporateResponse.ashx",contentType:"application/json; charset=utf-8",dataType:"text",async:!1,data:{type:"ratecount",corp:!1,cat_id:i,login_id:loginid,reviewid:n,corp_name:corporateName,corp_product:iscorp},responseType:"text/html",success:function(n){n=="success"&&(t=!0)}}),t}function writeExpressRev(){AjaxPostRev(expressfunc,"cid="+cidOfuserreview,"","")}function expressfunc(n){ChkLogin_Ratereview(n,"-ratereview");n!="login"&&redirecttowrite()}function ChkLogin_Ratereview(n){n=="login"&&(urlredirect=window.location.href,ajaxLogin(urlredirect))}function RatingAll(n,t,i){MM_showHideLayers("rating","","hide");n.value.toLowerCase()=="very useful"?AjaxPostRev(VU_All,"rid="+t+"&rating=4&catname="+CatName+"&loadhead="+loadhead,i,t):n.value.toLowerCase()=="useful"?AjaxPostRev(U_All,"rid="+t+"&rating=2&catname="+CatName+"&loadhead="+loadhead,i,t):n.value.toLowerCase()=="not useful"&&AjaxPostRev(NU_All,"rid="+t+"&rating=-4&catname="+CatName+"&loadhead="+loadhead,i,t)}function VU_All(n,t,i){ChkLogin_Rate(n,"",i);n!="login"&&(window.location.href=escape("/review/"+CatName+"-review-"+i+""))}function U_All(n,t,i){ChkLogin_Rate(n,"",i);n!="login"&&(window.location.href=escape("/review/"+CatName+"-review-"+i+""))}function NU_All(n,t,i){ChkLogin_Rate(n,"",i);n!="login"&&(window.location.href=escape("/review/"+CatName+"-review-"+i+""))}function RatingMsg_All(n,t,i){document.getElementById("dvpopLayer").innerHTML="";document.getElementById("popuplayer1").style.display="block";document.getElementById("dvRating").setAttribute("style","display:block;width:125;");document.getElementById("dvRating").className="confirmationbox";document.getElementById("pptitle").innerHTML="Review Rating";n=="Corporate"?document.getElementById("dvRating").innerHTML="Corporate users cannot rate a review":(document.getElementById("dvRating").innerHTML="<span>You found this review <span class='review-rating-breakup'>"+n+"<\/span>. Thank you for your rating<\/span>",showcentre("popuplayer1"),n=="Not Useful"&&(chkradioNU.checked=!0));closepptimeout("popuplayer1",2e3);var r="lblrating=1&rid="+i;AjaxPost_All(update_lblrating_all,r,t)}function AjaxPost_All(n,t,i){var r=new CreateRequest;r.ajaxObject.onreadystatechange=function(){r.ajaxObject.readyState==4&&n(r.ajaxObject.responseText,i)};r.ajaxObject.open("POST","/product/restaurant_ajax.aspx",!0);r.ajaxObject.setRequestHeader("Content-type","application/x-www-form-urlencoded");r.ajaxObject.setRequestHeader("Content-length",t.length);r.ajaxObject.setRequestHeader("Connection","close");r.ajaxObject.send(t)}function update_lblrating_all(n,t){var r=n,i=r.split("|");document.getElementById(t).innerHTML=i[0];document.getElementById(t).setAttribute("class",i[1])}function VU(n){ChkLogin(n,"");n!="login"&&(n=="You cannot rate your own review"?$("#ratingText").text(n).css("color","red"):n=="Corporate Cannot Rate Reviews."?$("#ratingText").text(n).css("color","red"):($("#divRatingR").html(n),$("#errComment").html("").hide(),Rate_Comment=!1,$("#snackbarLike").show().text("You found this review Very Useful").delay(2e3).fadeOut()))}function U(n){ChkLogin(n,"");n!="login"&&(n=="You cannot rate your own review"?$("#ratingText").text(n).css("color","red"):n=="Corporate Cannot Rate Reviews."?$("#ratingText").text(n).css("color","red"):($("#divRatingR").html(n),$("#errComment").html("").hide(),Rate_Comment=!1,$("#snackbarLike").show().text("You found this review Useful").delay(2e3).fadeOut()))}function NU(n){ChkLogin(n,"");n!="login"&&(n=="You cannot rate your own review"?$("#ratingText").text(n).css("color","red"):n=="write comment"?($("#errComment").html("<span class='icon-tool-tip'><\/span> &nbsp; Please fill in a comment to justify your rating for this review.").css("color","red").show(),$("html,body").animate({scrollTop:$("#errComment").offset().top-180},"slow"),document.getElementById("errComment").focus(),Rate_Comment=!0,FocusOnComments=!0):n=="Corporate Cannot Rate Reviews."?$("#ratingText").text(n).css("color","red"):($("#ratingText").text('You found this review <span class="review-rating-breakup">Not Useful<\/span>').css("color","#3c763d"),$("#divRatingR").html(n),$("#errComment").html("").hide(),$("#snackbarLike").show().text("You found this review Not Useful").delay(2e3).fadeOut()))}function RatingCount(){ratingbox.style.display=="none"&&(lblTotRated.innerHTML=lblTotRated.innerHTML*1+1,lblRatedMem.innerHTML=lblTotRated.innerHTML>1?"members":"member")}function RatingMsg(n){document.getElementById("dvpopLayer").innerHTML="";document.getElementById("popuplayer1").style.display="block";document.getElementById("dvRating").setAttribute("style","display:block;width:325;");document.getElementById("dvRating").className="confirmationbox";document.getElementById("pptitle").innerHTML="Review Rating";n=="Corporate"?document.getElementById("dvRating").innerHTML="Corporate users cannot rate a review":(document.getElementById("dvRating").innerHTML="<span>You found this review <span class='review-rating-breakup'>"+n+"<\/span>. Thank you for your rating<\/span>",showcentre("popuplayer1"),n=="Not Useful"&&(chkradioNU.checked=!0));closepptimeout("popuplayer1",2e3);ratingbox&&(ratingbox.style.display="none")}function DisableButton(n){n==!0?(btnSubmit.disabled=!0,btnEdit.disabled=!0):(btnSubmit.disabled=!1,btnEdit.disabled=!1)}function DisableCorpButton(n){n==!0?(corp_btnSubmit.disabled=!0,corp_btnEdit.disabled=!0):(corp_btnSubmit.disabled=!1,corp_btnEdit.disabled=!1)}function UrlEncode(n){return n=n.replace(/\+/g,"%2b"),encodeURIComponent(n)}function Bookmark(n){ChkLogin(n,"-bookmark-1");n=="reload"?window.location.reload():n=="success"&&(linkBookmark.style.display="none",alreadyBookmark.style.display="block")}function AjaxDelImg(n,t){var i,u,r;if(confirm("Do you really want to delete this photo?"))i=document.getElementById("RevImg"),u=i.src,i.src=i.getAttribute("nextimg"),i.setAttribute("nextimg",u),r=new CreateRequest,r.ajaxObject.onreadystatechange=function(){r.ajaxObject.readyState==4&&n(imgno)},r.ajaxObject.open("GET","/review/delete_review_Photo.aspx?cidimg="+t+"&imgno="+imgno+"&rndIe="+ReturnRndIe(),!0),r.ajaxObject.send(null);else return!1}function deleteimg(){var t,n;imgcount=="2"?(t=document.getElementById("spannextlink"),t.style.display="none",imgcount="1",imgno==1?(imgno=1,arrImg_user[0]=arrImg_user[1]):(imgno=1,arrImg_user[1]=arrImg_user[0])):(n=document.getElementById("divimage"),n.style.height="0",n.style.width="0",n.style.display="none",imgcount="0")}function ShowNUComments(n){revCmtTotCnt.value=n;document.getElementById("divCmtInc").style.display="none";document.getElementById("spanCommCnt").innerHTML="Showing 1 - "+parseInt($("#tblcomments").find("tr td:nth-child(2)").length)+" of "+parseInt(revCmtTotCnt.value)+" Comments";document.getElementById("divCommentCount").innerHTML="<strong>Comments on this review ("+parseInt(revCmtTotCnt.value)+")<\/strong>"}function AjaxPost_new(n,t,i){var r=new CreateRequest;r.ajaxObject.onreadystatechange=function(){r.ajaxObject.readyState==4&&n(r.ajaxObject.responseText,i)};r.ajaxObject.open("POST","/review/reviewajax.php",!0);r.ajaxObject.setRequestHeader("Content-type","application/x-www-form-urlencoded");r.ajaxObject.setRequestHeader("Content-length",t.length);r.ajaxObject.setRequestHeader("Connection","close");r.ajaxObject.send(t)}function ShowratingMsg(n,t){n=="corporate"?RatingMsg("Corporate"):t==5?RatingMsg("Very Useful"):t==4?RatingMsg("Useful"):t==2&&RatingMsg("Somewhat Useful")}function searchHitRar(n){document.getElementById("txtrrTabSearch").value==""||document.getElementById("txtrrTabSearch").value=="Search Product, Reviews and Ratings"||$(".sb_dropdown").hide();var t="";return t=navigator.appName=="Microsoft Internet Explorer"?window.event.keyCode:navigator.userAgent.toLowerCase().indexOf("chrome")>-1?window.event.which:n.keyCode?n.keyCode:n.charCode,t==13||t==26?!1:void 0}function textCommentCounterrr(n,t,i,r,u){CountWordsrr($("#"+r).val())<3?($("#"+r).val().length>50&&($(".comment-box").css("height","152px"),u=="corp"?($("#"+n).html("<span class='icon-tool-tip'><\/span> &nbsp; Minimum 3 words and Maximum 2000 characters").css("color","red").show(),$("#"+r).css("height","152px")):$("#"+n).html("<span class='icon-tool-tip'><\/span> &nbsp; Minimum 3 words and Maximum 2000 characters").css("color","red").show()),$("#"+t).prop("disabled",!0),$("#"+i).prop("disabled",!0)):($("#"+r).val().length>2e3?(u=="corp"?($("#"+n).html("<span class='icon-tool-tip'><\/span> &nbsp; Minimum 3 words and Maximum 2000 characters").css("color","red").show(),$("#"+r).css("height","152px")):$("#"+n).html("<span class='icon-tool-tip'><\/span> &nbsp; Minimum 3 words and Maximum 2000 characters").css("color","red").show(),$("#"+t).prop("disabled",!0),$("#"+i).prop("disabled",!0)):($("#"+n).html("").hide(),$("#"+t).prop("disabled",!1),$("#"+i).prop("disabled",!1)),$("#"+r).val().length>100&&$("#"+r).css("height","152px"))}function ChkLoginComment(n,t,i){n=="login"&&(pgurl=typeof pgurl=="undefined"?uri:pgurl.includes("sort")?pgurl:mainurl,urlredirect=encodeURI(pgurl)+encodeURI(t)+(i==undefined?"":i),indesof=urlredirect.indexOf("/review/"),urlredirectTo=urlredirect.substr(urlredirect),ajaxLogin(urlredirectTo))}function Ajaxrr(n,t,i,r,u,f,e){var o=new CreateRequest;o.ajaxObject.onreadystatechange=function(){o.ajaxObject.readyState==4&&n(o.ajaxObject.responseText,i,r,u,f,e)};o.ajaxObject.open("GET","/review/reviewajax.php?"+t,!0);o.ajaxObject.send(null)}function AjaxByHashrr(n,t,i,r,u,f,e,o){var s=new CreateRequest;s.ajaxObject.onreadystatechange=function(){s.ajaxObject.readyState==4&&(s.ajaxObject.responseText=="no records"&&($("#"+i).parent().find("h5").hide(),$("#"+i).parent().find(".text-center").hide()),n(s.ajaxObject.responseText,i,r,u,f,e,o))};s.ajaxObject.open("GET","/review/reviewajax.php?"+t,!1);s.ajaxObject.send(null)}function AjaxByHashCorprr(n,t,i,r,u,f,e){var o=new CreateRequest;o.ajaxObject.onreadystatechange=function(){o.ajaxObject.readyState==4&&n(o.ajaxObject.responseText,i,r,u,f,e)};o.ajaxObject.open("GET","/review/reviewajax.php?"+t,!1);o.ajaxObject.send(null)}function AjaxresAllrr(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y){var p=new CreateRequest;p.ajaxObject.onreadystatechange=function(){p.ajaxObject.readyState==4&&n(p.ajaxObject.responseText,i,r,u,f,e,o,s,h,c,l,a,v,y)};p.ajaxObject.open("GET","/review/reviewratingrestaurant.aspx?"+t,!0);p.ajaxObject.send(null)}function AjaxPostrr(n,t,i,r,u,f,e,o,s,h,c,l){var a=new CreateRequest;a.ajaxObject.onreadystatechange=function(){a.ajaxObject.readyState==4&&(t.includes("AddCorpComment=1")&&$("#ltCommentCount").text(parseInt($("#ltCommentCount").text())+1),n(a.ajaxObject.responseText,i,r,u,f,e,o,s,h,c,l))};a.ajaxObject.open("POST","/review/reviewajax.php",!0);a.ajaxObject.setRequestHeader("Content-type","application/x-www-form-urlencoded");a.ajaxObject.setRequestHeader("Content-length",t.length);a.ajaxObject.setRequestHeader("Connection","close");a.ajaxObject.send(t)}function ChkLoginrr(n,t,i){n=="login"&&(pgurl=typeof pgurl=="undefined"?uri:pgurl.includes("sort")?pgurl:mainurl,urlredirect=encodeURI(pgurl)+encodeURI(t)+(i==undefined?"":i),indesof=urlredirect.indexOf("/review/"),urlredirectTo=urlredirect.substr(urlredirect),ajaxLogin(urlredirectTo))}function ChkLogin_Raterr(n,t,i,r){return n=="0"?(urlredirect="/signup/login/login_now.php?add="+encodeURI("/review/"+CatName+"-review-"+i+"")+encodeURI(t)+(r==undefined?"":r),indesof=urlredirect.indexOf("/review/"),urlredirectTo=urlredirect.substr(indesof),ajaxLogin(urlredirectTo),"false"):"true"}function OverallRatingrr(n,t,i,r){ShowGraph1(n,t,i,r)}function ajaxTooltip(){$(".tooltip").on({mouseenter:function(){for(var n=$(this).find(".tooltip-content"),i=$(this).attr("class").split(" "),t=0;t<i.length;t++){switch(i[t]){case"left":n.css({"margin-left":-($(n).width()+15)+"px","margin-top":-$(this).height()+"px"});break;case"right":n.css({"margin-left":$(this).width()+5+"px","margin-top":-$(this).height()+"px"});break;case"top":n.css("margin-top",-($(this).height()+$(n).height()+5)+"px")}$(this).find(".tooltip-content").css("display","block")}},mouseleave:function(){$(".tooltip-content").hide()}})}function ajaxTooltip1(n){$("#iconLI"+n+" .tooltip").on({mouseenter:function(){for(var n=$(this).find(".tooltip-content"),i=$(this).attr("class").split(" "),t=0;t<i.length;t++){switch(i[t]){case"left":n.css({"margin-left":-($(n).width()+15)+"px","margin-top":-$(this).height()+"px"});break;case"right":n.css({"margin-left":$(this).width()+5+"px","margin-top":-$(this).height()+"px"});break;case"top":n.css("margin-top",-($(this).height()+$(n).height()+5)+"px")}$(this).find(".tooltip-content").css("display","block")}},mouseleave:function(){$("#iconLI"+n+" .tooltip-content").hide()}})}function MoreMemberReviews(n){divMoreReviews.innerHTML=n=="no records"?"<span class='font'>No records found.<\/span>":n;tabMoreMemRev.className="tabs_blue";tabEditorsPick.className="tabs_grey";linkMoreMemRev.removeAttribute("href");linkEditorsPick.setAttribute("href","javascript:Ajax(EditorsPick,'EditorsPick=1&Random="+Math.random()+"')")}function EditorsPick(n){divMoreReviews.innerHTML=n=="no records"?"<span class='font'>No records found.<\/span>":n;tabMoreMemRev.className="tabs_grey";tabEditorsPick.className="tabs_blue";linkEditorsPick.removeAttribute("href");linkMoreMemRev.setAttribute("href","javascript:Ajax(MoreMemberReviews,'"+MoreMemRevUrl+Math.random()+"')")}function ShowCommentsRatingrr(n,t,i,r,u,f,e){var o,s;divComments=document.getElementById(t);n!="no records"?(n=n.replace("&lt;br/&gt;","\r\n"),Rate_Comment=f,$(divComments).find("#hidCmmtCnt").remove(),divComments.innerHTML=n,$(divComments).parent().slideDown(),o=$("#"+r).val(),e=="show"?$("#"+i).hide():submitclick&&parseInt(o)>3?($("#"+i).html("View "+(parseInt(o)-3)+" more comment").show(),$("#"+i).parent().show(),submitclick=!1,$("#"+u).val(13)):$("#"+u).val()-10<parseInt(o)?($("#"+i).show(),s=parseInt(o)-($("#"+u).val()-10),s>1?($("#"+i).html("View "+s+" more comments").show(),$("#"+t).parent().find(".text-center").show()):s==1?($("#"+i).html("View "+s+" more comment").show(),$("#"+t).parent().find(".text-center").show()):$("#"+i).hide()):$("#"+i).hide(),FocusOnComments==!0&&(window.location.hash="#comments"),divComments.style.display="block"):(n=="no records"&&$(divComments).parent().is(":visible")?$(divComments).parent().slideUp():$(divComments).parent().slideDown(),divComments.style.display="none",$("#"+i).hide())}function ShowCorpCommentsrr(n,t,i,r,u,f){if(n!="no records"){if(n=n.replace("&lt;br/&gt;","\r\n"),buttonclicked=FindButtonClickedrr(f),buttonclicked=="edit")var e=$(editabletr).offset().top;$("#"+t).html(n);buttonclicked=="edit"?($("html,body").animate({scrollTop:parseInt(e)-180},"slow"),$("#"+r).text("Comment updated successfully.").css("color","#3c763d").show()):$("#"+r).html("");$("#"+i).val("");$("#"+u).show();$("#"+f).hide();DisableButtonrr(!1,u,f)}else $("#"+t).hide()}function ShowMoreCommentsrr(n,t,i,r,u,f){var s=$("#"+r).val(),e,o;divComments=document.getElementById(t);n!="no records"&&(e=parseInt(f),s>e?(o=parseInt(s)-parseInt(f),o>1?$("#"+i).html("View "+o+" more comments"):$("#"+i).html("View "+o+" more comment")):$("#"+i).hide(),e=parseInt(f)+10,$("#"+u).val(e),divComments.innerHTML=n,s.value=document.getElementById("hidCmmtCnt").value,FocusOnComments==!0&&(window.location.hash="#comments"),FocusOnAddComments==!0&&document.getElementById("hidAddCommentId").value!=""&&ViewmoreFocus(),divComments.style.display="block")}function EditCommentrr(n,t,i,r){var u=$(n).parent().siblings(0).html();editabletr=$(n).closest(".corp-response");selEdit=r;u=u.replace("...","").replace("READ MORE","").replace("Read More","");u=u.replace(/<(?!br\s*\/?)[^>]+>/g,"");u=u.replace("(<(/)*p>)","<br/>");u=u.replace("(\n)","<br/>");u=u.replace("((s)*<(/)*br(/)*>(s)*){2,}","<br/><br/>");u=u.replace("(<(/)*br(/)*>)","\n");u=u.replace(/<br>/g,"\n");u=u.replace(/<BR>/g,"\n");u=u.replace(/&nbsp;/g," ");u=u.replace(/&amp;/g,"&");u=u.replace(/&lt;/g,"<");u=u.replace(/&gt;/g,">");u=u.replace(/<a target.*?>/g,"");u=u.replace(/<\/a>/g,"");u=u.replace(/<(|\n)*?>/g,"");u=u.trim();hidCommentId.value=t;$(n).closest(".divcomment").siblings(0).find(".comment-box").val(u);$(n).closest(".divcomment").siblings(0).find(".pull-right").children(".addcomment").hide();$(n).closest(".divcomment").siblings(0).find(".pull-right").children(".updatecomment").show();$("html,body").animate({scrollTop:$(n).closest(".divcomment").siblings(0).find(".comment-box").offset().top-180},"slow");$(n).closest(".divcomment").siblings(0).find(".comment-box").focus()}function EditCorpCommentrr(n,t,i,r){var u=$(n).parent().siblings(0).html();editabletr=$(n).closest(".corp-response");selEdit=r;u=u.replace("...","").replace("READ MORE","").replace("Read More","");u=u.replace(/<(?!br\s*\/?)[^>]+>/g,"");u=u.replace("(<(/)*p>)","<br/>");u=u.replace("(\n)","<br/>");u=u.replace("((s)*<(/)*br(/)*>(s)*){2,}","<br/><br/>");u=u.replace("(<(/)*br(/)*>)","\n");u=u.replace(/<br>/g,"\n");u=u.replace(/<BR>/g,"\n");u=u.replace(/&nbsp;/g," ");u=u.replace(/&amp;/g,"&");u=u.replace(/&lt;/g,"<");u=u.replace(/&gt;/g,">");u=u.replace(/<a target.*?>/g,"");u=u.replace(/<\/a>/g,"");u=u.replace(/<(|\n)*?>/g,"");$(n).closest(".divcorpcomment").siblings(1).find("textarea").val(u);hidCorpCommentId.value=t;$(n).closest(".divcorpcomment").siblings(1).find(".pull-right").children(".addcorpcomment").hide();$(n).closest(".divcorpcomment").siblings(1).find(".pull-right").children(".updatecorpcomment").show();$("html,body").animate({scrollTop:$(n).closest(".divcorpcomment").siblings(1).find("textarea").offset().top-180},"slow");$(n).closest(".divcorpcomment").siblings(1).find("textarea").focus()}function AjaxPostcorprr(n,t,i,r,u,f,e){var o=new CreateRequest;o.ajaxObject.onreadystatechange=function(){o.ajaxObject.readyState==4&&(n(o.ajaxObject.responseText,i,r,u,f,e),t.includes("AddCorpComment=1")&&($("#"+i).parent().siblings(1).find(".pull-right").find(".pull-right > span > span").html(parseInt($("#"+i).parent().siblings(1).find(".pull-right").find(".pull-right > span > span").html())+1),$("#"+u).text("Comment added successfully.").css("color","#3c763d").show()))};o.ajaxObject.open("POST","/review/reviewajax.php",!0);o.ajaxObject.setRequestHeader("Content-type","application/x-www-form-urlencoded");o.ajaxObject.setRequestHeader("Content-length",t.length);o.ajaxObject.setRequestHeader("Connection","close");o.ajaxObject.send(t)}function corp_AddCommentrr(n,t,i,r,u,f,e,o){ValidateCorpCommentrr($("#"+i).val(),r)==!0&&(n!=0?(DisableButtonrr(!0,u,f),AjaxPostcorprr(ShowCorpCommentsrr,"AddCorpComment=1&PostId="+e+"&Rid="+o+"&Comment="+UrlEncode($("#"+i).val())+"&loadhead=1&rar=1",t,i,r,u,f)):(ajaxLogin("/review/ReviewAjax.php?AddCorpComment=1&PostId="+e+"&Rid="+o+"&Comment="+UrlEncode($("#"+i).val())+"&redirectToRAR=1&cat_name="+CatName+"&loadhead=1&what=1"),createCookie("fbLoginRedirection1","/review/ReviewAjax.php?AddCorpComment=1&PostId="+e+"&Rid="+o+"&Comment="+UrlEncode($("#"+i).val())+"&redirectToRAR=1&cat_name="+CatName+"&loadhead=1&what=1",30)))}function corp_AddComment_other(n,t,i,r,u,f,e,o){ValidateCorpCommentrr($("#"+i).val(),r)==!0&&(n!=0?(DisableButtonrr(!0,u,f),AjaxPostcorprr(ShowCorpCommentsrr,"AddCorpComment=1&PostId="+e+"&Rid="+o+"&Comment="+UrlEncode($("#"+i).val())+"&loadhead=1&rar=1",t,i,r,u,f)):ajaxLogin("/review/ReviewAjax.php?AddCorpComment=1&PostId="+e+"&Rid="+o+"&Comment="+UrlEncode($("#"+i).val())+"&redirectToRAR_other=1&cat_name="+CatName+"&loadhead=1&what=1"))}function corp_UpdateCommentrr(n,t,i,r,u,f,e){if(ValidateCorpCommentrr($("#"+t).val(),i)==!0){DisableButtonrr(!0,r,u);var o=hidCorpCommentId.value;AjaxPostcorprr(ShowCorpCommentsrr,"UpdateCorpComment=1&CommentId="+o+"&PostId="+f+"&Rid="+e+"&Comment="+UrlEncode($("#"+t).val())+"&loadhead=1&rar=1",n,t,i,r,u)}}function AddOnlyCommentrr(n,t,i,r,u,f,e,o,s){var h,l,c,a;ChkLoginrr(n,"","");n!="login"&&(n.substring(0,11).toLowerCase()=="bad word(s)"?$("#"+i).html("<span class='icon-tool-tip'><\/span> &nbsp; "+n+".").css("color","red").show():(h=FindButtonClickedrr(f),h=="edit"?(l=hidCommentId.value,c=$(editabletr).offset().top,$("#"+i).text("Comment updated successfully.").css("color","#3c763d").show(),ShowCommentsRatingrr(n,t,o,e,s,!1),a=$("#"+e).val(),$("html,body").animate({scrollTop:parseInt(c)-180},"slow"),hidCommentId.value=""):(Add_Comment=!0,$("#"+i).text("Comment posted successfully.").css("color","#3c763d").show(),$("#"+e).val(parseInt($("#"+e).val())+1),$("#"+r).closest(".comment.hide").siblings(".count-section").find(".comment-clk").find("span:nth-child(2)").text("Comments "+$("#"+e).val()+""),ShowCommentsRatingrr(n,t,o,e,s,!1)),$("#"+r).val(""),$("#"+u).show(),$("#"+f).hide()));DisableButtonrr(!1,u,f)}function RateNU_Commentrr(n,t,i,r,u,f,e,o,s){if(ChkLoginrr(n,"",""),n!="login")if(n.substring(0,11).toLowerCase()=="bad word(s)")$("#"+i).html("<span class='icon-tool-tip'><\/span> &nbsp; "+n+".").css("color","red").show();else if(n=="reload comment")window.location.href="/comment/readcomment.php?rid="+Rid;else if(n=="reload")window.location.reload();else{Add_Comment=!0;var h=n.split("||");$("#"+o).val(parseInt($("#"+o).val())+1);$("#"+t).html(h[0]);$("#"+t).is(":visible")||$("#"+t).slideToggle();$("#"+s).html("<a>&nbsp;"+h[1]+"<\/a>"+h[2]);$("#"+i).html("");$("#"+r).val("");hidCommentId.value="";$("#"+e).html("<img src='/Images/like-icon.svg' class='like-image-new'/><span class='nu-color'>Not Useful<\/span>");$("#"+r).closest(".comment.hide").siblings(".count-section").find(".comment-clk").find("span:nth-child(2)").text("Comments "+$("#"+o).val()+"");Rate_Comment=!1}DisableButtonrr(!1,u,f)}function ValidateCorpCommentrr(n,t){let i=$("#"+t).closest(".response").find("[id$=customer]");if(i.css("display")=="block")return $("#"+t).html('<span class="icon-tool-tip"><\/span> &nbsp;Please click "YES" or "NO" to justify your comments!'),$("#"+t).css("display","block"),$(".corp-box").siblings(".comment").slideDown(),!1;if(n.trim()=="")return $("#"+t).html("<span class='icon-tool-tip'><\/span> &nbsp; This information is required.").css("color","red").show(),!1;if(canPostComntonResponse1=="False")return $("#"+t).html("<span class='icon-tool-tip'><\/span> &nbsp; Access Not Granted.").css("color","red").show(),!1;if(CountWordsrr(n)<3){if(n.length<2e3)return $("#"+t).html("<span class='icon-tool-tip'><\/span> &nbsp; Minimum 3 words and Maximum 2000 characters.").css("color","red").show(),!1;if(n.length>=2e3)return $("#"+t).html("").hide(),!0}else return!0}function ValidateCommentrr(n,t,i){if(n.trim()=="")return $("#"+t).html("<span class='icon-tool-tip'><\/span> &nbsp; This information is required.").css("color","red").show(),!1;if(canPostComntOnReview=="False")return $("#"+t).html("<span class='icon-tool-tip'><\/span> &nbsp; Access Not Granted.").css("color","red").show(),!1;if(CountWordsrr(n)<3){if(n.length<=2e3)return $("#"+t).html("<span class='icon-tool-tip'><\/span> &nbsp; Minimum 3 words and Maximum 2000 characters.").css("color","red").show(),!1;if(n.length>2e3)return $("#"+t).html("").hide(),!0}else return checkCommentCount(i)?!0:(window.parent.$("#commentpopimg").attr("src","../Images/comment_popup_desktop.png"),window.parent.$("#commentpopimg").attr("width","400px"),window.parent.$(".to-top").css("display","none"),window.parent.$(".imgPastePrevent1,#commentpopimg").css("display","block"),window.parent.$(".black-layer").css("visibility","visible"),window.parent.$(".black-layer").css("display","block"),window.parent.$("#mainBody").css("overflow-y","hidden"),!1)}function checkCommentCount(n){var t=!1,i;return i=CatId,$.ajax({url:"/review/CorporateResponse.ashx",contentType:"application/json; charset=utf-8",dataType:"text",async:!1,data:{type:"commentcount",corp:!1,cat_id:i,login_id:loginid,reviewid:n,corp_name:corporateName,corp_product:iscorp},responseType:"text/html",success:function(n){n=="success"&&(t=!0)}}),t}function checkRatingCount(n){var t=!1,i;return i=CatId,$.ajax({url:"/review/CorporateResponse.ashx",contentType:"application/json; charset=utf-8",dataType:"text",async:!1,data:{type:"ratecount",corp:!1,cat_id:i,login_id:loginid,reviewid:n,corp_name:corporateName,corp_product:iscorp},responseType:"text/html",success:function(n){n=="success"&&(t=!0)}}),t}function FindButtonClickedrr(n){return $("#"+n).is(":visible")==!1?"add":"edit"}function CountWordsrr(n){var i,f,u,t;n=n.replace(/&nbsp;/gi,"");var e=n.trim(),s=e.replace(/^[^A-Za-z0-9]+/gi,""),h=rExp="",o=s.replace(h," "),i=o.split(" "),r=0;if(i.length-1<=5e3)if(i=o.split("\n"),u=0,i.length>=1)for(u=0;u<i.length;u++)for(f=i[u].split(" "),t=0;t<f.length;t++)f[t].trim()!=""&&(r=r+1);else for(t=0;t<i.length;t++)i[t].trim()!=""&&(r=r+1);else for(t=0;t<i.length;t++)i[t].trim()!=""&&(r=r+1);return e.length<2&&(r=0),r}function Ratingrr(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w){if(n=="btnAjxVU")if(checkRatingCount(t))Ajaxresrr(VUrr,"rid="+t+"&rating=4&catname=&loadhead="+i+"&arateid="+u,u,t,e,o);else return window.parent.$("#ratepopimg").attr("src","../Images/rate_popup_web.png"),window.parent.$("#ratepopimg").attr("width","400px"),window.parent.$(".to-top").css("display","none"),window.parent.$(".imgPastePrevent2,#ratepopimg").css("display","block"),window.parent.$(".black-layer").css("visibility","visible"),window.parent.$(".black-layer").css("display","block"),window.parent.$("#mainBody").css("overflow-y","hidden"),!1;else if(n=="btnAjxU")if(checkRatingCount(t))Ajaxresrr(Urr,"rid="+t+"&rating=2&catname=&loadhead="+i+"&arateid="+u,u,t,e,o);else return window.parent.$("#ratepopimg").attr("src","../Images/rate_popup_web.png"),window.parent.$("#ratepopimg").attr("width","400px"),window.parent.$(".to-top").css("display","none"),window.parent.$(".imgPastePrevent2,#ratepopimg").css("display","block"),window.parent.$(".black-layer").css("visibility","visible"),window.parent.$(".black-layer").css("display","block"),window.parent.$("#mainBody").css("overflow-y","hidden"),!1;else if(n=="btnAjxNU")if(checkRatingCount(t))AjaxresAllrr(NUrr,"rid="+t+"&rating=-4&catname=&loadhead="+i+"&arateid="+u,u,t,s,h,c,l,a,v,y,p,w,e,o);else return window.parent.$("#ratepopimg").attr("src","../Images/rate_popup_web.png"),window.parent.$("#ratepopimg").attr("width","400px"),window.parent.$(".to-top").css("display","none"),window.parent.$(".imgPastePrevent2,#ratepopimg").css("display","block"),window.parent.$(".black-layer").css("visibility","visible"),window.parent.$(".black-layer").css("display","block"),window.parent.$("#mainBody").css("overflow-y","hidden"),!1}function Ajaxresrr(n,t,i,r,u,f,e,o){$("#"+i).parent().siblings("img").show();$("#"+i).parent().hide();$("#"+i).parent().siblings(".like-count").hide();var s=new CreateRequest;s.ajaxObject.onreadystatechange=function(){s.ajaxObject.readyState==4&&n(s.ajaxObject.responseText,i,r,u,f,e,o)};s.ajaxObject.open("GET","/review/reviewratingrestaurant.aspx?"+t,!0);s.ajaxObject.send(null)}function VUrr(n,t,i,r,u){if(ChkLoginrr(n,""),n!=""&&n!="login"){$("#"+r).html("").hide();var f=n.split("|");n.toLowerCase()=="corporate cannot rate reviews."?($("#"+u).show(),$("#"+u).html(f[0]),$("#"+t).parent().hide()):($("#"+u).hide(),$("#"+t).html(f[0]),$("#"+t).parent().show());$("#"+t).parent().siblings(0).html(f[1]);$("#"+t).parent().siblings(0).attr("onclick","ratingMore_Ajax123('"+i+"');")}Rate_Comment=!1;$("#"+t).parent().siblings("img").hide();n.toString().toLowerCase().indexOf("cannot rate")==-1&&($("#"+t).parent().siblings(".like-count").show(),$("#"+t).parent().show())}function Urr(n,t,i,r,u){if(ChkLoginrr(n,""),$("#"+r).html("").hide(),n!=""&&n!="login"){var f=n.split("|");n.toLowerCase()=="corporate cannot rate reviews."?($("#"+u).show(),$("#"+u).html(f[0]),$("#"+t).parent().hide()):($("#"+u).hide(),$("#"+t).html(f[0]),$("#"+t).parent().show());$("#"+t).parent().siblings(0).html(f[1]);$("#"+t).parent().siblings(0).attr("onclick","ratingMore_Ajax123('"+i+"');")}Rate_Comment=!1;$("#"+t).parent().siblings("img").hide();n.toString().toLowerCase().indexOf("cannot rate")==-1&&($("#"+t).parent().siblings(".like-count").show(),$("#"+t).parent().show())}function NUrr(n,t,i,r,u,f,e,o,s,h,c,l,a,v){if(ChkLoginrr(n,""),n!="login")if(n=="write comment")$("#"+a).html("<span class='icon-tool-tip'><\/span> &nbsp; Please fill in a comment to justify your rating for this review.").css("color","red").show(),Rate_Comment=!0,FocusOnComments=!0,AjaxByHashrr(ShowCommentsRatingrr,"ShowComments="+i+"&Random="+r+"&skip="+u+"mergeparent="+f+"&parent"+e,o,s,h,c,!0);else if(n!=""&&n!="login"){var y=n.split("|");n.toLowerCase()=="corporate cannot rate reviews."?($("#"+v).show(),$("#"+v).html(y[0]),$("#"+t).parent().hide(),$("#"+t).parent().siblings(".like-count").hide()):($("#"+v).hide(),$("#"+t).html(y[0]),$("#"+t).parent().show());$("#"+t).parent().siblings(0).html(y[1]);$("#"+t).parent().siblings(0).attr("onclick","ratingMore_Ajax123('"+i+"');")}$("#"+t).parent().siblings("img").hide();n.toString().toLowerCase().indexOf("cannot rate")==-1&&($("#"+t).parent().siblings(".like-count").show(),$("#"+t).parent().show())}function DisableButtonrr(n,t,i){n==!0?($("#"+t).attr("disabled","disabled"),$("#"+i).attr("disabled","disabled")):($("#"+t).removeAttr("disabled"),$("#"+i).removeAttr("disabled"))}function UrlEncode(n){return n=n.replace(/\+/g,"%2b"),encodeURIComponent(n)}function htmlEncode(n){return $("<div/>").text(n).html()}function ratingMore_Ajax123(n){$("#dvpopupbox .dvpopupbox").load("/review/rating-list_ajax.aspx?rid="+n);openModal("#dvpopupbox")}function showMore(n,t){t.preventDefault();$(n).hide();$(n).siblings(".moreellipses").hide();$(n).siblings(".morecontent").show();$(n).closest(".more").siblings(".share").removeClass("hide")}function setheight(){try{var n=0,t=$("#variants .row.list > .col-3").map(function(){return $(this).height()}).get(),n=Math.max.apply(null,t);n=n;n>0&&$("#variants .row.list > .col-3 .gridl").css({height:n-15+"px"})}catch(i){}}function addcomments(n,t,i,r,u,f,e,o,s,h,c,l){ValidateCommentrr($("#"+o).val(),e,n)==!0&&(DisableButtonrr(!0,s,h),Rate_Comment==!1?AjaxPostrr(AddOnlyCommentrr,"Rid="+n+"&AddComment="+UrlEncode($("#"+o).val())+"&loadhead=1&rar=1",t,e,o,s,h,r,i,u,$("#"+t).next().val()):AjaxPostrr(RateNU_Commentrr,"Rid="+n+"&RateComment="+UrlEncode($("#"+o).val())+"&catname="+CatName+"&loadhead=1&rar=1&arateid="+c,t,e,o,s,h,c,r,l))}function showcomments(n,t,i,r,u,f,e,o,s,h,c){$("#"+e).html()==""?(AjaxByHashrr(ShowCommentsRatingrr,"ShowComments="+t+"&Random="+i+"&skip="+r+"&mergeparent="+u+"&rar=1&parent="+f,e,o,s,h,!1,c),$(n).closest(".count-section").siblings(".response").is(":visible")&&$(n).closest(".count-section").siblings(".response").slideUp()):($(n).closest(".count-section").siblings(".response").is(":visible")&&!$(n).closest(".count-section").siblings(".comment").is(":visible")&&$(n).closest(".count-section").siblings(".response").slideUp(),$("#"+e).parent().slideToggle())}function updatecomments(n,t,i,r,u,f,e,o,s,h){if(ValidateCommentrr($("#"+o).val(),e,n)==!0){DisableButtonrr(!0,s,h);var c=hidCommentId.value;AjaxPostrr(AddOnlyCommentrr,"Rid="+n+"&EditCommentId="+c+"&Comment="+UrlEncode($("#"+o).val())+"&rar=1&count="+$("#"+u).val(),t,e,o,s,h,r,i,u,$("#"+t).next().val())}}function showSection(n){$("#dvAll,#dvVU,#dvU,#dvNU").hide();$("#liAll,#liVU,#liU,#liNU").removeClass("active");switch(n){case"all":$("#dvAll").show();$("#liAll").addClass("active");break;case"vu":$("#dvVU").show();$("#liVU").addClass("active");break;case"u":$("#dvU").show();$("#liU").addClass("active");break;case"nu":$("#dvNU").show();$("#liNU").addClass("active");break;default:$("#dvAll").show();$("#liAll").addClass("active")}}function setCookie(n,t){var i,r,u;return checklogin()?(i=new Date,i.setTime(i.getTime()+31536e6),r="expires="+i.toUTCString(),u="path=/",document.cookie=n+"="+t+"; "+r+"; "+u,!0):!1}function setCookiesrch(n,t){var i=new Date,r,u;i.setTime(i.getTime()+31536e6);r="expires="+i.toUTCString();u="path=/";document.cookie=n+"="+t+"; "+r+"; "+u}function setCookieCorp(n,t){var i,r,u;return checkloginCorp()?(i=new Date,i.setTime(i.getTime()+31536e6),r="expires="+i.toUTCString(),u="path=/",document.cookie=n+"="+t+"; "+r+"; "+u,!0):!1}function hideBlackLayer(){$(".black-layer").hide()}function setFocusToHeaderSrch(){document.getElementById("txtproduct").focus()}function CheckIfCookie(n){setCookieCorp("brandReply","1")&&(window.location.href=n)}function ShowGraph1(n,t,i,r){if(n!=""){ajaxTooltip();var u=n.split("|");document.getElementById(t).innerHTML=u[0];document.getElementById(i).innerHTML=u[1];$("#"+t.replace("arate","dvResponse")).html(u[2]);$("#"+i).attr("onclick","ratingMore_Ajax123('"+r+"');")}}function getCorpResponse(n){var t=$(n).attr("reviewid"),r=$(n).attr("userid"),u=$(n).attr("id"),i=$(n).attr("divcorpid");$.ajax({url:"/review/CorporateResponse.ashx",contentType:"application/json; charset=utf-8",dataType:"text",data:{type:"corpresp",review_id:t,Random:Math.random(),corp:!1,Session:strSession,corpname:corporateName,catid:cid,catname:prod,sessionname:strUsrName},responseType:"text/html",success:function(data){$("#"+i).html(data);let onFullComm=$("#lnkFullComm").attr("onclick");onFullComm&&eval(onFullComm);$(".row .gallery-thumbnails").lightGallery({selector:".g-imgbox"})}});$(n).find("span:eq(1)").text()=="Brand Response"&&$(n).closest(".count-section").siblings(".response").slideToggle();Rebindcorp()}function bindreviewcontent(n,t,i,r,u,f,e,o,s,h,c){$.ajax({url:"/review/CorporateResponse.ashx",type:"POST",contentType:"application/x-www-form-urlencoded",dataType:"text",async:!1,data:{type:"review",reviewid:n,corp:!1,isvideo:i,fbmessage:r,catid:u,prodimg:f,twittermsg:e,twitterlnk:o,catname:s,rating_str:h,usession:parseInt(usessions)},responseType:"text/html",success:function(n){$(t).closest(".reviewdata").html(n);ajaxTooltip1(c)},error:function(){window.location.href="/error.php"}})}function bindShareAll(n,t,i,r,u,f,e,o,s,h,c,l){$(t).children(".sharedivdata").html().trim()==""?$.ajax({url:"/review/CorporateResponse.ashx",type:"POST",contentType:"application/x-www-form-urlencoded",dataType:"text",async:!1,data:{type:"share_rar",reviewid:n,corp:!1,isvideo:i,fbmessage:r,catid:u,prodimg:f,twittermsg:e,twitterlnk:o,catname:s,rating_str:h,usession:parseInt(usessions),brandname:l},responseType:"text/html",success:function(n){$(t).children(".sharedivdata").html(n);$(t).children(".sharedivdata").show()},error:function(){window.location.href="/error.php"}}):$(t).children(".sharedivdata").show()}function bindblogcontent(n,t,i,r,u){$.ajax({url:"/review/CorporateResponse.ashx",type:"POST",contentType:"application/x-www-form-urlencoded",dataType:"text",data:{type:"blog",blogid:n,corp:!1,canonicalURL:i,tweetTitle:r,username:u},responseType:"text/html",success:function(n){$(t).closest(".reviewdata").html(n)},error:function(){window.location.href="/error.php"}})}function createurlforpaging(){var t,i=$("#ctl00_ctl00_ContentPlaceHolderFooter_ContentPlaceHolderBody_ddlSorting"),n=sortorder;return n=n==""?"d":n.charAt(0),i.value==0&&(t=pgurl+"-sort-MsDate-order-"+n),i.value==1&&(t=pgurl+"-sort-rating-order-"+n),i.value==2&&(t=pgurl+"-sort-AvgRating-order-"+n),i.value==3&&(t=pgurl+"-sort-trustedcircle-order-"+n),i.value==4&&(t=pgurl+"-sort-read-order-"+n),t}function dissCounter(n){var t=n.value.replace(/\s+/g," ").length,i=n.parentNode;(t<5||t>500)&&(i.parentElement.children[3].style.color="#FD3A02",i.parentElement.children[3].innerHTML=t<5?500-t:"-"+(t-500),i.parentElement.children[2].setAttribute("disabled",""));(t>=5&&t<500||t==0)&&(i.parentElement.children[3].style.color="#76A44E",i.parentElement.children[3].innerHTML=500-t,i.parentElement.children[2].removeAttribute("disabled"))}function askQuestion(n){document.getElementById("askquestion").disabled=!0;var t=$("#txtQueArea").val(),i=CatId;if(t.replace(/\s+/g," ").replace(/(<([^>]+)>)/ig,"")=="")return $("#errCommentrr").html("<span class='icon-tool-tip'><\/span> &nbsp; This information is required.").show(),!1;$.get("/product/product_discussion_ajax.aspx?cid="+i+"&valid=1&ques="+UrlEncode1(t).replace(/\s+/g," ").replace("#","hhash")+"&ask=1&timestamp="+(new Date).getTime(),function(i){var u,r;if(i.indexOf("Bad word(s)")>-1)return document.getElementById("errCommentrr").style.display="block",document.getElementById("errCommentrr").innerHTML="<span>"+i+"<\/span>",document.getElementById("askquestion").disabled=!1,!1;i.indexOf("success")>-1&&($(n).parent().siblings("#emptytext").hide(),document.getElementById("errCommentrr").style.display="none",document.getElementById("errCommentrr").innerHTML="",u=i.substring(i.indexOf("|")+1),$("#txtQueArea").val(""),document.getElementById("askquestion").disabled=!1,r="",r=$(n).parent().parent().children("ul").length>0?"":r+"",r=r+'<div class="answer"><div class="row table"><div class="qnauserpic" > <a href="/'+strUsrName+'"><div class="profile-img"><img src="'+strUsrIcon+'" /><\/div><\/a><\/div>',r=r+'<div class="ans-content"><div class="row qatitle" onclick="javascript:userAnswerNew(event,this);"><p>'+t+"<\/p>",r=r+'<p class="notify">few seconds ago<\/p>',r=r+'<p class="notify">By: <a id="hypUser" href="/'+strUsrName+'/timeline">'+strUsrName+"<\/a><\/p>",r=r+'<p class="notify numbers"><span class="icon-comment"><\/span>Answers: <span id="spn'+u+'">0<\/span><\/p><\/div>',r=r+'<div class="answer-field" style="overflow: hidden; display: none;"><p class="warning hide" id="errCommentans"><\/p><span><textarea placeholder="Write your answer..." onkeyup="dissCounter(this);"><\/textarea><\/span><button class="btn btn-secondary" onclick="javascript:answerQuestion(this,'+u+');return false;">Submit<\/button><span class="pull-right text-right">500<\/span><\/div><\/div>',r=r+'<div class="text-right"><a class="btn btn-link btn-light"  onclick="javascript:answerQuesNew(event,this);">Answer<\/a><\/div><\/div><\/div>',$("#quesdata").after(r),$(n).siblings(".pull-right").html("500"),$(".answer .btn-link").click(function(n){$(this).parent().parent().siblings(".answer-field").slideToggle(500);n.stopPropagation()}),$(".h2val1").html("500"))})}function answerQuestion(n,t){document.getElementById("answer").disabled=!0;var i=$(n).parent().children(2).children("textarea").val(),r=CatId,u=n.parentNode;if(i.replace(/\s+/g," ").replace(/(<([^>]+)>)/ig,"")=="")return $(n).parent().children("p").html("<span class='icon-tool-tip'><\/span> &nbsp; This information is required.").show(),document.getElementById("answer").disabled=!1,!1;$(n).parent().children("p").html("");$.get("/product/product_discussion_ajax.aspx?cid="+r+"&valid=1&anstxt="+UrlEncode1(i).replace(/\s+/g," ").replace("#","hhash")+"&quesId="+t+"&ans=1&timestamp="+(new Date).getTime(),function(i){var r,u,f;if(i!=""){if(i.indexOf("Bad word(s)")>-1)return document.getElementById("diverror_discussion").style.display="block",document.getElementById("diverror_discussion").innerHTML="<span>"+i+"<\/span>",document.getElementById("answer").disabled=!1,!1;document.getElementById("diverror_discussion").style.display="none";document.getElementById("diverror_discussion").innerHTML="";$(n).parent().children(2).children("textarea").val("");document.getElementById("answer").disabled=!1;r="";u=i.split("|");r=r+'<div class="user-answer">';r=r+"<div>";r=r+'<p class="br-none lh20">'+u[0]+"<\/p>";r=r+'<p class="notify">few seconds ago<\/p>';r=r+'<p class="notify">';r=r+'By: <a id="hypUsrAns" href="/'+strUsrName+'/timeline">'+strUsrName+"<\/a> ";r=r+"<\/p>";r=r+"<\/div>";r=r+"<\/div>";$(n).parent().siblings(".user-answers").html()!=null?(r=r+$(n).parent().siblings(".user-answers").html(),$(n).parent().siblings(".user-answers").html(r),$(n).siblings(".pull-right").html("500")):($(n).parent().parent().append('<div class="row user-answers display" id="dvanswer">'+r+"<\/div>"),$(n).siblings(".pull-right").html("500"));f=parseInt($("#spn"+t).html());$("#spn"+t).html(f+1);$(".h2val").html("500");$(n).parent().siblings(".user-answers").slideDown({easing:"easeInQuad"})}})}function showMorePagesrr(n,t,r,u){var o=$("#spnPaging"),f="",e="",f="<li>  <a class='btn btn-link' href= '"+pgurl.replace("-page-","")+"'>1<\/a><\/li><li><span style='cursor:pointer' onClick=\"return showLessPagesrr("+n+", "+t+", '"+r+"', "+u+');"><b>...<\/b><\/span><\/li> ';for(intMorePage+9<n?(loopPages=9,tabThisPage=10,e="<li> <span style='cursor:pointer' onClick=\"return showMorePagesrr("+n+", "+t+", '"+r+"', "+u+');"><b>...<\/b><\/span><\/li>',e=e+"<li>  <a class='btn btn-link' href= '"+pgurl+""+n+"'>"+n+"<\/a><\/li>"):(loopPages=n-intMorePage,tabThisPage=loopPages),i=intMorePage;i<=loopPages+intMorePage;i++)f=i==t?f+" <li> <a class='btn btn-link active'>"+i+"<\/a> <\/li>":f+" <li> <a class='btn btn-link' href='"+pgurl+""+i+"'>"+i+"<\/a><\/li>";intMorePage=intMorePage+tabThisPage;intLessPage=intLessPage+10;o.html(f+e)}function showLessPagesrr(n,t,r,u){var o=$("#spnPaging"),f="",e="";for(intLessPage>11&&(e="<li>  <a class='btn btn-link' href= '"+pgurl.replace("-page-","")+"'>1<\/a><\/li><li><span style='cursor:pointer' onClick=\"return showLessPagesrr("+n+", "+t+", '"+r+"', "+u+');"><b>...<\/b><\/span><\/li>'),i=intLessPage-1;i>=intLessPage-10;i--)f=i==t?"<li> <a class='btn btn-link active'>"+i+"<\/a><\/li> "+f:"<li> <a class='btn btn-link' href='"+pgurl+""+i+"'>"+i+"<\/a><\/li> "+f;strMore="<li><span style='cursor:pointer' onClick=\"return showMorePagesrr("+n+", "+t+", '"+r+"', "+u+');"><b>...<\/b><\/span><\/li>';o.html(e+f+strMore+"<li><a class='btn btn-link' href='"+pgurl+""+n+"'><b>"+n+"<\/b><\/a><\/li>");intLessPage=intLessPage-10;intMorePage>11&&(intMorePage=intMorePage-tabThisPage);tabThisPage=10}function UrlEncode1(n){return n=encodeURIComponent?encodeURIComponent(n):encodeURI?encodeURI(n):encodeURI(n),n.replace(/\+/g,"%2B")}function chkCommentToClose(n){var t=new CreateRequest;t.ajaxObject.onreadystatechange=function(){t.ajaxObject.readyState==4&&(emailflag=t.ajaxObject.responseText,emailflag=="success"?document.location.href=document.getElementById(custnolink).value:(document.getElementById("customer").style.display="none",document.getElementById("corp_errComment_"+n).innerHTML="<span>Please fill in a comment for this response<\/span>",document.getElementById("corp_errComment_"+n).style.display="block",$(".corp-box").siblings(".comment").slideDown(),$("#lnkFullComm").hide()))};t.ajaxObject.open("GET","/withoutlogin.aspx?postid="+$("#hdnResponseID").val()+"&resp=no",!0);t.ajaxObject.send(null)}function dissCounter(n){var t=n.value.replace(/\s+/g," ").length,i=n.parentNode;(t<5||t>500)&&(i.parentElement.children[3].style.color="#FD3A02",i.parentElement.children[3].innerHTML=t<5?500-t:"-"+(t-500),i.parentElement.children[2].setAttribute("disabled",""));(t>=5&&t<500||t==0)&&(i.parentElement.children[3].style.color="#76A44E",i.parentElement.children[3].innerHTML=500-t,i.parentElement.children[2].removeAttribute("disabled"))}function askQuestion(n){document.getElementById("askquestion").disabled=!0;var t=$("#txtQueArea").val(),i=CatId;if(t.replace(/\s+/g," ").replace(/(<([^>]+)>)/ig,"")=="")return $("#errCommentrr").html("<span class='icon-tool-tip'><\/span> &nbsp; This information is required.").show(),document.getElementById("askquestion").disabled=!1,!1;$.get("/product/product_discussion_ajax.aspx?cid="+i+"&valid=1&ques="+UrlEncode1(t).replace(/\s+/g," ").replace("#","hhash")+"&ask=1&timestamp="+(new Date).getTime(),function(i){var u,r;if(i.indexOf("Bad word(s)")>-1)return document.getElementById("errCommentrr").style.display="block",document.getElementById("errCommentrr").innerHTML="<span>"+i+"<\/span>",document.getElementById("askquestion").disabled=!1,!1;i.indexOf("success")>-1&&($(n).parent().siblings("#emptytext").hide(),document.getElementById("errCommentrr").style.display="none",document.getElementById("errCommentrr").innerHTML="",u=i.substring(i.indexOf("|")+1),$("#txtQueArea").val(""),document.getElementById("askquestion").disabled=!1,r="",r=$(n).parent().parent().children("ul").length>0?"":r+"",r=r+'<div class="answer"><div class="row table"><div class="qnauserpic" > <a href="/'+strUsrName+'"><div class="profile-img"><img src="'+strUsrIcon+'" /><\/div><\/a><\/div>',r=r+'<div class="ans-content"><div class="row qatitle" onclick="javascript:userAnswerNew(event,this);"><p>'+t+"<\/p>",r=r+'<p class="notify">few seconds ago<\/p>',r=r+'<p class="notify">By: <a id="hypUser" href="/'+strUsrName+'/timeline">'+strUsrName+"<\/a><\/p>",r=r+'<p class="notify numbers"><span class="icon-comment"><\/span>Answers: <span id="spn'+u+'">0<\/span><\/p><\/div>',r=r+'<div class="answer-field" style="overflow: hidden; display: none;"><p class="warning hide" id="errCommentans"><\/p><span><textarea placeholder="Write your answer..." onkeyup="dissCounter(this);"><\/textarea><\/span><button class="btn btn-secondary" id="anser" onclick="javascript:answerQuestion(this,'+u+');return false;">Submit<\/button><span class="pull-right text-right">500<\/span><\/div><\/div>',r=r+'<div class="text-right"><a class="btn btn-link btn-light"  onclick="javascript:answerQuesNew(event,this);">Answer<\/a><\/div><\/div><\/div>',$("#quesdata").after(r),$(n).siblings(".pull-right").html("500"),$(".answer .btn-link").click(function(n){$(this).parent().parent().siblings(".answer-field").slideToggle(500);n.stopPropagation()}),$(".h2val1").html("500"))})}function answerQuestion(n,t){var i,r,u;if(document.getElementById("answer").disabled=!0,i=$(n).parent().children(2).children("textarea").val(),$(n).parent().children(2).children("textarea").val(""),r=CatId,u=n.parentNode,i.replace(/\s+/g," ").replace(/(<([^>]+)>)/ig,"")=="")return $(n).parent().children("p").html("<span class='icon-tool-tip'><\/span> &nbsp; This information is required.").show(),document.getElementById("answer").disabled=!1,!1;$(n).parent().children("p").html("");$.get("/product/product_discussion_ajax.aspx?cid="+r+"&valid=1&anstxt="+UrlEncode1(i).replace(/\s+/g," ").replace("#","hhash")+"&quesId="+t+"&ans=1&timestamp="+(new Date).getTime(),function(i){var r,u,f;if(i!=""){if(i.indexOf("Bad word(s)")>-1)return document.getElementById("diverror_discussion").style.display="block",document.getElementById("diverror_discussion").innerHTML="<span>"+i+"<\/span>",document.getElementById("answer").disabled=!1,!1;document.getElementById("diverror_discussion").style.display="none";document.getElementById("diverror_discussion").innerHTML="";$(n).parent().children(2).children("textarea").val("");document.getElementById("answer").disabled=!1;r="";u=i.split("|");r=r+'<div class="user-answer">';r=r+"<div>";r=r+'<p class="br-none lh20">'+u[0]+"<\/p>";r=r+'<p class="notify">few seconds ago<\/p>';r=r+'<p class="notify">';r=r+'By: <a id="hypUsrAns" href="/'+strUsrName+'/timeline">'+strUsrName+"<\/a> ";r=r+"<\/p>";r=r+"<\/div>";r=r+"<\/div>";$(n).parent().siblings(".user-answers").html()!=null?(r=r+$(n).parent().siblings(".user-answers").html(),$(n).parent().siblings(".user-answers").html(r),$(n).siblings(".pull-right").html("500")):($(n).parent().parent().append('<div class="row user-answers display" id="dvanswer">'+r+"<\/div>"),$(n).siblings(".pull-right").html("500"));f=parseInt($("#spn"+t).html());$("#spn"+t).html(f+1);$(".h2val").html("500");$(n).parent().siblings(".user-answers").slideDown({easing:"easeInQuad"})}})}function UrlEncode1(n){return n=encodeURIComponent?encodeURIComponent(n):encodeURI?encodeURI(n):escape(n),n.replace(/\+/g,"%2B")}function Rebindcorp(){$(".icon-reply").parent("a").unbind("click").click(function(n){$(this).find("span:eq(1)").text()=="Brand Response"&&(n.preventDefault(),$(this).closest(".count-section").siblings(".response").slideToggle())});$(".comment textarea").on("click focus",function(){$(this).css("height","100px");$(this).off();$(this).parent().siblings(".expand-comment").slideDown("fast")})}function openModal(n){$(".black-layer").css("visibility","visible");$(n).addClass("modal");$(n).find(".icon-close").remove();$(n).append('<span class="icon-close"><\/span>');$("body").css({"overflow-y":"hidden",width:"100%"});$(".black-layer, "+n+".modal .icon-close").click(function(){$(".black-layer").css("visibility","hidden");$("body").css("overflow-y","auto");$(n).hide().removeClass("modal")})}function editContent(n){var t=$(n).attr("class");t=="bold"&&document.execCommand("bold")}function CallOtherReviews(){isBot==0&&($.ajax({async:!0,type:"GET",url:mshost+"review/OtherReviews_RR.aspx?cat_id="+catid+"&parent="+parent1+"&parent2="+parent2+"&level1="+level1+"&isAdvice="+advice+"&mergeparent="+mergeparent+"&ismerge_new="+ismerge_new+"&revDate="+revDate+"&prodImage="+productimg+"&twitter="+twitter.replace("|"," ").replace("#","%23")+"&iscorpproduct="+iscorp+"&reviewId="+revId+"&isArch="+isArch,contentType:"application/json; charset=utf-8",dataType:"text",success:function(n){$("#divMoreReview").html(n);var t=$("#ctl00_ctl00_ContentPlaceHolderFooter_ContentPlaceHolderBody_customheader_btnwritereview").attr("onclick");$("#btnWritereview_scroll").attr("onclick",t);$("#imgWriteReview").attr("onclick",t);$(".your-rating-star").attr("onclick",t);$(".comment textarea").on("click focus",function(){$(this).css("height","100px");$(this).off();$(this).parent().siblings(".expand-comment").slideDown("fast")});setTimeout(function(){$(".like-image-new").each(function(){var n=$(this).parent().attr("reviewid"),i=$(this).parent().attr("userid"),t=$(this).parent().attr("id"),r=$(this).parent().attr("divlikeid");Ajaxresor(OverallRatingrr,"OverallGraph="+n+"&u="+i+"&Random="+Math.random()+"&arateid="+t,t,r,n)})},1e3)}}),$.ajax({async:!0,type:"GET",url:mshost+"product/product_discussion_readall.aspx?cid="+catid+"&timestamp="+(new Date).getTime(),contentType:"application/json; charset=utf-8",dataType:"text",success:function(n){$("#ask-question").html(n)}}))}function PostQuestion(n){return $(n).siblings(".field-outline").find("textarea").val()==""?($(n).siblings(".warning").html("This information is required.").show(),!1):(ajaxLogin("/product/product_discussion_ajax.aspx?cid="+catid+"&ques="+$(n).siblings("span").children("textarea")[0].value+"&ask=0&rr=1&rid="+reviewkey),!1)}function PostAnswer(n,t){return $(n).siblings(".field-outline").find("textarea").val()==""?($(n).siblings(".warning").html("This information is required.").show(),!1):(ajaxLogin("/product/product_discussion_ajax.aspx?cid="+catid+"&anstxt="+$(n).siblings("span").children("textarea")[0].value+"&quesId="+t+"&ans=0&rr=1&rid="+reviewkey),!1)}function postResponseRR(n){var r=document.getElementById(txtRespId).value,u=document.getElementById(hidimg1ID).value,f=document.getElementById(hidimg2ID).value,i,t;return validateResponse(n)?(i={CorpResponse:r,rid:Rid,img1ID:u,img2ID:f},t=new CreateRequest,t.ajaxObject.onreadystatechange=function(){var n;t.ajaxObject.readyState==4&&(t.ajaxObject.responseText.replaceAll('"',"")==="success"?(n=window.location.protocol+window.location.host+window.location.pathname+"#dvCorpResponse",window.location.href=n):(n=window.location.protocol+window.location.host+window.location.pathname+"#dvCorpResponse",window.location.href=n))},t.ajaxObject.open("POST",mshost+"apiMSDashboard/dashboard/postResponseRR",!0),t.ajaxObject.setRequestHeader("Content-Type","application/json"),t.ajaxObject.setRequestHeader("Connection","close"),t.ajaxObject.send(JSON.stringify(i)),!1):!1}function EditResponseRR(){var u=document.getElementById("txtResponse").value,f=document.getElementById(hidimg1ID).value,e=document.getElementById(hidimg2ID).value,t=PostId,i,r,n;if(t!=="")return validateEditResponse()?(i=document.getElementById("txtResponse").value,document.getElementById(hdnResponseid).value=i,r={CorpResponse:u,rid:Rid,responseId:t,img1ID:f,img2ID:e},n=new CreateRequest,n.ajaxObject.onreadystatechange=function(){var t;n.ajaxObject.readyState==4&&(n.ajaxObject.responseText.replaceAll('"',"")==="success"?(t=window.location.protocol+window.location.host+window.location.pathname+"#dvCorpResponse",window.location.href=t):(t=window.location.protocol+window.location.host+window.location.pathname+"#dvCorpResponse",window.location.href=t))},n.ajaxObject.open("POST",mshost+"apiMSDashboard/dashboard/updateResponseRR",!0),n.ajaxObject.setRequestHeader("Content-Type","application/json"),n.ajaxObject.setRequestHeader("Connection","close"),n.ajaxObject.send(JSON.stringify(r)),!1):!1}function validateResponse(n){var t=document.getElementById(txtRespId).value;return t.trim()==""?($("#err_Response").html("<span class='icon-tool-tip'><\/span> &nbsp; This information is required.").css("color","red").show(),!1):CountWords(t)<3?($("#err_Response").html("<span class='icon-tool-tip'><\/span> &nbsp; Minimum 3 words and Maximum 5000 characters.").css("color","red").show(),!1):t.length>5e3?($("#err_Response").html("<span class='icon-tool-tip'><\/span> &nbsp; Minimum 3 words and Maximum 5000 characters.").css("color","red").show(),!1):($(n).addClass("jsdisable"),!0)}function hidewarningmsg(){$("#warningmsg").hide()}function validateEditResponse(){var n=document.getElementById("txtResponse").value;return n.trim()==""?($("#err_EditResponse").html("<span class='icon-tool-tip'><\/span> &nbsp; This information is required.").css("color","red").show(),!1):CountWords(n)<3?($("#err_EditResponse").html("<span class='icon-tool-tip'><\/span> &nbsp; Minimum 3 words and Maximum 5000 characters.").css("color","red").show(),!1):n.length>5e3?($("#err_EditResponse").html("<span class='icon-tool-tip'><\/span> &nbsp; Minimum 3 words and Maximum 5000 characters.").css("color","red").show(),!1):!0}function textResCounter(n){var t=$("#"+txtRespId).val(),i=$("#txtResponse").val();n=="insert"?t.length>5e3?($("#err_Response").html("<span class='icon-tool-tip'><\/span> &nbsp; Minimum 3 words and Maximum 5000 characters").css("color","red").show(),$("#"+btnRespId).prop("disabled",!0)):($("#err_Response").html("").hide(),$("#"+btnRespId).prop("disabled",!1)):i.length>5e3?($("#err_EditResponse").html("<span class='icon-tool-tip'><\/span> &nbsp; Minimum 3 words and Maximum 5000 characters").css("color","red").show(),$("#"+btnEditRespId).prop("disabled",!0)):($("#err_EditResponse").html("").hide(),$("#"+btnEditRespId).prop("disabled",!1));t.length>100&&$(".comment-box1").css("height","152px")}function wrapNode(n,t){var i=document.createElement(t),r=n.parentNode;i.appendChild(n.cloneNode(!0));r.replaceChild(i,n)}function question(){document.getElementById("ask").style.visibility="hidden";document.getElementById("question-box").style.display="";$("#txtQueArea").focus()}function showMore(n,t){t.preventDefault();$(n).hide();$(n).siblings(".moreellipses").hide();$(n).siblings(".morecontent").show()}function setResponseToHidden(){if(validateEditResponse()){var n=document.getElementById("txtResponse").value;document.getElementById(hdnResponseid).value=n}else return!1}function ratingMore_Ajax12(n){$("#dvpopupbox .dvpopupbox").load("rating-list_ajax.aspx?rid="+n);openModal("#dvpopupbox")}function showSection(n){$("#dvAll,#dvVU,#dvU,#dvNU").hide();$("#liAll,#liVU,#liU,#liNU").removeClass("active");switch(n){case"all":$("#dvAll").show();$("#liAll").addClass("active");break;case"vu":$("#dvVU").show();$("#liVU").addClass("active");break;case"u":$("#dvU").show();$("#liU").addClass("active");break;case"nu":$("#dvNU").show();$("#liNU").addClass("active");break;default:$("#dvAll").show();$("#liAll").addClass("active")}}function viewComments(){parseInt(0)!=revHidskip.value&&(revHidskip.value==1&&(revHidskip.value=13),Ajax(ShowMoreComments,"ShowMoreComments="+Rid+"&Random="+Math.random()+"&skip="+revHidskip.value+"&mergeparent="+mergeparent+"&parent="+parent1))}function setFocusToHeaderSrch(){document.getElementById("txtproduct").focus()}function chkCommentToClose(){var n=new CreateRequest;n.ajaxObject.onreadystatechange=function(){n.ajaxObject.readyState==4&&(emailflag=n.ajaxObject.responseText,emailflag=="success"?document.location.href=document.getElementById(custnolink).value:(document.getElementById(customerid).style.display="none",document.getElementById("corp_errComment").innerHTML="<span>Please fill in a comment for this response<\/span>",document.getElementById("corp_errComment").style.display="block",$(".corp-box").siblings(".comment").slideDown(),$("#lnkFullComm").hide()))};n.ajaxObject.open("GET","/withoutlogin.aspx?postid="+PostId+"&resp=no",!0);n.ajaxObject.send(null)}function hideBlackLayer(){$(".black-layer").hide()}function alpha_fb_click(){$.ajax({url:"/review/CorporateResponse.ashx",contentType:"application/json; charset=utf-8",dataType:"text",data:{type:"fb_banner_click",corp:!1},responseType:"text/html",success:function(){}})}var mod,intMorePage,intLessPage,tabThisPage,UFO,rate,element_r,tcount_r,iframes,i;document.addEventListener("DOMContentLoaded",function(){setTimeout(function(){showimages_catphoto(CatId)},500)});var divMoreReviews,linkMoreProdRev,linkMoreMemRev,linkEditorsPick,MoreMemRevUrl,MoreProdRevUrl,OverallRatUrl,TrustRatUrl,tabMoreProdRev,tabMoreMemRev,tabEditorsPick,divComments,divCorpComments,spancomcount,diverror,txtComment,btnSubmit,btnEdit,hidCommentId,loadhead,divTotcnt,hidviewmore,corp_btnEdit,corp_btnSubmit,Rate_Comment=!1,FocusOnComments=!1,Add_Comment=!1,FocusOnAddComments=!1,Height1,Height2,width1,width2,selEdit,urlredirect,indesof,urlredirectTo,editabletr="",firstvisit=1,googlebot="<%=isBot%>",canPostComntOnReview,canPostComntOnResponse;$(document).ready(function(){try{btnSubmit=document.getElementById("btnSubmit");divComments=document.getElementById("divComments");divCorpComments=document.getElementById("corp_divComments");linkpostcomment=document.getElementById("linkpostcomment");btnEdit=document.getElementById("btnEdit");txtComment=document.getElementById("txtComment");corp_txtComment=document.getElementById("corp_txtComment");loadhead=document.getElementById("hidpgload").value;hidCommentId=document.getElementById("hidCommentId");corp_btnSubmit=document.getElementById("corp_btnSubmit");corp_btnEdit=document.getElementById("corp_btnEdit")}catch(n){}});$(function(){function i(){r()}function r(){currLatLong=0;try{$.get("https://ipapi.co/json",function(t){if(t!=null&&t!="")try{html5Lat=t.latitude;html5Lon=t.longitude;currLatLong=html5Lat.toFixed(8)+", "+html5Lon.toFixed(8);currLatLong=currLatLong.split(",");n("currLatLong",currLatLong)}catch(i){n("currLatLong",currLatLong)}},"json")}catch(t){currLatLong=0}}function n(n,t){var i=new Date,r,u;i.setTime(i.getTime()+31536e6);r="expires="+i.toUTCString();u="path=/";document.cookie=n+"="+t+"; "+r+"; "+u}function t(n){for(var r=n+"=",f=decodeURIComponent(document.cookie),u=f.split(";"),t,i=0;i<u.length;i++){for(t=u[i];t.charAt(0)==" ";)t=t.substring(1);if(t.indexOf(r)==0)return t.substring(r.length,t.length)}return""}$(document).ready(function(){currLatLong=0;var n=t("currLatLong");n==""||n=="0"?i():currLatLong=n});$("#txtrrTabSearch").autocomplete({source:function(n,t){var c=0,u=n.term,s,e,f,r,i,o,h;u=stripHTML(u);n.term=u;u.replace(/[^\w\s]/gi,"")==""&&(c=1);srctype=srctype1;s=srchcat;txtId="txtrrTabSearch";u=="Search Product, Reviews and Ratings"&&(u="");e="{contextKey:'"+s+"|0||',count:10,prefixText:'"+u+"',type:'"+srctype1+"'}";u.trim().length>=2&&c==0?(prevparameters==e&&(dupreq=!0),prevparameters=e,dupreq==!0&&prevmsgd!=undefined?(f=prevmsgd,msgdlength=f.length,t($.map(f,function(n){if(n!=null){var t=n.split("|"),i;return t[1]==0?{label:'<b style="padding-left: 7px;">'+t[0].replace("repme",stripHTML($("#txtrrTabSearch").val()))+"<\/b>  ",value:t[1],catid:t[1],parent2:t[6]}:t[1]==111111?{label:'<span ><span style="color: #6d6d6d;">'+t[0]+"<\/span>",value:111111,catid:t[1],parent2:t[6],url:t[9]}:(i='<span ><span style="color: #6d6d6d;">'+t[0]+"<\/span>"+t[10]+t[3],t[2]>0&&(i=i+' <span  style="font-size:11px;color:#44a512;">('+t[2]+" Variants)<\/span>"),i=i+"<\/span>",i=i+'<div class="clear"><\/div>',i=i+' <span style="font-size:11px;color:#44a512;">'+t[5]+"<\/span>",{label:i,value:t[0]+"-"+t[1],catid:t[1],parent2:t[6],level1:t[7],ptype:t[8],valueUrl:t[9],isCorp:t[10]})}})),dupreq=!1):(xhr1&&xhr1.readyState!=4&&xhr1.abort(),xhr1=$.ajax({type:"GET",url:"/web/search.asmx/GetAutoCompleteProductSearch",data:{contextKey:"'"+s+"|0||'",strProductSrh:"'"+u.replace("'","\\'")+"'",currLatLong:"'"+currLatLong+"'",isPreWrite:"0"},contentType:"application/json; charset=utf-8",dataType:"json",success:function(n){if($("#txtrrTabSearch").val()==u){prevmsg=n;var r,i;r=n.d?n.d:n;msgdlength=r.length;prevmsgd=r;t($.map(r,function(n){if(n!=null){var t=n.split("|");return t[1]==0?(r.length==1&&insertSearch(document.getElementById("txtrrTabSearch").value,"No Action",btoa(window.location.href),""),{label:'<b style="padding-left: 7px;">'+t[0].replace("repme",stripHTML($("#txtrrTabSearch").val()))+"<\/b>  ",value:t[1],catid:t[1],parent2:t[6]}):t[1]==111111?{label:'<span ><span style="color: #6d6d6d;">'+t[0]+"<\/span>",value:111111,catid:t[1],parent2:t[6],url:t[9]}:(i='<span><span style="color: #6d6d6d;">'+t[0]+"<\/span>"+t[10]+t[3],t[2]>0&&(i=i+' <span  style="font-size:11px;color:#44a512;">('+t[2]+" Variants)<\/span>"),i=i+"<\/span>",i=i+'<div class="clear"><\/div>',i=i+' <span style="font-size:11px;color:#44a512;">'+t[5]+"<\/span>",{label:i,value:t[0]+"-"+t[1],catid:t[1],parent2:t[6],level1:t[7],ptype:t[8],valueUrl:t[9],isCorp:t[10]})}}));srctype=srctype1}},error:function(){}}))):(prevparameters==e&&(dupreq=!0),prevparameters=e,dupreq==!0&&prevmsgd!=undefined?(f=prevmsgd,msgdlength=f.length,t($.map(f,function(n){if(n!=null)return i=n.split("|"),i[1]==0?(i[2]!=""&&i[3]==""?(o=i[2].split("~"),o[1]?(r='<span ><span class="search-span-headAnchor" style="color: #6d6d6d;"><b>'+o[0]+"<\/b><\/span><\/span>",h=o[1]):(r='<span ><span class="search-span-head" style="color: #6d6d6d;"><b>'+o[0]+"<\/b><\/span><\/span>",h="")):r='<span ><span style="color: #6d6d6d;">'+i[2]+"<\/span><\/span>",{label:r,value:"Redirecting",catid:i[1],parent2:i[6],innValueUrl:h,valueUrl:i[3]}):(r='<span ><span style="color: #6d6d6d;">'+i[0]+"<\/span>"+i[12],i[4]>0&&(r=r+' <span  style="font-size:11px;color:#44a512;padding-top: 3px;">('+i[4]+" Variants)<\/span>"),r=r+"<\/span>",r=r+'<div class="clear"><\/div>',r=r+' <span style="font-size:11px;color:#44a512;padding-top: 3px;">'+i[7]+"<\/span>",{label:r,value:i[0]+"-"+i[1],catid:i[1],parent2:i[6],level1:i[8],ptype:i[9],valueUrl:i[11],isCorp:i[12]})})),$(".search-span-head").parent().parent().css({background:"rgba(204,204,204,0.3)",cursor:"default"}),$(".search-span-headAnchor").parent().parent().css({background:"rgba(204,204,204,0.3)"}),dupreq=!1):(xhr1&&xhr1.readyState!=4&&xhr1.abort(),xhr1=$.ajax({type:"GET",url:"/web/search.asmx/GetAutoCompleteProductSearchFixed",contentType:"application/json; charset=utf-8",dataType:"json",success:function(n){prevmsg=n;var f,r,i,u,e;f=n.d?n.d:n;msgdlength=f.length;prevmsgd=f;t($.map(f,function(n){if(n!=null)return i=n.split("|"),i[1]==0?(i[2]!=""&&i[3]==""?(u=i[2].split("~"),u[1]?(r='<span ><span class="search-span-headAnchor" style="color: #6d6d6d;"><b>'+u[0]+"<\/b><\/span><\/span>",e=u[1]):(r='<span ><span class="search-span-head" style="color: #6d6d6d;"><b>'+u[0]+"<\/b><\/span><\/span>",e="")):r='<span ><span style="color: #6d6d6d;">'+i[2]+"<\/span><\/span>",{label:r,value:"Redirecting",catid:i[1],innValueUrl:e,parent2:i[6],valueUrl:i[3]}):(r='<span ><span style="color: #6d6d6d;">'+i[0]+"<\/span>"+i[12],i[4]>0&&(r=r+' <span  style="font-size:11px;color:#44a512;padding-top: 3px;">('+i[4]+" Variants)<\/span>"),r=r+"<\/span>",r=r+'<div class="clear"><\/div>',r=r+' <span style="font-size:11px;color:#44a512;padding-top: 3px;">'+i[7]+"<\/span>",{label:r,value:i[0]+"-"+i[1],catid:i[1],parent2:i[6],level1:i[8],ptype:i[9],valueUrl:i[11],isCorp:i[12]})}));srctype=srctype1;$(".search-span-head").parent().parent().css({background:"rgba(204,204,204,0.3)",cursor:"default"});$(".search-span-headAnchor").parent().parent().css({background:"rgba(204,204,204,0.3)"})},error:function(){}})))},minLength:0,selectFirst:!0,select:function(i,r){var e,s,f,o;if(r.item.parent2!="0"&&r.item.parent2!=undefined){let i=t("srchparent2");i=i==""||i=="0"?r.item.parent2:i+","+r.item.parent2;n("srchparent2",i)}if(r.item.catid!="0"&&r.item.catid!="11111111"&&r.item.catid!="111111"&&r.item.catid!="Redirecting"&&r.item.catid!=undefined){let i=t("srchcatid");i=i==""||i=="0"?r.item.catid:i+","+r.item.catid;n("srchcatid",i)}var u="",h=$("#ui_element");if(h.find(".sb_dropdown").hide(),r.item.value==0)e=document.getElementById("CategorySP"),s="",e!=null&&(s="&amp;p="+e.options[e.selectedIndex].value),u=mshost+"search/prodsrch.aspx?data="+encodeURIComponent(this.value).replace(/%20/g,"+")+decodeURIComponent("%26type=%26p=")+srchcat,msgdlength>1?window.location.href=u:window.location=u,insertSearch(document.getElementById("txtrrTabSearch").value,"Clicked on see more",btoa(window.location.href),btoa(u));else if(r.item.value==111111)window.location.href=r.item.url;else if(r.item.value=="Redirecting")f=r.item.valueUrl,o=r.item.innValueUrl,f?window.location.href=f:o?window.location.href=o:r.item.value="";else{var c=r.item.value,f=r.item.valueUrl,l=r.item.level1,a=r.item.parent2,v=r.item.ptype;u=f;r.item.catid=="11111111"?insertSearch(document.getElementById("txtrrTabSearch").value,"Clicked on Category link",btoa(window.location.href),btoa(u)):insertSearch(document.getElementById("txtrrTabSearch").value,"Clicked on product link",btoa(window.location.href),btoa(u));window.location.href=u;document.getElementById("txtrrTabSearch").value=""}}});$("#txtrrTabSearch").click(function(){$(this).autocomplete("search")})});var divMoreReviews,linkMoreProdRev,linkMoreMemRev,linkEditorsPick,MoreMemRevUrl,MoreProdRevUrl,OverallRatUrl,TrustRatUrl,tabMoreProdRev,tabMoreMemRev,tabEditorsPick,divComments,divCorpComments,spancomcount,diverror,txtComment,btnSubmit,btnEdit,hidCommentId,loadhead,divTotcnt,hidviewmore,corp_btnEdit,corp_btnSubmit,Rate_Comment=!1,FocusOnComments=!1,Add_Comment=!1,FocusOnAddComments=!1,Height1,Height2,width1,width2,selEdit,urlredirect,indesof,urlredirectTo,editabletr,firstvisit=1,canPostComntonResponse1;try{canPostComntonResponse1=canPostComntOnResponse}catch(e){}$(document).ready(function(){btnSubmit=document.getElementById("btnSubmit");divCorpComments=document.getElementById("corp_divComments");linkpostcomment=document.getElementById("linkpostcomment");btnEdit=document.getElementById("btnEdit");txtComment=document.getElementById("txtComment");corp_txtComment=document.getElementById("corp_txtComment");hidCommentId=document.getElementById("hidCommentId");corp_btnSubmit=document.getElementById("corp_btnSubmit");corp_btnEdit=document.getElementById("corp_btnEdit")});$(".AjxLayrClose").click(function(){$("#popuplayer1").hide();urlredirectTo!=undefined&&urlredirectTo.indexOf("ratereview")!=-1&&(urlredirectTo=urlredirectTo.replace("-ratereview","").replace("&ratereview=1",""))});$(document).ready(function(){var t=$("#ctl00_ctl00_ContentPlaceHolderFooter_ContentPlaceHolderBody_customheader_btnwritereview").attr("onclick"),n,i;$("#btnWritereview_scroll").attr("onclick",t);$("#imgWriteReview").attr("onclick",t);$(".your-rating-star").attr("onclick",t);n=new Date;n.setTime(n.getTime());i="expires="+n.toUTCString();document.cookie="brandReply=0; "+i;ajaxTooltip();$(".like-image-new").each(function(){var t=$(this).parent().attr("reviewid"),u=$(this).parent().attr("userid"),n=$(this).parent().attr("id"),i=$(this).parent().attr("divlikeid"),f=$(this).parent().attr("divcorpid"),e=$(this).parent().attr("is_rate"),o=$(this).parent().attr("href_arr"),r;e!=-6||iscorp!=""||iscorp==corporateName&&iscorp!=""?$.ajax({url:"/review/CorporateResponse.ashx",contentType:"application/json; charset=utf-8",dataType:"text",data:{type:"like",OverallGraph:t,u:u,Random:Math.random(),arateid:n,corp:!1,Session:strSession,corpname:corporateName,catid:cid,catname:prod,sessionname:strUsrName,divcorprespid:f},responseType:"text/html",success:function(r){ShowGraph1(r,n,i,t)}}):(ajaxTooltip(),document.getElementById(n).innerHTML="<img src='/Images/like-icon.svg' class='like-image-new'/><span>Like<\/span>",document.getElementById(i).innerHTML="<a style='margin-left: 3px;'>0<\/a>",userId!="0"?$("#"+n.replace("arate","dvResponse")).html(""):(r="<a id='areply' onclick=~CheckIfCookie('"+o+"')~ style='cursor:pointer'><span class='icon-reply' style='font-size: 17px; color: rgba(36,44,66,.5);'><\/span><span id='resplink'>Reply as Brand<\/span><\/a>",$("#"+n.replace("arate","dvResponse")).html(r.replace("~",'"').replace("~",'"'))),$("#"+i).attr("onclick","ratingMore_Ajax123('"+t+"');"))});editreview==1&&($(".advice-section").hide(),$("#starsep").hide(),$(".rar-section-divider").hide())});$(document).mouseup(function(n){var t=$(".sharedivdata");t.is(n.target)||t.has(n.target).length!==0||t.hide()});var intMorePage=11,intLessPage=1,tabThisPage=10;try{if(sel>=11)mod=sel%10,mod==0?(intMorePage=sel-mod+1,intLessPage=sel-mod-9):(intMorePage=sel-mod+11,intLessPage=sel-mod+1),tabThisPage=10;else var intMorePage=11,intLessPage=1,tabThisPage=10}catch(e){}$(function(){function i(){if(navigator.geolocation)try{navigator.geolocation.getCurrentPosition(r,n,{timeout:1e4})}catch(t){n()}else n()}function r(n){geo_loc=u(n);currLatLong=geo_loc.split(",");setCookiesrch("currLatLong",currLatLong)}function n(){currLatLong=0;try{$.get("https://ipapi.co/json",function(n){if(n!=null&&n!="")try{html5Lat=n.latitude;html5Lon=n.longitude;currLatLong=html5Lat.toFixed(8)+", "+html5Lon.toFixed(8);currLatLong=currLatLong.split(",");setCookiesrch("currLatLong",currLatLong)}catch(t){setCookiesrch("currLatLong",currLatLong)}},"json")}catch(n){currLatLong=0}}function u(n){return html5Lat=n.coords.latitude,html5Lon=n.coords.longitude,html5Lat.toFixed(8)+", "+html5Lon.toFixed(8)}function t(n){for(var r=n+"=",f=decodeURIComponent(document.cookie),u=f.split(";"),t,i=0;i<u.length;i++){for(t=u[i];t.charAt(0)==" ";)t=t.substring(1);if(t.indexOf(r)==0)return t.substring(r.length,t.length)}return""}$(document).ready(function(){currLatLong=0;var n=t("currLatLong");n==""||n=="0"?i():currLatLong=n});$("#txtRarTabSearch").autocomplete({source:function(n,t){var c=0,u=n.term,s,e,f,r,i,o,h;u=stripHTML(u);n.term=u;u.replace(/[^\w\s]/gi,"")==""&&(c=1);srctype=srctype1;s=srchcat;txtId="txtRarTabSearch";u=="Search Product, Reviews and Ratings"&&(u="");e="{contextKey:'"+s+"|0||',count:10,prefixText:'"+u+"',type:'"+srctype1+"'}";u.trim().length>=2&&c==0?(prevparameters==e&&(dupreq=!0),prevparameters=e,dupreq==!0&&prevmsgd!=undefined?(f=prevmsgd,msgdlength=f.length,t($.map(f,function(n){if(n!=null){var t=n.split("|"),i;return t[1]==0?{label:'<b style="padding-left: 7px;">'+t[0].replace("repme",stripHTML($("#txtRarTabSearch").val()))+"<\/b>  ",value:t[1],catid:t[1],parent2:t[6]}:t[1]==111111?{label:'<span ><span style="color: #6d6d6d;">'+t[0]+"<\/span>",value:111111,catid:t[1],parent2:t[6],url:t[9]}:(i='<span ><span style="color: #6d6d6d;">'+t[0]+"<\/span>"+t[10]+t[3],t[2]>0&&(i=i+' <span  style="font-size:11px;color:#44a512;">('+t[2]+" Variants)<\/span>"),i=i+"<\/span>",i=i+'<div class="clear"><\/div>',i=i+' <span style="font-size:11px;color:#44a512;">'+t[5]+"<\/span>",{label:i,value:t[0]+"-"+t[1],catid:t[1],parent2:t[6],level1:t[7],ptype:t[8],valueUrl:t[9],isCorp:t[10]})}})),dupreq=!1):(xhr1&&xhr1.readyState!=4&&xhr1.abort(),xhr1=$.ajax({type:"GET",url:"/web/search.asmx/GetAutoCompleteProductSearch",data:{contextKey:"'"+s+"|0||'",strProductSrh:"'"+u.replace("'","\\'")+"'",currLatLong:"'"+currLatLong+"'",isPreWrite:"0"},contentType:"application/json; charset=utf-8",dataType:"json",success:function(n){if($("#txtRarTabSearch").val()==u){prevmsg=n;var r,i;r=n.d?n.d:n;msgdlength=r.length;prevmsgd=r;t($.map(r,function(n){if(n!=null){var t=n.split("|");return t[1]==0?(r.length==1&&insertSearch(document.getElementById("txtRarTabSearch").value,"No Action",btoa(window.location.href),""),{label:'<b style="padding-left: 7px;">'+t[0].replace("repme",stripHTML($("#txtRarTabSearch").val()))+"<\/b>  ",value:t[1],catid:t[1],parent2:t[6]}):t[1]==111111?{label:'<span ><span style="color: #6d6d6d;">'+t[0]+"<\/span>",value:111111,catid:t[1],parent2:t[6],url:t[9]}:(i='<span><span style="color: #6d6d6d;">'+t[0]+"<\/span>"+t[10]+t[3],t[2]>0&&(i=i+' <span  style="font-size:11px;color:#44a512;">('+t[2]+" Variants)<\/span>"),i=i+"<\/span>",i=i+'<div class="clear"><\/div>',i=i+' <span style="font-size:11px;color:#44a512;">'+t[5]+"<\/span>",{label:i,value:t[0]+"-"+t[1],catid:t[1],parent2:t[6],level1:t[7],ptype:t[8],valueUrl:t[9],isCorp:t[10]})}}));srctype=srctype1}},error:function(){}}))):(prevparameters==e&&(dupreq=!0),prevparameters=e,dupreq==!0&&prevmsgd!=undefined?(f=prevmsgd,msgdlength=f.length,t($.map(f,function(n){if(n!=null)return i=n.split("|"),i[1]==0?(i[2]!=""&&i[3]==""?(o=i[2].split("~"),o[1]?(r='<span ><span class="search-span-headAnchor" style="color: #6d6d6d;"><b>'+o[0]+"<\/b><\/span><\/span>",h=o[1]):(r='<span ><span class="search-span-head" style="color: #6d6d6d;"><b>'+o[0]+"<\/b><\/span><\/span>",h="")):r='<span ><span style="color: #6d6d6d;">'+i[2]+"<\/span><\/span>",{label:r,value:"Redirecting",catid:i[1],parent2:i[6],innValueUrl:h,valueUrl:i[3]}):(r='<span ><span style="color: #6d6d6d;">'+i[0]+"<\/span>"+i[12],i[4]>0&&(r=r+' <span  style="font-size:11px;color:#44a512;padding-top: 3px;">('+i[4]+" Variants)<\/span>"),r=r+"<\/span>",r=r+'<div class="clear"><\/div>',r=r+' <span style="font-size:11px;color:#44a512;padding-top: 3px;">'+i[7]+"<\/span>",{label:r,value:i[0]+"-"+i[1],catid:i[1],parent2:i[6],level1:i[8],ptype:i[9],valueUrl:i[11],isCorp:i[12]})})),$(".search-span-head").parent().parent().css({background:"rgba(204,204,204,0.3)",cursor:"default"}),$(".search-span-headAnchor").parent().parent().css({background:"rgba(204,204,204,0.3)"}),dupreq=!1):(xhr1&&xhr1.readyState!=4&&xhr1.abort(),xhr1=$.ajax({type:"GET",url:"/web/search.asmx/GetAutoCompleteProductSearchFixed",contentType:"application/json; charset=utf-8",dataType:"json",success:function(n){prevmsg=n;var f,r,i,u,e;f=n.d?n.d:n;msgdlength=f.length;prevmsgd=f;t($.map(f,function(n){if(n!=null)return i=n.split("|"),i[1]==0?(i[2]!=""&&i[3]==""?(u=i[2].split("~"),u[1]?(r='<span ><span class="search-span-headAnchor" style="color: #6d6d6d;"><b>'+u[0]+"<\/b><\/span><\/span>",e=u[1]):(r='<span ><span class="search-span-head" style="color: #6d6d6d;"><b>'+u[0]+"<\/b><\/span><\/span>",e="")):r='<span ><span style="color: #6d6d6d;">'+i[2]+"<\/span><\/span>",{label:r,value:"Redirecting",catid:i[1],parent2:i[6],innValueUrl:e,valueUrl:i[3]}):(r='<span ><span style="color: #6d6d6d;">'+i[0]+"<\/span>"+i[12],i[4]>0&&(r=r+' <span style="font-size:11px;color:#44a512;padding-top: 3px;">('+i[4]+" Variants)<\/span>"),r=r+"<\/span>",r=r+'<div class="clear"><\/div>',r=r+' <span style="font-size:11px;color:#44a512;padding-top: 3px;">'+i[7]+"<\/span>",{label:r,value:i[0]+"-"+i[1],catid:i[1],parent2:i[6],level1:i[8],ptype:i[9],valueUrl:i[11],isCorp:i[12]})}));srctype=srctype1;$(".search-span-head").parent().parent().css({background:"rgba(204,204,204,0.3)",cursor:"default"});$(".search-span-headAnchor").parent().parent().css({background:"rgba(204,204,204,0.3)"})},error:function(){}})))},minLength:0,selectFirst:!0,select:function(n,i){var f,o,u,e;if(i.item.parent2!="0"&&i.item.parent2!=undefined){let n=t("srchparent2");n=n==""||n=="0"?i.item.parent2:n+","+i.item.parent2;setCookiesrch("srchparent2",n)}if(i.item.catid!="0"&&i.item.catid!="11111111"&&i.item.catid!="111111"&&i.item.catid!="Redirecting"&&i.item.catid!=undefined){let n=t("srchcatid");n=n==""||n=="0"?i.item.catid:n+","+i.item.catid;setCookiesrch("srchcatid",n)}var r="",s=$("#ui_element");if(s.find(".sb_dropdown").hide(),i.item.value==0)f=document.getElementById("CategorySP"),o="",f!=null&&(o="&amp;p="+f.options[f.selectedIndex].value),r=mshost+"search/prodsrch.aspx?data="+encodeURIComponent(this.value).replace(/%20/g,"+")+decodeURIComponent("%26type=%26p=")+srchcat,msgdlength>1?window.location.href=r:window.location=r,insertSearch(document.getElementById("txtRarTabSearch").value,"Clicked on see more",btoa(window.location.href),btoa(r));else if(i.item.value==111111)window.location.href=i.item.url;else if(i.item.value=="Redirecting")u=i.item.valueUrl,e=i.item.innValueUrl,u?window.location.href=u:e?window.location.href=e:i.item.value="";else{var h=i.item.value,u=i.item.valueUrl,c=i.item.level1,l=i.item.parent2,a=i.item.ptype;r=u;i.item.catid=="11111111"?insertSearch(document.getElementById("txtRarTabSearch").value,"Clicked on Category link",btoa(window.location.href),btoa(r)):insertSearch(document.getElementById("txtRarTabSearch").value,"Clicked on product link",btoa(window.location.href),btoa(r));window.location.href=r;document.getElementById("txtRarTabSearch").value=""}}});$("#txtRarTabSearch").click(function(){$(this).autocomplete("search")})});UFO={req:["movie","width","height","majorversion","build"],opt:["play","loop","menu","quality","scale","salign","wmode","bgcolor","base","flashvars","devicefont","allowscriptaccess","seamlesstabbing"],optAtt:["id","name","align"],optExc:["swliveconnect"],ximovie:"ufo.swf",xiwidth:"215",xiheight:"138",ua:navigator.userAgent.toLowerCase(),pluginType:"",fv:[0,0],foList:[],create:function(n,t){UFO.uaHas("w3cdom")&&!UFO.uaHas("ieMac")&&(UFO.getFlashVersion(),UFO.foList[t]=UFO.updateFO(n),UFO.createCSS("#"+t,"visibility:hidden;"),UFO.domLoad(t))},updateFO:function(n){return typeof n.xi!="undefined"&&n.xi=="true"&&(typeof n.ximovie=="undefined"&&(n.ximovie=UFO.ximovie),typeof n.xiwidth=="undefined"&&(n.xiwidth=UFO.xiwidth),typeof n.xiheight=="undefined"&&(n.xiheight=UFO.xiheight)),n.mainCalled=!1,n},domLoad:function(n){var t=setInterval(function(){(document.getElementsByTagName("body")[0]!=null||document.body!=null)&&document.getElementById(n)!=null&&(UFO.main(n),clearInterval(t))},250);typeof document.addEventListener!="undefined"&&document.addEventListener("DOMContentLoaded",function(){UFO.main(n);clearInterval(t)},null)},main:function(n){var t=UFO.foList[n];t.mainCalled||(UFO.foList[n].mainCalled=!0,document.getElementById(n).style.visibility="hidden",UFO.hasRequired(n)&&(UFO.hasFlashVersion(parseInt(t.majorversion,10),parseInt(t.build,10))?(typeof t.setcontainercss!="undefined"&&t.setcontainercss=="true"&&UFO.setContainerCSS(n),UFO.writeSWF(n)):t.xi=="true"&&UFO.hasFlashVersion(6,65)&&UFO.createDialog(n)),document.getElementById(n).style.visibility="visible")},createCSS:function(n,t){var u=document.getElementsByTagName("head")[0],i=UFO.createElement("style"),r;UFO.uaHas("ieWin")||i.appendChild(document.createTextNode(n+" {"+t+"}"));i.setAttribute("type","text/css");i.setAttribute("media","screen");u.appendChild(i);UFO.uaHas("ieWin")&&document.styleSheets&&document.styleSheets.length>0&&(r=document.styleSheets[document.styleSheets.length-1],typeof r.addRule=="object"&&r.addRule(n,t))},setContainerCSS:function(n){var t=UFO.foList[n],i=/%/.test(t.width)?"":"px",r=/%/.test(t.height)?"":"px";UFO.createCSS("#"+n,"width:"+t.width+i+"; height:"+t.height+r+";");t.width=="100%"&&UFO.createCSS("body","margin-left:0; margin-right:0; padding-left:0; padding-right:0;");t.height=="100%"&&(UFO.createCSS("html","height:100%; overflow:hidden;"),UFO.createCSS("body","margin-top:0; margin-bottom:0; padding-top:0; padding-bottom:0; height:100%;"))},createElement:function(n){return UFO.uaHas("xml")&&typeof document.createElementNS!="undefined"?document.createElementNS("http://www.w3.org/1999/xhtml",n):document.createElement(n)},createObjParam:function(n,t,i){var r=UFO.createElement("param");r.setAttribute("name",t);r.setAttribute("value",i);n.appendChild(r)},uaHas:function(n){var t=UFO.ua,r,u,i;switch(n){case"w3cdom":return typeof document.getElementById!="undefined"&&typeof document.getElementsByTagName!="undefined"&&(typeof document.createElement!="undefined"||typeof document.createElementNS!="undefined");case"xml":for(r=document.getElementsByTagName("meta"),u=r.length,i=0;i<u;i++)if(/content-type/i.test(r[i].getAttribute("http-equiv"))&&/xml/i.test(r[i].getAttribute("content")))return!0;return!1;case"ieMac":return/msie/.test(t)&&!/opera/.test(t)&&/mac/.test(t);case"ieWin":return/msie/.test(t)&&!/opera/.test(t)&&/win/.test(t);case"gecko":return/gecko/.test(t)&&!/applewebkit/.test(t);case"opera":return/opera/.test(t);case"safari":return/applewebkit/.test(t);default:return!1}},getFlashVersion:function(){var i,r,t,n;if(UFO.fv[0]==0)if(navigator.plugins&&typeof navigator.plugins["Shockwave Flash"]=="object")UFO.pluginType="npapi",n=navigator.plugins["Shockwave Flash"].description,typeof n!="undefined"&&(n=n.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),i=parseInt(n.replace(/^(.*)\..*$/,"$1"),10),r=/r/.test(n)?parseInt(n.replace(/^.*r(.*)$/,"$1"),10):0,UFO.fv=[i,r]);else if(window.ActiveXObject){UFO.pluginType="ax";try{t=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(u){try{t=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");UFO.fv=[6,0];t.AllowScriptAccess="always"}catch(u){if(UFO.fv[0]==6)return}try{t=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(u){}}typeof t=="object"&&(n=t.GetVariable("$version"),typeof n!="undefined"&&(n=n.replace(/^\S+\s+(.*)$/,"$1").split(","),UFO.fv=[parseInt(n[0],10),parseInt(n[2],10)]))}},hasRequired:function(n){for(var i=UFO.req.length,t=0;t<i;t++)if(typeof UFO.foList[n][UFO.req[t]]=="undefined")return!1;return!0},hasFlashVersion:function(n,t){return UFO.fv[0]>n||UFO.fv[0]==n&&UFO.fv[1]>=t?!0:!1},writeSWF:function(n){var i=UFO.foList[n],e=document.getElementById(n),f,u,o,s,r,t,c;if(UFO.pluginType=="npapi")if(UFO.uaHas("gecko")||UFO.uaHas("xml")){while(e.hasChildNodes())e.removeChild(e.firstChild);for(f=UFO.createElement("object"),f.setAttribute("type","application/x-shockwave-flash"),f.setAttribute("data",i.movie),f.setAttribute("width",i.width),f.setAttribute("height",i.height),r=UFO.optAtt.length,t=0;t<r;t++)typeof i[UFO.optAtt[t]]!="undefined"&&f.setAttribute(UFO.optAtt[t],i[UFO.optAtt[t]]);for(u=UFO.opt.concat(UFO.optExc),r=u.length,t=0;t<r;t++)typeof i[u[t]]!="undefined"&&UFO.createObjParam(f,u[t],i[u[t]]);e.appendChild(f)}else{var h="",u=UFO.opt.concat(UFO.optAtt).concat(UFO.optExc),r=u.length;for(t=0;t<r;t++)typeof i[u[t]]!="undefined"&&(h+=" "+u[t]+'="'+i[u[t]]+'"');e.innerHTML='<embed type="application/x-shockwave-flash" src="'+i.movie+'" width="'+i.width+'" height="'+i.height+'" pluginspage="http://www.macromedia.com/go/getflashplayer"'+h+"><\/embed>"}else if(UFO.pluginType=="ax"){for(o="",r=UFO.optAtt.length,t=0;t<r;t++)typeof i[UFO.optAtt[t]]!="undefined"&&(o+=" "+UFO.optAtt[t]+'="'+i[UFO.optAtt[t]]+'"');for(s="",r=UFO.opt.length,t=0;t<r;t++)typeof i[UFO.opt[t]]!="undefined"&&(s+='<param name="'+UFO.opt[t]+'" value="'+i[UFO.opt[t]]+'" />');c=window.location.protocol=="https:"?"https:":"http:";e.innerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+o+' width="'+i.width+'" height="'+i.height+'" codebase="'+c+"//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version="+i.majorversion+",0,"+i.build+',0"><param name="movie" value="'+i.movie+'" />'+s+"<\/object>"}},createDialog:function(n){var t=UFO.foList[n],f,i,r,e,u;UFO.createCSS("html","height:100%; overflow:hidden;");UFO.createCSS("body","height:100%; overflow:hidden;");UFO.createCSS("#xi-con","position:absolute; left:0; top:0; z-index:1000; width:100%; height:100%; background-color:#fff; filter:alpha(opacity:75); opacity:0.75;");UFO.createCSS("#xi-dia","position:absolute; left:50%; top:50%; margin-left: -"+Math.round(parseInt(t.xiwidth,10)/2)+"px; margin-top: -"+Math.round(parseInt(t.xiheight,10)/2)+"px; width:"+t.xiwidth+"px; height:"+t.xiheight+"px;");f=document.getElementsByTagName("body")[0];i=UFO.createElement("div");i.setAttribute("id","xi-con");r=UFO.createElement("div");r.setAttribute("id","xi-dia");i.appendChild(r);f.appendChild(i);e=window.location;u=UFO.uaHas("xml")&&UFO.uaHas("safari")?document.getElementsByTagName("title")[0].firstChild.nodeValue=document.getElementsByTagName("title")[0].firstChild.nodeValue.slice(0,47)+" - Flash Player Installation":document.title=document.title.slice(0,47)+" - Flash Player Installation";var o=UFO.pluginType=="ax"?"ActiveX":"PlugIn",s=typeof t.xiurlcancel!="undefined"?"&xiUrlCancel="+t.xiurlcancel:"",h=typeof t.xiurlfailed!="undefined"?"&xiUrlFailed="+t.xiurlfailed:"";UFO.foList["xi-dia"]={movie:t.ximovie,width:t.xiwidth,height:t.xiheight,majorversion:"6",build:"65",flashvars:"MMredirectURL="+e+"&MMplayerType="+o+"&MMdoctitle="+u+s+h};UFO.writeSWF("xi-dia")},expressInstallCallback:function(){var n=document.getElementsByTagName("body")[0],t=document.getElementById("xi-con");n.removeChild(t);UFO.createCSS("body","height:auto; overflow:auto;");UFO.createCSS("html","height:auto; overflow:auto;")},cleanupIELeaks:function(){for(var t=document.getElementsByTagName("object"),r=t.length,i,n=0;n<r;n++){t[n].style.display="none";for(i in t[n])typeof t[n][i]=="function"&&(t[n][i]=null)}}};typeof window.attachEvent!="undefined"&&UFO.uaHas("ieWin")&&window.attachEvent("onunload",UFO.cleanupIELeaks),function(n,t,i){"use strict";function r(t,r){if(this.el=t,this.$el=n(t),this.s=n.extend({},u,r),this.s.dynamic&&this.s.dynamicEl!=="undefined"&&this.s.dynamicEl.constructor===Array&&!this.s.dynamicEl.length)throw"When using dynamic mode, you must also define dynamicEl as an Array.";return this.modules={},this.lGalleryOn=!1,this.lgBusy=!1,this.hideBartimeout=!1,this.isTouch="ontouchstart"in i.documentElement,this.s.slideEndAnimatoin&&(this.s.hideControlOnEnd=!1),this.$items=this.s.dynamic?this.s.dynamicEl:this.s.selector==="this"?this.$el:this.s.selector!==""?this.s.selectWithin?n(this.s.selectWithin).find(this.s.selector):this.$el.find(n(this.s.selector)):this.$el.children(),this.$slide="",this.$outer="",this.init(),this}var u={mode:"lg-slide",cssEasing:"ease",easing:"linear",speed:400,height:"",width:"",addClass:"",startClass:"",backdropDuration:150,hideBarsDelay:6e3,useLeft:!1,closable:!0,loop:!0,escKey:!0,keyPress:!0,controls:!0,slideEndAnimatoin:!1,hideControlOnEnd:!0,mousewheel:!0,getCaptionFromTitleOrAlt:!0,appendSubHtmlTo:".lg-sub-html",preload:1,showAfterLoad:!0,selector:"",selectWithin:"",nextHtml:"",prevHtml:"",index:!1,iframeMaxWidth:"100%",download:!1,counter:!0,appendCounterTo:".lg-toolbar",swipeThreshold:50,enableSwipe:!0,enableDrag:!0,dynamic:!1,dynamicEl:[],galleryId:1};r.prototype.init=function(){var i=this,r;if(i.s.preload>i.$items.length&&(i.s.preload=i.$items.length),r=t.location.hash,r.indexOf("lg="+this.s.galleryId)>0&&(i.index=parseInt(r.split("&slide=")[1],10),n("body").addClass("lg-from-hash"),n("body").hasClass("lg-on")||setTimeout(function(){i.build(i.index);n("body").addClass("lg-on")})),i.s.dynamic)i.$el.trigger("onBeforeOpen.lg"),i.index=i.s.index||0,n("body").hasClass("lg-on")||setTimeout(function(){i.build(i.index);n("body").addClass("lg-on")});else i.$items.on("click.lgcustom",function(t){try{t.preventDefault();t.preventDefault()}catch(r){t.returnValue=!1}i.$el.trigger("onBeforeOpen.lg");i.index=i.s.index||i.$items.index(this);n("body").hasClass("lg-on")||(i.build(i.index),n("body").addClass("lg-on"))})};r.prototype.build=function(t){var i=this;i.structure();n.each(n.fn.lightGallery.modules,function(t){i.modules[t]=new n.fn.lightGallery.modules[t](i.el)});i.slide(t,!1,!1);i.s.keyPress&&i.keyPress();i.$items.length>1&&(i.arrow(),setTimeout(function(){i.enableDrag();i.enableSwipe()},50),i.s.mousewheel&&i.mousewheel());i.counter();i.closeGallery();i.$el.trigger("onAfterOpen.lg");i.$outer.on("mousemove.lg click.lg touchstart.lg",function(){i.$outer.removeClass("lg-hide-items");clearTimeout(i.hideBartimeout);i.hideBartimeout=setTimeout(function(){i.$outer.addClass("lg-hide-items")},i.s.hideBarsDelay)})};r.prototype.structure=function(){var f="",e="",i=0,o="",s,r=this,u;for(n("body").append('<div class="lg-backdrop"><\/div>'),n(".lg-backdrop").css("transition-duration",this.s.backdropDuration+"ms"),i=0;i<this.$items.length;i++)f+='<div class="lg-item"><\/div>';this.s.controls&&this.$items.length>1&&(e='<div class="lg-actions"><div class="icon-previous">'+this.s.prevHtml+'<\/div><div class="icon-next">'+this.s.nextHtml+"<\/div><\/div>");this.s.appendSubHtmlTo===".lg-sub-html"&&(o=" ");s='<div class="container"><div class="lg-outer '+this.s.addClass+" "+this.s.startClass+'"><div class="lg-toolbar group"><span class="icon-close"><\/span><\/div>'+e+'<div class="lg" style="width:'+this.s.width+"; height:"+this.s.height+'"><div class="lg-inner">'+f+"<\/div>"+o+"<\/div><\/div>";n("body").append(s);this.$outer=n(".lg-outer");this.$slide=this.$outer.find(".lg-item");this.s.useLeft?(this.$outer.addClass("lg-use-left"),this.s.mode="lg-slide"):this.$outer.addClass("lg-use-css3");r.setTop();n(t).on("resize.lg orientationchange.lg",function(){setTimeout(function(){r.setTop()},100)});this.$slide.eq(this.index).addClass("lg-current");this.doCss()?this.$outer.addClass("lg-css3"):(this.$outer.addClass("lg-css"),this.s.speed=0);this.$outer.addClass(this.s.mode);this.s.enableDrag&&this.$items.length>1&&this.$outer.addClass("lg-grab");this.s.showAfterLoad&&this.$outer.addClass("lg-show-after-load");this.doCss()&&(u=this.$outer.find(".lg-inner"),u.css("transition-timing-function",this.s.cssEasing),u.css("transition-duration",this.s.speed+"ms"));n(".lg-backdrop").addClass("in");setTimeout(function(){r.$outer.addClass("lg-visible")},this.s.backdropDuration);this.prevScrollTop=n(t).scrollTop()};r.prototype.setTop=function(){if(this.s.height!=="100%"){var i=n(t).height(),u=(i-parseInt(this.s.height,10))/2,r=this.$outer.find(".lg");i>=parseInt(this.s.height,10)?r.css("top",u+"px"):r.css("top","0px")}};r.prototype.doCss=function(){var n=function(){for(var t=["transition","MozTransition","WebkitTransition","OTransition","msTransition","KhtmlTransition"],r=i.documentElement,n=0,n=0;n<t.length;n++)if(t[n]in r.style)return!0};return n()?!0:!1};r.prototype.isVideo=function(n,t){var i;if(i=this.s.dynamic?this.s.dynamicEl[t].html:this.$items.eq(t).attr("data-html"),!n&&i)return{html5:!0};var r=n.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)/i),u=n.match(/\/\/(?:www\.)?vimeo.com\/([0-9a-z\-_]+)/i),f=n.match(/\/\/(?:www\.)?dai.ly\/([0-9a-z\-_]+)/i),e=n.match(/\/\/(?:www\.)?(?:vk\.com|vkontakte\.ru)\/(?:video_ext\.php\?)(.*)/i);return r?{youtube:r}:u?{vimeo:u}:f?{dailymotion:f}:e?{vk:e}:void 0};r.prototype.counter=function(){this.s.counter&&n(this.s.appendCounterTo).append('<div id="lg-counter"><span id="lg-counter-current">'+(parseInt(this.index,10)+1)+'<\/span> / <span id="lg-counter-all">'+this.$items.length+"<\/span><\/div>")};r.prototype.addHtml=function(t){var i=null,r,u;this.s.dynamic?this.s.dynamicEl[t].subHtmlUrl?r=this.s.dynamicEl[t].subHtmlUrl:i=this.s.dynamicEl[t].subHtml:this.$items.eq(t).attr("data-sub-html-url")?r=this.$items.eq(t).attr("data-sub-html-url"):(i=this.$items.eq(t).attr("data-sub-html"),this.s.getCaptionFromTitleOrAlt&&!i&&(i=this.$items.eq(t).attr("title")||this.$items.eq(t).find("img").first().attr("alt")));r||(typeof i!="undefined"&&i!==null?(u=i.substring(0,1),(u==="."||u==="#")&&(i=n(i).html())):i="");this.s.appendSubHtmlTo===".lg-sub-html"?r?this.$outer.find(this.s.appendSubHtmlTo).load(r):this.$outer.find(this.s.appendSubHtmlTo).html(i):r?this.$slide.eq(t).load(r):this.$slide.eq(t).append(i);typeof i!="undefined"&&i!==null&&(i===""?this.$outer.find(this.s.appendSubHtmlTo).addClass("lg-empty-html"):this.$outer.find(this.s.appendSubHtmlTo).removeClass("lg-empty-html"));this.$el.trigger("onAfterAppendSubHtml.lg",[t])};r.prototype.preload=function(n){for(var t=1,i=1,t=1;t<=this.s.preload;t++){if(t>=this.$items.length-n)break;this.loadContent(n+t,!1,0)}for(i=1;i<=this.s.preload;i++){if(n-i<0)break;this.loadContent(n-i,!1,0)}};r.prototype.loadContent=function(i,r,u){var f=this,s=!1,h,o,v,c,l,y,w=function(i){for(var e=[],s=[],r,h,u,f=0;f<i.length;f++)r=i[f].split(" "),r[0]===""&&r.splice(0,1),s.push(r[0]),e.push(r[1]);for(h=n(t).width(),u=0;u<e.length;u++)if(parseInt(e[u],10)>h){o=s[u];break}},b,k,a,e,p;if(f.s.dynamic?(f.s.dynamicEl[i].poster&&(s=!0,v=f.s.dynamicEl[i].poster),y=f.s.dynamicEl[i].html,o=f.s.dynamicEl[i].src,f.s.dynamicEl[i].responsive&&(b=f.s.dynamicEl[i].responsive.split(","),w(b)),c=f.s.dynamicEl[i].srcset,l=f.s.dynamicEl[i].sizes):(f.$items.eq(i).attr("data-poster")&&(s=!0,v=f.$items.eq(i).attr("data-poster")),y=f.$items.eq(i).attr("data-html"),o=f.$items.eq(i).attr("href")||f.$items.eq(i).attr("data-src"),f.$items.eq(i).attr("data-responsive")&&(k=f.$items.eq(i).attr("data-responsive").split(","),w(k)),c=f.$items.eq(i).attr("data-srcset"),l=f.$items.eq(i).attr("data-sizes")),a=!1,f.s.dynamic?f.s.dynamicEl[i].iframe&&(a=!0):f.$items.eq(i).attr("data-iframe")==="true"&&(a=!0),e=f.isVideo(o,i),!f.$slide.eq(i).hasClass("lg-loaded")){if(a?f.$slide.eq(i).prepend('<div class="lg-video-cont" style="max-width:'+f.s.iframeMaxWidth+'"><div class="lg-video"><iframe class="lg-object" frameborder="0" src="'+o+'"  allowfullscreen="true"><\/iframe><\/div><\/div>'):s?(p="",p=e&&e.youtube?"lg-has-youtube":e&&e.vimeo?"lg-has-vimeo":"lg-has-html5",f.$slide.eq(i).prepend('<div class="lg-video-cont '+p+' "><div class="lg-video"><span class="lg-video-play"><\/span><img class="lg-object lg-has-poster" src="'+v+'" /><\/div><\/div>')):e?(f.$slide.eq(i).prepend('<div class="lg-video-cont "><div class="lg-video"><\/div><\/div>'),f.$el.trigger("hasVideo.lg",[i,o,y])):f.$slide.eq(i).prepend('<div class="lg-img-wrap"><img class="lg-object lg-image" src="'+o+'" /><div class="lg-sub-html"><\/div><\/div>'),f.$el.trigger("onAferAppendSlide.lg",[i]),h=f.$slide.eq(i).find(".lg-object"),l&&h.attr("sizes",l),c){h.attr("srcset",c);try{picturefill({elements:[h[0]]})}catch(d){console.error("Make sure you have included Picturefill version 2")}}this.s.appendSubHtmlTo!==".lg-sub-html"&&f.addHtml(i);f.$slide.eq(i).addClass("lg-loaded")}f.$slide.eq(i).find(".lg-object").on("load.lg error.lg",function(){var t=0;u&&!n("body").hasClass("lg-from-hash")&&(t=u);setTimeout(function(){f.$slide.eq(i).addClass("lg-complete");f.$el.trigger("onSlideItemLoad.lg",[i,u||0])},t)});if(e&&e.html5&&!s&&f.$slide.eq(i).addClass("lg-complete"),r===!0)if(f.$slide.eq(i).hasClass("lg-complete"))f.preload(i);else f.$slide.eq(i).find(".lg-object").on("load.lg error.lg",function(){f.preload(i)})};r.prototype.slide=function(t,i,r){var f=this.$outer.find(".lg-current").index(),u=this,l,h,c;if(!u.lGalleryOn||f!==t){var e=this.$slide.length,a=u.lGalleryOn?this.s.speed:0,o=!1,s=!1;u.lgBusy||(this.s.download&&(l=u.s.dynamic?u.s.dynamicEl[t].downloadUrl!==!1&&(u.s.dynamicEl[t].downloadUrl||u.s.dynamicEl[t].src):u.$items.eq(t).attr("data-download-url")!=="false"&&(u.$items.eq(t).attr("data-download-url")||u.$items.eq(t).attr("href")||u.$items.eq(t).attr("data-src")),l?(n("#lg-download").attr("href",l),u.$outer.removeClass("lg-hide-download")):u.$outer.addClass("lg-hide-download")),this.$el.trigger("onBeforeSlide.lg",[f,t,i,r]),u.lgBusy=!0,clearTimeout(u.hideBartimeout),this.s.appendSubHtmlTo===".lg-sub-html"&&setTimeout(function(){u.addHtml(t)},a),this.arrowDisable(t),i?(h=t-1,c=t+1,t===0&&f===e-1?(c=0,h=e-1):t===e-1&&f===0&&(c=0,h=e-1),this.$slide.removeClass("lg-prev-slide lg-current lg-next-slide"),u.$slide.eq(h).addClass("lg-prev-slide"),u.$slide.eq(c).addClass("lg-next-slide"),u.$slide.eq(t).addClass("lg-current")):(u.$outer.addClass("lg-no-trans"),this.$slide.removeClass("lg-prev-slide lg-next-slide"),t<f?(s=!0,t!==0||f!==e-1||r||(s=!1,o=!0)):t>f&&(o=!0,t!==e-1||f!==0||r||(s=!0,o=!1)),s?(this.$slide.eq(t).addClass("lg-prev-slide"),this.$slide.eq(f).addClass("lg-next-slide")):o&&(this.$slide.eq(t).addClass("lg-next-slide"),this.$slide.eq(f).addClass("lg-prev-slide")),setTimeout(function(){u.$slide.removeClass("lg-current");u.$slide.eq(t).addClass("lg-current");u.$outer.removeClass("lg-no-trans")},50)),u.lGalleryOn?(setTimeout(function(){u.loadContent(t,!0,0)},this.s.speed+50),setTimeout(function(){u.lgBusy=!1;u.$el.trigger("onAfterSlide.lg",[f,t,i,r])},this.s.speed)):(u.loadContent(t,!0,u.s.backdropDuration),u.lgBusy=!1,u.$el.trigger("onAfterSlide.lg",[f,t,i,r])),u.lGalleryOn=!0,this.s.counter&&n("#lg-counter-current").text(t+1))}};r.prototype.goToNextSlide=function(n){var t=this;t.lgBusy||(t.index+1<t.$slide.length?(t.index++,t.$el.trigger("onBeforeNextSlide.lg",[t.index]),t.slide(t.index,n,!1)):t.s.loop?(t.index=0,t.$el.trigger("onBeforeNextSlide.lg",[t.index]),t.slide(t.index,n,!1)):t.s.slideEndAnimatoin&&(t.$outer.addClass("lg-right-end"),setTimeout(function(){t.$outer.removeClass("lg-right-end")},400)))};r.prototype.goToPrevSlide=function(n){var t=this;t.lgBusy||(t.index>0?(t.index--,t.$el.trigger("onBeforePrevSlide.lg",[t.index,n]),t.slide(t.index,n,!1)):t.s.loop?(t.index=t.$items.length-1,t.$el.trigger("onBeforePrevSlide.lg",[t.index,n]),t.slide(t.index,n,!1)):t.s.slideEndAnimatoin&&(t.$outer.addClass("lg-left-end"),setTimeout(function(){t.$outer.removeClass("lg-left-end")},400)))};r.prototype.keyPress=function(){var i=this;if(this.$items.length>1)n(t).on("keyup.lg",function(n){i.$items.length>1&&(n.keyCode===37&&(n.preventDefault(),i.goToPrevSlide()),n.keyCode===39&&(n.preventDefault(),i.goToNextSlide()))});n(t).on("keydown.lg",function(n){i.s.escKey===!0&&n.keyCode===27&&(n.preventDefault(),i.$outer.hasClass("lg-thumb-open")?i.$outer.removeClass("lg-thumb-open"):i.destroy())})};r.prototype.arrow=function(){var n=this;this.$outer.find(".icon-previous").on("click.lg",function(){n.goToPrevSlide()});this.$outer.find(".icon-next").on("click.lg",function(){n.goToNextSlide()})};r.prototype.arrowDisable=function(n){!this.s.loop&&this.s.hideControlOnEnd&&(n+1<this.$slide.length?this.$outer.find(".lg-next").removeAttr("disabled").removeClass("disabled"):this.$outer.find(".lg-next").attr("disabled","disabled").addClass("disabled"),n>0?this.$outer.find(".lg-prev").removeAttr("disabled").removeClass("disabled"):this.$outer.find(".lg-prev").attr("disabled","disabled").addClass("disabled"))};r.prototype.setTranslate=function(n,t,i){this.s.useLeft?n.css("left",t):n.css({transform:"translate3d("+t+"px, "+i+"px, 0px)"})};r.prototype.touchMove=function(t,i){var r=i-t;Math.abs(r)>15&&(this.$outer.addClass("lg-dragging"),this.setTranslate(this.$slide.eq(this.index),r,0),this.setTranslate(n(".lg-prev-slide"),-this.$slide.eq(this.index).width()+r,0),this.setTranslate(n(".lg-next-slide"),this.$slide.eq(this.index).width()+r,0))};r.prototype.touchEnd=function(n){var t=this;t.s.mode!=="lg-slide"&&t.$outer.addClass("lg-slide");this.$slide.not(".lg-current, .lg-prev-slide, .lg-next-slide").css("opacity","0");setTimeout(function(){t.$outer.removeClass("lg-dragging");n<0&&Math.abs(n)>t.s.swipeThreshold?t.goToNextSlide(!0):n>0&&Math.abs(n)>t.s.swipeThreshold?t.goToPrevSlide(!0):Math.abs(n)<5&&t.$el.trigger("onSlideClick.lg");t.$slide.removeAttr("style")});setTimeout(function(){t.$outer.hasClass("lg-dragging")||t.s.mode==="lg-slide"||t.$outer.removeClass("lg-slide")},t.s.speed+100)};r.prototype.enableSwipe=function(){var n=this,t=0,i=0,r=!1;if(n.s.enableSwipe&&n.isTouch&&n.doCss()){n.$slide.on("touchstart.lg",function(i){n.$outer.hasClass("lg-zoomed")||n.lgBusy||(i.preventDefault(),n.manageSwipeClass(),t=i.originalEvent.targetTouches[0].pageX)});n.$slide.on("touchmove.lg",function(u){n.$outer.hasClass("lg-zoomed")||(u.preventDefault(),i=u.originalEvent.targetTouches[0].pageX,n.touchMove(t,i),r=!0)});n.$slide.on("touchend.lg",function(){n.$outer.hasClass("lg-zoomed")||(r?(r=!1,n.touchEnd(i-t)):n.$el.trigger("onSlideClick.lg"))})}};r.prototype.enableDrag=function(){var i=this,u=0,f=0,r=!1,e=!1;if(i.s.enableDrag&&!i.isTouch&&i.doCss()){i.$slide.on("mousedown.lg",function(t){i.$outer.hasClass("lg-zoomed")||(n(t.target).hasClass("lg-object")||n(t.target).hasClass("lg-video-play"))&&(t.preventDefault(),i.lgBusy||(i.manageSwipeClass(),u=t.pageX,r=!0,i.$outer.scrollLeft+=1,i.$outer.scrollLeft-=1,i.$outer.removeClass("lg-grab").addClass("lg-grabbing"),i.$el.trigger("onDragstart.lg")))});n(t).on("mousemove.lg",function(n){r&&(e=!0,f=n.pageX,i.touchMove(u,f),i.$el.trigger("onDragmove.lg"))});n(t).on("mouseup.lg",function(t){e?(e=!1,i.touchEnd(f-u),i.$el.trigger("onDragend.lg")):(n(t.target).hasClass("lg-object")||n(t.target).hasClass("lg-video-play"))&&i.$el.trigger("onSlideClick.lg");r&&(r=!1,i.$outer.removeClass("lg-grabbing").addClass("lg-grab"))})}};r.prototype.manageSwipeClass=function(){var t=this.index+1,n=this.index-1,i=this.$slide.length;this.s.loop&&(this.index===0?n=i-1:this.index===i-1&&(t=0));this.$slide.removeClass("lg-next-slide lg-prev-slide");n>-1&&this.$slide.eq(n).addClass("lg-prev-slide");this.$slide.eq(t).addClass("lg-next-slide")};r.prototype.mousewheel=function(){var n=this;n.$outer.on("mousewheel.lg",function(t){t.deltaY&&(t.deltaY>0?n.goToPrevSlide():n.goToNextSlide(),t.preventDefault())})};r.prototype.closeGallery=function(){var t=this,i=!1;this.$outer.find(".icon-close").on("click.lg",function(){t.destroy()});if(t.s.closable){t.$outer.on("mousedown.lg",function(t){i=n(t.target).is(".lg-outer")||n(t.target).is(".lg-item ")||n(t.target).is(".lg-img-wrap")?!0:!1});t.$outer.on("mouseup.lg",function(r){(n(r.target).is(".lg-outer")||n(r.target).is(".lg-item ")||n(r.target).is(".lg-img-wrap")&&i)&&(t.$outer.hasClass("lg-dragging")||t.destroy())})}};r.prototype.destroy=function(i){var r=this;i||r.$el.trigger("onBeforeClose.lg");n(t).scrollTop(r.prevScrollTop);i&&(r.s.dynamic||this.$items.off("click.lg click.lgcustom"),n.removeData(r.el,"lightGallery"));this.$el.off(".lg.tm");n.each(n.fn.lightGallery.modules,function(n){r.modules[n]&&r.modules[n].destroy()});this.lGalleryOn=!1;clearTimeout(r.hideBartimeout);this.hideBartimeout=!1;n(t).off(".lg");n("body").removeClass("lg-on lg-from-hash");r.$outer&&r.$outer.removeClass("lg-visible");n(".lg-backdrop").removeClass("in");setTimeout(function(){r.$outer&&r.$outer.remove();n(".lg-backdrop").remove();i||r.$el.trigger("onCloseAfter.lg")},r.s.backdropDuration+50)};n.fn.lightGallery=function(t){return this.each(function(){if(n.data(this,"lightGallery"))try{n(this).data("lightGallery").init()}catch(i){console.error("lightGallery has not initiated properly")}else n.data(this,"lightGallery",new r(this,t))})};n.fn.lightGallery.modules={}}(jQuery,window,document);$(document).ready(function(){}),function(n,t){"use strict";var r={thumbnail:!0,animateThumb:!0,currentPagerPosition:"middle",thumbWidth:120,thumbContHeight:100,thumbMargin:5,exThumbImage:!1,showThumbByDefault:!0,toogleThumb:!0,pullCaptionUp:!0,enableThumbDrag:!0,enableThumbSwipe:!0,swipeThreshold:50,loadYoutubeThumbnail:!0,youtubeThumbSize:1,loadVimeoThumbnail:!0,vimeoThumbSize:"thumbnail_small",loadDailymotionThumbnail:!0},i=function(t){return this.core=n(t).data("lightGallery"),this.core.s=n.extend({},r,this.core.s),this.$el=n(t),this.$thumbOuter=null,this.thumbOuterWidth=0,this.thumbTotalWidth=this.core.$items.length*(this.core.s.thumbWidth+this.core.s.thumbMargin),this.thumbIndex=this.core.index,this.left=0,this.init(),this};i.prototype.init=function(){var t=this;this.core.s.thumbnail&&this.core.$items.length>1&&(this.core.s.showThumbByDefault&&setTimeout(function(){t.core.$outer.addClass("lg-thumb-open")},700),this.core.s.pullCaptionUp&&this.core.$outer.addClass("lg-pull-caption-up"),this.build(),this.core.s.animateThumb?(this.core.s.enableThumbDrag&&!this.core.isTouch&&this.core.doCss()&&this.enableThumbDrag(),this.core.s.enableThumbSwipe&&this.core.isTouch&&this.core.doCss()&&this.enableThumbSwipe(),this.thumbClickable=!1):this.thumbClickable=!0,this.toogle(),this.thumbkeyPress());n(".lg-outer .lg-inner,.icon-previous,.icon-next").on({mouseover:function(){n(".lg-outer .lg-thumb-outer").fadeOut("fast")},mouseleave:function(){n(".lg-outer .lg-thumb-outer").fadeIn("fast")}})};i.prototype.build=function(){function e(n,t,r){var u=i.core.isVideo(n,r)||{},e,s="";u.youtube||u.vimeo||u.dailymotion?u.youtube?e=i.core.s.loadYoutubeThumbnail?"//img.youtube.com/vi/"+u.youtube[1]+"/"+i.core.s.youtubeThumbSize+".jpg":t:u.vimeo?i.core.s.loadVimeoThumbnail?(e="//i.vimeocdn.com/video/error_"+f+".jpg",s=u.vimeo[1]):e=t:u.dailymotion&&(e=i.core.s.loadDailymotionThumbnail?"//www.dailymotion.com/thumbnail/video/"+u.dailymotion[1]:t):e=t;o+='<div data-vimeo-id="'+s+'" class="lg-thumb-item" style="width:'+i.core.s.thumbWidth+"px; margin-right: "+i.core.s.thumbMargin+'px"><img src="'+e+'" /><\/div>';s=""}var i=this,o="",f="",r,u;switch(this.core.s.vimeoThumbSize){case"thumbnail_large":f="640";break;case"thumbnail_medium":f="200x150";break;case"thumbnail_small":f="100x75"}if(i.core.$outer.addClass("lg-has-thumb"),i.core.$outer.append('<div class="lg-thumb-outer"><div class="lg-thumb group"><\/div><\/div>'),i.$thumbOuter=i.core.$outer.find(".lg-thumb-outer"),i.thumbOuterWidth=i.$thumbOuter.width(),i.core.s.animateThumb&&i.core.$outer.find(".lg-thumb").css({width:i.thumbTotalWidth+"px",position:"relative"}),this.core.s.animateThumb&&i.$thumbOuter.css("height",i.core.s.thumbContHeight+"px"),i.core.s.dynamic)for(u=0;u<i.core.s.dynamicEl.length;u++)e(i.core.s.dynamicEl[u].src,i.core.s.dynamicEl[u].thumb,u);else i.core.$items.each(function(t){i.core.s.exThumbImage?e(n(this).attr("href")||n(this).attr("data-src"),n(this).attr(i.core.s.exThumbImage),t):e(n(this).attr("href")||n(this).attr("data-src"),n(this).find("img").attr("data-src"),t)});i.core.$outer.find(".lg-thumb").html(o);r=i.core.$outer.find(".lg-thumb-item");r.each(function(){var t=n(this),r=t.attr("data-vimeo-id");r&&n.getJSON("//www.vimeo.com/api/v2/video/"+r+".json?callback=?",{format:"json"},function(n){t.find("img").attr("src",n[0][i.core.s.vimeoThumbSize])})});r.eq(i.core.index).addClass("active");i.core.$el.on("onBeforeSlide.lg.tm",function(){r.removeClass("active");r.eq(i.core.index).addClass("active")});r.on("click.lg touchend.lg",function(){var t=n(this);setTimeout(function(){(!i.thumbClickable||i.core.lgBusy)&&i.core.doCss()||(i.core.index=t.index(),i.core.slide(i.core.index,!1,!0))},50)});i.core.$el.on("onBeforeSlide.lg.tm",function(){i.animateThumb(i.core.index)});n(t).on("resize.lg.thumb orientationchange.lg.thumb",function(){setTimeout(function(){i.animateThumb(i.core.index);i.thumbOuterWidth=i.$thumbOuter.width()},200)})};i.prototype.setTranslate=function(n){this.core.$outer.find(".lg-thumb").css({transform:"translate3d(-"+n+"px, 0px, 0px)"})};i.prototype.animateThumb=function(n){var i=this.core.$outer.find(".lg-thumb"),t;if(this.core.s.animateThumb){switch(this.core.s.currentPagerPosition){case"left":t=0;break;case"middle":t=this.thumbOuterWidth/2-this.core.s.thumbWidth/2;break;case"right":t=this.thumbOuterWidth-this.core.s.thumbWidth}this.left=(this.core.s.thumbWidth+this.core.s.thumbMargin)*n-1-t;this.left>this.thumbTotalWidth-this.thumbOuterWidth&&(this.left=this.thumbTotalWidth-this.thumbOuterWidth);this.left<0&&(this.left=0);this.core.lGalleryOn?(i.hasClass("on")||this.core.$outer.find(".lg-thumb").css("transition-duration",this.core.s.speed+"ms"),this.core.doCss()||i.animate({left:-this.left+"px"},this.core.s.speed)):this.core.doCss()||i.css("left",-this.left+"px");this.setTranslate(this.left)}};i.prototype.enableThumbDrag=function(){var i=this,f=0,e=0,u=!1,o=!1,r=0;i.$thumbOuter.addClass("lg-grab");i.core.$outer.find(".lg-thumb").on("mousedown.lg.thumb",function(n){i.thumbTotalWidth>i.thumbOuterWidth&&(n.preventDefault(),f=n.pageX,u=!0,i.core.$outer.scrollLeft+=1,i.core.$outer.scrollLeft-=1,i.thumbClickable=!1,i.$thumbOuter.removeClass("lg-grab").addClass("lg-grabbing"))});n(t).on("mousemove.lg.thumb",function(n){u&&(r=i.left,o=!0,e=n.pageX,i.$thumbOuter.addClass("lg-dragging"),r=r-(e-f),r>i.thumbTotalWidth-i.thumbOuterWidth&&(r=i.thumbTotalWidth-i.thumbOuterWidth),r<0&&(r=0),i.setTranslate(r))});n(t).on("mouseup.lg.thumb",function(){o?(o=!1,i.$thumbOuter.removeClass("lg-dragging"),i.left=r,Math.abs(e-f)<i.core.s.swipeThreshold&&(i.thumbClickable=!0)):i.thumbClickable=!0;u&&(u=!1,i.$thumbOuter.removeClass("lg-grabbing").addClass("lg-grab"))})};i.prototype.enableThumbSwipe=function(){var n=this,i=0,r=0,u=!1,t=0;n.core.$outer.find(".lg-thumb").on("touchstart.lg",function(t){n.thumbTotalWidth>n.thumbOuterWidth&&(t.preventDefault(),i=t.originalEvent.targetTouches[0].pageX,n.thumbClickable=!1)});n.core.$outer.find(".lg-thumb").on("touchmove.lg",function(f){n.thumbTotalWidth>n.thumbOuterWidth&&(f.preventDefault(),r=f.originalEvent.targetTouches[0].pageX,u=!0,n.$thumbOuter.addClass("lg-dragging"),t=n.left,t=t-(r-i),t>n.thumbTotalWidth-n.thumbOuterWidth&&(t=n.thumbTotalWidth-n.thumbOuterWidth),t<0&&(t=0),n.setTranslate(t))});n.core.$outer.find(".lg-thumb").on("touchend.lg",function(){n.thumbTotalWidth>n.thumbOuterWidth?u?(u=!1,n.$thumbOuter.removeClass("lg-dragging"),Math.abs(r-i)<n.core.s.swipeThreshold&&(n.thumbClickable=!0),n.left=t):n.thumbClickable=!0:n.thumbClickable=!0})};i.prototype.toogle=function(){var n=this;n.core.s.toogleThumb&&n.core.$outer.addClass("lg-can-toggle")};i.prototype.thumbkeyPress=function(){var i=this;n(t).on("keydown.lg.thumb",function(n){n.keyCode===38?(n.preventDefault(),i.core.$outer.addClass("lg-thumb-open")):n.keyCode===40&&(n.preventDefault(),i.core.$outer.removeClass("lg-thumb-open"))})};i.prototype.destroy=function(){this.core.s.thumbnail&&this.core.$items.length>1&&(n(t).off("resize.lg.thumb orientationchange.lg.thumb keydown.lg.thumb"),this.$thumbOuter.remove(),this.core.$outer.removeClass("lg-has-thumb"))};n.fn.lightGallery.modules.Thumbnail=i}(jQuery,window,document);$(document).ready(function(){function u(n){if(n.files&&n.files[0]){var t=new FileReader,i=n.files[0].size/1048576,r=n.files[0].name,u=r.split(".").pop();console.log(u+" "+i+" MB");t.onload=function(n){$(".up-img").attr("src",n.target.result).show();$(".upload-section .icon-add").hide();$(".get-file").unbind("click")};t.readAsDataURL(n.files[0])}}var i=0,t,n,r;$(".w-r-panel textarea").on("click focus",function(n){i==0&&($(this).animate({height:"200"}),i=i+1);$(this).siblings(".review-help").addClass("review-help-add");$(this).siblings(".review-help").css("right",-($(".field-outline .review-help").width()+46));$(this).parent().siblings(".expand-wr").slideDown();n.stopPropagation()});$('.check-wrap input[type="checkbox"]').click(function(){$(this).prop("checked")==!0?$(this).parent().addClass("checked"):$(this).parent().removeClass("checked")});$(".prod-var .view-var").click(function(n){n.preventDefault();$(this).siblings("ul").slideToggle();$(this).find("span").toggleClass("icon-drop-down icon-next")});$(function(){$(".open-all a").click(function(){$(this).parent().siblings(".more-brands-div").slideToggle()})});t=document.getElementsByTagName("textarea")[0];n=document.getElementsByClassName("char-count")[0];t&&(t.onkeyup=function(){var i=t.value;document.getElementById("hdfCatID").value=="925642336"||document.getElementById("hdfVerifiedReviews").value!=""||document.getElementById("hdfVerifiedDraft").value==1?i.length==0?n.innerHTML="":(n.style.color=i.length>=50?"green":"red",n.innerHTML=i.length):i.length==0?n.innerHTML="":(n.style.color=i.length>=100?"green":"red",n.innerHTML=i.length)});$(function(){$(".pages li").click(function(){$(this).find("button").addClass("active");$(this).siblings().find("button").removeClass("active")})});$(".toggle div.obtitle").click(function(){$(this).siblings(".toggle-content").slideToggle();$(this).find(".icon-drop-down").toggleClass("icon-next","icon-drop-down")});$("button.quote").click(function(){$(this).parent().parent().hide().siblings(".thank-quote").show()});$(".edit-comment").click(function(n){n.preventDefault();$(this).hide();var t=$(this).parent().siblings(0).find(".brand-comment");$(this).parent().siblings(0).find(".brand-comment").hide(0,function(){var i=$(this).text().replace(/\.../g,"").replace("READ MORE","").replace("Read More",""),n=$("<textarea/>").attr("id","txtResponse");n.val(i);$(n).insertAfter(t);$(".button-events").show()});$(".corp-response #btnCancel").click(function(){$(".brand-comment,.edit-comment").show();$("#txtResponse,.button-events").hide()})});$(".grid-view").click(function(){var t,n;$(".categories .list .box").wrap("<div class='col-3'><\/div>").addClass("gridl");$(".categories .bygdbox,.categories .cat-pagination").wrap("<div class='col-12'><\/div>");$(".categories .list").css("margin","0px -15px");$(".list-view").css("pointer-events","auto");$(".grid-view").css("pointer-events","none");$(".grid-view > span").removeClass("unrated-star");$(".list-view > span").addClass("unrated-star");$(".gridview").show();$(".gridview > div").show();$(".dvListingAds").hide();try{t=$(".row.list .col-3 div.rtitle").map(function(){return $(this).height()}).get();n=Math.max.apply(null,t);n>0&&$(".row.list .col-3 .gridl div.rtitle").css({height:n+"px"})}catch(i){}try{var n=0,t=$(".row.list .col-3").map(function(){return $(this).height()}).get(),n=Math.max.apply(null,t);n>0&&$(".row.list .col-3 .gridl").css({height:n-35+"px"})}catch(i){}});$(".list-view").click(function(){$(".row.list .col-3 .gridl").removeAttr("style");$(".row.list .col-3 .gridl .rtitle").removeAttr("style");$(".categories .list .box").unwrap().removeClass("gridl");$(".categories .bygdbox,.categories .cat-pagination").unwrap();$(".list-view").css("pointer-events","none");$(".grid-view").css("pointer-events","auto");$(".categories .list").css("margin","0px");$(".grid-view > span").addClass("unrated-star");$(".list-view > span").removeClass("unrated-star");$(".gridview").hide();$(".dvListingAds").show()});$(function(){if($("#tablist").length>0)$(window).on("scroll",function(){var t=$("#tablist").position(),i=t.top,r=i-$(window).scrollTop(),n;r<0?($(".fixed-menu").slideDown(),$(".list-menu >li:first-child").addClass("active"),n=$(document).scrollTop(),$(".fixed-menu .list-menu .scroll").each(function(){var t=$(this),i=$(t.find("a").attr("href")),r;i.is(":visible")&&(r=i.position(),r.top-60<n+$("#fixed-menu").height()&&r.top+i.height()>=n+$("#fixed-menu").height()-60?($(".fixed-menu .list-menu .scroll").removeClass("active"),t.addClass("active")):t.removeClass("active"))})):$(".fixed-menu").slideUp()})});$(".scroll, .gallery-thumbnails .thumb-count, .full-spec").on("click",function(){$("body, html").animate({scrollTop:$($(this).find("a").attr("href")).position().top-$("#fixed-menu").height()},"fast")});$(".to-top").click(function(n){n.preventDefault();$("html,body ").animate({scrollTop:0},600)});$(".tabable-accordion .table-head.open+.table-content").css("display","block");$(".tabable-accordion .table-head").click(function(){if($(this).hasClass("open")==!0)$(this).siblings(".table-content").slideUp({duration:300,easing:"easeInQuad",complete:function(){$(this).siblings(".table-head").removeClass("open")}});else{var n;$(this).siblings(".table-content").slideDown({duration:300,easing:"easeInQuad",complete:function(){$(this).siblings(".table-head").addClass("open");$(".tabable-accordion .table-content").not(this).slideUp({duration:300,easing:"easeInQuad",complete:function(){$(this).siblings(".table-head").removeClass("open")}})}})}n=$("#explore .tabable-accordion").offset().top-50;$("html,body").animate({scrollTop:n},"slow")});r=function(){document.getElementsByClassName("choosephoto")[0].click()};$(".get-file").on("click",function(){$(this).parent().find(".choosephoto").click()});$(".chosefile").on("click",function(){r()});$("#choosephoto").change(function(){u(this)});$(".add-image .icon-close").click(function(n){$(".upload-section .icon-add").show();$(".up-img").hide();n.stopPropagation();$(".get-file").bind("click",function(){r()})});$(".w-r-panel textarea").on("focusout",function(n){n.preventDefault();$(".review-help").removeClass("review-help-add").css("right","-300px")});$(".tolerence-div h4").on("click",function(){$(".tolerence-div > ul").slideToggle();$(this).find("span").toggleClass("icon-expand icon-collapse")});(function(){$(".product-details .more-guide").parent().find(".specification table").height()>270?($(".product-details .more-guide").parent().find(".specification .col-6:eq(0)").css("height","270px"),$(".product-details .more-guide").show(),$(".product-details .more-guide").click(function(n){n.preventDefault();$(this).hide().parent().find(".specification .col-6:eq(0)").css({height:"auto"}).height()})):$(".product-details .more-guide").hide()})();askQuestionNew=function(n){$("#quesdata").siblings("#emptytext").hide();n.preventDefault();$("#quesdata").slideToggle({easing:"easeInQuad"})};answerQuesNew=function(n,t){n.preventDefault();n.stopPropagation();$(t).parent().siblings().find(".answer-field").slideToggle({easing:"easeInQuad"})};userAnswerNew=function(n,t){n.preventDefault();$(t).siblings(".user-answers").slideToggle({easing:"easeInQuad"})};$(".tabs li a").click(function(n){n.preventDefault();$(this).parent().addClass("active").siblings().removeClass("active")});$(".notify-me").click(function(){openModal(".email-alert-box")});$("#quote").click(function(){openModal(".get-quote")});$(".salesfrm").click(function(){openModal(".sales-frm")});$(".review .read-more").click(function(n){n.preventDefault();$(this).toggle().parent().siblings(".expand-review").slideToggle()});$(".like-count").click(function(n){n.preventDefault();openModal(".user-rating-show")});$(".comment-clk,div > .icon-not-useful-filled").click(function(n){n.preventDefault()});$(".breply-clk").click(function(n){n.preventDefault();$(this).parent().parent().siblings(".cresbox").toggleClass("corp-resbox").slideToggle()});setTimeout(function(){$(".fullcommunictn a").unbind("click").parent(".fullcommunictn").click(function(n){n.preventDefault();$(this).hide().siblings(".comment").slideDown()})},2e3);$(".cust-share").click(function(){$(this).find(".dropdown-tip").is(":visible")==!1?$(this).find(".dropdown-tip").css("display","block"):$(this).find(".dropdown-tip").css("display","none")});$(".addfrbx span a").click(function(n){n.preventDefault();$(this).parent().hide().siblings().addClass("show")});$(".comment textarea").on("click focus",function(){$(this).css("height","100px");$(this).off();$(this).parent().siblings(".expand-comment").slideDown("fast")});rate(".expressrating","rated-star","unrated-star");$(".your-rating-star").on({mouseover:function(){$(this).children().removeClass("unrated-star").addClass("rated-star")},mouseleave:function(){$(this).children().removeClass("rated-star").addClass("unrated-star")}})}),function(){$("#lightgallery > div:lt(4)").show()}();rate=function(n,t,i){$(n).on({mouseover:function(){$(this).prevAll().andSelf().removeClass(i).addClass(t)},mouseleave:function(){$(this).prevAll().andSelf().removeClass(t).addClass(i);n!=".w-r-panel .express-ratings div"&&$(".click-star-txt").text("YOUR RATING ON")}})};var revHidskip,firstload=0,tempno=1,urlredirect1,indesof1,urlredirectTo1,submitclick=!1,url,hashid=window.location.href.substring(window.location.href.indexOf("#"));for(hashid.indexOf("#")!=-1&&$("#fixed-menu").hide(),$(document).ready(function(){var n;$("form#upload-form").attr("enctype","multipart/form-data").attr("encoding","multipart/form-data");lt2!==""&&lt2!=="0"||$("#locationmap").hide();$("#lightgallery").lightGallery();$(".row .gallery-thumbnails").lightGallery({selector:".g-imgbox"});document.getElementById("hidskip").value=13;scrollToDiv!=""&&(n=new Date,n.setTime(n.getTime()),eraseCookie("scrollDiv"),window.scrollTo(0,$("#"+scrollToDiv).offset().top-100));setTimeout(function(){if(Ajaxres(OverallRating,"OverallGraph="+Rid+"&u="+revAuthor+"&Random="+Math.random()),isBot!=1)firstload!=2&&(AjaxByHash(ShowComments,"ShowComments="+Rid+"&Random="+Math.random()+"&skip="+revHidskip.value+"&mergeparent="+mergeparent+"&parent="+parent1),firstload=1);else{var n=document.getElementById("linkpostcomment");n.style.display="none"}if(commentforRating=="True"&&NU("write comment"),showResponse=="True"&&(AjaxByHash(ShowCorpComments,"ShowCorpComments="+PostId+"&Random="+Math.random()+"&corpname="+coname),openComm=="1"&&$(".fullcommunictn").trigger("click")),isVidAd=="True")try{$("#dvRHS").html('<iframe src="'+mshost+"review/RR_ADS.aspx?cat_id="+catid+"&review_key="+reviewkey+'" style="width:300px;height:250px;overflow:auto;" scrolling="no" allowfullscreen><\/iframe>')}catch(t){}else try{$("#dvRHS").html('<iframe src="'+mshost+"DisplayAd.aspx?cid="+catId+'&size=300-250&type=reviews" style="width:300px;height:250px;overflow:auto;border:0;" scrolling="no"><\/iframe>')}catch(t){}},1e3);iscorp!=""&&$.ajax({url:"/review/CorporateResponse.ashx",async:!0,type:"POST",contentType:"application/x-www-form-urlencoded",dataType:"text",data:{catid:catid,mergedprods:mergedprods,mergeparent:mergeparent,corp:!0},responseType:"text/html",success:function(n){$("#idcorpresp").html(n);$("#idcorpresp").show()},error:function(){}})}),element_r=$("#dvRatingWidget"),tcount_r=1,$(window).scroll(function(){var n=element_r.offset(),t=element_r.outerHeight(),i=document.documentElement.scrollTop,r=n.top+t-i;r<$(window).height()&&tcount_r==1&&(tcount_r=2,CallOtherReviews())}),$(document).ready(function(){var n;if($("#btnBrandReply").click(function(n){loginid==0?(indesof1=LoginUrl.indexOf("/review/"),urlredirectTo1=LoginUrl.substr(indesof1),ajaxLoginCorp(urlredirectTo1)):(n.preventDefault(),$(this).siblings(".cresbox").toggleClass("corp-resbox").slideToggle())}),$("#"+lnkeditrespid).click(function(n){n.preventDefault();$(this).hide();var t=$(this).parent().siblings(0).find(".brand-comment");$(this).parent().siblings(0).find(".brand-comment").hide(0,function(){var n=$(this).html(),r,i;n=n.replace("READ MORE...","").replace("Read More...","").replace("...","");n=n.replace(/<(?!br\s*\/?)[^>]+>/g,"");n=n.replace("(<(/)*p>)","<br/>");n=n.replace("(\n)","<br/>");n=n.replace("((s)*<(/)*br(/)*>(s)*){2,}","<br/><br/>");n=n.replace("(<(/)*br(/)*>)","\n");n=n.replace(/<br>/g,"\n");n=n.replace(/<BR>/g,"\n");n=n.replace(/&nbsp;/g," ");n=n.replace(/&amp;/g,"&");n=n.replace(/&lt;/g,"<");n=n.replace(/&gt;/g,">");n=n.replace(/<a target.*?>/g,"");n=n.replace(/<\/a>/g,"");n=n.replace(/<(|\n)*?>/g,"");r=$("<span/>").attr("id","err_EditResponse").attr("class","warning hide");$(r).insertBefore(t);i=$("<textarea/>").attr("id","txtResponse").attr("onkeyup",'textResCounter("edit")').attr("onkeydown",'textResCounter("edit")');i.val(n);$(i).insertAfter(t);$(".button-events").show()});$(".corp-response #btnCancel").click(function(){$(".brand-comment,.edit-comm").show();$("#txtResponse,.button-events").hide()})}),brandRespond==1){try{$("#btnBrandReply").trigger("click")}catch(t){}$("html,body").animate({scrollTop:$("#btnBrandReply").offset().top-180},"slow");document.getElementById(txtRespId).focus();n=new Date;n.setTime(n.getTime());eraseCookie("brandReply")}else brandRespond==2&&($(".edit-comm").trigger("click"),$("html,body").animate({scrollTop:$("#btnCancel").offset().top-200},"slow"),n=new Date,n.setTime(n.getTime()),eraseCookie("brandReply"))}),$("#btnCancel").click(function(){$("#err_EditResponse").html("").hide()}),iframes=document.getElementsByTagName("iframe"),i=0;i<iframes.length;i++)wrapNode(iframes[i],"div")