function manipulateBanerVisibility(n){n===!1?$("#preferences-header").hide():$("#preferences-header").show()}function cookieExist(n){for(var t,u=n+"=",r=document.cookie.split(";"),i=0;i<r.length;i++){for(t=r[i];t.charAt(0)==" ";)t=t.substring(1,t.length);if(t.indexOf(u)==0)return!0}return!1}var NAME,checkCookie;(function(n){var t=!1,r,i;typeof define=="function"&&define.amd&&(define(n),t=!0);typeof exports=="object"&&(module.exports=n(),t=!0);t||(r=window.Cookies,i=window.Cookies=n(),i.noConflict=function(){return window.Cookies=r,i})})(function(){function n(){for(var n=0,r={},t,i;n<arguments.length;n++){t=arguments[n];for(i in t)r[i]=t[i]}return r}function t(i){function r(t,u,f){var o,c,l,s,v,e,h;if(typeof document!="undefined"){if(arguments.length>1){f=n({path:"/"},r.defaults,f);typeof f.expires=="number"&&(c=new Date,c.setMilliseconds(c.getMilliseconds()+f.expires*864e5),f.expires=c);f.expires=f.expires?f.expires.toUTCString():"";try{o=JSON.stringify(u);/^[\{\[]/.test(o)&&(u=o)}catch(w){}u=i.write?i.write(u,t):encodeURIComponent(String(u)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent);t=encodeURIComponent(String(t));t=t.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent);t=t.replace(/[\(\)]/g,escape);l="";for(s in f)f[s]&&(l+="; "+s,f[s]!==!0)&&(l+="="+f[s]);return document.cookie=t+"="+u+l}t||(o={});for(var y=document.cookie?document.cookie.split("; "):[],p=/(%[0-9A-Z]{2})+/g,a=0;a<y.length;a++){v=y[a].split("=");e=v.slice(1).join("=");e.charAt(0)==='"'&&(e=e.slice(1,-1));try{if(h=v[0].replace(p,decodeURIComponent),e=i.read?i.read(e,h):i(e,h)||e.replace(p,decodeURIComponent),this.json)try{e=JSON.parse(e)}catch(w){}if(t===h){o=e;break}t||(o[h]=e)}catch(w){}}return o}}return r.set=r,r.get=function(n){return r.call(r,n)},r.getJSON=function(){return r.apply({json:!0},[].slice.call(arguments))},r.defaults={},r.remove=function(t,i){r(t,"",n(i,{expires:-1}))},r.withConverter=t,r}return t(function(){})});NAME=NAME||{},function(n){"use strict";NAME.keyboard={back:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,esc:27,space:32,pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40,del:46,command:91};NAME.focusables="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]";NAME.general={};NAME.general.senseClickOutside=function(n,t){if(n.closest(t).length===0)return!0};NAME.general.debounce=function(n,t,i){var r,u;return function(){var f=this,e=arguments,o=function(){r=null;i||(u=n.apply(f,e))},s=i&&!r;return clearTimeout(r),r=setTimeout(o,t),s&&(u=n.apply(f,e)),u}};NAME.access={};NAME.access.blockFocus=function(n,t){n.attr("aria-hidden","true");n.on("focusin.blockingFocus",function(){if(n.attr("aria-hidden")==="true")return t.focus(),!1})};NAME.access.removeBlockFocus=function(n){n.off("focusin.blockingFocus");n.removeAttr("aria-hidden")};NAME.access.ariaExpand=function(n,t){n.attr("aria-expanded","true");t.attr("aria-hidden","false")};NAME.access.ariaContract=function(n,t){n.attr("aria-expanded","false");t.attr("aria-hidden","true")};NAME.access.ariaHideContent=function(n){var t=n.find("a, button, input, select, textaria");n.attr("aria-hidden","true");t.attr("tabindex","-1").attr("data-focusable-hidden-elem","true")};NAME.access.ariaShowContent=function(n){var t=n.find("[data-focusable-hidden-elem]");n.removeAttr("aria-hidden");t.removeAttr("tabindex").removeAttr("data-focusable-hidden-elem")};NAME.access.tagTrigger=function(t){var i;i=t?t:n(document.activeElement);i.attr("data-trigger","true")};NAME.access.focusTrigger=function(t){var i;i=t?t:n('[data-trigger="true"]');i.focus().removeAttr("data-trigger")};NAME.access.announcements=function(n,t){n.text(t);setTimeout(function(){n.text("")},1e3)};NAME.access.duplicateTextForReading=function(t,i){var r="";n.each(i,function(){r+=n(this).text();r+=" "});NAME.access.announcements(t,r)}}(jQuery),function(n,t){var i=t.keyboard;n(function(){function o(){if(/iP(hone|od|ad)/.test(navigator.platform)){var n=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);return{isIos:!0,Major:parseInt(n[1],10),Minor:parseInt(n[2],10),Patch:parseInt(n[3]||0,10)}}return{isIos:!1}}var t=".key, .evtItem, .evtItemPil, .tabs",u=n(".acc-arrow li"),f=n(t).click(function(){this.focus()}),r;Array.prototype.indexOf||(Array.prototype.indexOf=function(n){var i=this.length>>>0,t=Number(arguments[1])||0;for(t=t<0?Math.ceil(t):Math.floor(t),t<0&&(t+=i);t<i;t++)if(t in this&&this[t]===n)return t;return-1});n(t).keydown(function(n){if([i.up,i.down,i.left,i.right].indexOf(n.keyCode)>-1){n.preventDefault();var r=n.keyCode===i.down||n.keyCode===i.right?1:-1,e=f.filter(":focus").parent("li").index()+r;u.eq(e%u.length).find(t).focus()}});n(window).scroll(function(){n(this).scrollTop()>=300?n("#return-to-top").fadeIn(200):n("#return-to-top").fadeOut(200)});n("#return-to-top").click(function(){n("body,html").animate({scrollTop:0},500)});n(".hideme").click(function(){n(".tableOfContents, .hideme").hide();n(".showme").show()});n(".showme").click(function(){n(".tableOfContents, .hideme").show();n(".showme").hide()});n(".ePrivacyButton").click(function(){n(".privacyouterwrapper").hide("slow")});n('[data-toggle="popover"]').popover();n(".related-meds").click(function(t){var i=n(".related-meds-links"),r;return i.filter(":visible").length===0&&(r=n(this),r.trackCustomEvent("docRelatedMenu",t)),i.toggle(),!0});n("#segmenter").modal("show");n(".search_bar").click(function(){n(".container-fluid.content").hasClass("contracted")?(n(".container-fluid.content").toggleClass("contracted"),n(".search-main").toggle(),n(".anchor").toggleClass("anchorWithSearchExpanded"),n(".affix").toggleClass("affixWithSearchExpanded"),e.preventDefault()):(n(".container-fluid.content").toggleClass("contracted"),n(".search-main").toggle(),n(".anchor").toggleClass("anchorWithSearchExpanded"),n(".affix").toggleClass("affixWithSearchExpanded"),e.preventDefault())});r=o();r.isIos&&r.Major<10&&n(".sidebar-arrow,.sticky").hide()})}(jQuery,NAME),function(n){n.fn.trackCustomEvent=function(n,t){if(n&&n.trim()!==""){var i=this.get(0),r={event:"emc.custom."+n,"gtm.element":i,"gtm.elementClasses":i.className||"","gtm.elementId":i.id||"","gtm.elementTarget":i.target||"","gtm.elementUrl":i.href||i.action||""};typeof t!="undefined"&&(r["gtm.originalEvent"]=t);(window.dataLayer||[]).push(r)}}}(jQuery);$(function(){function u(n){var t=r.exec(n);return t?!0:!1}function f(n,t){var o,r,f,e;if(u(n))return!0;if(o=i.exec(n),r=o&&o[2]||"",r.length===0)return!1;for(f=0;f<t.length;f++)if(e=t[f],r.substr(r.length-e.length,e.length)===e)return!1;return!0}var i=new RegExp("^(https?:)?//([^/?#]+).*"),r=new RegExp("/Link$"),n="This link will open in a new window",e="You are now leaving the emc website. emc is not responsible for content on external websites.",o=["datapharm.com","emcsupport.medicines.org.uk",location.hostname],s=$('a[href][target="_blank"]'),t;s.each(function(){var t=$(this);t.attr("data-toggle")==null&&t.attr("data-toggle","popover").attr("data-trigger","hover").attr("data-content",n).attr("aria-label",n).attr("data-container","body").attr("data-placement","topMultiline").popover()});t=$("a[href]").filter(function(){return f($(this).attr("href"),o)});t.on("click",function(t){var i=$(this),r;return i.data("suppress-external-link-warning")?!0:(r=e,i.attr("target")==="_blank"&&(r+=" "+n+"."),confirm(r)?(i.trackCustomEvent("externalLinkOk",t),!0):(t.preventDefault(),i.trackCustomEvent("externalLinkCancel",t),!1))});$.fn.popover.Constructor.prototype.getPosition=function(n){var c,l;n=n||this.$element;var u=n[0],f=u.tagName=="BODY",r=u.getBoundingClientRect();r.width==null&&(r=$.extend({},r,{width:r.right-r.left,height:r.bottom-r.top}));var e=u.getClientRects(),t=e[0],i=e[e.length-1];t=$.extend({},t,{width:t.right-t.left,height:t.bottom-t.top});i=$.extend({},i,{width:i.right-i.left,height:i.bottom-i.top});var o=f?{top:0,left:0}:n.offset(),s=o.top-r.top,h=o.left-r.left;return t.top+=s,i.top+=s,t.left+=h,i.left+=h,t={firstRect:t},i={lastRect:i},c={scroll:f?document.documentElement.scrollTop||document.body.scrollTop:n.scrollTop()},l=f?{width:$(window).width(),height:$(window).height()}:null,$.extend({},r,c,l,o,t,i)};$.fn.popover.Constructor.prototype.getCalculatedOffset=function(n,t,i,r){return n=="bottom"?{top:t.top+t.height,left:t.left+t.width/2-i/2}:n=="top"?{top:t.top-r,left:t.firstRect.left+(t.firstRect.right-t.firstRect.left)/2-i/2}:n=="topMultiline"?{top:t.top-r,left:t.firstRect.left+(t.firstRect.right-t.firstRect.left)/2-i/2}:n=="left"?{top:t.top+t.height/2,left:t.left-i}:{top:t.top+t.height/2,left:t.left+t.width}}}),function(n,t){"use strict";function c(){var n=r.find("li"),t=n.length===0?i.outerHeight():n.outerHeight()*6;r.css({left:i.position().left+"px",top:i.position().top+i.outerHeight()+"px",height:t+"px","min-width":i.outerWidth()+"px"})}function w(n){var t,f,e;r.html(p+"&nbsp;<\/li>");r.show();var o=r.find("li"),s=o.outerHeight(),u="";for(t=0;t<n.length;t+=1)u+=p+n[t]+"<\/li>";r.html(u);i.attr("aria-expanded","true");f=parseInt(r.css("padding-top").replace("px",""),10)+parseInt(r.css("padding-bottom").replace("px",""),10);e=n.length===0?i.outerHeight():f+s*g;r.css({height:e+"px"})}function tt(i,r){var u=n.map(i.toUpperCase().split(""),function(n){return n===" "?"space":n}).join(" "),e=r.length,o=e+(e>1?" suggestions are":" suggestion is")+" available beginning with "+u+". "+y;r.length===0&&(o="No suggestions begin with "+u+".");t.access.announcements(f,o)}function it(n){var t=n.getBoundingClientRect(),i=t.top,r=t.height;n=n.parentNode;do{if((t=n.getBoundingClientRect(),i<=t.bottom==!1)||i+r<=t.top)return!1;n=n.parentNode}while(n!==document.body);return i<=document.documentElement.clientHeight}function s(){return r.find('[aria-selected="true"]')}function rt(n){var r,u;if(n.length===0){t.access.announcements(f,"No suggestion selected. "+y);return}r=n.get(0);it(r)||r.scrollIntoView();u="selectedOption";n.attr("aria-selected","true").attr("id",u);i.attr("aria-activedescendant",u)}function b(n){i.val(v=n);t.access.announcements(f,"Suggestion accepted. Submit search to retrieve matching medicines.")}function l(){i.attr("aria-activedescendant","");s().attr("aria-selected","false").attr("id","")}function e(){l();r.hide();i.attr("aria-expanded","false")}function ut(){o>0&&clearTimeout(o);var t=d*3/Math.max(Math.min(i.val().length,3),1);o=setTimeout(function(){var t,r;(o=0,a!==i.val())&&(t=i.val(),a=t,t.length===0?(w([]),e()):(r=encodeURI(t),n.getJSON(nt+"?prefix="+r,function(n){w(n);c();n.length===0&&e();tt(t,n)}).fail(function(n,t,i){console.log("getJSON request failed! "+t+".\n"+i)})))},t)}function ft(n){var t=s(),i=null;n===u.down&&(i=t.length!==0?t.next("li"):r.children().eq(0));n===u.up&&(i=t.length!==0?t.prev("li"):r.children().eq(-1));l();i&&rt(i)}function et(){n(document).on("click",function(u){var f=i.add(r);if(t.general.senseClickOutside(n(u.target),f)){e();return}});n(window).on("resize",function(){c()});i.on("keyup",function(n){var t=n.which||n.keyCode||n.charCode;t!==u.up&&t!==u.down&&t!==u.tab&&t!==u.enter&&t!==u.esc&&t!==u.left&&t!==u.right&&ut()});i.on("keydown",function(n){var o=n.which||n.keyCode||n.charCode,h;if(o===u.tab||o===u.esc){e();return}if(o===u.enter){r.is(":visible")&&(s().length!==0?(n.preventDefault(),h=s().text(),i.val(h),b(h)):t.access.announcements(f,"Suggestions collapsed. Press ENTER to search for "+i.val()));e();return}if((o===u.up||o===u.down)&&r.is(":visible")){n.preventDefault();ft(o);return}});r.on("click",function(n){var t=n.target.textContent;b(t);e();i.focus()});r.hover(function(){l()});k.submit(function(r){var u=i.val(),e,o;if(!u||u.length===0||n.trim(u)===""){r.preventDefault();t.access.announcements(f,"Search prevented. You did not provide any search text.");return}if(e=256,u.length>e){r.preventDefault();t.access.announcements(f,"Sorry, your search is too long and must be less than "+e);return}u===v&&(o='"'+n.map(u.split(""),function(n){return n==='"'?'""':n}).join("")+'"',i.val(o))})}function ot(){et();c()}var h=n('[data-widget="search-with-suggestions"]'),k=n(".search-main form"),i=h.find("#searchField"),a="",v="",d=400,o=0,g=6,r=h.find("ul#suggestions"),f=h.find("[aria-live]"),u=t.keyboard,y="Use up and down arrows to review suggestions and enter to select. Continue typing to refine.",p='<li id="" class="suggestion-item" role="option" aria-selected="false" tabindex="-1">',nt="/emc/autosuggestion-js";ot()}(jQuery,NAME),function(n){n(function(){var i=5/1440,t=n("div.risk,div.rmmdir").filter(function(){return n(this).attr("data-hcp-selfcertify-cookie-key")}).attr("data-hcp-selfcertify-cookie-key"),r=n("a[href][data-target][data-hcp-mustcertify]"),u=function(r){var f=n(this),h,u,e,o,s;if(!f.data("userIsHcp")&&(h=f.attr("data-target"),h!=="")){r.preventDefault();r.stopPropagation();u=n(h);e=f.attr("data-ai-content-type");typeof e=="undefined"&&(e="");o=function(){u.off("click","button.btn-cancel",o);var n="hcp"+e+"Cancel";f.trackCustomEvent(n,r)};s=function(){f.data("userIsHcp",!0);u.modal("hide");u.off("click","button.btn-proceed",s);var n="hcp"+e+"Proceed";if(f.trackCustomEvent(n,r),Cookies.set(t,{confirmed:!0},{expires:i,path:"/"}),typeof Cookies.get(t)=="undefined"){alert("We were unable to set a cookie to confirm that you have declared yourself a healthcare professional. Please update your browser configuration to ensure it allows this site to set cookies.");return}f[0].click();setTimeout(function(){f.removeData("suppress-external-link-warning")},100)};u.on("click","button.btn-proceed",s);u.on("click","button.btn-cancel",o);u.modal("show");u.on("hide.bs.modal",function(){u.off("click","button.btn-proceed",s);u.off("click","button.btn-cancel",o)})}};r.data("suppress-external-link-warning",1).on("click",u)})}(jQuery);$(".preferences-item").click("click",function(n){n.preventDefault();var i=$(this).data("val"),t=new Date;t.setMonth(t.getMonth()+24);switch(i){case"Patient or Carer":manipulateBanerVisibility(!1);document.cookie="_usersegmentation=UT01;expires="+t+"path=/";break;case"Healthcare Professional":manipulateBanerVisibility(!1);document.cookie="_usersegmentation=UT02;expires="+t+"path=/";break;case"Other Professional":manipulateBanerVisibility(!1);document.cookie="_usersegmentation=UT03;expires="+t+"path=/"}});checkCookie=function(){return function(){cookieExist("_ga")===!0&&cookieExist("_usersegmentation")!=!0&&manipulateBanerVisibility(!0)}}();window.setInterval(checkCookie,100);$(window).load(function(){var n=cookieExist("_ga"),t=cookieExist("_usersegmentation");n!=!0?manipulateBanerVisibility(!1):n===!0&&t===!0?manipulateBanerVisibility(!1):n===!0&&t!=!0&&manipulateBanerVisibility(!0)}),function(){function i(n){for(var t,r=n+"=",u=document.cookie.split(";"),i=0;i<u.length;i++){for(t=u[i];t.charAt(0)==" ";)t=t.substring(1,t.length);if(t.indexOf(r)==0)return t.substring(r.length,t.length)}return null}var n=i("_usersegmentation"),t=window.dataLayer||[];t.push({userType:n})}(jQuery),function(){"use strict";if(navigator.userAgent.match(/IEMobile\/10\.0/)){var n=document.createElement("style");n.appendChild(document.createTextNode("@-ms-viewport{width:auto!important}"));document.querySelector("head").appendChild(n)}}()