(function(n){var o=navigator.platform,t={tabPause:800,focusChange:null,iOS:o==="iPad"||o==="iPhone"||o==="iPod",firefox:typeof InstallTrigger!="undefined",ie11:!window.ActiveXObject&&"ActiveXObject"in window},i=function(t,i){if(i!==null&&typeof i!="undefined")for(var r in i)n(t).data("autotab-"+r,i[r])},r=function(t){var r={arrowKey:!1,format:"all",loaded:!1,disabled:!1,pattern:null,uppercase:!1,lowercase:!1,nospace:!1,maxlength:2147483647,target:null,previous:null,trigger:null,originalValue:"",changed:!1,editable:t.type==="text"||t.type==="password"||t.type==="textarea"||t.type==="tel"||t.type==="number"||t.type==="email"||t.type==="search"||t.type==="url",filterable:t.type==="text"||t.type==="password"||t.type==="textarea",tabOnSelect:!1},f,u;if(n.autotab.selectFilterByClass===!0&&typeof n(t).data("autotab-format")=="undefined"){f=["all","text","alpha","number","numeric","alphanumeric","hex","hexadecimal","custom"];for(u in f)if(n(t).hasClass(f[u])){r.format=f[u];break}}for(u in r)typeof n(t).data("autotab-"+u)!="undefined"&&(r[u]=n(t).data("autotab-"+u));return r.loaded||(r.trigger!==null&&typeof r.trigger=="string"&&(r.trigger=r.trigger.toString()),i(t,r)),r},u=function(n){return typeof n!="undefined"&&(typeof n=="string"||!(n instanceof jQuery))},s=function(n){var t=0,i=0,r=0;if(n.type==="text"||n.type==="password"||n.type==="textarea")if(typeof n.selectionStart=="number"&&typeof n.selectionEnd=="number")t=n.selectionStart,i=n.selectionEnd,r=1;else if(document.selection&&document.selection.createRange){var u=document.selection.createRange(),f=n.createTextRange(),e=n.createTextRange(),o=u.getBookmark();f.moveToBookmark(o);e.setEndPoint("EndToStart",f);t=e.text.length;i=t+u.text.length;r=2}return{start:t,end:i,selectionType:r}},e,f;n.autotab=function(t){typeof t!="object"&&(t={});n(":input").autotab(t)};n.autotab.selectFilterByClass=!1;n.autotab.next=function(){var t=n(document.activeElement);t.length&&t.trigger("autotab-next")};n.autotab.previous=function(){var t=n(document.activeElement);t.length&&t.trigger("autotab-previous")};n.autotab.remove=function(t){u(t)?n(t).autotab("remove"):n(":input").autotab("remove")};n.autotab.restore=function(t){u(t)?n(t).autotab("restore"):n(":input").autotab("restore")};n.autotab.refresh=function(t){u(t)?n(t).autotab("refresh"):n(":input").autotab("refresh")};n.fn.autotab=function(t,e){var h,l,o,s,c;if(!this.length)return this;if(h=n.grep(this,function(n){return n.type!="hidden"}),t=="filter")for((typeof e=="string"||typeof e=="function")&&(e={format:e}),s=0,c=h.length;s<c;s++)o=r(h[s]),l=e,l.target=o.target,l.previous=o.previous,n.extend(o,l),o.loaded?i(h[s],o):(o.disabled=!0,f(h[s],l));else if(t=="remove"||t=="destroy"||t=="disable")for(s=0,c=h.length;s<c;s++)o=r(h[s]),o.disabled=!0,i(h[s],o);else if(t=="restore"||t=="enable")for(s=0,c=h.length;s<c;s++)o=r(h[s]),o.disabled=!1,i(h[s],o);else if(t=="refresh")for(s=0,c=h.length;s<c;s++){var o=r(h[s]),a=s+1,v=s-1,y=function(){o.target=s>0&&a<c?h[a]:s>0?null:h[a]},p=function(){o.previous=s>0&&a<c?h[v]:s>0?h[v]:null};o.target===null||o.target.selector===""?y():(typeof o.target=="string"||o.target.selector)&&(o.target=n(typeof o.target=="string"?o.target:o.target.selector),o.target.length===0&&y());o.previous===null||o.previous.selector===""?p():(typeof o.previous=="string"||o.previous.selector)&&(o.previous=n(typeof o.previous=="string"?o.previous:o.previous.selector),o.previous.length===0&&p());o.loaded?(u(o.target)&&(o.target=n(o.target)),u(o.previous)&&(o.previous=n(o.previous)),i(h[s],o)):f(h[s],o)}else if(t===null||typeof t=="undefined"?e={}:typeof t=="string"||typeof t=="function"?e={format:t}:typeof t=="object"&&(e=t),h.length>1)for(s=0,c=h.length;s<c;s++){var a=s+1,v=s-1,l=e;s>0&&a<c?(l.target=h[a],l.previous=h[v]):s>0?(l.target=null,l.previous=h[v]):(l.target=h[a],l.previous=null);f(h[s],l)}else f(h[0],e);return this};e=function(n,t,i){if(typeof i.format=="function")return i.format(t,n);var r=null;switch(i.format){case"text":r=new RegExp("[0-9]+","g");break;case"alpha":r=new RegExp("[^a-zA-Z]+","g");break;case"number":case"numeric":r=new RegExp("[^0-9]+","g");break;case"alphanumeric":r=new RegExp("[^0-9a-zA-Z]+","g");break;case"hex":case"hexadecimal":r=new RegExp("[^0-9A-Fa-f]+","g");break;case"custom":r=new RegExp(i.pattern,"g")}return r!==null&&(t=t.replace(r,"")),i.nospace&&(r=new RegExp("[ ]+","g"),t=t.replace(r,"")),i.uppercase&&(t=t.toUpperCase()),i.lowercase&&(t=t.toLowerCase()),t};f=function(f,o){var h=r(f),c;if(h.disabled&&(h.disabled=!1,h.target=null,h.previous=null),n.extend(h,o),u(h.target)&&(h.target=n(h.target)),u(h.previous)&&(h.previous=n(h.previous)),c=f.maxLength,typeof f.maxLength=="undefined"&&f.type=="textarea"&&(c=f.maxLength=f.getAttribute("maxlength")),h.maxlength==2147483647&&c!=2147483647&&c!=-1?h.maxlength=c:h.maxlength>0?f.maxLength=h.maxlength:h.target=null,h.loaded){i(f,h);return}if(h.loaded=!0,i(f,h),f.type=="select-one")n(f).on("change",function(){var t=r(this);t.tabOnSelect&&n(this).trigger("autotab-next")});n(f).on("autotab-next",function(n,i){var u=this;setTimeout(function(){i||(i=r(u));var n=i.target;!i.disabled&&n.length&&(t.iOS||(n.prop("disabled")||n.prop("readonly")?n.trigger("autotab-next"):i.arrowKey?n.focus():n.focus().select(),t.focusChange=new Date))},1)}).on("autotab-previous",function(n,u){var f=this;setTimeout(function(){var n,e;u||(u=r(f));n=u.previous;!u.disabled&&n.length&&(e=n.val(),n.prop("disabled")||n.prop("readonly")?n.trigger("autotab-previous"):e.length&&n.data("autotab-editable")&&!u.arrowKey?(t.ie11?n.val(e.substring(0,e.length-1)).focus():n.focus().val(e.substring(0,e.length-1)),i(n,{changed:!0})):(u.arrowKey&&i(this,{arrowKey:!1}),t.ie11?n.val(e).focus():n.focus().val(e)),t.focusChange=null)},1)}).on("focus",function(){i(this,{originalValue:this.value})}).on("blur",function(){var t=r(this);t.changed&&this.value!=t.originalValue&&(i(this,{changed:!1}),n(this).change())}).on("keydown.autotab",function(u){var f=r(this),o,e;if(!f||f.disabled)return!0;if(o=s(this),e=u.which||u.charCode,e==8){if(f.arrowKey=!1,!f.editable)return n(this).trigger("autotab-previous",f),!1;if(i(this,{changed:this.value!==f.originalValue}),this.value.length===0){n(this).trigger("autotab-previous",f);return}}else if(e==9&&t.focusChange!==null){if(u.shiftKey){t.focusChange=null;return}if((new Date).getTime()-t.focusChange.getTime()<t.tabPause)return t.focusChange=null,!1}else this.type!=="range"&&this.type!=="select-one"&&this.type!=="select-multiple"&&(this.type!=="tel"&&this.type!=="number"||(this.type==="tel"||this.type==="number")&&this.value.length==0)&&(e!=37||f.editable&&o.start!=0?e!=39||f.editable&&f.filterable&&o.end!=this.value.length&&this.value.length!=0||(f.arrowKey=!0,n(this).trigger("autotab-next",f)):(f.arrowKey=!0,n(this).trigger("autotab-previous",f)))}).on("keypress.autotab",function(u){var f=r(this),l=u.which||u.keyCode,h,a,o,c;if(!f||f.disabled||t.firefox&&u.charCode===0||u.ctrlKey||u.altKey||l==13||this.disabled)return!0;if(h=String.fromCharCode(l),this.type!="text"&&this.type!="password"&&this.type!="textarea")return this.value.length+1>=f.maxlength&&(f.arrowKey=!1,n(this).trigger("autotab-next",f)),!(this.value.length==f.maxlength);if(f.trigger!==null&&f.trigger.indexOf(h)>=0)return t.focusChange!==null&&(new Date).getTime()-t.focusChange.getTime()<t.tabPause?t.focusChange=null:(f.arrowKey=!1,n(this).trigger("autotab-next",f)),!1;if(t.focusChange=null,a=document.selection&&document.selection.createRange?!0:l>0,h=e(this,h,f),a&&(h===null||h===""))return!1;if(a&&this.value.length<=this.maxLength){if(o=s(this),o.start===0&&o.end==this.value.length)this.value=h,i(this,{changed:this.value!=f.originalValue});else{if(this.value.length==this.maxLength&&o.start===o.end)return f.arrowKey=!1,n(this).trigger("autotab-next",f),!1;this.value=this.value.slice(0,o.start)+h+this.value.slice(o.end);i(this,{changed:this.value!=f.originalValue})}this.value.length!=f.maxlength&&(o.start++,o.selectionType==1?this.selectionStart=this.selectionEnd=o.start:o.selectionType==2&&(c=this.createTextRange(),c.collapse(!0),c.moveEnd("character",o.start),c.moveStart("character",o.start),c.select()))}return this.value.length==f.maxlength&&(f.arrowKey=!1,n(this).trigger("autotab-next",f)),!1}).on("drop paste",function(){var i=r(this);if(!i)return!0;this.maxLength=2147483647,function(u,f){setTimeout(function(){var h=-1,o=document.createElement("input"),s;o.type="hidden";o.value=u.value.toLowerCase();o.originalValue=u.value;u.value=e(u,u.value,f).substr(0,f.maxlength);s=function(i,u){var f,l,a,v,c;if(i){if(f=r(i),n(i).prop("disabled")||n(i).prop("readonly")||!f.editable){n(i).trigger("autotab-next");t.iOS||s(f.target[0],u);return}for(l=0,a=u.length;l<a;l++)h=o.value.indexOf(u.charAt(l).toLowerCase(),h)+1;(v=o.originalValue.substr(h),c=e(i,v,f).substr(0,f.maxlength),c)&&(i.value=c,c.length==f.maxlength&&(f.arrowKey=!1,n(i).trigger("autotab-next",f),t.firefox&&setTimeout(function(){i.selectionStart=i.value.length},1),t.iOS||s(f.target[0],c)))}};u.value.length==f.maxlength&&(i.arrowKey=!1,n(u).trigger("autotab-next",i),t.iOS||s(f.target[0],u.value.toLowerCase()));u.maxLength=f.maxlength},1)}(this,i)})};n.fn.autotab_magic=function(){return n(this).autotab()};n.fn.autotab_filter=function(t){var i={};return typeof t=="string"||typeof t=="function"?i.format=t:n.extend(i,t),n(this).autotab("filter",i)}})(jQuery);$("document").ready(function(){function n(){$("#alertAddToBasketSuccess").hide();$("#alertAddToBasketWarning").hide();$("#js_PrintSubscriptionButtonRow").hide();$("#js_SingleIssueButtonRow").hide();$("#js_DigitalSubscriptionButtonRow").hide();$("#js_DigitalAndPrintButtonRow").hide();$("#js_DigitalOnlyButtonRow").hide();$("input[type=radio][name=selectedSubscription]:checked").parent().removeClass("radio-active");$("input[type=radio][name=selectedSubscription]").removeAttr("checked")}function t(){var n="."+$("input[type=radio][name=issueOptionsUK]:checked").val(),t="."+$("input[type=radio][name=issueOptionsEurope]:checked").val(),i="."+$("input[type=radio][name=issueOptionsROW]:checked").val(),r="."+$("input[type=radio][name=issueOptionsUsaCanada]:checked").val();$("#tabSubscriptionOffersUK .subscription-offers-row").filter(n).fadeIn(400);$("#tabSubscriptionOffersEurope .subscription-offers-row").filter(t).fadeIn(400);$("#tabSubscriptionOffersROW .subscription-offers-row").filter(i).fadeIn(400);$("#tabSubscriptionOffersUsaCanada .subscription-offers-row").filter(r).fadeIn(400);$("#tabSubscriptionMembershipOffers .subscription-offers-row").fadeIn(400);$("#tabSubscriptionOffersDigitalOnly .subscription-offers-row").fadeIn(400);$("#js_PrintSubscriptionButtonRow").hide();$("#js_SingleIssueButtonRow").hide();$("#js_DigitalSubscriptionButtonRow").hide();$("#js_DigitalOnlyButtonRow").hide();$("#js_DigitalAndPrintButtonRow").hide();$("#js_PrintSubscriptionButtonRow").removeClass("hidden");$("#js_SingleIssueButtonRow").removeClass("hidden");$("#js_DigitalSubscriptionButtonRow").removeClass("hidden");$("#js_DigitalOnlyButtonRow").removeClass("hidden");$("#js_DigitalAndPrintButtonRow").removeClass("hidden")}$("#tabPostageIssueOptions input").click(function(){$(this).parent().parent().find(".radio-inline").each(function(){$(this).removeClass("radio-active")});$(this).parent().addClass("radio-active")});$(".subscription-offers-row input").click(function(){$("#myriadSubsPromotionId").val(this.value);$("#alertAddToBasketSuccess").hide();$("#alertAddToBasketWarning").hide();$(".subscription-offers-row .radio-inline").each(function(){$(this).removeClass("radio-active")});$(this).parent().addClass("radio-active");$(this).hasClass("js_IsSingleIssue")?($("#js_PrintSubscriptionButtonRow").fadeOut(400),$("#js_DigitalSubscriptionButtonRow").fadeOut(400),$("#js_DigitalOnlyButtonRow").fadeOut(400),$("#js_DigitalAndPrintButtonRow").fadeOut(400),$("#js_SingleIssueButtonRow").delay(400).fadeIn(400)):$(this).hasClass("js_isDigitalSubscription")?($("#js_PrintSubscriptionButtonRow").fadeOut(400),$("#js_DigitalSubscriptionButtonRow").fadeOut(400),$("#js_DigitalAndPrintButtonRow").fadeOut(400),$("#js_SingleIssueButtonRow").fadeOut(400),$("#js_DigitalOnlyButtonRow").delay(400).fadeIn(400)):$(this).hasClass("js_isDigitalAndPrintSubscription")?($("#js_PrintSubscriptionButtonRow").fadeOut(400),$("#js_DigitalSubscriptionButtonRow").fadeOut(400),$("#js_DigitalOnlyButtonRow").fadeOut(400),$("#js_SingleIssueButtonRow").fadeOut(400),$("#js_DigitalAndPrintButtonRow").delay(400).fadeIn(400)):($("#js_PrintSubscriptionButtonRow").delay(400).fadeIn(400),$("#js_SingleIssueButtonRow").fadeOut(400),$("#js_DigitalOnlyButtonRow").fadeOut(400),$("#js_DigitalAndPrintButtonRow").fadeOut(400),$("#js_DigitalSubscriptionButtonRow").fadeOut(400));$("html, body").animate({scrollTop:$("#js_ScrollToPaymentButtons").offset().top},1e3)});$("input[type=radio][name=issueOptionsUK]").change(function(){var t="."+this.value;n();$("#tabSubscriptionOffersUK .subscription-offers-row").fadeOut(400);$("#tabSubscriptionOffersUK .subscription-offers-row").filter(t).delay(400).fadeIn(400)});$("input[type=radio][name=issueOptionsEurope]").change(function(){var t="."+this.value;n();$("#tabSubscriptionOffersEurope .subscription-offers-row").fadeOut(400);$("#tabSubscriptionOffersEurope .subscription-offers-row").filter(t).delay(400).fadeIn(400)});$("input[type=radio][name=issueOptionsROW]").change(function(){var t="."+this.value;n();$("#tabSubscriptionOffersROW .subscription-offers-row").fadeOut(400);$("#tabSubscriptionOffersROW .subscription-offers-row").filter(t).delay(400).fadeIn(400)});$("input[type=radio][name=issueOptionsUsaCanada]").change(function(){var t="."+this.value;n();$("#tabSubscriptionOffersUsaCanada .subscription-offers-row").fadeOut(400);$("#tabSubscriptionOffersUsaCanada .subscription-offers-row").filter(t).delay(400).fadeIn(400)});$('input[name="subscriptionRegion"]').click(function(){$(this).tab("show")});$("#postageRegionOffers input").click(function(){$(this).parent().parent().find(".radio-inline").each(function(){$(this).removeClass("radio-active")});$(this).parent().addClass("radio-active")});$("a[data-toggle='tab']").on("shown.bs.tab",function(){n()});t();$("#purchasing-options input[type=radio][name=postageOptions]").change(function(){$("#purchasing-options label.active").removeClass("active");$(this).parent().addClass("active")})});$("document").ready(function(){$(".js_autoadvancealpha").autotab("filter",{nospace:!1,format:"custom",pattern:"[^0-9a-zA-Z- /+_]"});$(document).on("show.bs.tab",'.nav-tabs-responsive [data-toggle="tab"]',function(n){var t=$(n.target),r=t.closest(".nav-tabs-responsive"),i=t.closest("li"),u=i.next(),f=i.prev();r.find("li").removeClass("next prev");f.addClass("prev");u.addClass("next")})});$("document").ready(function(){function n(){var n=window.location.pathname,t;return(n=n[0]==="/"?n.substr(1):n,t=n.split("/",1),typeof t!="undefined"&&t!=null&&t.length>0)?"/"+t[0]:""}function t(n){if(typeof n.addToBasketResult!="undefined"&&typeof n.addToBasketResult.ItemAdded!="undefined"&&n.addToBasketResult.ItemAdded===!0){var t=parseInt($("#basket-item-count").html());$("#basket-item-count").html(t+1)}}function i(t){var r=$("#addToBasketModal"),l=$(".js-modal-body-loader",r),h=$(".js-modal-body-result",r),a=$(".js-modal-footer-result",r),f=$(".modal-title",r),c=$(".js-modal-title-text",r),o=$(".modal-content",r),s=$(".js-modal-body-message",h),u=$(".js-modal-body-confirm-button",r),i=t.addToBasketResult;f.removeClass("text-success text-danger");o.removeClass("text-success text-danger");u.removeClass("btn-success btn-danger");typeof i!="undefined"&&i!==null&&typeof i.ItemAdded!="undefined"&&i.ItemAdded===!0?($(".js_BasketItemCounter").html(t.addToBasketResult.TotalItems),c.html("Added to your basket!"),f.addClass("text-success"),o.addClass("text-success"),s.html(t.addToBasketResult.ProductDescription),u.addClass("btn-success")):(c.html("<strong>Sorry!<\/strong> This item could not be added to your basket."),f.addClass("text-danger"),o.addClass("text-danger"),s.html(""),u.addClass("btn-danger"),typeof i!="undefined"&&i!==null&&typeof i.ResultMessage!="undefined"&&s.html(t.addToBasketResult.ResultMessage));h.show();a.show();u.attr("href",n()+"/checkout/");l.hide();e(i)}function r(){var n=$("#addToBasketModal"),t=$(".js-modal-body-loader",n),i=$(".js-modal-body-result",n);i.hide();t.show();n.modal("show")}function e(n){n===null||n.ItemAdded===!1?$(".js-checkmark-error").removeClass("hidden"):($(".js-checkmark-success").removeClass("hidden"),$(".js-checkmark-success").toggleClass("load-complete"));$(".js-checkmark").toggle()}function u(){var n=$("#SubscriptionOffers ul.nav-tabs li.active")[0];if(typeof n=="undefined")return 0;switch(n.id){case"tabUkPostage":return 1;case"tabEuropeanPostage":return 2;case"tabWorldwidePostage":return 3;case"tabUSACanadaPostage":return 4;default:return 0}}function o(){var t=u(),n;switch(t){case 1:n="#postageregionUk";break;case 2:n="#postageregionEurope";break;case 3:n="#postageregionWorldwide";break;case 4:n="#postageregionUsaCanada";break;default:return"0"}return $(n).val()}function f(){var n=$("#isMembershipSubscription").val();return typeof n!="undefined"&&n==="true"?!0:!1}$("#addToBasketModal").on("hidden.bs.modal",function(){$(".js-checkmark-success").hasClass("load-complete")&&$(".js-checkmark-success").toggleClass("load-complete");$(".js-checkmark-error").addClass("hidden");$(".js-checkmark-success").addClass("hidden");$(".js-checkmark").toggle()});$("#SubscriptionGridAddSubscription").click(function(e){e.preventDefault();r();$.ajax({method:"POST",url:n()+"/basket/addsubscription",data:{myriadSubsPromotionId:$("input[name=selectedSubscription]:checked").val(),deliveryRegionId:u(),subscriptionStartIssueId:$("#js_SubscriptionStartIssueId").val(),isMembershipSubscription:f()}}).done(function(n){i(n);t(n)})});$("#DigitalAndPrintSubscription").click(function(e){e.preventDefault();r();$.ajax({method:"POST",url:n()+"/basket/addsubscription",data:{myriadSubsPromotionId:$("input[name=selectedSubscription]:checked").val(),deliveryRegionId:u(),subscriptionStartIssueId:$("#js_SubscriptionStartIssueId").val(),isMembershipSubscription:f(),orderProductTypeId:7}}).done(function(n){i(n);t(n)})});$("#DigitalOnlySubscription").click(function(u){u.preventDefault();r();$.ajax({method:"POST",url:n()+"/basket/addsubscription",data:{myriadSubsPromotionId:$("input[name=selectedSubscription]:checked").val(),deliveryRegionId:0,subscriptionStartIssueId:$("#js_SubscriptionStartIssueId").val(),isMembershipSubscription:f(),orderProductTypeId:6}}).done(function(n){i(n);t(n)})});$("#SubscriptionGridAddSingleIssue").click(function(f){f.preventDefault();r();var e=$("input[name=selectedSubscription]:checked").val(),s=o();$.ajax({method:"POST",url:n()+"/basket/addproduct",data:{issueId:e,deliveryRegionId:u(),postageRateId:s,checkoutOrderProductType:2}}).done(function(n){i(n);t(n)})});$(".js_BuyNowButton").click(function(u){u.preventDefault();r();var e=$("#js_PromotionId").val(),o=$("#js_IsRenewal").val(),s=$("#js_IsGiftRenewal").val(),h=$("#js_MyriadPackageId").val(),c=$(this).siblings("input[type='hidden'][id*='js_MyriadSubsPromotionId']").val(),l=$(this).siblings("input[type='hidden'][id*='js_RegionToBuy']").val(),a=$(this).parent().parent().find("select[id*='js_SubscriptionStartIssueId']").val(),v=$(this).siblings("input[type='hidden'][id*='js_OrderProductTypeId']").val();$.ajax({method:"POST",url:n()+"/basket/addsubscription",data:{myriadSubsPromotionId:c,deliveryRegionId:l,subscriptionStartIssueId:a,myriadPromotionId:e,isRenewal:o,isGiftRenewal:s,myriadPackageId:h,isMembershipSubscription:f(),orderProductTypeId:v}}).done(function(n){i(n);t(n)})});$(".js_RadioPostageOptionsLabel").click(function(){$(".js_RadioPostageOptionsLabel").removeClass("labelSelected");$(this).addClass("labelSelected")});$("#ButtonBuyProduct").click(function(u){var o,s;u.preventDefault();var f=$("input[name=postageOptions]:checked").val().split("/"),h=f[0],e=f[1];typeof e=="undefined"?$("#js_PostageValidation").show():(r(),$("#js_PostageValidation").hide(),o=$("#js_IssueId").val(),s=$("#js_CheckoutProductType").val(),$.ajax({method:"POST",url:n()+"/basket/addproduct",data:{issueId:o,deliveryRegionId:h,postageRateId:e,checkoutOrderProductType:s}}).done(function(n){i(n);t(n)}))})});$("document").ready(function(){$(".js_smoothscroll").click(function(){if(location.pathname.replace(/^\//,"")===this.pathname.replace(/^\//,"")&&location.hostname===this.hostname){var n=$(this.hash);if(n=n.length?n:$("[name="+this.hash.slice(1)+"]"),n.length)return $("html, body").animate({scrollTop:n.offset().top},1e3),!1}return!0})})