function google_ad_request_done(n){var f,t,r,u;if(!(n.length<1)){if(document.write('<div class="googleAdsSidebar">'),document.write('<div class="googleAdsSidebarContent">'),document.write('<div class="ads-by">'),google_info.feedback_url?document.write('<a href="'+google_info.feedback_url+'">Ads by Google<\/a>'):document.write('<a class="text" href="#">Ads by Google<\/a>'),document.write("<\/div>"),document.write('<ul class="items">'),n[0].type=="text")for(i=0;i<n.length;++i)f=typeof gAdsBottomLinkBeforeMiddleContent!="undefined"&&gAdsBottomLinkBeforeMiddleContent,t='<li class="mid-content">',typeof gAdsPrefaceMiddleContentWithHyphen!="undefined"&&gAdsPrefaceMiddleContentWithHyphen&&(t+='<span class="hyphen-preface">-<\/span>'),t+='<div class="mid-line mid-line1">'+n[i].line2+'<\/div><div class="mid-line mid-line2">'+n[i].line3+"<\/div><\/li>",r='<li class="bot-link">',typeof gAdsPrefaceBottomLinkWithHyphen!="undefined"&&gAdsPrefaceBottomLinkWithHyphen&&(r+='<span class="hyphen-preface">-<\/span>'),r+='<a href="'+n[i].url+'">'+n[i].visible_url+"<\/a><\/li>",u='<li class="item"><ul class="item"><li class="top-link"><a href="'+n[i].url+'">'+n[i].line1+"<\/a><\/li>",u+=f?r+t:t+r,u+="<\/ul><div style='clear:both;'><\/div><\/li>",document.write(u);n[0].type=="image"&&(document.write('<li class="img-item"><a href="'+n[0].url+'"><img src="'+n[0].image_url+'" height="'+n[0].height+'" width="'+n[0].width+'" border="0"><\/a>'),document.write("<\/li>"));document.write("<\/ul>");document.write("<\/div>");document.write("<\/div>")}}function openSocialSharingLink(n){var t=parseInt(n.attr("data-win-width")||550),i=parseInt(n.attr("data-win-height")||500),r=n.attr("href");return BlogEngine.openSocialSharer(r,t,i),!1}function onGooglePlusOneEvent(n){BlogEngine.recordGooglePlusOneEvent(n)}function serveSiteDisplaySlot(n){console.log("serveSiteDisplaySlot: "+n)}function copyToClipboard(n){var t=$("<input>");$("body").append(t);t.val($(n).val()).select();document.execCommand("copy");t.remove()}function showWebinarCopyShareLinkBox(){$(".webinar-share-copylink-tooltip").css("visibility","visible").fadeIn()}function hideWebinarCopyShareLinkBox(){$(".webinar-share-copylink-tooltip").fadeOut(1e3,function(){$(this).css({visibility:"hidden",display:"block"})})}function toggleCarouselDescriptions(n,t){var i=$(n.delegateTarget),r=i.data("use-transitions");r?i.toggleClass("is-hovering",t):i.find("p").stop(!0,!0).slideToggle(200)}function toggleHpfeatureDescriptions(n,t){var i=$(n.delegateTarget),r=i.data("use-transitions");r?i.toggleClass("is-hovering",t):i.find("p").stop(!0,!0).animate({"max-height":t?80:0})}function scaleTextOnImage(n){var u=n.delegateTarget,t=$(u),c=t.width(),nt=t.height(),l=u.style?u.style.maxWidth:"",p=t.css("maxWidth"),a=!!p,w=!!l,v=t.closest(".toi-wrap"),b=v.find(".toi-text-block"),h;a&&t.css("maxWidth","none");var f=t.width(),i=590,e=$.trim(v.attr("data-design-width")||"");e&&!isNaN(e)&&(i=parseInt(e,10));i=Math.min(i,f);var k=f<=i?1:f/i,d=t.height(),g=Math.floor(d/k);a&&t.css("maxWidth",w?l:"");var y=function(n){var t=(n||"").toString().replace(/[^\d\.]/gi,"");return isNaN(t)?0:parseInt(t,10)},o=1,s=556,r=t.data("runtime-measurement-width");r||(h=$(document.createElement("span")).css({fontSize:"40px",fontFamily:'Georgia,Times,"Times New Roman",serif',display:"inline",position:"absolute",left:"-9000px"}).text("This is some relatively long text").appendTo($("body").first()),r=h.width(),h.remove(),t.data("runtime-measurement-width",r));r&&s&&r!=s&&(o=s/r);b.each(function(){var n=$(this),t,r,e,s;if(n.data("original-left")||n.data("original-left",y(n.css("left"))),n.data("original-top")||n.data("original-top",y(n.css("top"))),t=n.data("original-left")||0,r=n.data("original-top")||0,c!==i&&i>0&&g>0){var u=c/i,h=t*u,l=r*u,f=u;o&&(f=f*o);e="scale("+f.toString()+")";s="left top";n.css({transform:e,transformOrigin:s,left:h.toString()+"px",top:l.toString()+"px"})}else n.css({transform:"",transformOrigin:"",left:t.toString()+"px",top:r.toString()+"px"})})}function fitTextOnImages(){var n=$("img.toi-img");n.each(function(){var n=$(this);if(this.width&&this.height)scaleTextOnImage({delegateTarget:this});else n.on("load",scaleTextOnImage)})}function stickyHeader(){var n=$("body"),t=$(window),f=t.width(),i=g_headerOffset===null,o=i||g_headerWindowWidth!==f,r,e,u;if(o){if(g_headerWindowWidth=f,r=$(".main-menu"),r.length<1)return;if(n.addClass("non-sticky-header"),g_headerOffset=r.offset().top,n.removeClass("non-sticky-header"),g_headerOffset<=5){i||t.off("scroll",stickyHeader);return}if(i){Azom.logInConsole("stickyHeader in effect");t.on("scroll",stickyHeader)}}e=t.scrollTop();u=!n.hasClass("non-sticky-header");e>g_headerOffset?u||n.removeClass("non-sticky-header"):u&&n.addClass("non-sticky-header")}function toggleGrayHeaderBarForMobile(){var n=$(window).scrollTop()>60;n!=g_isNoUserMenuApplied&&($("body").toggleClass("nousermenu",n),g_isNoUserMenuApplied=n)}function initSyncHeaderHideOnScroll(){var f=9999999,t=0,i=f,o=!0,r=!0,n=0,u=$(".main-menu"),s=$("body"),h=$(window),c=$(".mobile-menu"),e;if(!s.hasClass("non-sticky-header")){e=function(){var v=u.height(),a=h.scrollTop(),y=a-n,p=y<0,w=y>0,e,l,b,k;p?n>t&&(t=n):t=0;w?n<i&&(i=n):i=f;e=a<=v||p&&t-a>=50;l=a>v&&w&&a-i>=50;l&&u.hasClass("is-mobile-menu-open")&&c.is(":visible")&&(e=!0,l=!1);o&&(o=!1,e=!0,l=!1);b=e?!0:l?!1:r;(e&&!r||l&&r)&&(l&&u.hasClass("is-mobile-menu-open")&&$(".moremenu").first().trigger("click"),t=0,i=f,k=e?0:v*-1,s.toggleClass("hideheader",!e),u.css({top:k.toString()+"px"}));r=b;n=a};h.on("scroll",e);e()}}function syncMoreMenuItemSeparators(){var n=null,t=null;$(".sub-menu > ul:visible > li:visible").each(function(){var i=$(this),r=i.offset().top;i.hasClass("noseparator")&&i.removeClass("noseparator");n&&t!==r&&n.addClass("noseparator");n=i;t=r}).last().addClass("noseparator")}function onNavMoreMenuSlideComplete(){var i=$("header .menu:visible li a.moremenu"),n=i.children("span"),t,r;n.length===0&&(i.html("<span>"+i.text()+"<\/span>"),n=i.children("span"),t=0,typeof n.get(0).getBoundingClientRect=="function"&&(r=n.get(0).getBoundingClientRect(),r&&r.width&&(t=r.width)),t||(t=n.width()),n.css({width:t.toString()+"px",display:"inline-block"}));$(".sub-menu").css("display")==="none"?n.html("More..."):n.html("Less...")}function initNavMoreMenu(){var u=$("header nav"),n=!1,t=null,i=null,r=function(){!i||(window.clearTimeout(i),i=null)};$(".moremenu").on("click",function(i){var e=i.type==="mouseenter",o=i.type==="click",f;if((!e||!n)&&(!o||!n||!t)){if(u=$("header nav"),hideVisibleContentHubMenus(""),u.toggleClass("is-mobile-menu-open",!n),r(),t&&(window.clearTimeout(t),t=null),!n&&e&&(t=window.setTimeout(function(){t=null},1e3)),f=$(".sub-menu"),f.stop(!0,!0),n?f.slideUp(350,onNavMoreMenuSlideComplete):f.slideDown(350,onNavMoreMenuSlideComplete),n)$(window).off("resize.syncMoreMenuItemSeparators",syncMoreMenuItemSeparators);else{window.setTimeout(syncMoreMenuItemSeparators,10);$(window).on("resize.syncMoreMenuItemSeparators",syncMoreMenuItemSeparators)}n=!n}});$("header nav").on("mouseleave",function(){n&&(r(),i=window.setTimeout(function(){i=null;$(".moremenu").first().trigger("click")},400))}).on("mouseenter",function(){r()})}function hideVisibleContentHubMenus(n){var t=$(".hub-menu-desktop").filter(":visible").not(n||"zzzzzz");t.length>0&&!t.data("is-sliding-up")&&t.data("is-sliding-up",!0).stop(!0,!0).slideUp(400,function(){$(this).removeData("is-sliding-up")});$(".main-nav-menu").css("display","");$(".hub-menu-mobile").hide()}function initContentHubMenu(){if(!($(".nav-right a.content-hub-link").length<1)){$(".nav-right").on("mouseenter click","ul.menu > li > a",function(n){var a=$(n.currentTarget),i=Modernizr.mq("(max-width: 767px)"),f,t,h,c,l;if(i&&n.type==="mouseenter")return!1;if(f=a.hasClass("content-hub-link"),!f){i||n.type!=="mouseenter"||hideVisibleContentHubMenus("");return}var v=i?".medical-hub-menu-mobile":".medical-hub-menu",y=i?".ls-hub-menu-mobile":".ls-hub-menu",p=$("body").hasClass("active-menu-medical"),e=p?v:y;if(hideVisibleContentHubMenus(e),t=$(e),t.length<1)return!0;if(i){t.find(".close-mobile-hub-menu").off("click").on("click",function(){return hideVisibleContentHubMenus(""),!1});t.show();$(".main-nav-menu").hide()}else{var w=t.closest(".nav-right"),r=$(window).width(),b=w.offset(),o=t.outerWidth(),u=100,s=b.left+u+o;s+10>r&&(h=s-r,c=(r-o)/2,u-=h+c);t.css("left",u.toString()+"px");l=$(".sub-menu").is(":visible");t.css("z-index",l?"25":"15");t.slideDown()}return!1});$("header nav").on("mouseleave",".hub-menu-desktop",function(){$(".nav-right a.content-hub-link:hover").length>0||hideVisibleContentHubMenus("")})}}function initSiteSectionMenuBtnsHoverMenuToggling(){var u=$(".site-sections-menu"),i=$("body"),n=i.hasClass("active-menu-medical"),t=n,r=function(n){i.toggleClass("active-menu-medical",n).toggleClass("active-menu-life-sciences",!n);t=n;hideVisibleContentHubMenus("")};u.on("mouseenter","a",function(n){var u=$(n.currentTarget),i=u.hasClass("site-section-menu-btn-medical");i!==t&&r(i)});$("header nav").on("mouseleave",function(){t!==n&&r(n)})}function checkForSupplierProfileVideoRepositioning(){if(!Modernizr.mq("(max-width: 991px)")){var n=$(".supplier-profile-video-wrap");n.length<1||n.each(function(){var t=$(this),n=t.children(".fluid-width-video-wrapper"),i,r,u;if(n.length<1)return!0;t.removeClass("supplier-profile-video-wrap-under-sidebar");i=n.offset().top;n.css({clear:"both"});r=n.offset().top;n.css({clear:""});u=r>i+30;t.toggleClass("supplier-profile-video-wrap-under-sidebar",!u)})}}function initSupplierProfileVideoRepositioning(){var n=$(".supplier-profile-video-wrap");if(!(n.length<1)){$(window).on("resize",Azom.azoDebounce(checkForSupplierProfileVideoRepositioning,100));checkForSupplierProfileVideoRepositioning()}}function onYouTubeIframeAPIReady(){Azom.wireUpYouTubeVideos()}var g_headerOffset,g_headerWindowWidth,g_isNoUserMenuApplied,AZoProfileUtils,Azom;if(!function(n,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=n.document?t(n,!0):function(n){if(!n.document)throw new Error("jQuery requires a window with a document");return t(n)}:t(n)}("undefined"!=typeof window?window:this,function(n,t){function ri(n){var t=n.length,r=i.type(n);return"function"===r||i.isWindow(n)?!1:1===n.nodeType&&t?!0:"array"===r||0===t||"number"==typeof t&&t>0&&t-1 in n}function ui(n,t,r){if(i.isFunction(t))return i.grep(n,function(n,i){return!!t.call(n,i,n)!==r});if(t.nodeType)return i.grep(n,function(n){return n===t!==r});if("string"==typeof t){if(ue.test(t))return i.filter(t,n,r);t=i.filter(t,n)}return i.grep(n,function(n){return i.inArray(n,t)>=0!==r})}function hr(n,t){do n=n[t];while(n&&1!==n.nodeType);return n}function oe(n){var t=fi[n]={};return i.each(n.match(h)||[],function(n,i){t[i]=!0}),t}function cr(){u.addEventListener?(u.removeEventListener("DOMContentLoaded",a,!1),n.removeEventListener("load",a,!1)):(u.detachEvent("onreadystatechange",a),n.detachEvent("onload",a))}function a(){(u.addEventListener||"load"===event.type||"complete"===u.readyState)&&(cr(),i.ready())}function yr(n,t,r){if(void 0===r&&1===n.nodeType){var u="data-"+t.replace(vr,"-$1").toLowerCase();if(r=n.getAttribute(u),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:ar.test(r)?i.parseJSON(r):r}catch(f){}i.data(n,t,r)}else r=void 0}return r}function ei(n){for(var t in n)if(("data"!==t||!i.isEmptyObject(n[t]))&&"toJSON"!==t)return!1;return!0}function pr(n,t,r,u){if(i.acceptData(n)){var s,e,h=i.expando,l=n.nodeType,o=l?i.cache:n,f=l?n[h]:n[h]&&h;if(f&&o[f]&&(u||o[f].data)||void 0!==r||"string"!=typeof t)return f||(f=l?n[h]=c.pop()||i.guid++:h),o[f]||(o[f]=l?{}:{toJSON:i.noop}),("object"==typeof t||"function"==typeof t)&&(u?o[f]=i.extend(o[f],t):o[f].data=i.extend(o[f].data,t)),e=o[f],u||(e.data||(e.data={}),e=e.data),void 0!==r&&(e[i.camelCase(t)]=r),"string"==typeof t?(s=e[t],null==s&&(s=e[i.camelCase(t)])):s=e,s}}function wr(n,t,u){if(i.acceptData(n)){var o,s,h=n.nodeType,f=h?i.cache:n,e=h?n[i.expando]:i.expando;if(f[e]){if(t&&(o=u?f[e]:f[e].data)){for(i.isArray(t)?t=t.concat(i.map(t,i.camelCase)):(t in o)?t=[t]:(t=i.camelCase(t),t=(t in o)?[t]:t.split(" ")),s=t.length;s--;)delete o[t[s]];if(u?!ei(o):!i.isEmptyObject(o))return}(u||(delete f[e].data,ei(f[e])))&&(h?i.cleanData([n],!0):r.deleteExpando||f!=f.window?delete f[e]:f[e]=null)}}}function vt(){return!0}function it(){return!1}function dr(){try{return u.activeElement}catch(n){}}function gr(n){var i=nu.split("|"),t=n.createDocumentFragment();if(t.createElement)while(i.length)t.createElement(i.pop());return t}function f(n,t){var e,u,s=0,r=typeof n.getElementsByTagName!==o?n.getElementsByTagName(t||"*"):typeof n.querySelectorAll!==o?n.querySelectorAll(t||"*"):void 0;if(!r)for(r=[],e=n.childNodes||n;null!=(u=e[s]);s++)!t||i.nodeName(u,t)?r.push(u):i.merge(r,f(u,t));return void 0===t||t&&i.nodeName(n,t)?i.merge([n],r):r}function be(n){oi.test(n.type)&&(n.defaultChecked=n.checked)}function eu(n,t){return i.nodeName(n,"table")&&i.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?n.getElementsByTagName("tbody")[0]||n.appendChild(n.ownerDocument.createElement("tbody")):n}function ou(n){return n.type=(null!==i.find.attr(n,"type"))+"/"+n.type,n}function su(n){var t=ye.exec(n.type);return t?n.type=t[1]:n.removeAttribute("type"),n}function li(n,t){for(var u,r=0;null!=(u=n[r]);r++)i._data(u,"globalEval",!t||i._data(t[r],"globalEval"))}function hu(n,t){if(1===t.nodeType&&i.hasData(n)){var u,f,o,s=i._data(n),r=i._data(t,s),e=s.events;if(e){delete r.handle;r.events={};for(u in e)for(f=0,o=e[u].length;o>f;f++)i.event.add(t,u,e[u][f])}r.data&&(r.data=i.extend({},r.data))}}function ke(n,t){var u,e,f;if(1===t.nodeType){if(u=t.nodeName.toLowerCase(),!r.noCloneEvent&&t[i.expando]){f=i._data(t);for(e in f.events)i.removeEvent(t,e,f.handle);t.removeAttribute(i.expando)}"script"===u&&t.text!==n.text?(ou(t).text=n.text,su(t)):"object"===u?(t.parentNode&&(t.outerHTML=n.outerHTML),r.html5Clone&&n.innerHTML&&!i.trim(t.innerHTML)&&(t.innerHTML=n.innerHTML)):"input"===u&&oi.test(n.type)?(t.defaultChecked=t.checked=n.checked,t.value!==n.value&&(t.value=n.value)):"option"===u?t.defaultSelected=t.selected=n.defaultSelected:("input"===u||"textarea"===u)&&(t.defaultValue=n.defaultValue)}}function cu(t,r){var f,u=i(r.createElement(t)).appendTo(r.body),e=n.getDefaultComputedStyle&&(f=n.getDefaultComputedStyle(u[0]))?f.display:i.css(u[0],"display");return u.detach(),e}function yt(n){var r=u,t=ai[n];return t||(t=cu(n,r),"none"!==t&&t||(ot=(ot||i("<iframe frameborder='0' width='0' height='0'/>")).appendTo(r.documentElement),r=(ot[0].contentWindow||ot[0].contentDocument).document,r.write(),r.close(),t=cu(n,r),ot.detach()),ai[n]=t),t}function au(n,t){return{get:function(){var i=n();if(null!=i)return i?void delete this.get:(this.get=t).apply(this,arguments)}}}function pu(n,t){if(t in n)return t;for(var r=t.charAt(0).toUpperCase()+t.slice(1),u=t,i=yu.length;i--;)if(t=yu[i]+r,t in n)return t;return u}function wu(n,t){for(var f,r,o,e=[],u=0,s=n.length;s>u;u++)r=n[u],r.style&&(e[u]=i._data(r,"olddisplay"),f=r.style.display,t?(e[u]||"none"!==f||(r.style.display=""),""===r.style.display&&et(r)&&(e[u]=i._data(r,"olddisplay",yt(r.nodeName)))):(o=et(r),(f&&"none"!==f||!o)&&i._data(r,"olddisplay",o?f:i.css(r,"display"))));for(u=0;s>u;u++)r=n[u],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?e[u]||"":"none"));return n}function bu(n,t,i){var r=to.exec(t);return r?Math.max(0,r[1]-(i||0))+(r[2]||"px"):t}function ku(n,t,r,u,f){for(var e=r===(u?"border":"content")?4:"width"===t?1:0,o=0;4>e;e+=2)"margin"===r&&(o+=i.css(n,r+w[e],!0,f)),u?("content"===r&&(o-=i.css(n,"padding"+w[e],!0,f)),"margin"!==r&&(o-=i.css(n,"border"+w[e]+"Width",!0,f))):(o+=i.css(n,"padding"+w[e],!0,f),"padding"!==r&&(o+=i.css(n,"border"+w[e]+"Width",!0,f)));return o}function du(n,t,u){var o=!0,f="width"===t?n.offsetWidth:n.offsetHeight,e=k(n),s=r.boxSizing&&"border-box"===i.css(n,"boxSizing",!1,e);if(0>=f||null==f){if(f=d(n,t,e),(0>f||null==f)&&(f=n.style[t]),pt.test(f))return f;o=s&&(r.boxSizingReliable()||f===n.style[t]);f=parseFloat(f)||0}return f+ku(n,t,u||(s?"border":"content"),o,e)+"px"}function e(n,t,i,r,u){return new e.prototype.init(n,t,i,r,u)}function nf(){return setTimeout(function(){rt=void 0}),rt=i.now()}function kt(n,t){var r,i={height:n},u=0;for(t=t?1:0;4>u;u+=2-t)r=w[u],i["margin"+r]=i["padding"+r]=n;return t&&(i.opacity=i.width=n),i}function tf(n,t,i){for(var u,f=(st[t]||[]).concat(st["*"]),r=0,e=f.length;e>r;r++)if(u=f[r].call(i,t,n))return u}function eo(n,t,u){var f,a,p,v,s,w,h,b,l=this,y={},o=n.style,c=n.nodeType&&et(n),e=i._data(n,"fxshow");u.queue||(s=i._queueHooks(n,"fx"),null==s.unqueued&&(s.unqueued=0,w=s.empty.fire,s.empty.fire=function(){s.unqueued||w()}),s.unqueued++,l.always(function(){l.always(function(){s.unqueued--;i.queue(n,"fx").length||s.empty.fire()})}));1===n.nodeType&&("height"in t||"width"in t)&&(u.overflow=[o.overflow,o.overflowX,o.overflowY],h=i.css(n,"display"),b="none"===h?i._data(n,"olddisplay")||yt(n.nodeName):h,"inline"===b&&"none"===i.css(n,"float")&&(r.inlineBlockNeedsLayout&&"inline"!==yt(n.nodeName)?o.zoom=1:o.display="inline-block"));u.overflow&&(o.overflow="hidden",r.shrinkWrapBlocks()||l.always(function(){o.overflow=u.overflow[0];o.overflowX=u.overflow[1];o.overflowY=u.overflow[2]}));for(f in t)if(a=t[f],uo.exec(a)){if(delete t[f],p=p||"toggle"===a,a===(c?"hide":"show")){if("show"!==a||!e||void 0===e[f])continue;c=!0}y[f]=e&&e[f]||i.style(n,f)}else h=void 0;if(i.isEmptyObject(y))"inline"===("none"===h?yt(n.nodeName):h)&&(o.display=h);else{e?"hidden"in e&&(c=e.hidden):e=i._data(n,"fxshow",{});p&&(e.hidden=!c);c?i(n).show():l.done(function(){i(n).hide()});l.done(function(){var t;i._removeData(n,"fxshow");for(t in y)i.style(n,t,y[t])});for(f in y)v=tf(c?e[f]:0,f,l),f in e||(e[f]=v.start,c&&(v.end=v.start,v.start="width"===f||"height"===f?1:0))}}function oo(n,t){var r,f,e,u,o;for(r in n)if(f=i.camelCase(r),e=t[f],u=n[r],i.isArray(u)&&(e=u[1],u=n[r]=u[0]),r!==f&&(n[f]=u,delete n[r]),o=i.cssHooks[f],o&&"expand"in o){u=o.expand(u);delete n[f];for(r in u)r in n||(n[r]=u[r],t[r]=e)}else t[f]=e}function rf(n,t,r){var h,e,o=0,l=bt.length,f=i.Deferred().always(function(){delete c.elem}),c=function(){if(e)return!1;for(var s=rt||nf(),t=Math.max(0,u.startTime+u.duration-s),h=t/u.duration||0,i=1-h,r=0,o=u.tweens.length;o>r;r++)u.tweens[r].run(i);return f.notifyWith(n,[u,i,t]),1>i&&o?t:(f.resolveWith(n,[u]),!1)},u=f.promise({elem:n,props:i.extend({},t),opts:i.extend(!0,{specialEasing:{}},r),originalProperties:t,originalOptions:r,startTime:rt||nf(),duration:r.duration,tweens:[],createTween:function(t,r){var f=i.Tween(n,u.opts,t,r,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(f),f},stop:function(t){var i=0,r=t?u.tweens.length:0;if(e)return this;for(e=!0;r>i;i++)u.tweens[i].run(1);return t?f.resolveWith(n,[u,t]):f.rejectWith(n,[u,t]),this}}),s=u.props;for(oo(s,u.opts.specialEasing);l>o;o++)if(h=bt[o].call(u,n,s,u.opts))return h;return i.map(s,tf,u),i.isFunction(u.opts.start)&&u.opts.start.call(n,u),i.fx.timer(i.extend(c,{elem:n,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function vf(n){return function(t,r){"string"!=typeof t&&(r=t,t="*");var u,f=0,e=t.toLowerCase().match(h)||[];if(i.isFunction(r))while(u=e[f++])"+"===u.charAt(0)?(u=u.slice(1)||"*",(n[u]=n[u]||[]).unshift(r)):(n[u]=n[u]||[]).push(r)}}function yf(n,t,r,u){function e(s){var h;return f[s]=!0,i.each(n[s]||[],function(n,i){var s=i(t,r,u);return"string"!=typeof s||o||f[s]?o?!(h=s):void 0:(t.dataTypes.unshift(s),e(s),!1)}),h}var f={},o=n===bi;return e(t.dataTypes[0])||!f["*"]&&e("*")}function ki(n,t){var u,r,f=i.ajaxSettings.flatOptions||{};for(r in t)void 0!==t[r]&&((f[r]?n:u||(u={}))[r]=t[r]);return u&&i.extend(!0,n,u),n}function vo(n,t,i){for(var o,e,u,f,s=n.contents,r=n.dataTypes;"*"===r[0];)r.shift(),void 0===e&&(e=n.mimeType||t.getResponseHeader("Content-Type"));if(e)for(f in s)if(s[f]&&s[f].test(e)){r.unshift(f);break}if(r[0]in i)u=r[0];else{for(f in i){if(!r[0]||n.converters[f+" "+r[0]]){u=f;break}o||(o=f)}u=u||o}if(u)return(u!==r[0]&&r.unshift(u),i[u])}function yo(n,t,i,r){var h,u,f,s,e,o={},c=n.dataTypes.slice();if(c[1])for(f in n.converters)o[f.toLowerCase()]=n.converters[f];for(u=c.shift();u;)if(n.responseFields[u]&&(i[n.responseFields[u]]=t),!e&&r&&n.dataFilter&&(t=n.dataFilter(t,n.dataType)),e=u,u=c.shift())if("*"===u)u=e;else if("*"!==e&&e!==u){if(f=o[e+" "+u]||o["* "+u],!f)for(h in o)if(s=h.split(" "),s[1]===u&&(f=o[e+" "+s[0]]||o["* "+s[0]])){f===!0?f=o[h]:o[h]!==!0&&(u=s[0],c.unshift(s[1]));break}if(f!==!0)if(f&&n.throws)t=f(t);else try{t=f(t)}catch(l){return{state:"parsererror",error:f?l:"No conversion from "+e+" to "+u}}}return{state:"success",data:t}}function di(n,t,r,u){var f;if(i.isArray(t))i.each(t,function(t,i){r||wo.test(n)?u(n,i):di(n+"["+("object"==typeof i?t:"")+"]",i,r,u)});else if(r||"object"!==i.type(t))u(n,t);else for(f in t)di(n+"["+f+"]",t[f],r,u)}function wf(){try{return new n.XMLHttpRequest}catch(t){}}function ns(){try{return new n.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function bf(n){return i.isWindow(n)?n:9===n.nodeType?n.defaultView||n.parentWindow:!1}var c=[],l=c.slice,ir=c.concat,ii=c.push,rr=c.indexOf,ct={},gf=ct.toString,tt=ct.hasOwnProperty,r={},ur="1.11.2",i=function(n,t){return new i.fn.init(n,t)},ne=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,te=/^-ms-/,ie=/-([\da-z])/gi,re=function(n,t){return t.toUpperCase()},p,or,sr,h,fi,lt,o,lr,ar,vr,ot,ai,uf,ef,sf,gt,gi,ti,nr,tr,kf,df;i.fn=i.prototype={jquery:ur,constructor:i,selector:"",length:0,toArray:function(){return l.call(this)},get:function(n){return null!=n?0>n?this[n+this.length]:this[n]:l.call(this)},pushStack:function(n){var t=i.merge(this.constructor(),n);return t.prevObject=this,t.context=this.context,t},each:function(n,t){return i.each(this,n,t)},map:function(n){return this.pushStack(i.map(this,function(t,i){return n.call(t,i,t)}))},slice:function(){return this.pushStack(l.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(n){var i=this.length,t=+n+(0>n?i:0);return this.pushStack(t>=0&&i>t?[this[t]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:ii,sort:c.sort,splice:c.splice};i.extend=i.fn.extend=function(){var r,e,t,f,o,s,n=arguments[0]||{},u=1,c=arguments.length,h=!1;for("boolean"==typeof n&&(h=n,n=arguments[u]||{},u++),"object"==typeof n||i.isFunction(n)||(n={}),u===c&&(n=this,u--);c>u;u++)if(null!=(o=arguments[u]))for(f in o)r=n[f],t=o[f],n!==t&&(h&&t&&(i.isPlainObject(t)||(e=i.isArray(t)))?(e?(e=!1,s=r&&i.isArray(r)?r:[]):s=r&&i.isPlainObject(r)?r:{},n[f]=i.extend(h,s,t)):void 0!==t&&(n[f]=t));return n};i.extend({expando:"jQuery"+(ur+Math.random()).replace(/\D/g,""),isReady:!0,error:function(n){throw new Error(n);},noop:function(){},isFunction:function(n){return"function"===i.type(n)},isArray:Array.isArray||function(n){return"array"===i.type(n)},isWindow:function(n){return null!=n&&n==n.window},isNumeric:function(n){return!i.isArray(n)&&n-parseFloat(n)+1>=0},isEmptyObject:function(n){for(var t in n)return!1;return!0},isPlainObject:function(n){var t;if(!n||"object"!==i.type(n)||n.nodeType||i.isWindow(n))return!1;try{if(n.constructor&&!tt.call(n,"constructor")&&!tt.call(n.constructor.prototype,"isPrototypeOf"))return!1}catch(u){return!1}if(r.ownLast)for(t in n)return tt.call(n,t);for(t in n);return void 0===t||tt.call(n,t)},type:function(n){return null==n?n+"":"object"==typeof n||"function"==typeof n?ct[gf.call(n)]||"object":typeof n},globalEval:function(t){t&&i.trim(t)&&(n.execScript||function(t){n.eval.call(n,t)})(t)},camelCase:function(n){return n.replace(te,"ms-").replace(ie,re)},nodeName:function(n,t){return n.nodeName&&n.nodeName.toLowerCase()===t.toLowerCase()},each:function(n,t,i){var u,r=0,f=n.length,e=ri(n);if(i){if(e){for(;f>r;r++)if(u=t.apply(n[r],i),u===!1)break}else for(r in n)if(u=t.apply(n[r],i),u===!1)break}else if(e){for(;f>r;r++)if(u=t.call(n[r],r,n[r]),u===!1)break}else for(r in n)if(u=t.call(n[r],r,n[r]),u===!1)break;return n},trim:function(n){return null==n?"":(n+"").replace(ne,"")},makeArray:function(n,t){var r=t||[];return null!=n&&(ri(Object(n))?i.merge(r,"string"==typeof n?[n]:n):ii.call(r,n)),r},inArray:function(n,t,i){var r;if(t){if(rr)return rr.call(t,n,i);for(r=t.length,i=i?0>i?Math.max(0,r+i):i:0;r>i;i++)if(i in t&&t[i]===n)return i}return-1},merge:function(n,t){for(var r=+t.length,i=0,u=n.length;r>i;)n[u++]=t[i++];if(r!==r)while(void 0!==t[i])n[u++]=t[i++];return n.length=u,n},grep:function(n,t,i){for(var u,f=[],r=0,e=n.length,o=!i;e>r;r++)u=!t(n[r],r),u!==o&&f.push(n[r]);return f},map:function(n,t,i){var u,r=0,e=n.length,o=ri(n),f=[];if(o)for(;e>r;r++)u=t(n[r],r,i),null!=u&&f.push(u);else for(r in n)u=t(n[r],r,i),null!=u&&f.push(u);return ir.apply([],f)},guid:1,proxy:function(n,t){var u,r,f;return"string"==typeof t&&(f=n[t],t=n,n=f),i.isFunction(n)?(u=l.call(arguments,2),r=function(){return n.apply(t||this,u.concat(l.call(arguments)))},r.guid=n.guid=n.guid||i.guid++,r):void 0},now:function(){return+new Date},support:r});i.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(n,t){ct["[object "+t+"]"]=t.toLowerCase()});p=function(n){function r(n,t,i,r){var p,s,a,c,w,y,d,v,nt,g;if((t?t.ownerDocument||t:h)!==o&&k(t),t=t||o,i=i||[],c=t.nodeType,"string"!=typeof n||!n||1!==c&&9!==c&&11!==c)return i;if(!r&&l){if(11!==c&&(p=hr.exec(n)))if(a=p[1]){if(9===c){if(s=t.getElementById(a),!s||!s.parentNode)return i;if(s.id===a)return i.push(s),i}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(a))&&et(t,s)&&s.id===a)return i.push(s),i}else{if(p[2])return b.apply(i,t.getElementsByTagName(n)),i;if((a=p[3])&&u.getElementsByClassName)return b.apply(i,t.getElementsByClassName(a)),i}if(u.qsa&&(!e||!e.test(n))){if(v=d=f,nt=t,g=1!==c&&n,1===c&&"object"!==t.nodeName.toLowerCase()){for(y=ft(n),(d=t.getAttribute("id"))?v=d.replace(cr,"\\$&"):t.setAttribute("id",v),v="[id='"+v+"'] ",w=y.length;w--;)y[w]=v+vt(y[w]);nt=dt.test(n)&&ti(t.parentNode)||t;g=y.join(",")}if(g)try{return b.apply(i,nt.querySelectorAll(g)),i}catch(tt){}finally{d||t.removeAttribute("id")}}}return oi(n.replace(lt,"$1"),t,i,r)}function gt(){function n(r,u){return i.push(r+" ")>t.cacheLength&&delete n[i.shift()],n[r+" "]=u}var i=[];return n}function c(n){return n[f]=!0,n}function v(n){var t=o.createElement("div");try{return!!n(t)}catch(i){return!1}finally{t.parentNode&&t.parentNode.removeChild(t);t=null}}function ni(n,i){for(var u=n.split("|"),r=n.length;r--;)t.attrHandle[u[r]]=i}function wi(n,t){var i=t&&n,r=i&&1===n.nodeType&&1===t.nodeType&&(~t.sourceIndex||li)-(~n.sourceIndex||li);if(r)return r;if(i)while(i=i.nextSibling)if(i===t)return-1;return n?1:-1}function lr(n){return function(t){var i=t.nodeName.toLowerCase();return"input"===i&&t.type===n}}function ar(n){return function(t){var i=t.nodeName.toLowerCase();return("input"===i||"button"===i)&&t.type===n}}function tt(n){return c(function(t){return t=+t,c(function(i,r){for(var u,f=n([],i.length,t),e=f.length;e--;)i[u=f[e]]&&(i[u]=!(r[u]=i[u]))})})}function ti(n){return n&&"undefined"!=typeof n.getElementsByTagName&&n}function bi(){}function vt(n){for(var t=0,r=n.length,i="";r>t;t++)i+=n[t].value;return i}function ii(n,t,i){var r=t.dir,u=i&&"parentNode"===r,e=ki++;return t.first?function(t,i,f){while(t=t[r])if(1===t.nodeType||u)return n(t,i,f)}:function(t,i,o){var s,h,c=[a,e];if(o){while(t=t[r])if((1===t.nodeType||u)&&n(t,i,o))return!0}else while(t=t[r])if(1===t.nodeType||u){if(h=t[f]||(t[f]={}),(s=h[r])&&s[0]===a&&s[1]===e)return c[2]=s[2];if(h[r]=c,c[2]=n(t,i,o))return!0}}}function ri(n){return n.length>1?function(t,i,r){for(var u=n.length;u--;)if(!n[u](t,i,r))return!1;return!0}:n[0]}function vr(n,t,i){for(var u=0,f=t.length;f>u;u++)r(n,t[u],i);return i}function yt(n,t,i,r,u){for(var e,o=[],f=0,s=n.length,h=null!=t;s>f;f++)(e=n[f])&&(!i||i(e,r,u))&&(o.push(e),h&&t.push(f));return o}function ui(n,t,i,r,u,e){return r&&!r[f]&&(r=ui(r)),u&&!u[f]&&(u=ui(u,e)),c(function(f,e,o,s){var l,c,a,p=[],y=[],w=e.length,k=f||vr(t||"*",o.nodeType?[o]:o,[]),v=!n||!f&&t?k:yt(k,p,n,o,s),h=i?u||(f?n:w||r)?[]:e:v;if(i&&i(v,h,o,s),r)for(l=yt(h,y),r(l,[],o,s),c=l.length;c--;)(a=l[c])&&(h[y[c]]=!(v[y[c]]=a));if(f){if(u||n){if(u){for(l=[],c=h.length;c--;)(a=h[c])&&l.push(v[c]=a);u(null,h=[],l,s)}for(c=h.length;c--;)(a=h[c])&&(l=u?nt(f,a):p[c])>-1&&(f[l]=!(e[l]=a))}}else h=yt(h===e?h.splice(w,h.length):h),u?u(null,e,h,s):b.apply(e,h)})}function fi(n){for(var o,u,r,s=n.length,h=t.relative[n[0].type],c=h||t.relative[" "],i=h?1:0,l=ii(function(n){return n===o},c,!0),a=ii(function(n){return nt(o,n)>-1},c,!0),e=[function(n,t,i){var r=!h&&(i||t!==ht)||((o=t).nodeType?l(n,t,i):a(n,t,i));return o=null,r}];s>i;i++)if(u=t.relative[n[i].type])e=[ii(ri(e),u)];else{if(u=t.filter[n[i].type].apply(null,n[i].matches),u[f]){for(r=++i;s>r;r++)if(t.relative[n[r].type])break;return ui(i>1&&ri(e),i>1&&vt(n.slice(0,i-1).concat({value:" "===n[i-2].type?"*":""})).replace(lt,"$1"),u,r>i&&fi(n.slice(i,r)),s>r&&fi(n=n.slice(r)),s>r&&vt(n))}e.push(u)}return ri(e)}function yr(n,i){var u=i.length>0,f=n.length>0,e=function(e,s,h,c,l){var y,d,w,k=0,v="0",g=e&&[],p=[],nt=ht,tt=e||f&&t.find.TAG("*",l),it=a+=null==nt?1:Math.random()||.1,rt=tt.length;for(l&&(ht=s!==o&&s);v!==rt&&null!=(y=tt[v]);v++){if(f&&y){for(d=0;w=n[d++];)if(w(y,s,h)){c.push(y);break}l&&(a=it)}u&&((y=!w&&y)&&k--,e&&g.push(y))}if(k+=v,u&&v!==k){for(d=0;w=i[d++];)w(g,p,s,h);if(e){if(k>0)while(v--)g[v]||p[v]||(p[v]=gi.call(c));p=yt(p)}b.apply(c,p);l&&!e&&p.length>0&&k+i.length>1&&r.uniqueSort(c)}return l&&(a=it,ht=nt),g};return u?c(e):e}var it,u,t,st,ei,ft,pt,oi,ht,w,rt,k,o,s,l,e,d,ct,et,f="sizzle"+1*new Date,h=n.document,a=0,ki=0,si=gt(),hi=gt(),ci=gt(),wt=function(n,t){return n===t&&(rt=!0),0},li=-2147483648,di={}.hasOwnProperty,g=[],gi=g.pop,nr=g.push,b=g.push,ai=g.slice,nt=function(n,t){for(var i=0,r=n.length;r>i;i++)if(n[i]===t)return i;return-1},bt="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",i="[\\x20\\t\\r\\n\\f]",ut="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",vi=ut.replace("w","w#"),yi="\\["+i+"*("+ut+")(?:"+i+"*([*^$|!~]?=)"+i+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+vi+"))|)"+i+"*\\]",kt=":("+ut+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+yi+")*)|.*)\\)|)",tr=new RegExp(i+"+","g"),lt=new RegExp("^"+i+"+|((?:^|[^\\\\])(?:\\\\.)*)"+i+"+$","g"),ir=new RegExp("^"+i+"*,"+i+"*"),rr=new RegExp("^"+i+"*([>+~]|"+i+")"+i+"*"),ur=new RegExp("="+i+"*([^\\]'\"]*?)"+i+"*\\]","g"),fr=new RegExp(kt),er=new RegExp("^"+vi+"$"),at={ID:new RegExp("^#("+ut+")"),CLASS:new RegExp("^\\.("+ut+")"),TAG:new RegExp("^("+ut.replace("w","w*")+")"),ATTR:new RegExp("^"+yi),PSEUDO:new RegExp("^"+kt),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+i+"*(even|odd|(([+-]|)(\\d*)n|)"+i+"*(?:([+-]|)"+i+"*(\\d+)|))"+i+"*\\)|)","i"),bool:new RegExp("^(?:"+bt+")$","i"),needsContext:new RegExp("^"+i+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+i+"*((?:-\\d)?\\d*)"+i+"*\\)|)(?=[^-]|$)","i")},or=/^(?:input|select|textarea|button)$/i,sr=/^h\d$/i,ot=/^[^{]+\{\s*\[native \w/,hr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,dt=/[+~]/,cr=/'|\\/g,y=new RegExp("\\\\([\\da-f]{1,6}"+i+"?|("+i+")|.)","ig"),p=function(n,t,i){var r="0x"+t-65536;return r!==r||i?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},pi=function(){k()};try{b.apply(g=ai.call(h.childNodes),h.childNodes);g[h.childNodes.length].nodeType}catch(pr){b={apply:g.length?function(n,t){nr.apply(n,ai.call(t))}:function(n,t){for(var i=n.length,r=0;n[i++]=t[r++];);n.length=i-1}}}u=r.support={};ei=r.isXML=function(n){var t=n&&(n.ownerDocument||n).documentElement;return t?"HTML"!==t.nodeName:!1};k=r.setDocument=function(n){var a,c,r=n?n.ownerDocument||n:h;return r!==o&&9===r.nodeType&&r.documentElement?(o=r,s=r.documentElement,c=r.defaultView,c&&c!==c.top&&(c.addEventListener?c.addEventListener("unload",pi,!1):c.attachEvent&&c.attachEvent("onunload",pi)),l=!ei(r),u.attributes=v(function(n){return n.className="i",!n.getAttribute("className")}),u.getElementsByTagName=v(function(n){return n.appendChild(r.createComment("")),!n.getElementsByTagName("*").length}),u.getElementsByClassName=ot.test(r.getElementsByClassName),u.getById=v(function(n){return s.appendChild(n).id=f,!r.getElementsByName||!r.getElementsByName(f).length}),u.getById?(t.find.ID=function(n,t){if("undefined"!=typeof t.getElementById&&l){var i=t.getElementById(n);return i&&i.parentNode?[i]:[]}},t.filter.ID=function(n){var t=n.replace(y,p);return function(n){return n.getAttribute("id")===t}}):(delete t.find.ID,t.filter.ID=function(n){var t=n.replace(y,p);return function(n){var i="undefined"!=typeof n.getAttributeNode&&n.getAttributeNode("id");return i&&i.value===t}}),t.find.TAG=u.getElementsByTagName?function(n,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(n):u.qsa?t.querySelectorAll(n):void 0}:function(n,t){var i,r=[],f=0,u=t.getElementsByTagName(n);if("*"===n){while(i=u[f++])1===i.nodeType&&r.push(i);return r}return u},t.find.CLASS=u.getElementsByClassName&&function(n,t){if(l)return t.getElementsByClassName(n)},d=[],e=[],(u.qsa=ot.test(r.querySelectorAll))&&(v(function(n){s.appendChild(n).innerHTML="<a id='"+f+"'><\/a><select id='"+f+"-\f]' msallowcapture=''><option selected=''><\/option><\/select>";n.querySelectorAll("[msallowcapture^='']").length&&e.push("[*^$]="+i+"*(?:''|\"\")");n.querySelectorAll("[selected]").length||e.push("\\["+i+"*(?:value|"+bt+")");n.querySelectorAll("[id~="+f+"-]").length||e.push("~=");n.querySelectorAll(":checked").length||e.push(":checked");n.querySelectorAll("a#"+f+"+*").length||e.push(".#.+[+~]")}),v(function(n){var t=r.createElement("input");t.setAttribute("type","hidden");n.appendChild(t).setAttribute("name","D");n.querySelectorAll("[name=d]").length&&e.push("name"+i+"*[*^$|!~]?=");n.querySelectorAll(":enabled").length||e.push(":enabled",":disabled");n.querySelectorAll("*,:x");e.push(",.*:")})),(u.matchesSelector=ot.test(ct=s.matches||s.webkitMatchesSelector||s.mozMatchesSelector||s.oMatchesSelector||s.msMatchesSelector))&&v(function(n){u.disconnectedMatch=ct.call(n,"div");ct.call(n,"[s!='']:x");d.push("!=",kt)}),e=e.length&&new RegExp(e.join("|")),d=d.length&&new RegExp(d.join("|")),a=ot.test(s.compareDocumentPosition),et=a||ot.test(s.contains)?function(n,t){var r=9===n.nodeType?n.documentElement:n,i=t&&t.parentNode;return n===i||!(!i||1!==i.nodeType||!(r.contains?r.contains(i):n.compareDocumentPosition&&16&n.compareDocumentPosition(i)))}:function(n,t){if(t)while(t=t.parentNode)if(t===n)return!0;return!1},wt=a?function(n,t){if(n===t)return rt=!0,0;var i=!n.compareDocumentPosition-!t.compareDocumentPosition;return i?i:(i=(n.ownerDocument||n)===(t.ownerDocument||t)?n.compareDocumentPosition(t):1,1&i||!u.sortDetached&&t.compareDocumentPosition(n)===i?n===r||n.ownerDocument===h&&et(h,n)?-1:t===r||t.ownerDocument===h&&et(h,t)?1:w?nt(w,n)-nt(w,t):0:4&i?-1:1)}:function(n,t){if(n===t)return rt=!0,0;var i,u=0,o=n.parentNode,s=t.parentNode,f=[n],e=[t];if(!o||!s)return n===r?-1:t===r?1:o?-1:s?1:w?nt(w,n)-nt(w,t):0;if(o===s)return wi(n,t);for(i=n;i=i.parentNode;)f.unshift(i);for(i=t;i=i.parentNode;)e.unshift(i);while(f[u]===e[u])u++;return u?wi(f[u],e[u]):f[u]===h?-1:e[u]===h?1:0},r):o};r.matches=function(n,t){return r(n,null,null,t)};r.matchesSelector=function(n,t){if((n.ownerDocument||n)!==o&&k(n),t=t.replace(ur,"='$1']"),!(!u.matchesSelector||!l||d&&d.test(t)||e&&e.test(t)))try{var i=ct.call(n,t);if(i||u.disconnectedMatch||n.document&&11!==n.document.nodeType)return i}catch(f){}return r(t,o,null,[n]).length>0};r.contains=function(n,t){return(n.ownerDocument||n)!==o&&k(n),et(n,t)};r.attr=function(n,i){(n.ownerDocument||n)!==o&&k(n);var f=t.attrHandle[i.toLowerCase()],r=f&&di.call(t.attrHandle,i.toLowerCase())?f(n,i,!l):void 0;return void 0!==r?r:u.attributes||!l?n.getAttribute(i):(r=n.getAttributeNode(i))&&r.specified?r.value:null};r.error=function(n){throw new Error("Syntax error, unrecognized expression: "+n);};r.uniqueSort=function(n){var r,f=[],t=0,i=0;if(rt=!u.detectDuplicates,w=!u.sortStable&&n.slice(0),n.sort(wt),rt){while(r=n[i++])r===n[i]&&(t=f.push(i));while(t--)n.splice(f[t],1)}return w=null,n};st=r.getText=function(n){var r,i="",u=0,t=n.nodeType;if(t){if(1===t||9===t||11===t){if("string"==typeof n.textContent)return n.textContent;for(n=n.firstChild;n;n=n.nextSibling)i+=st(n)}else if(3===t||4===t)return n.nodeValue}else while(r=n[u++])i+=st(r);return i};t=r.selectors={cacheLength:50,createPseudo:c,match:at,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(n){return n[1]=n[1].replace(y,p),n[3]=(n[3]||n[4]||n[5]||"").replace(y,p),"~="===n[2]&&(n[3]=" "+n[3]+" "),n.slice(0,4)},CHILD:function(n){return n[1]=n[1].toLowerCase(),"nth"===n[1].slice(0,3)?(n[3]||r.error(n[0]),n[4]=+(n[4]?n[5]+(n[6]||1):2*("even"===n[3]||"odd"===n[3])),n[5]=+(n[7]+n[8]||"odd"===n[3])):n[3]&&r.error(n[0]),n},PSEUDO:function(n){var i,t=!n[6]&&n[2];return at.CHILD.test(n[0])?null:(n[3]?n[2]=n[4]||n[5]||"":t&&fr.test(t)&&(i=ft(t,!0))&&(i=t.indexOf(")",t.length-i)-t.length)&&(n[0]=n[0].slice(0,i),n[2]=t.slice(0,i)),n.slice(0,3))}},filter:{TAG:function(n){var t=n.replace(y,p).toLowerCase();return"*"===n?function(){return!0}:function(n){return n.nodeName&&n.nodeName.toLowerCase()===t}},CLASS:function(n){var t=si[n+" "];return t||(t=new RegExp("(^|"+i+")"+n+"("+i+"|$)"))&&si(n,function(n){return t.test("string"==typeof n.className&&n.className||"undefined"!=typeof n.getAttribute&&n.getAttribute("class")||"")})},ATTR:function(n,t,i){return function(u){var f=r.attr(u,n);return null==f?"!="===t:t?(f+="","="===t?f===i:"!="===t?f!==i:"^="===t?i&&0===f.indexOf(i):"*="===t?i&&f.indexOf(i)>-1:"$="===t?i&&f.slice(-i.length)===i:"~="===t?(" "+f.replace(tr," ")+" ").indexOf(i)>-1:"|="===t?f===i||f.slice(0,i.length+1)===i+"-":!1):!0}},CHILD:function(n,t,i,r,u){var s="nth"!==n.slice(0,3),o="last"!==n.slice(-4),e="of-type"===t;return 1===r&&0===u?function(n){return!!n.parentNode}:function(t,i,h){var v,k,c,l,y,w,b=s!==o?"nextSibling":"previousSibling",p=t.parentNode,g=e&&t.nodeName.toLowerCase(),d=!h&&!e;if(p){if(s){while(b){for(c=t;c=c[b];)if(e?c.nodeName.toLowerCase()===g:1===c.nodeType)return!1;w=b="only"===n&&!w&&"nextSibling"}return!0}if(w=[o?p.firstChild:p.lastChild],o&&d){for(k=p[f]||(p[f]={}),v=k[n]||[],y=v[0]===a&&v[1],l=v[0]===a&&v[2],c=y&&p.childNodes[y];c=++y&&c&&c[b]||(l=y=0)||w.pop();)if(1===c.nodeType&&++l&&c===t){k[n]=[a,y,l];break}}else if(d&&(v=(t[f]||(t[f]={}))[n])&&v[0]===a)l=v[1];else while(c=++y&&c&&c[b]||(l=y=0)||w.pop())if((e?c.nodeName.toLowerCase()===g:1===c.nodeType)&&++l&&(d&&((c[f]||(c[f]={}))[n]=[a,l]),c===t))break;return l-=u,l===r||l%r==0&&l/r>=0}}},PSEUDO:function(n,i){var e,u=t.pseudos[n]||t.setFilters[n.toLowerCase()]||r.error("unsupported pseudo: "+n);return u[f]?u(i):u.length>1?(e=[n,n,"",i],t.setFilters.hasOwnProperty(n.toLowerCase())?c(function(n,t){for(var r,f=u(n,i),e=f.length;e--;)r=nt(n,f[e]),n[r]=!(t[r]=f[e])}):function(n){return u(n,0,e)}):u}},pseudos:{not:c(function(n){var t=[],r=[],i=pt(n.replace(lt,"$1"));return i[f]?c(function(n,t,r,u){for(var e,o=i(n,null,u,[]),f=n.length;f--;)(e=o[f])&&(n[f]=!(t[f]=e))}):function(n,u,f){return t[0]=n,i(t,null,f,r),t[0]=null,!r.pop()}}),has:c(function(n){return function(t){return r(n,t).length>0}}),contains:c(function(n){return n=n.replace(y,p),function(t){return(t.textContent||t.innerText||st(t)).indexOf(n)>-1}}),lang:c(function(n){return er.test(n||"")||r.error("unsupported lang: "+n),n=n.replace(y,p).toLowerCase(),function(t){var i;do if(i=l?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return i=i.toLowerCase(),i===n||0===i.indexOf(n+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var i=n.location&&n.location.hash;return i&&i.slice(1)===t.id},root:function(n){return n===s},focus:function(n){return n===o.activeElement&&(!o.hasFocus||o.hasFocus())&&!!(n.type||n.href||~n.tabIndex)},enabled:function(n){return n.disabled===!1},disabled:function(n){return n.disabled===!0},checked:function(n){var t=n.nodeName.toLowerCase();return"input"===t&&!!n.checked||"option"===t&&!!n.selected},selected:function(n){return n.parentNode&&n.parentNode.selectedIndex,n.selected===!0},empty:function(n){for(n=n.firstChild;n;n=n.nextSibling)if(n.nodeType<6)return!1;return!0},parent:function(n){return!t.pseudos.empty(n)},header:function(n){return sr.test(n.nodeName)},input:function(n){return or.test(n.nodeName)},button:function(n){var t=n.nodeName.toLowerCase();return"input"===t&&"button"===n.type||"button"===t},text:function(n){var t;return"input"===n.nodeName.toLowerCase()&&"text"===n.type&&(null==(t=n.getAttribute("type"))||"text"===t.toLowerCase())},first:tt(function(){return[0]}),last:tt(function(n,t){return[t-1]}),eq:tt(function(n,t,i){return[0>i?i+t:i]}),even:tt(function(n,t){for(var i=0;t>i;i+=2)n.push(i);return n}),odd:tt(function(n,t){for(var i=1;t>i;i+=2)n.push(i);return n}),lt:tt(function(n,t,i){for(var r=0>i?i+t:i;--r>=0;)n.push(r);return n}),gt:tt(function(n,t,i){for(var r=0>i?i+t:i;++r<t;)n.push(r);return n})}};t.pseudos.nth=t.pseudos.eq;for(it in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})t.pseudos[it]=lr(it);for(it in{submit:!0,reset:!0})t.pseudos[it]=ar(it);return bi.prototype=t.filters=t.pseudos,t.setFilters=new bi,ft=r.tokenize=function(n,i){var e,f,s,o,u,h,c,l=hi[n+" "];if(l)return i?0:l.slice(0);for(u=n,h=[],c=t.preFilter;u;){(!e||(f=ir.exec(u)))&&(f&&(u=u.slice(f[0].length)||u),h.push(s=[]));e=!1;(f=rr.exec(u))&&(e=f.shift(),s.push({value:e,type:f[0].replace(lt," ")}),u=u.slice(e.length));for(o in t.filter)(f=at[o].exec(u))&&(!c[o]||(f=c[o](f)))&&(e=f.shift(),s.push({value:e,type:o,matches:f}),u=u.slice(e.length));if(!e)break}return i?u.length:u?r.error(n):hi(n,h).slice(0)},pt=r.compile=function(n,t){var r,u=[],e=[],i=ci[n+" "];if(!i){for(t||(t=ft(n)),r=t.length;r--;)i=fi(t[r]),i[f]?u.push(i):e.push(i);i=ci(n,yr(e,u));i.selector=n}return i},oi=r.select=function(n,i,r,f){var s,e,o,a,v,c="function"==typeof n&&n,h=!f&&ft(n=c.selector||n);if(r=r||[],1===h.length){if(e=h[0]=h[0].slice(0),e.length>2&&"ID"===(o=e[0]).type&&u.getById&&9===i.nodeType&&l&&t.relative[e[1].type]){if(i=(t.find.ID(o.matches[0].replace(y,p),i)||[])[0],!i)return r;c&&(i=i.parentNode);n=n.slice(e.shift().value.length)}for(s=at.needsContext.test(n)?0:e.length;s--;){if(o=e[s],t.relative[a=o.type])break;if((v=t.find[a])&&(f=v(o.matches[0].replace(y,p),dt.test(e[0].type)&&ti(i.parentNode)||i))){if(e.splice(s,1),n=f.length&&vt(e),!n)return b.apply(r,f),r;break}}}return(c||pt(n,h))(f,i,!l,r,dt.test(n)&&ti(i.parentNode)||i),r},u.sortStable=f.split("").sort(wt).join("")===f,u.detectDuplicates=!!rt,k(),u.sortDetached=v(function(n){return 1&n.compareDocumentPosition(o.createElement("div"))}),v(function(n){return n.innerHTML="<a href='#'><\/a>","#"===n.firstChild.getAttribute("href")})||ni("type|href|height|width",function(n,t,i){if(!i)return n.getAttribute(t,"type"===t.toLowerCase()?1:2)}),u.attributes&&v(function(n){return n.innerHTML="<input/>",n.firstChild.setAttribute("value",""),""===n.firstChild.getAttribute("value")})||ni("value",function(n,t,i){if(!i&&"input"===n.nodeName.toLowerCase())return n.defaultValue}),v(function(n){return null==n.getAttribute("disabled")})||ni(bt,function(n,t,i){var r;if(!i)return n[t]===!0?t.toLowerCase():(r=n.getAttributeNode(t))&&r.specified?r.value:null}),r}(n);i.find=p;i.expr=p.selectors;i.expr[":"]=i.expr.pseudos;i.unique=p.uniqueSort;i.text=p.getText;i.isXMLDoc=p.isXML;i.contains=p.contains;var fr=i.expr.match.needsContext,er=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,ue=/^.[^:#\[\.,]*$/;i.filter=function(n,t,r){var u=t[0];return r&&(n=":not("+n+")"),1===t.length&&1===u.nodeType?i.find.matchesSelector(u,n)?[u]:[]:i.find.matches(n,i.grep(t,function(n){return 1===n.nodeType}))};i.fn.extend({find:function(n){var t,r=[],u=this,f=u.length;if("string"!=typeof n)return this.pushStack(i(n).filter(function(){for(t=0;f>t;t++)if(i.contains(u[t],this))return!0}));for(t=0;f>t;t++)i.find(n,u[t],r);return r=this.pushStack(f>1?i.unique(r):r),r.selector=this.selector?this.selector+" "+n:n,r},filter:function(n){return this.pushStack(ui(this,n||[],!1))},not:function(n){return this.pushStack(ui(this,n||[],!0))},is:function(n){return!!ui(this,"string"==typeof n&&fr.test(n)?i(n):n||[],!1).length}});var ft,u=n.document,fe=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ee=i.fn.init=function(n,t){var r,f;if(!n)return this;if("string"==typeof n){if(r="<"===n.charAt(0)&&">"===n.charAt(n.length-1)&&n.length>=3?[null,n,null]:fe.exec(n),!r||!r[1]&&t)return!t||t.jquery?(t||ft).find(n):this.constructor(t).find(n);if(r[1]){if(t=t instanceof i?t[0]:t,i.merge(this,i.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:u,!0)),er.test(r[1])&&i.isPlainObject(t))for(r in t)i.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}if(f=u.getElementById(r[2]),f&&f.parentNode){if(f.id!==r[2])return ft.find(n);this.length=1;this[0]=f}return this.context=u,this.selector=n,this}return n.nodeType?(this.context=this[0]=n,this.length=1,this):i.isFunction(n)?"undefined"!=typeof ft.ready?ft.ready(n):n(i):(void 0!==n.selector&&(this.selector=n.selector,this.context=n.context),i.makeArray(n,this))};ee.prototype=i.fn;ft=i(u);or=/^(?:parents|prev(?:Until|All))/;sr={children:!0,contents:!0,next:!0,prev:!0};i.extend({dir:function(n,t,r){for(var f=[],u=n[t];u&&9!==u.nodeType&&(void 0===r||1!==u.nodeType||!i(u).is(r));)1===u.nodeType&&f.push(u),u=u[t];return f},sibling:function(n,t){for(var i=[];n;n=n.nextSibling)1===n.nodeType&&n!==t&&i.push(n);return i}});i.fn.extend({has:function(n){var t,r=i(n,this),u=r.length;return this.filter(function(){for(t=0;u>t;t++)if(i.contains(this,r[t]))return!0})},closest:function(n,t){for(var r,f=0,o=this.length,u=[],e=fr.test(n)||"string"!=typeof n?i(n,t||this.context):0;o>f;f++)for(r=this[f];r&&r!==t;r=r.parentNode)if(r.nodeType<11&&(e?e.index(r)>-1:1===r.nodeType&&i.find.matchesSelector(r,n))){u.push(r);break}return this.pushStack(u.length>1?i.unique(u):u)},index:function(n){return n?"string"==typeof n?i.inArray(this[0],i(n)):i.inArray(n.jquery?n[0]:n,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(n,t){return this.pushStack(i.unique(i.merge(this.get(),i(n,t))))},addBack:function(n){return this.add(null==n?this.prevObject:this.prevObject.filter(n))}});i.each({parent:function(n){var t=n.parentNode;return t&&11!==t.nodeType?t:null},parents:function(n){return i.dir(n,"parentNode")},parentsUntil:function(n,t,r){return i.dir(n,"parentNode",r)},next:function(n){return hr(n,"nextSibling")},prev:function(n){return hr(n,"previousSibling")},nextAll:function(n){return i.dir(n,"nextSibling")},prevAll:function(n){return i.dir(n,"previousSibling")},nextUntil:function(n,t,r){return i.dir(n,"nextSibling",r)},prevUntil:function(n,t,r){return i.dir(n,"previousSibling",r)},siblings:function(n){return i.sibling((n.parentNode||{}).firstChild,n)},children:function(n){return i.sibling(n.firstChild)},contents:function(n){return i.nodeName(n,"iframe")?n.contentDocument||n.contentWindow.document:i.merge([],n.childNodes)}},function(n,t){i.fn[n]=function(r,u){var f=i.map(this,t,r);return"Until"!==n.slice(-5)&&(u=r),u&&"string"==typeof u&&(f=i.filter(u,f)),this.length>1&&(sr[n]||(f=i.unique(f)),or.test(n)&&(f=f.reverse())),this.pushStack(f)}});h=/\S+/g;fi={};i.Callbacks=function(n){n="string"==typeof n?fi[n]||oe(n):i.extend({},n);var o,u,h,f,e,c,t=[],r=!n.once&&[],l=function(i){for(u=n.memory&&i,h=!0,e=c||0,c=0,f=t.length,o=!0;t&&f>e;e++)if(t[e].apply(i[0],i[1])===!1&&n.stopOnFalse){u=!1;break}o=!1;t&&(r?r.length&&l(r.shift()):u?t=[]:s.disable())},s={add:function(){if(t){var r=t.length;!function e(r){i.each(r,function(r,u){var f=i.type(u);"function"===f?n.unique&&s.has(u)||t.push(u):u&&u.length&&"string"!==f&&e(u)})}(arguments);o?f=t.length:u&&(c=r,l(u))}return this},remove:function(){return t&&i.each(arguments,function(n,r){for(var u;(u=i.inArray(r,t,u))>-1;)t.splice(u,1),o&&(f>=u&&f--,e>=u&&e--)}),this},has:function(n){return n?i.inArray(n,t)>-1:!(!t||!t.length)},empty:function(){return t=[],f=0,this},disable:function(){return t=r=u=void 0,this},disabled:function(){return!t},lock:function(){return r=void 0,u||s.disable(),this},locked:function(){return!r},fireWith:function(n,i){return!t||h&&!r||(i=i||[],i=[n,i.slice?i.slice():i],o?r.push(i):l(i)),this},fire:function(){return s.fireWith(this,arguments),this},fired:function(){return!!h}};return s};i.extend({Deferred:function(n){var u=[["resolve","done",i.Callbacks("once memory"),"resolved"],["reject","fail",i.Callbacks("once memory"),"rejected"],["notify","progress",i.Callbacks("memory")]],f="pending",r={state:function(){return f},always:function(){return t.done(arguments).fail(arguments),this},then:function(){var n=arguments;return i.Deferred(function(f){i.each(u,function(u,e){var o=i.isFunction(n[u])&&n[u];t[e[1]](function(){var n=o&&o.apply(this,arguments);n&&i.isFunction(n.promise)?n.promise().done(f.resolve).fail(f.reject).progress(f.notify):f[e[0]+"With"](this===r?f.promise():this,o?[n]:arguments)})});n=null}).promise()},promise:function(n){return null!=n?i.extend(n,r):r}},t={};return r.pipe=r.then,i.each(u,function(n,i){var e=i[2],o=i[3];r[i[1]]=e.add;o&&e.add(function(){f=o},u[1^n][2].disable,u[2][2].lock);t[i[0]]=function(){return t[i[0]+"With"](this===t?r:this,arguments),this};t[i[0]+"With"]=e.fireWith}),r.promise(t),n&&n.call(t,t),t},when:function(n){var t=0,u=l.call(arguments),r=u.length,e=1!==r||n&&i.isFunction(n.promise)?r:0,f=1===e?n:i.Deferred(),h=function(n,t,i){return function(r){t[n]=this;i[n]=arguments.length>1?l.call(arguments):r;i===o?f.notifyWith(t,i):--e||f.resolveWith(t,i)}},o,c,s;if(r>1)for(o=new Array(r),c=new Array(r),s=new Array(r);r>t;t++)u[t]&&i.isFunction(u[t].promise)?u[t].promise().done(h(t,s,u)).fail(f.reject).progress(h(t,c,o)):--e;return e||f.resolveWith(s,u),f.promise()}});i.fn.ready=function(n){return i.ready.promise().done(n),this};i.extend({isReady:!1,readyWait:1,holdReady:function(n){n?i.readyWait++:i.ready(!0)},ready:function(n){if(n===!0?!--i.readyWait:!i.isReady){if(!u.body)return setTimeout(i.ready);i.isReady=!0;n!==!0&&--i.readyWait>0||(lt.resolveWith(u,[i]),i.fn.triggerHandler&&(i(u).triggerHandler("ready"),i(u).off("ready")))}}});i.ready.promise=function(t){if(!lt)if(lt=i.Deferred(),"complete"===u.readyState)setTimeout(i.ready);else if(u.addEventListener)u.addEventListener("DOMContentLoaded",a,!1),n.addEventListener("load",a,!1);else{u.attachEvent("onreadystatechange",a);n.attachEvent("onload",a);var r=!1;try{r=null==n.frameElement&&u.documentElement}catch(e){}r&&r.doScroll&&!function f(){if(!i.isReady){try{r.doScroll("left")}catch(n){return setTimeout(f,50)}cr();i.ready()}}()}return lt.promise(t)};o="undefined";for(lr in i(r))break;r.ownLast="0"!==lr;r.inlineBlockNeedsLayout=!1;i(function(){var f,t,n,i;n=u.getElementsByTagName("body")[0];n&&n.style&&(t=u.createElement("div"),i=u.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(t),typeof t.style.zoom!==o&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",r.inlineBlockNeedsLayout=f=3===t.offsetWidth,f&&(n.style.zoom=1)),n.removeChild(i))}),function(){var n=u.createElement("div");if(null==r.deleteExpando){r.deleteExpando=!0;try{delete n.test}catch(t){r.deleteExpando=!1}}n=null}();i.acceptData=function(n){var t=i.noData[(n.nodeName+" ").toLowerCase()],r=+n.nodeType||1;return 1!==r&&9!==r?!1:!t||t!==!0&&n.getAttribute("classid")===t};ar=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/;vr=/([A-Z])/g;i.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(n){return n=n.nodeType?i.cache[n[i.expando]]:n[i.expando],!!n&&!ei(n)},data:function(n,t,i){return pr(n,t,i)},removeData:function(n,t){return wr(n,t)},_data:function(n,t,i){return pr(n,t,i,!0)},_removeData:function(n,t){return wr(n,t,!0)}});i.fn.extend({data:function(n,t){var f,u,e,r=this[0],o=r&&r.attributes;if(void 0===n){if(this.length&&(e=i.data(r),1===r.nodeType&&!i._data(r,"parsedAttrs"))){for(f=o.length;f--;)o[f]&&(u=o[f].name,0===u.indexOf("data-")&&(u=i.camelCase(u.slice(5)),yr(r,u,e[u])));i._data(r,"parsedAttrs",!0)}return e}return"object"==typeof n?this.each(function(){i.data(this,n)}):arguments.length>1?this.each(function(){i.data(this,n,t)}):r?yr(r,n,i.data(r,n)):void 0},removeData:function(n){return this.each(function(){i.removeData(this,n)})}});i.extend({queue:function(n,t,r){var u;if(n)return(t=(t||"fx")+"queue",u=i._data(n,t),r&&(!u||i.isArray(r)?u=i._data(n,t,i.makeArray(r)):u.push(r)),u||[])},dequeue:function(n,t){t=t||"fx";var r=i.queue(n,t),e=r.length,u=r.shift(),f=i._queueHooks(n,t),o=function(){i.dequeue(n,t)};"inprogress"===u&&(u=r.shift(),e--);u&&("fx"===t&&r.unshift("inprogress"),delete f.stop,u.call(n,o,f));!e&&f&&f.empty.fire()},_queueHooks:function(n,t){var r=t+"queueHooks";return i._data(n,r)||i._data(n,r,{empty:i.Callbacks("once memory").add(function(){i._removeData(n,t+"queue");i._removeData(n,r)})})}});i.fn.extend({queue:function(n,t){var r=2;return"string"!=typeof n&&(t=n,n="fx",r--),arguments.length<r?i.queue(this[0],n):void 0===t?this:this.each(function(){var r=i.queue(this,n,t);i._queueHooks(this,n);"fx"===n&&"inprogress"!==r[0]&&i.dequeue(this,n)})},dequeue:function(n){return this.each(function(){i.dequeue(this,n)})},clearQueue:function(n){return this.queue(n||"fx",[])},promise:function(n,t){var r,f=1,e=i.Deferred(),u=this,o=this.length,s=function(){--f||e.resolveWith(u,[u])};for("string"!=typeof n&&(t=n,n=void 0),n=n||"fx";o--;)r=i._data(u[o],n+"queueHooks"),r&&r.empty&&(f++,r.empty.add(s));return s(),e.promise(t)}});var at=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=["Top","Right","Bottom","Left"],et=function(n,t){return n=t||n,"none"===i.css(n,"display")||!i.contains(n.ownerDocument,n)},b=i.access=function(n,t,r,u,f,e,o){var s=0,c=n.length,h=null==r;if("object"===i.type(r)){f=!0;for(s in r)i.access(n,t,s,r[s],!0,e,o)}else if(void 0!==u&&(f=!0,i.isFunction(u)||(o=!0),h&&(o?(t.call(n,u),t=null):(h=t,t=function(n,t,r){return h.call(i(n),r)})),t))for(;c>s;s++)t(n[s],r,o?u:u.call(n[s],s,t(n[s],r)));return f?n:h?t.call(n):c?t(n[0],r):e},oi=/^(?:checkbox|radio)$/i;!function(){var t=u.createElement("input"),n=u.createElement("div"),i=u.createDocumentFragment();if(n.innerHTML="  <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>",r.leadingWhitespace=3===n.firstChild.nodeType,r.tbody=!n.getElementsByTagName("tbody").length,r.htmlSerialize=!!n.getElementsByTagName("link").length,r.html5Clone="<:nav><\/:nav>"!==u.createElement("nav").cloneNode(!0).outerHTML,t.type="checkbox",t.checked=!0,i.appendChild(t),r.appendChecked=t.checked,n.innerHTML="<textarea>x<\/textarea>",r.noCloneChecked=!!n.cloneNode(!0).lastChild.defaultValue,i.appendChild(n),n.innerHTML="<input type='radio' checked='checked' name='t'/>",r.checkClone=n.cloneNode(!0).cloneNode(!0).lastChild.checked,r.noCloneEvent=!0,n.attachEvent&&(n.attachEvent("onclick",function(){r.noCloneEvent=!1}),n.cloneNode(!0).click()),null==r.deleteExpando){r.deleteExpando=!0;try{delete n.test}catch(f){r.deleteExpando=!1}}}(),function(){var t,i,f=u.createElement("div");for(t in{submit:!0,change:!0,focusin:!0})i="on"+t,(r[t+"Bubbles"]=i in n)||(f.setAttribute(i,"t"),r[t+"Bubbles"]=f.attributes[i].expando===!1);f=null}();var si=/^(?:input|select|textarea)$/i,se=/^key/,he=/^(?:mouse|pointer|contextmenu)|click/,br=/^(?:focusinfocus|focusoutblur)$/,kr=/^([^.]*)(?:\.(.+)|)$/;i.event={global:{},add:function(n,t,r,u,f){var w,y,b,p,s,c,l,a,e,k,d,v=i._data(n);if(v){for(r.handler&&(p=r,r=p.handler,f=p.selector),r.guid||(r.guid=i.guid++),(y=v.events)||(y=v.events={}),(c=v.handle)||(c=v.handle=function(n){if(typeof i!==o&&(!n||i.event.triggered!==n.type))return i.event.dispatch.apply(c.elem,arguments)},c.elem=n),t=(t||"").match(h)||[""],b=t.length;b--;)w=kr.exec(t[b])||[],e=d=w[1],k=(w[2]||"").split(".").sort(),e&&(s=i.event.special[e]||{},e=(f?s.delegateType:s.bindType)||e,s=i.event.special[e]||{},l=i.extend({type:e,origType:d,data:u,handler:r,guid:r.guid,selector:f,needsContext:f&&i.expr.match.needsContext.test(f),namespace:k.join(".")},p),(a=y[e])||(a=y[e]=[],a.delegateCount=0,s.setup&&s.setup.call(n,u,k,c)!==!1||(n.addEventListener?n.addEventListener(e,c,!1):n.attachEvent&&n.attachEvent("on"+e,c))),s.add&&(s.add.call(n,l),l.handler.guid||(l.handler.guid=r.guid)),f?a.splice(a.delegateCount++,0,l):a.push(l),i.event.global[e]=!0);n=null}},remove:function(n,t,r,u,f){var y,o,s,b,p,a,c,l,e,w,k,v=i.hasData(n)&&i._data(n);if(v&&(a=v.events)){for(t=(t||"").match(h)||[""],p=t.length;p--;)if(s=kr.exec(t[p])||[],e=k=s[1],w=(s[2]||"").split(".").sort(),e){for(c=i.event.special[e]||{},e=(u?c.delegateType:c.bindType)||e,l=a[e]||[],s=s[2]&&new RegExp("(^|\\.)"+w.join("\\.(?:.*\\.|)")+"(\\.|$)"),b=y=l.length;y--;)o=l[y],!f&&k!==o.origType||r&&r.guid!==o.guid||s&&!s.test(o.namespace)||u&&u!==o.selector&&("**"!==u||!o.selector)||(l.splice(y,1),o.selector&&l.delegateCount--,c.remove&&c.remove.call(n,o));b&&!l.length&&(c.teardown&&c.teardown.call(n,w,v.handle)!==!1||i.removeEvent(n,e,v.handle),delete a[e])}else for(e in a)i.event.remove(n,e+t[p],r,u,!0);i.isEmptyObject(a)&&(delete v.handle,i._removeData(n,"events"))}},trigger:function(t,r,f,e){var l,a,o,p,c,h,w,y=[f||u],s=tt.call(t,"type")?t.type:t,v=tt.call(t,"namespace")?t.namespace.split("."):[];if(o=h=f=f||u,3!==f.nodeType&&8!==f.nodeType&&!br.test(s+i.event.triggered)&&(s.indexOf(".")>=0&&(v=s.split("."),s=v.shift(),v.sort()),a=s.indexOf(":")<0&&"on"+s,t=t[i.expando]?t:new i.Event(s,"object"==typeof t&&t),t.isTrigger=e?2:3,t.namespace=v.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=f),r=null==r?[t]:i.makeArray(r,[t]),c=i.event.special[s]||{},e||!c.trigger||c.trigger.apply(f,r)!==!1)){if(!e&&!c.noBubble&&!i.isWindow(f)){for(p=c.delegateType||s,br.test(p+s)||(o=o.parentNode);o;o=o.parentNode)y.push(o),h=o;h===(f.ownerDocument||u)&&y.push(h.defaultView||h.parentWindow||n)}for(w=0;(o=y[w++])&&!t.isPropagationStopped();)t.type=w>1?p:c.bindType||s,l=(i._data(o,"events")||{})[t.type]&&i._data(o,"handle"),l&&l.apply(o,r),l=a&&o[a],l&&l.apply&&i.acceptData(o)&&(t.result=l.apply(o,r),t.result===!1&&t.preventDefault());if(t.type=s,!e&&!t.isDefaultPrevented()&&(!c._default||c._default.apply(y.pop(),r)===!1)&&i.acceptData(f)&&a&&f[s]&&!i.isWindow(f)){h=f[a];h&&(f[a]=null);i.event.triggered=s;try{f[s]()}catch(b){}i.event.triggered=void 0;h&&(f[a]=h)}return t.result}},dispatch:function(n){n=i.event.fix(n);var e,f,t,r,o,s=[],h=l.call(arguments),c=(i._data(this,"events")||{})[n.type]||[],u=i.event.special[n.type]||{};if(h[0]=n,n.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,n)!==!1){for(s=i.event.handlers.call(this,n,c),e=0;(r=s[e++])&&!n.isPropagationStopped();)for(n.currentTarget=r.elem,o=0;(t=r.handlers[o++])&&!n.isImmediatePropagationStopped();)(!n.namespace_re||n.namespace_re.test(t.namespace))&&(n.handleObj=t,n.data=t.data,f=((i.event.special[t.origType]||{}).handle||t.handler).apply(r.elem,h),void 0!==f&&(n.result=f)===!1&&(n.preventDefault(),n.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,n),n.result}},handlers:function(n,t){var f,e,u,o,h=[],s=t.delegateCount,r=n.target;if(s&&r.nodeType&&(!n.button||"click"!==n.type))for(;r!=this;r=r.parentNode||this)if(1===r.nodeType&&(r.disabled!==!0||"click"!==n.type)){for(u=[],o=0;s>o;o++)e=t[o],f=e.selector+" ",void 0===u[f]&&(u[f]=e.needsContext?i(f,this).index(r)>=0:i.find(f,this,null,[r]).length),u[f]&&u.push(e);u.length&&h.push({elem:r,handlers:u})}return s<t.length&&h.push({elem:this,handlers:t.slice(s)}),h},fix:function(n){if(n[i.expando])return n;var e,o,s,r=n.type,f=n,t=this.fixHooks[r];for(t||(this.fixHooks[r]=t=he.test(r)?this.mouseHooks:se.test(r)?this.keyHooks:{}),s=t.props?this.props.concat(t.props):this.props,n=new i.Event(f),e=s.length;e--;)o=s[e],n[o]=f[o];return n.target||(n.target=f.srcElement||u),3===n.target.nodeType&&(n.target=n.target.parentNode),n.metaKey=!!n.metaKey,t.filter?t.filter(n,f):n},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(n,t){return null==n.which&&(n.which=null!=t.charCode?t.charCode:t.keyCode),n}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(n,t){var i,e,r,f=t.button,o=t.fromElement;return null==n.pageX&&null!=t.clientX&&(e=n.target.ownerDocument||u,r=e.documentElement,i=e.body,n.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),n.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),!n.relatedTarget&&o&&(n.relatedTarget=o===n.target?t.toElement:o),n.which||void 0===f||(n.which=1&f?1:2&f?3:4&f?2:0),n}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==dr()&&this.focus)try{return this.focus(),!1}catch(n){}},delegateType:"focusin"},blur:{trigger:function(){if(this===dr()&&this.blur)return(this.blur(),!1)},delegateType:"focusout"},click:{trigger:function(){if(i.nodeName(this,"input")&&"checkbox"===this.type&&this.click)return(this.click(),!1)},_default:function(n){return i.nodeName(n.target,"a")}},beforeunload:{postDispatch:function(n){void 0!==n.result&&n.originalEvent&&(n.originalEvent.returnValue=n.result)}}},simulate:function(n,t,r,u){var f=i.extend(new i.Event,r,{type:n,isSimulated:!0,originalEvent:{}});u?i.event.trigger(f,null,t):i.event.dispatch.call(t,f);f.isDefaultPrevented()&&r.preventDefault()}};i.removeEvent=u.removeEventListener?function(n,t,i){n.removeEventListener&&n.removeEventListener(t,i,!1)}:function(n,t,i){var r="on"+t;n.detachEvent&&(typeof n[r]===o&&(n[r]=null),n.detachEvent(r,i))};i.Event=function(n,t){return this instanceof i.Event?(n&&n.type?(this.originalEvent=n,this.type=n.type,this.isDefaultPrevented=n.defaultPrevented||void 0===n.defaultPrevented&&n.returnValue===!1?vt:it):this.type=n,t&&i.extend(this,t),this.timeStamp=n&&n.timeStamp||i.now(),void(this[i.expando]=!0)):new i.Event(n,t)};i.Event.prototype={isDefaultPrevented:it,isPropagationStopped:it,isImmediatePropagationStopped:it,preventDefault:function(){var n=this.originalEvent;this.isDefaultPrevented=vt;n&&(n.preventDefault?n.preventDefault():n.returnValue=!1)},stopPropagation:function(){var n=this.originalEvent;this.isPropagationStopped=vt;n&&(n.stopPropagation&&n.stopPropagation(),n.cancelBubble=!0)},stopImmediatePropagation:function(){var n=this.originalEvent;this.isImmediatePropagationStopped=vt;n&&n.stopImmediatePropagation&&n.stopImmediatePropagation();this.stopPropagation()}};i.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(n,t){i.event.special[n]={delegateType:t,bindType:t,handle:function(n){var u,f=this,r=n.relatedTarget,e=n.handleObj;return(!r||r!==f&&!i.contains(f,r))&&(n.type=e.origType,u=e.handler.apply(this,arguments),n.type=t),u}}});r.submitBubbles||(i.event.special.submit={setup:function(){return i.nodeName(this,"form")?!1:void i.event.add(this,"click._submit keypress._submit",function(n){var r=n.target,t=i.nodeName(r,"input")||i.nodeName(r,"button")?r.form:void 0;t&&!i._data(t,"submitBubbles")&&(i.event.add(t,"submit._submit",function(n){n._submit_bubble=!0}),i._data(t,"submitBubbles",!0))})},postDispatch:function(n){n._submit_bubble&&(delete n._submit_bubble,this.parentNode&&!n.isTrigger&&i.event.simulate("submit",this.parentNode,n,!0))},teardown:function(){return i.nodeName(this,"form")?!1:void i.event.remove(this,"._submit")}});r.changeBubbles||(i.event.special.change={setup:function(){return si.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(i.event.add(this,"propertychange._change",function(n){"checked"===n.originalEvent.propertyName&&(this._just_changed=!0)}),i.event.add(this,"click._change",function(n){this._just_changed&&!n.isTrigger&&(this._just_changed=!1);i.event.simulate("change",this,n,!0)})),!1):void i.event.add(this,"beforeactivate._change",function(n){var t=n.target;si.test(t.nodeName)&&!i._data(t,"changeBubbles")&&(i.event.add(t,"change._change",function(n){!this.parentNode||n.isSimulated||n.isTrigger||i.event.simulate("change",this.parentNode,n,!0)}),i._data(t,"changeBubbles",!0))})},handle:function(n){var t=n.target;if(this!==t||n.isSimulated||n.isTrigger||"radio"!==t.type&&"checkbox"!==t.type)return n.handleObj.handler.apply(this,arguments)},teardown:function(){return i.event.remove(this,"._change"),!si.test(this.nodeName)}});r.focusinBubbles||i.each({focus:"focusin",blur:"focusout"},function(n,t){var r=function(n){i.event.simulate(t,n.target,i.event.fix(n),!0)};i.event.special[t]={setup:function(){var u=this.ownerDocument||this,f=i._data(u,t);f||u.addEventListener(n,r,!0);i._data(u,t,(f||0)+1)},teardown:function(){var u=this.ownerDocument||this,f=i._data(u,t)-1;f?i._data(u,t,f):(u.removeEventListener(n,r,!0),i._removeData(u,t))}}});i.fn.extend({on:function(n,t,r,u,f){var o,e;if("object"==typeof n){"string"!=typeof t&&(r=r||t,t=void 0);for(o in n)this.on(o,t,r,n[o],f);return this}if(null==r&&null==u?(u=t,r=t=void 0):null==u&&("string"==typeof t?(u=r,r=void 0):(u=r,r=t,t=void 0)),u===!1)u=it;else if(!u)return this;return 1===f&&(e=u,u=function(n){return i().off(n),e.apply(this,arguments)},u.guid=e.guid||(e.guid=i.guid++)),this.each(function(){i.event.add(this,n,u,r,t)})},one:function(n,t,i,r){return this.on(n,t,i,r,1)},off:function(n,t,r){var u,f;if(n&&n.preventDefault&&n.handleObj)return u=n.handleObj,i(n.delegateTarget).off(u.namespace?u.origType+"."+u.namespace:u.origType,u.selector,u.handler),this;if("object"==typeof n){for(f in n)this.off(f,t,n[f]);return this}return(t===!1||"function"==typeof t)&&(r=t,t=void 0),r===!1&&(r=it),this.each(function(){i.event.remove(this,n,r,t)})},trigger:function(n,t){return this.each(function(){i.event.trigger(n,t,this)})},triggerHandler:function(n,t){var r=this[0];if(r)return i.event.trigger(n,t,r,!0)}});var nu="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ce=/ jQuery\d+="(?:null|\d+)"/g,tu=new RegExp("<(?:"+nu+")[\\s/>]","i"),hi=/^\s+/,iu=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ru=/<([\w:]+)/,uu=/<tbody/i,le=/<|&#?\w+;/,ae=/<(?:script|style|link)/i,ve=/checked\s*(?:[^=]|=\s*.checked.)/i,fu=/^$|\/(?:java|ecma)script/i,ye=/^true\/(.*)/,pe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,s={option:[1,"<select multiple='multiple'>","<\/select>"],legend:[1,"<fieldset>","<\/fieldset>"],area:[1,"<map>","<\/map>"],param:[1,"<object>","<\/object>"],thead:[1,"<table>","<\/table>"],tr:[2,"<table><tbody>","<\/tbody><\/table>"],col:[2,"<table><tbody><\/tbody><colgroup>","<\/colgroup><\/table>"],td:[3,"<table><tbody><tr>","<\/tr><\/tbody><\/table>"],_default:r.htmlSerialize?[0,"",""]:[1,"X<div>","<\/div>"]},we=gr(u),ci=we.appendChild(u.createElement("div"));s.optgroup=s.option;s.tbody=s.tfoot=s.colgroup=s.caption=s.thead;s.th=s.td;i.extend({clone:function(n,t,u){var e,c,s,o,h,l=i.contains(n.ownerDocument,n);if(r.html5Clone||i.isXMLDoc(n)||!tu.test("<"+n.nodeName+">")?s=n.cloneNode(!0):(ci.innerHTML=n.outerHTML,ci.removeChild(s=ci.firstChild)),!(r.noCloneEvent&&r.noCloneChecked||1!==n.nodeType&&11!==n.nodeType||i.isXMLDoc(n)))for(e=f(s),h=f(n),o=0;null!=(c=h[o]);++o)e[o]&&ke(c,e[o]);if(t)if(u)for(h=h||f(n),e=e||f(s),o=0;null!=(c=h[o]);o++)hu(c,e[o]);else hu(n,s);return e=f(s,"script"),e.length>0&&li(e,!l&&f(n,"script")),e=h=c=null,s},buildFragment:function(n,t,u,e){for(var c,o,b,h,p,w,a,k=n.length,v=gr(t),l=[],y=0;k>y;y++)if(o=n[y],o||0===o)if("object"===i.type(o))i.merge(l,o.nodeType?[o]:o);else if(le.test(o)){for(h=h||v.appendChild(t.createElement("div")),p=(ru.exec(o)||["",""])[1].toLowerCase(),a=s[p]||s._default,h.innerHTML=a[1]+o.replace(iu,"<$1><\/$2>")+a[2],c=a[0];c--;)h=h.lastChild;if(!r.leadingWhitespace&&hi.test(o)&&l.push(t.createTextNode(hi.exec(o)[0])),!r.tbody)for(o="table"!==p||uu.test(o)?"<table>"!==a[1]||uu.test(o)?0:h:h.firstChild,c=o&&o.childNodes.length;c--;)i.nodeName(w=o.childNodes[c],"tbody")&&!w.childNodes.length&&o.removeChild(w);for(i.merge(l,h.childNodes),h.textContent="";h.firstChild;)h.removeChild(h.firstChild);h=v.lastChild}else l.push(t.createTextNode(o));for(h&&v.removeChild(h),r.appendChecked||i.grep(f(l,"input"),be),y=0;o=l[y++];)if((!e||-1===i.inArray(o,e))&&(b=i.contains(o.ownerDocument,o),h=f(v.appendChild(o),"script"),b&&li(h),u))for(c=0;o=h[c++];)fu.test(o.type||"")&&u.push(o);return h=null,v},cleanData:function(n,t){for(var u,e,f,s,a=0,h=i.expando,l=i.cache,v=r.deleteExpando,y=i.event.special;null!=(u=n[a]);a++)if((t||i.acceptData(u))&&(f=u[h],s=f&&l[f])){if(s.events)for(e in s.events)y[e]?i.event.remove(u,e):i.removeEvent(u,e,s.handle);l[f]&&(delete l[f],v?delete u[h]:typeof u.removeAttribute!==o?u.removeAttribute(h):u[h]=null,c.push(f))}}});i.fn.extend({text:function(n){return b(this,function(n){return void 0===n?i.text(this):this.empty().append((this[0]&&this[0].ownerDocument||u).createTextNode(n))},null,n,arguments.length)},append:function(){return this.domManip(arguments,function(n){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=eu(this,n);t.appendChild(n)}})},prepend:function(){return this.domManip(arguments,function(n){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=eu(this,n);t.insertBefore(n,t.firstChild)}})},before:function(){return this.domManip(arguments,function(n){this.parentNode&&this.parentNode.insertBefore(n,this)})},after:function(){return this.domManip(arguments,function(n){this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling)})},remove:function(n,t){for(var r,e=n?i.filter(n,this):this,u=0;null!=(r=e[u]);u++)t||1!==r.nodeType||i.cleanData(f(r)),r.parentNode&&(t&&i.contains(r.ownerDocument,r)&&li(f(r,"script")),r.parentNode.removeChild(r));return this},empty:function(){for(var n,t=0;null!=(n=this[t]);t++){for(1===n.nodeType&&i.cleanData(f(n,!1));n.firstChild;)n.removeChild(n.firstChild);n.options&&i.nodeName(n,"select")&&(n.options.length=0)}return this},clone:function(n,t){return n=null==n?!1:n,t=null==t?n:t,this.map(function(){return i.clone(this,n,t)})},html:function(n){return b(this,function(n){var t=this[0]||{},u=0,e=this.length;if(void 0===n)return 1===t.nodeType?t.innerHTML.replace(ce,""):void 0;if(!("string"!=typeof n||ae.test(n)||!r.htmlSerialize&&tu.test(n)||!r.leadingWhitespace&&hi.test(n)||s[(ru.exec(n)||["",""])[1].toLowerCase()])){n=n.replace(iu,"<$1><\/$2>");try{for(;e>u;u++)t=this[u]||{},1===t.nodeType&&(i.cleanData(f(t,!1)),t.innerHTML=n);t=0}catch(o){}}t&&this.empty().append(n)},null,n,arguments.length)},replaceWith:function(){var n=arguments[0];return this.domManip(arguments,function(t){n=this.parentNode;i.cleanData(f(this));n&&n.replaceChild(t,this)}),n&&(n.length||n.nodeType)?this:this.remove()},detach:function(n){return this.remove(n,!0)},domManip:function(n,t){n=ir.apply([],n);var h,u,c,o,v,s,e=0,l=this.length,p=this,w=l-1,a=n[0],y=i.isFunction(a);if(y||l>1&&"string"==typeof a&&!r.checkClone&&ve.test(a))return this.each(function(i){var r=p.eq(i);y&&(n[0]=a.call(this,i,r.html()));r.domManip(n,t)});if(l&&(s=i.buildFragment(n,this[0].ownerDocument,!1,this),h=s.firstChild,1===s.childNodes.length&&(s=h),h)){for(o=i.map(f(s,"script"),ou),c=o.length;l>e;e++)u=s,e!==w&&(u=i.clone(u,!0,!0),c&&i.merge(o,f(u,"script"))),t.call(this[e],u,e);if(c)for(v=o[o.length-1].ownerDocument,i.map(o,su),e=0;c>e;e++)u=o[e],fu.test(u.type||"")&&!i._data(u,"globalEval")&&i.contains(v,u)&&(u.src?i._evalUrl&&i._evalUrl(u.src):i.globalEval((u.text||u.textContent||u.innerHTML||"").replace(pe,"")));s=h=null}return this}});i.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(n,t){i.fn[n]=function(n){for(var u,r=0,f=[],e=i(n),o=e.length-1;o>=r;r++)u=r===o?this:this.clone(!0),i(e[r])[t](u),ii.apply(f,u.get());return this.pushStack(f)}});ai={};!function(){var n;r.shrinkWrapBlocks=function(){if(null!=n)return n;n=!1;var t,i,r;return i=u.getElementsByTagName("body")[0],i&&i.style?(t=u.createElement("div"),r=u.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",i.appendChild(r).appendChild(t),typeof t.style.zoom!==o&&(t.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",t.appendChild(u.createElement("div")).style.width="5px",n=3!==t.offsetWidth),i.removeChild(r),n):void 0}}();var lu=/^margin/,pt=new RegExp("^("+at+")(?!px)[a-z%]+$","i"),k,d,de=/^(top|right|bottom|left)$/;n.getComputedStyle?(k=function(t){return t.ownerDocument.defaultView.opener?t.ownerDocument.defaultView.getComputedStyle(t,null):n.getComputedStyle(t,null)},d=function(n,t,r){var e,o,s,u,f=n.style;return r=r||k(n),u=r?r.getPropertyValue(t)||r[t]:void 0,r&&(""!==u||i.contains(n.ownerDocument,n)||(u=i.style(n,t)),pt.test(u)&&lu.test(t)&&(e=f.width,o=f.minWidth,s=f.maxWidth,f.minWidth=f.maxWidth=f.width=u,u=r.width,f.width=e,f.minWidth=o,f.maxWidth=s)),void 0===u?u:u+""}):u.documentElement.currentStyle&&(k=function(n){return n.currentStyle},d=function(n,t,i){var o,f,e,r,u=n.style;return i=i||k(n),r=i?i[t]:void 0,null==r&&u&&u[t]&&(r=u[t]),pt.test(r)&&!de.test(t)&&(o=u.left,f=n.runtimeStyle,e=f&&f.left,e&&(f.left=n.currentStyle.left),u.left="fontSize"===t?"1em":r,r=u.pixelLeft+"px",u.left=o,e&&(f.left=e)),void 0===r?r:r+""||"auto"});!function(){var f,t,c,o,s,e,h;if(f=u.createElement("div"),f.innerHTML="  <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>",c=f.getElementsByTagName("a")[0],t=c&&c.style){t.cssText="float:left;opacity:.5";r.opacity="0.5"===t.opacity;r.cssFloat=!!t.cssFloat;f.style.backgroundClip="content-box";f.cloneNode(!0).style.backgroundClip="";r.clearCloneStyle="content-box"===f.style.backgroundClip;r.boxSizing=""===t.boxSizing||""===t.MozBoxSizing||""===t.WebkitBoxSizing;i.extend(r,{reliableHiddenOffsets:function(){return null==e&&c(),e},boxSizingReliable:function(){return null==s&&c(),s},pixelPosition:function(){return null==o&&c(),o},reliableMarginRight:function(){return null==h&&c(),h}});function c(){var i,r,f,t;r=u.getElementsByTagName("body")[0];r&&r.style&&(i=u.createElement("div"),f=u.createElement("div"),f.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",r.appendChild(f).appendChild(i),i.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",o=s=!1,h=!0,n.getComputedStyle&&(o="1%"!==(n.getComputedStyle(i,null)||{}).top,s="4px"===(n.getComputedStyle(i,null)||{width:"4px"}).width,t=i.appendChild(u.createElement("div")),t.style.cssText=i.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",t.style.marginRight=t.style.width="0",i.style.width="1px",h=!parseFloat((n.getComputedStyle(t,null)||{}).marginRight),i.removeChild(t)),i.innerHTML="<table><tr><td><\/td><td>t<\/td><\/tr><\/table>",t=i.getElementsByTagName("td"),t[0].style.cssText="margin:0;border:0;padding:0;display:none",e=0===t[0].offsetHeight,e&&(t[0].style.display="",t[1].style.display="none",e=0===t[0].offsetHeight),r.removeChild(f))}}}();i.swap=function(n,t,i,r){var f,u,e={};for(u in t)e[u]=n.style[u],n.style[u]=t[u];f=i.apply(n,r||[]);for(u in t)n.style[u]=e[u];return f};var vi=/alpha\([^)]*\)/i,ge=/opacity\s*=\s*([^)]*)/,no=/^(none|table(?!-c[ea]).+)/,to=new RegExp("^("+at+")(.*)$","i"),io=new RegExp("^([+-])=("+at+")","i"),ro={position:"absolute",visibility:"hidden",display:"block"},vu={letterSpacing:"0",fontWeight:"400"},yu=["Webkit","O","Moz","ms"];i.extend({cssHooks:{opacity:{get:function(n,t){if(t){var i=d(n,"opacity");return""===i?"1":i}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:r.cssFloat?"cssFloat":"styleFloat"},style:function(n,t,u,f){if(n&&3!==n.nodeType&&8!==n.nodeType&&n.style){var o,h,e,s=i.camelCase(t),c=n.style;if(t=i.cssProps[s]||(i.cssProps[s]=pu(c,s)),e=i.cssHooks[t]||i.cssHooks[s],void 0===u)return e&&"get"in e&&void 0!==(o=e.get(n,!1,f))?o:c[t];if(h=typeof u,"string"===h&&(o=io.exec(u))&&(u=(o[1]+1)*o[2]+parseFloat(i.css(n,t)),h="number"),null!=u&&u===u&&("number"!==h||i.cssNumber[s]||(u+="px"),r.clearCloneStyle||""!==u||0!==t.indexOf("background")||(c[t]="inherit"),!(e&&"set"in e&&void 0===(u=e.set(n,u,f)))))try{c[t]=u}catch(l){}}},css:function(n,t,r,u){var s,f,e,o=i.camelCase(t);return t=i.cssProps[o]||(i.cssProps[o]=pu(n.style,o)),e=i.cssHooks[t]||i.cssHooks[o],e&&"get"in e&&(f=e.get(n,!0,r)),void 0===f&&(f=d(n,t,u)),"normal"===f&&t in vu&&(f=vu[t]),""===r||r?(s=parseFloat(f),r===!0||i.isNumeric(s)?s||0:f):f}});i.each(["height","width"],function(n,t){i.cssHooks[t]={get:function(n,r,u){if(r)return no.test(i.css(n,"display"))&&0===n.offsetWidth?i.swap(n,ro,function(){return du(n,t,u)}):du(n,t,u)},set:function(n,u,f){var e=f&&k(n);return bu(n,u,f?ku(n,t,f,r.boxSizing&&"border-box"===i.css(n,"boxSizing",!1,e),e):0)}}});r.opacity||(i.cssHooks.opacity={get:function(n,t){return ge.test((t&&n.currentStyle?n.currentStyle.filter:n.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(n,t){var r=n.style,u=n.currentStyle,e=i.isNumeric(t)?"alpha(opacity="+100*t+")":"",f=u&&u.filter||r.filter||"";r.zoom=1;(t>=1||""===t)&&""===i.trim(f.replace(vi,""))&&r.removeAttribute&&(r.removeAttribute("filter"),""===t||u&&!u.filter)||(r.filter=vi.test(f)?f.replace(vi,e):f+" "+e)}});i.cssHooks.marginRight=au(r.reliableMarginRight,function(n,t){if(t)return i.swap(n,{display:"inline-block"},d,[n,"marginRight"])});i.each({margin:"",padding:"",border:"Width"},function(n,t){i.cssHooks[n+t]={expand:function(i){for(var r=0,f={},u="string"==typeof i?i.split(" "):[i];4>r;r++)f[n+w[r]+t]=u[r]||u[r-2]||u[0];return f}};lu.test(n)||(i.cssHooks[n+t].set=bu)});i.fn.extend({css:function(n,t){return b(this,function(n,t,r){var f,e,o={},u=0;if(i.isArray(t)){for(f=k(n),e=t.length;e>u;u++)o[t[u]]=i.css(n,t[u],!1,f);return o}return void 0!==r?i.style(n,t,r):i.css(n,t)},n,t,arguments.length>1)},show:function(){return wu(this,!0)},hide:function(){return wu(this)},toggle:function(n){return"boolean"==typeof n?n?this.show():this.hide():this.each(function(){et(this)?i(this).show():i(this).hide()})}});i.Tween=e;e.prototype={constructor:e,init:function(n,t,r,u,f,e){this.elem=n;this.prop=r;this.easing=f||"swing";this.options=t;this.start=this.now=this.cur();this.end=u;this.unit=e||(i.cssNumber[r]?"":"px")},cur:function(){var n=e.propHooks[this.prop];return n&&n.get?n.get(this):e.propHooks._default.get(this)},run:function(n){var r,t=e.propHooks[this.prop];return this.pos=r=this.options.duration?i.easing[this.easing](n,this.options.duration*n,0,1,this.options.duration):n,this.now=(this.end-this.start)*r+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),t&&t.set?t.set(this):e.propHooks._default.set(this),this}};e.prototype.init.prototype=e.prototype;e.propHooks={_default:{get:function(n){var t;return null==n.elem[n.prop]||n.elem.style&&null!=n.elem.style[n.prop]?(t=i.css(n.elem,n.prop,""),t&&"auto"!==t?t:0):n.elem[n.prop]},set:function(n){i.fx.step[n.prop]?i.fx.step[n.prop](n):n.elem.style&&(null!=n.elem.style[i.cssProps[n.prop]]||i.cssHooks[n.prop])?i.style(n.elem,n.prop,n.now+n.unit):n.elem[n.prop]=n.now}}};e.propHooks.scrollTop=e.propHooks.scrollLeft={set:function(n){n.elem.nodeType&&n.elem.parentNode&&(n.elem[n.prop]=n.now)}};i.easing={linear:function(n){return n},swing:function(n){return.5-Math.cos(n*Math.PI)/2}};i.fx=e.prototype.init;i.fx.step={};var rt,wt,uo=/^(?:toggle|show|hide)$/,gu=new RegExp("^(?:([+-])=|)("+at+")([a-z%]*)$","i"),fo=/queueHooks$/,bt=[eo],st={"*":[function(n,t){var f=this.createTween(n,t),s=f.cur(),r=gu.exec(t),e=r&&r[3]||(i.cssNumber[n]?"":"px"),u=(i.cssNumber[n]||"px"!==e&&+s)&&gu.exec(i.css(f.elem,n)),o=1,h=20;if(u&&u[3]!==e){e=e||u[3];r=r||[];u=+s||1;do o=o||".5",u/=o,i.style(f.elem,n,u+e);while(o!==(o=f.cur()/s)&&1!==o&&--h)}return r&&(u=f.start=+u||+s||0,f.unit=e,f.end=r[1]?u+(r[1]+1)*r[2]:+r[2]),f}]};i.Animation=i.extend(rf,{tweener:function(n,t){i.isFunction(n)?(t=n,n=["*"]):n=n.split(" ");for(var r,u=0,f=n.length;f>u;u++)r=n[u],st[r]=st[r]||[],st[r].unshift(t)},prefilter:function(n,t){t?bt.unshift(n):bt.push(n)}});i.speed=function(n,t,r){var u=n&&"object"==typeof n?i.extend({},n):{complete:r||!r&&t||i.isFunction(n)&&n,duration:n,easing:r&&t||t&&!i.isFunction(t)&&t};return u.duration=i.fx.off?0:"number"==typeof u.duration?u.duration:u.duration in i.fx.speeds?i.fx.speeds[u.duration]:i.fx.speeds._default,(null==u.queue||u.queue===!0)&&(u.queue="fx"),u.old=u.complete,u.complete=function(){i.isFunction(u.old)&&u.old.call(this);u.queue&&i.dequeue(this,u.queue)},u};i.fn.extend({fadeTo:function(n,t,i,r){return this.filter(et).css("opacity",0).show().end().animate({opacity:t},n,i,r)},animate:function(n,t,r,u){var o=i.isEmptyObject(n),e=i.speed(t,r,u),f=function(){var t=rf(this,i.extend({},n),e);(o||i._data(this,"finish"))&&t.stop(!0)};return f.finish=f,o||e.queue===!1?this.each(f):this.queue(e.queue,f)},stop:function(n,t,r){var u=function(n){var t=n.stop;delete n.stop;t(r)};return"string"!=typeof n&&(r=t,t=n,n=void 0),t&&n!==!1&&this.queue(n||"fx",[]),this.each(function(){var o=!0,t=null!=n&&n+"queueHooks",e=i.timers,f=i._data(this);if(t)f[t]&&f[t].stop&&u(f[t]);else for(t in f)f[t]&&f[t].stop&&fo.test(t)&&u(f[t]);for(t=e.length;t--;)e[t].elem!==this||null!=n&&e[t].queue!==n||(e[t].anim.stop(r),o=!1,e.splice(t,1));(o||!r)&&i.dequeue(this,n)})},finish:function(n){return n!==!1&&(n=n||"fx"),this.each(function(){var t,f=i._data(this),r=f[n+"queue"],e=f[n+"queueHooks"],u=i.timers,o=r?r.length:0;for(f.finish=!0,i.queue(this,n,[]),e&&e.stop&&e.stop.call(this,!0),t=u.length;t--;)u[t].elem===this&&u[t].queue===n&&(u[t].anim.stop(!0),u.splice(t,1));for(t=0;o>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete f.finish})}});i.each(["toggle","show","hide"],function(n,t){var r=i.fn[t];i.fn[t]=function(n,i,u){return null==n||"boolean"==typeof n?r.apply(this,arguments):this.animate(kt(t,!0),n,i,u)}});i.each({slideDown:kt("show"),slideUp:kt("hide"),slideToggle:kt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(n,t){i.fn[n]=function(n,i,r){return this.animate(t,n,i,r)}});i.timers=[];i.fx.tick=function(){var r,n=i.timers,t=0;for(rt=i.now();t<n.length;t++)r=n[t],r()||n[t]!==r||n.splice(t--,1);n.length||i.fx.stop();rt=void 0};i.fx.timer=function(n){i.timers.push(n);n()?i.fx.start():i.timers.pop()};i.fx.interval=13;i.fx.start=function(){wt||(wt=setInterval(i.fx.tick,i.fx.interval))};i.fx.stop=function(){clearInterval(wt);wt=null};i.fx.speeds={slow:600,fast:200,_default:400};i.fn.delay=function(n,t){return n=i.fx?i.fx.speeds[n]||n:n,t=t||"fx",this.queue(t,function(t,i){var r=setTimeout(t,n);i.stop=function(){clearTimeout(r)}})},function(){var n,t,f,i,e;t=u.createElement("div");t.setAttribute("className","t");t.innerHTML="  <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>";i=t.getElementsByTagName("a")[0];f=u.createElement("select");e=f.appendChild(u.createElement("option"));n=t.getElementsByTagName("input")[0];i.style.cssText="top:1px";r.getSetAttribute="t"!==t.className;r.style=/top/.test(i.getAttribute("style"));r.hrefNormalized="/a"===i.getAttribute("href");r.checkOn=!!n.value;r.optSelected=e.selected;r.enctype=!!u.createElement("form").enctype;f.disabled=!0;r.optDisabled=!e.disabled;n=u.createElement("input");n.setAttribute("value","");r.input=""===n.getAttribute("value");n.value="t";n.setAttribute("type","radio");r.radioValue="t"===n.value}();uf=/\r/g;i.fn.extend({val:function(n){var t,r,f,u=this[0];return arguments.length?(f=i.isFunction(n),this.each(function(r){var u;1===this.nodeType&&(u=f?n.call(this,r,i(this).val()):n,null==u?u="":"number"==typeof u?u+="":i.isArray(u)&&(u=i.map(u,function(n){return null==n?"":n+""})),t=i.valHooks[this.type]||i.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,u,"value")||(this.value=u))})):u?(t=i.valHooks[u.type]||i.valHooks[u.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(r=t.get(u,"value"))?r:(r=u.value,"string"==typeof r?r.replace(uf,""):null==r?"":r)):void 0}});i.extend({valHooks:{option:{get:function(n){var t=i.find.attr(n,"value");return null!=t?t:i.trim(i.text(n))}},select:{get:function(n){for(var o,t,s=n.options,u=n.selectedIndex,f="select-one"===n.type||0>u,h=f?null:[],c=f?u+1:s.length,e=0>u?c:f?u:0;c>e;e++)if(t=s[e],!(!t.selected&&e!==u||(r.optDisabled?t.disabled:null!==t.getAttribute("disabled"))||t.parentNode.disabled&&i.nodeName(t.parentNode,"optgroup"))){if(o=i(t).val(),f)return o;h.push(o)}return h},set:function(n,t){for(var f,r,u=n.options,o=i.makeArray(t),e=u.length;e--;)if(r=u[e],i.inArray(i.valHooks.option.get(r),o)>=0)try{r.selected=f=!0}catch(s){r.scrollHeight}else r.selected=!1;return f||(n.selectedIndex=-1),u}}}});i.each(["radio","checkbox"],function(){i.valHooks[this]={set:function(n,t){if(i.isArray(t))return n.checked=i.inArray(i(n).val(),t)>=0}};r.checkOn||(i.valHooks[this].get=function(n){return null===n.getAttribute("value")?"on":n.value})});var ut,ff,v=i.expr.attrHandle,yi=/^(?:checked|selected)$/i,g=r.getSetAttribute,dt=r.input;i.fn.extend({attr:function(n,t){return b(this,i.attr,n,t,arguments.length>1)},removeAttr:function(n){return this.each(function(){i.removeAttr(this,n)})}});i.extend({attr:function(n,t,r){var u,f,e=n.nodeType;if(n&&3!==e&&8!==e&&2!==e)return typeof n.getAttribute===o?i.prop(n,t,r):(1===e&&i.isXMLDoc(n)||(t=t.toLowerCase(),u=i.attrHooks[t]||(i.expr.match.bool.test(t)?ff:ut)),void 0===r?u&&"get"in u&&null!==(f=u.get(n,t))?f:(f=i.find.attr(n,t),null==f?void 0:f):null!==r?u&&"set"in u&&void 0!==(f=u.set(n,r,t))?f:(n.setAttribute(t,r+""),r):void i.removeAttr(n,t))},removeAttr:function(n,t){var r,u,e=0,f=t&&t.match(h);if(f&&1===n.nodeType)while(r=f[e++])u=i.propFix[r]||r,i.expr.match.bool.test(r)?dt&&g||!yi.test(r)?n[u]=!1:n[i.camelCase("default-"+r)]=n[u]=!1:i.attr(n,r,""),n.removeAttribute(g?r:u)},attrHooks:{type:{set:function(n,t){if(!r.radioValue&&"radio"===t&&i.nodeName(n,"input")){var u=n.value;return n.setAttribute("type",t),u&&(n.value=u),t}}}}});ff={set:function(n,t,r){return t===!1?i.removeAttr(n,r):dt&&g||!yi.test(r)?n.setAttribute(!g&&i.propFix[r]||r,r):n[i.camelCase("default-"+r)]=n[r]=!0,r}};i.each(i.expr.match.bool.source.match(/\w+/g),function(n,t){var r=v[t]||i.find.attr;v[t]=dt&&g||!yi.test(t)?function(n,t,i){var u,f;return i||(f=v[t],v[t]=u,u=null!=r(n,t,i)?t.toLowerCase():null,v[t]=f),u}:function(n,t,r){if(!r)return n[i.camelCase("default-"+t)]?t.toLowerCase():null}});dt&&g||(i.attrHooks.value={set:function(n,t,r){return i.nodeName(n,"input")?void(n.defaultValue=t):ut&&ut.set(n,t,r)}});g||(ut={set:function(n,t,i){var r=n.getAttributeNode(i);return r||n.setAttributeNode(r=n.ownerDocument.createAttribute(i)),r.value=t+="","value"===i||t===n.getAttribute(i)?t:void 0}},v.id=v.name=v.coords=function(n,t,i){var r;if(!i)return(r=n.getAttributeNode(t))&&""!==r.value?r.value:null},i.valHooks.button={get:function(n,t){var i=n.getAttributeNode(t);if(i&&i.specified)return i.value},set:ut.set},i.attrHooks.contenteditable={set:function(n,t,i){ut.set(n,""===t?!1:t,i)}},i.each(["width","height"],function(n,t){i.attrHooks[t]={set:function(n,i){if(""===i)return(n.setAttribute(t,"auto"),i)}}}));r.style||(i.attrHooks.style={get:function(n){return n.style.cssText||void 0},set:function(n,t){return n.style.cssText=t+""}});ef=/^(?:input|select|textarea|button|object)$/i;sf=/^(?:a|area)$/i;i.fn.extend({prop:function(n,t){return b(this,i.prop,n,t,arguments.length>1)},removeProp:function(n){return n=i.propFix[n]||n,this.each(function(){try{this[n]=void 0;delete this[n]}catch(t){}})}});i.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(n,t,r){var f,u,o,e=n.nodeType;if(n&&3!==e&&8!==e&&2!==e)return o=1!==e||!i.isXMLDoc(n),o&&(t=i.propFix[t]||t,u=i.propHooks[t]),void 0!==r?u&&"set"in u&&void 0!==(f=u.set(n,r,t))?f:n[t]=r:u&&"get"in u&&null!==(f=u.get(n,t))?f:n[t]},propHooks:{tabIndex:{get:function(n){var t=i.find.attr(n,"tabindex");return t?parseInt(t,10):ef.test(n.nodeName)||sf.test(n.nodeName)&&n.href?0:-1}}}});r.hrefNormalized||i.each(["href","src"],function(n,t){i.propHooks[t]={get:function(n){return n.getAttribute(t,4)}}});r.optSelected||(i.propHooks.selected={get:function(n){var t=n.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}});i.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){i.propFix[this.toLowerCase()]=this});r.enctype||(i.propFix.enctype="encoding");gt=/[\t\r\n\f]/g;i.fn.extend({addClass:function(n){var o,t,r,u,s,f,e=0,c=this.length,l="string"==typeof n&&n;if(i.isFunction(n))return this.each(function(t){i(this).addClass(n.call(this,t,this.className))});if(l)for(o=(n||"").match(h)||[];c>e;e++)if(t=this[e],r=1===t.nodeType&&(t.className?(" "+t.className+" ").replace(gt," "):" ")){for(s=0;u=o[s++];)r.indexOf(" "+u+" ")<0&&(r+=u+" ");f=i.trim(r);t.className!==f&&(t.className=f)}return this},removeClass:function(n){var o,t,r,u,s,f,e=0,c=this.length,l=0===arguments.length||"string"==typeof n&&n;if(i.isFunction(n))return this.each(function(t){i(this).removeClass(n.call(this,t,this.className))});if(l)for(o=(n||"").match(h)||[];c>e;e++)if(t=this[e],r=1===t.nodeType&&(t.className?(" "+t.className+" ").replace(gt," "):"")){for(s=0;u=o[s++];)while(r.indexOf(" "+u+" ")>=0)r=r.replace(" "+u+" "," ");f=n?i.trim(r):"";t.className!==f&&(t.className=f)}return this},toggleClass:function(n,t){var r=typeof n;return"boolean"==typeof t&&"string"===r?t?this.addClass(n):this.removeClass(n):this.each(i.isFunction(n)?function(r){i(this).toggleClass(n.call(this,r,this.className,t),t)}:function(){if("string"===r)for(var t,f=0,u=i(this),e=n.match(h)||[];t=e[f++];)u.hasClass(t)?u.removeClass(t):u.addClass(t);else(r===o||"boolean"===r)&&(this.className&&i._data(this,"__className__",this.className),this.className=this.className||n===!1?"":i._data(this,"__className__")||"")})},hasClass:function(n){for(var i=" "+n+" ",t=0,r=this.length;r>t;t++)if(1===this[t].nodeType&&(" "+this[t].className+" ").replace(gt," ").indexOf(i)>=0)return!0;return!1}});i.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(n,t){i.fn[t]=function(n,i){return arguments.length>0?this.on(t,null,n,i):this.trigger(t)}});i.fn.extend({hover:function(n,t){return this.mouseenter(n).mouseleave(t||n)},bind:function(n,t,i){return this.on(n,null,t,i)},unbind:function(n,t){return this.off(n,null,t)},delegate:function(n,t,i,r){return this.on(t,n,i,r)},undelegate:function(n,t,i){return 1===arguments.length?this.off(n,"**"):this.off(t,n||"**",i)}});var pi=i.now(),wi=/\?/,so=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;i.parseJSON=function(t){if(n.JSON&&n.JSON.parse)return n.JSON.parse(t+"");var f,r=null,u=i.trim(t+"");return u&&!i.trim(u.replace(so,function(n,t,i,u){return f&&t&&(r=0),0===r?n:(f=i||t,r+=!u-!i,"")}))?Function("return "+u)():i.error("Invalid JSON: "+t)};i.parseXML=function(t){var r,u;if(!t||"string"!=typeof t)return null;try{n.DOMParser?(u=new DOMParser,r=u.parseFromString(t,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(t))}catch(f){r=void 0}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||i.error("Invalid XML: "+t),r};var nt,y,ho=/#.*$/,hf=/([?&])_=[^&]*/,co=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,lo=/^(?:GET|HEAD)$/,ao=/^\/\//,cf=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,lf={},bi={},af="*/".concat("*");try{y=location.href}catch(ts){y=u.createElement("a");y.href="";y=y.href}nt=cf.exec(y.toLowerCase())||[];i.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:y,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(nt[1]),global:!0,processData:!0,"async":!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":af,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":i.parseJSON,"text xml":i.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(n,t){return t?ki(ki(n,i.ajaxSettings),t):ki(i.ajaxSettings,n)},ajaxPrefilter:vf(lf),ajaxTransport:vf(bi),ajax:function(n,t){function w(n,t,s,h){var v,it,nt,y,w,c=t;2!==e&&(e=2,k&&clearTimeout(k),a=void 0,b=h||"",u.readyState=n>0?4:0,v=n>=200&&300>n||304===n,s&&(y=vo(r,u,s)),y=yo(r,y,u,v),v?(r.ifModified&&(w=u.getResponseHeader("Last-Modified"),w&&(i.lastModified[f]=w),w=u.getResponseHeader("etag"),w&&(i.etag[f]=w)),204===n||"HEAD"===r.type?c="nocontent":304===n?c="notmodified":(c=y.state,it=y.data,nt=y.error,v=!nt)):(nt=c,(n||!c)&&(c="error",0>n&&(n=0))),u.status=n,u.statusText=(t||c)+"",v?g.resolveWith(o,[it,c,u]):g.rejectWith(o,[u,c,nt]),u.statusCode(p),p=void 0,l&&d.trigger(v?"ajaxSuccess":"ajaxError",[u,r,v?it:nt]),tt.fireWith(o,[u,c]),l&&(d.trigger("ajaxComplete",[u,r]),--i.active||i.event.trigger("ajaxStop")))}"object"==typeof n&&(t=n,n=void 0);t=t||{};var s,c,f,b,k,l,a,v,r=i.ajaxSetup({},t),o=r.context||r,d=r.context&&(o.nodeType||o.jquery)?i(o):i.event,g=i.Deferred(),tt=i.Callbacks("once memory"),p=r.statusCode||{},it={},rt={},e=0,ut="canceled",u={readyState:0,getResponseHeader:function(n){var t;if(2===e){if(!v)for(v={};t=co.exec(b);)v[t[1].toLowerCase()]=t[2];t=v[n.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===e?b:null},setRequestHeader:function(n,t){var i=n.toLowerCase();return e||(n=rt[i]=rt[i]||n,it[n]=t),this},overrideMimeType:function(n){return e||(r.mimeType=n),this},statusCode:function(n){var t;if(n)if(2>e)for(t in n)p[t]=[p[t],n[t]];else u.always(n[u.status]);return this},abort:function(n){var t=n||ut;return a&&a.abort(t),w(0,t),this}};if(g.promise(u).complete=tt.add,u.success=u.done,u.error=u.fail,r.url=((n||r.url||y)+"").replace(ho,"").replace(ao,nt[1]+"//"),r.type=t.method||t.type||r.method||r.type,r.dataTypes=i.trim(r.dataType||"*").toLowerCase().match(h)||[""],null==r.crossDomain&&(s=cf.exec(r.url.toLowerCase()),r.crossDomain=!(!s||s[1]===nt[1]&&s[2]===nt[2]&&(s[3]||("http:"===s[1]?"80":"443"))===(nt[3]||("http:"===nt[1]?"80":"443")))),r.data&&r.processData&&"string"!=typeof r.data&&(r.data=i.param(r.data,r.traditional)),yf(lf,r,t,u),2===e)return u;l=i.event&&r.global;l&&0==i.active++&&i.event.trigger("ajaxStart");r.type=r.type.toUpperCase();r.hasContent=!lo.test(r.type);f=r.url;r.hasContent||(r.data&&(f=r.url+=(wi.test(f)?"&":"?")+r.data,delete r.data),r.cache===!1&&(r.url=hf.test(f)?f.replace(hf,"$1_="+pi++):f+(wi.test(f)?"&":"?")+"_="+pi++));r.ifModified&&(i.lastModified[f]&&u.setRequestHeader("If-Modified-Since",i.lastModified[f]),i.etag[f]&&u.setRequestHeader("If-None-Match",i.etag[f]));(r.data&&r.hasContent&&r.contentType!==!1||t.contentType)&&u.setRequestHeader("Content-Type",r.contentType);u.setRequestHeader("Accept",r.dataTypes[0]&&r.accepts[r.dataTypes[0]]?r.accepts[r.dataTypes[0]]+("*"!==r.dataTypes[0]?", "+af+"; q=0.01":""):r.accepts["*"]);for(c in r.headers)u.setRequestHeader(c,r.headers[c]);if(r.beforeSend&&(r.beforeSend.call(o,u,r)===!1||2===e))return u.abort();ut="abort";for(c in{success:1,error:1,complete:1})u[c](r[c]);if(a=yf(bi,r,t,u)){u.readyState=1;l&&d.trigger("ajaxSend",[u,r]);r.async&&r.timeout>0&&(k=setTimeout(function(){u.abort("timeout")},r.timeout));try{e=1;a.send(it,w)}catch(ft){if(!(2>e))throw ft;w(-1,ft)}}else w(-1,"No Transport");return u},getJSON:function(n,t,r){return i.get(n,t,r,"json")},getScript:function(n,t){return i.get(n,void 0,t,"script")}});i.each(["get","post"],function(n,t){i[t]=function(n,r,u,f){return i.isFunction(r)&&(f=f||u,u=r,r=void 0),i.ajax({url:n,type:t,dataType:f,data:r,success:u})}});i._evalUrl=function(n){return i.ajax({url:n,type:"GET",dataType:"script","async":!1,global:!1,throws:!0})};i.fn.extend({wrapAll:function(n){if(i.isFunction(n))return this.each(function(t){i(this).wrapAll(n.call(this,t))});if(this[0]){var t=i(n,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]);t.map(function(){for(var n=this;n.firstChild&&1===n.firstChild.nodeType;)n=n.firstChild;return n}).append(this)}return this},wrapInner:function(n){return this.each(i.isFunction(n)?function(t){i(this).wrapInner(n.call(this,t))}:function(){var t=i(this),r=t.contents();r.length?r.wrapAll(n):t.append(n)})},wrap:function(n){var t=i.isFunction(n);return this.each(function(r){i(this).wrapAll(t?n.call(this,r):n)})},unwrap:function(){return this.parent().each(function(){i.nodeName(this,"body")||i(this).replaceWith(this.childNodes)}).end()}});i.expr.filters.hidden=function(n){return n.offsetWidth<=0&&n.offsetHeight<=0||!r.reliableHiddenOffsets()&&"none"===(n.style&&n.style.display||i.css(n,"display"))};i.expr.filters.visible=function(n){return!i.expr.filters.hidden(n)};var po=/%20/g,wo=/\[\]$/,pf=/\r?\n/g,bo=/^(?:submit|button|image|reset|file)$/i,ko=/^(?:input|select|textarea|keygen)/i;i.param=function(n,t){var r,u=[],f=function(n,t){t=i.isFunction(t)?t():null==t?"":t;u[u.length]=encodeURIComponent(n)+"="+encodeURIComponent(t)};if(void 0===t&&(t=i.ajaxSettings&&i.ajaxSettings.traditional),i.isArray(n)||n.jquery&&!i.isPlainObject(n))i.each(n,function(){f(this.name,this.value)});else for(r in n)di(r,n[r],t,f);return u.join("&").replace(po,"+")};i.fn.extend({serialize:function(){return i.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var n=i.prop(this,"elements");return n?i.makeArray(n):this}).filter(function(){var n=this.type;return this.name&&!i(this).is(":disabled")&&ko.test(this.nodeName)&&!bo.test(n)&&(this.checked||!oi.test(n))}).map(function(n,t){var r=i(this).val();return null==r?null:i.isArray(r)?i.map(r,function(n){return{name:t.name,value:n.replace(pf,"\r\n")}}):{name:t.name,value:r.replace(pf,"\r\n")}}).get()}});i.ajaxSettings.xhr=void 0!==n.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&wf()||ns()}:wf;var go=0,ni={},ht=i.ajaxSettings.xhr();return n.attachEvent&&n.attachEvent("onunload",function(){for(var n in ni)ni[n](void 0,!0)}),r.cors=!!ht&&"withCredentials"in ht,ht=r.ajax=!!ht,ht&&i.ajaxTransport(function(n){if(!n.crossDomain||r.cors){var t;return{send:function(r,u){var e,f=n.xhr(),o=++go;if(f.open(n.type,n.url,n.async,n.username,n.password),n.xhrFields)for(e in n.xhrFields)f[e]=n.xhrFields[e];n.mimeType&&f.overrideMimeType&&f.overrideMimeType(n.mimeType);n.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(e in r)void 0!==r[e]&&f.setRequestHeader(e,r[e]+"");f.send(n.hasContent&&n.data||null);t=function(r,e){var s,c,h;if(t&&(e||4===f.readyState))if(delete ni[o],t=void 0,f.onreadystatechange=i.noop,e)4!==f.readyState&&f.abort();else{h={};s=f.status;"string"==typeof f.responseText&&(h.text=f.responseText);try{c=f.statusText}catch(l){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=h.text?200:404}h&&u(s,c,h,f.getAllResponseHeaders())};n.async?4===f.readyState?setTimeout(t):f.onreadystatechange=ni[o]=t:t()},abort:function(){t&&t(void 0,!0)}}}}),i.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(n){return i.globalEval(n),n}}}),i.ajaxPrefilter("script",function(n){void 0===n.cache&&(n.cache=!1);n.crossDomain&&(n.type="GET",n.global=!1)}),i.ajaxTransport("script",function(n){if(n.crossDomain){var t,r=u.head||i("head")[0]||u.documentElement;return{send:function(i,f){t=u.createElement("script");t.async=!0;n.scriptCharset&&(t.charset=n.scriptCharset);t.src=n.url;t.onload=t.onreadystatechange=function(n,i){(i||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,i||f(200,"success"))};r.insertBefore(t,r.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}}),gi=[],ti=/(=)\?(?=&|$)|\?\?/,i.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var n=gi.pop()||i.expando+"_"+pi++;return this[n]=!0,n}}),i.ajaxPrefilter("json jsonp",function(t,r,u){var f,o,e,s=t.jsonp!==!1&&(ti.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&ti.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return(f=t.jsonpCallback=i.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(ti,"$1"+f):t.jsonp!==!1&&(t.url+=(wi.test(t.url)?"&":"?")+t.jsonp+"="+f),t.converters["script json"]=function(){return e||i.error(f+" was not called"),e[0]},t.dataTypes[0]="json",o=n[f],n[f]=function(){e=arguments},u.always(function(){n[f]=o;t[f]&&(t.jsonpCallback=r.jsonpCallback,gi.push(f));e&&i.isFunction(o)&&o(e[0]);e=o=void 0}),"script")}),i.parseHTML=function(n,t,r){if(!n||"string"!=typeof n)return null;"boolean"==typeof t&&(r=t,t=!1);t=t||u;var f=er.exec(n),e=!r&&[];return f?[t.createElement(f[1])]:(f=i.buildFragment([n],t,e),e&&e.length&&i(e).remove(),i.merge([],f.childNodes))},nr=i.fn.load,i.fn.load=function(n,t,r){if("string"!=typeof n&&nr)return nr.apply(this,arguments);var u,o,s,f=this,e=n.indexOf(" ");return e>=0&&(u=i.trim(n.slice(e,n.length)),n=n.slice(0,e)),i.isFunction(t)?(r=t,t=void 0):t&&"object"==typeof t&&(s="POST"),f.length>0&&i.ajax({url:n,type:s,dataType:"html",data:t}).done(function(n){o=arguments;f.html(u?i("<div>").append(i.parseHTML(n)).find(u):n)}).complete(r&&function(n,t){f.each(r,o||[n.responseText,t,n])}),this},i.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(n,t){i.fn[t]=function(n){return this.on(t,n)}}),i.expr.filters.animated=function(n){return i.grep(i.timers,function(t){return n===t.elem}).length},tr=n.document.documentElement,i.offset={setOffset:function(n,t,r){var e,o,s,h,u,c,v,l=i.css(n,"position"),a=i(n),f={};"static"===l&&(n.style.position="relative");u=a.offset();s=i.css(n,"top");c=i.css(n,"left");v=("absolute"===l||"fixed"===l)&&i.inArray("auto",[s,c])>-1;v?(e=a.position(),h=e.top,o=e.left):(h=parseFloat(s)||0,o=parseFloat(c)||0);i.isFunction(t)&&(t=t.call(n,r,u));null!=t.top&&(f.top=t.top-u.top+h);null!=t.left&&(f.left=t.left-u.left+o);"using"in t?t.using.call(n,f):a.css(f)}},i.fn.extend({offset:function(n){if(arguments.length)return void 0===n?this:this.each(function(t){i.offset.setOffset(this,n,t)});var t,f,u={top:0,left:0},r=this[0],e=r&&r.ownerDocument;if(e)return t=e.documentElement,i.contains(t,r)?(typeof r.getBoundingClientRect!==o&&(u=r.getBoundingClientRect()),f=bf(e),{top:u.top+(f.pageYOffset||t.scrollTop)-(t.clientTop||0),left:u.left+(f.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):u},position:function(){if(this[0]){var n,r,t={top:0,left:0},u=this[0];return"fixed"===i.css(u,"position")?r=u.getBoundingClientRect():(n=this.offsetParent(),r=this.offset(),i.nodeName(n[0],"html")||(t=n.offset()),t.top+=i.css(n[0],"borderTopWidth",!0),t.left+=i.css(n[0],"borderLeftWidth",!0)),{top:r.top-t.top-i.css(u,"marginTop",!0),left:r.left-t.left-i.css(u,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var n=this.offsetParent||tr;n&&!i.nodeName(n,"html")&&"static"===i.css(n,"position");)n=n.offsetParent;return n||tr})}}),i.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(n,t){var r=/Y/.test(t);i.fn[n]=function(u){return b(this,function(n,u,f){var e=bf(n);return void 0===f?e?t in e?e[t]:e.document.documentElement[u]:n[u]:void(e?e.scrollTo(r?i(e).scrollLeft():f,r?f:i(e).scrollTop()):n[u]=f)},n,u,arguments.length,null)}}),i.each(["top","left"],function(n,t){i.cssHooks[t]=au(r.pixelPosition,function(n,r){if(r)return(r=d(n,t),pt.test(r)?i(n).position()[t]+"px":r)})}),i.each({Height:"height",Width:"width"},function(n,t){i.each({padding:"inner"+n,content:t,"":"outer"+n},function(r,u){i.fn[u]=function(u,f){var e=arguments.length&&(r||"boolean"!=typeof u),o=r||(u===!0||f===!0?"margin":"border");return b(this,function(t,r,u){var f;return i.isWindow(t)?t.document.documentElement["client"+n]:9===t.nodeType?(f=t.documentElement,Math.max(t.body["scroll"+n],f["scroll"+n],t.body["offset"+n],f["offset"+n],f["client"+n])):void 0===u?i.css(t,r,o):i.style(t,r,u,o)},t,e?u:void 0,e,null)}})}),i.fn.size=function(){return this.length},i.fn.andSelf=i.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return i}),kf=n.jQuery,df=n.$,i.noConflict=function(t){return n.$===i&&(n.$=df),t&&n.jQuery===i&&(n.jQuery=kf),i},typeof t===o&&(n.jQuery=n.$=i),i}),function(n){"function"==typeof define&&define.amd?define(["jquery"],n):n(jQuery)}(function(n){function p(n){for(var t=n.css("visibility");"inherit"===t;)n=n.parent(),t=n.css("visibility");return"hidden"!==t}function w(n){for(var t,i;n.length&&n[0]!==document;){if(t=n.css("position"),("absolute"===t||"relative"===t||"fixed"===t)&&(i=parseInt(n.css("zIndex"),10),!isNaN(i)&&0!==i))return i;n=n.parent()}return 0}function h(){this._curInst=null;this._keyEvent=!1;this._disabledInputs=[];this._datepickerShowing=!1;this._inDialog=!1;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1};n.extend(this._defaults,this.regional[""]);this.regional.en=n.extend(!0,{},this.regional[""]);this.regional["en-US"]=n.extend(!0,{},this.regional.en);this.dpDiv=c(n("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'><\/div>"))}function c(t){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.on("mouseout",i,function(){n(this).removeClass("ui-state-hover");-1!==this.className.indexOf("ui-datepicker-prev")&&n(this).removeClass("ui-datepicker-prev-hover");-1!==this.className.indexOf("ui-datepicker-next")&&n(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",i,l)}function l(){n.datepicker._isDisabledDatepicker(t.inline?t.dpDiv.parent()[0]:t.input[0])||(n(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),n(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&n(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&n(this).addClass("ui-datepicker-next-hover"))}function r(t,i){n.extend(t,i);for(var r in i)null==i[r]&&(t[r]=i[r]);return t}var a,e,i,u,v,t;n.ui=n.ui||{};n.ui.version="1.12.1";a=0;e=Array.prototype.slice;n.cleanData=function(t){return function(i){for(var r,u,f=0;null!=(u=i[f]);f++)try{r=n._data(u,"events");r&&r.remove&&n(u).triggerHandler("remove")}catch(e){}t(i)}}(n.cleanData);n.widget=function(t,i,r){var f,u,o,h={},e=t.split(".")[0],s;return t=t.split(".")[1],s=e+"-"+t,r||(r=i,i=n.Widget),n.isArray(r)&&(r=n.extend.apply(null,[{}].concat(r))),n.expr[":"][s.toLowerCase()]=function(t){return!!n.data(t,s)},n[e]=n[e]||{},f=n[e][t],u=n[e][t]=function(n,t){return this._createWidget?(arguments.length&&this._createWidget(n,t),void 0):new u(n,t)},n.extend(u,f,{version:r.version,_proto:n.extend({},r),_childConstructors:[]}),o=new i,o.options=n.widget.extend({},o.options),n.each(r,function(t,r){return n.isFunction(r)?(h[t]=function(){function n(){return i.prototype[t].apply(this,arguments)}function u(n){return i.prototype[t].apply(this,n)}return function(){var t,i=this._super,f=this._superApply;return this._super=n,this._superApply=u,t=r.apply(this,arguments),this._super=i,this._superApply=f,t}}(),void 0):(h[t]=r,void 0)}),u.prototype=n.widget.extend(o,{widgetEventPrefix:f?o.widgetEventPrefix||t:t},h,{constructor:u,namespace:e,widgetName:t,widgetFullName:s}),f?(n.each(f._childConstructors,function(t,i){var r=i.prototype;n.widget(r.namespace+"."+r.widgetName,u,i._proto)}),delete f._childConstructors):i._childConstructors.push(u),n.widget.bridge(t,u),u};n.widget.extend=function(t){for(var i,r,f=e.call(arguments,1),u=0,o=f.length;o>u;u++)for(i in f[u])r=f[u][i],f[u].hasOwnProperty(i)&&void 0!==r&&(t[i]=n.isPlainObject(r)?n.isPlainObject(t[i])?n.widget.extend({},t[i],r):n.widget.extend({},r):r);return t};n.widget.bridge=function(t,i){var r=i.prototype.widgetFullName||t;n.fn[t]=function(u){var s="string"==typeof u,o=e.call(arguments,1),f=this;return s?this.length||"instance"!==u?this.each(function(){var i,e=n.data(this,r);return"instance"===u?(f=e,!1):e?n.isFunction(e[u])&&"_"!==u.charAt(0)?(i=e[u].apply(e,o),i!==e&&void 0!==i?(f=i&&i.jquery?f.pushStack(i.get()):i,!1):void 0):n.error("no such method '"+u+"' for "+t+" widget instance"):n.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+u+"'")}):f=void 0:(o.length&&(u=n.widget.extend.apply(null,[u].concat(o))),this.each(function(){var t=n.data(this,r);t?(t.option(u||{}),t._init&&t._init()):n.data(this,r,new i(u,this))})),f}};n.Widget=function(){};n.Widget._childConstructors=[];n.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,i){i=n(i||this.defaultElement||this)[0];this.element=n(i);this.uuid=a++;this.eventNamespace="."+this.widgetName+this.uuid;this.bindings=n();this.hoverable=n();this.focusable=n();this.classesElementLookup={};i!==this&&(n.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(n){n.target===i&&this.destroy()}}),this.document=n(i.style?i.ownerDocument:i.document||i),this.window=n(this.document[0].defaultView||this.document[0].parentWindow));this.options=n.widget.extend({},this.options,this._getCreateOptions(),t);this._create();this.options.disabled&&this._setOptionDisabled(this.options.disabled);this._trigger("create",null,this._getCreateEventData());this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:n.noop,_create:n.noop,_init:n.noop,destroy:function(){var t=this;this._destroy();n.each(this.classesElementLookup,function(n,i){t._removeClass(i,n)});this.element.off(this.eventNamespace).removeData(this.widgetFullName);this.widget().off(this.eventNamespace).removeAttr("aria-disabled");this.bindings.off(this.eventNamespace)},_destroy:n.noop,widget:function(){return this.element},option:function(t,i){var r,u,f,e=t;if(0===arguments.length)return n.widget.extend({},this.options);if("string"==typeof t)if(e={},r=t.split("."),t=r.shift(),r.length){for(u=e[t]=n.widget.extend({},this.options[t]),f=0;r.length-1>f;f++)u[r[f]]=u[r[f]]||{},u=u[r[f]];if(t=r.pop(),1===arguments.length)return void 0===u[t]?null:u[t];u[t]=i}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];e[t]=i}return this._setOptions(e),this},_setOptions:function(n){for(var t in n)this._setOption(t,n[t]);return this},_setOption:function(n,t){return"classes"===n&&this._setOptionClasses(t),this.options[n]=t,"disabled"===n&&this._setOptionDisabled(t),this},_setOptionClasses:function(t){var i,u,r;for(i in t)r=this.classesElementLookup[i],t[i]!==this.options.classes[i]&&r&&r.length&&(u=n(r.get()),this._removeClass(r,i),u.addClass(this._classes({element:u,keys:i,classes:t,add:!0})))},_setOptionDisabled:function(n){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!n);n&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(t){function r(r,f){for(var o,e=0;r.length>e;e++)o=u.classesElementLookup[r[e]]||n(),o=t.add?n(n.unique(o.get().concat(t.element.get()))):n(o.not(t.element).get()),u.classesElementLookup[r[e]]=o,i.push(r[e]),f&&t.classes[r[e]]&&i.push(t.classes[r[e]])}var i=[],u=this;return t=n.extend({element:this.element,classes:this.options.classes||{}},t),this._on(t.element,{remove:"_untrackClassesElement"}),t.keys&&r(t.keys.match(/\S+/g)||[],!0),t.extra&&r(t.extra.match(/\S+/g)||[]),i.join(" ")},_untrackClassesElement:function(t){var i=this;n.each(i.classesElementLookup,function(r,u){-1!==n.inArray(t.target,u)&&(i.classesElementLookup[r]=n(u.not(t.target).get()))})},_removeClass:function(n,t,i){return this._toggleClass(n,t,i,!1)},_addClass:function(n,t,i){return this._toggleClass(n,t,i,!0)},_toggleClass:function(n,t,i,r){r="boolean"==typeof r?r:i;var u="string"==typeof n||null===n,f={extra:u?t:i,keys:u?n:t,element:u?this.element:n,add:r};return f.element.toggleClass(this._classes(f),r),this},_on:function(t,i,r){var f,u=this;"boolean"!=typeof t&&(r=i,i=t,t=!1);r?(i=f=n(i),this.bindings=this.bindings.add(i)):(r=i,i=this.element,f=this.widget());n.each(r,function(r,e){function o(){if(t||u.options.disabled!==!0&&!n(this).hasClass("ui-state-disabled"))return("string"==typeof e?u[e]:e).apply(u,arguments)}"string"!=typeof e&&(o.guid=e.guid=e.guid||o.guid||n.guid++);var s=r.match(/^([\w:-]*)\s*(.*)$/),h=s[1]+u.eventNamespace,c=s[2];c?f.on(h,c,o):i.on(h,o)})},_off:function(t,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace;t.off(i).off(i);this.bindings=n(this.bindings.not(t).get());this.focusable=n(this.focusable.not(t).get());this.hoverable=n(this.hoverable.not(t).get())},_delay:function(n,t){function r(){return("string"==typeof n?i[n]:n).apply(i,arguments)}var i=this;return setTimeout(r,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t);this._on(t,{mouseenter:function(t){this._addClass(n(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(n(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t);this._on(t,{focusin:function(t){this._addClass(n(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(n(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,i,r){var u,f,e=this.options[t];if(r=r||{},i=n.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],f=i.originalEvent)for(u in f)u in i||(i[u]=f[u]);return this.element.trigger(i,r),!(n.isFunction(e)&&e.apply(this.element[0],[i].concat(r))===!1||i.isDefaultPrevented())}};n.each({show:"fadeIn",hide:"fadeOut"},function(t,i){n.Widget.prototype["_"+t]=function(r,u,f){"string"==typeof u&&(u={effect:u});var o,e=u?u===!0||"number"==typeof u?i:u.effect||i:t;u=u||{};"number"==typeof u&&(u={duration:u});o=!n.isEmptyObject(u);u.complete=f;u.delay&&r.delay(u.delay);o&&n.effects&&n.effects.effect[e]?r[t](u):e!==t&&r[e]?r[e](u.duration,u.easing,f):r.queue(function(i){n(this)[t]();f&&f.call(r[0]);i()})}});n.widget,function(){function f(n,t,i){return[parseFloat(n[0])*(c.test(n[0])?t/100:1),parseFloat(n[1])*(c.test(n[1])?i/100:1)]}function i(t,i){return parseInt(n.css(t,i),10)||0}function l(t){var i=t[0];return 9===i.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:n.isWindow(i)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}var u,r=Math.max,t=Math.abs,e=/left|center|right/,o=/top|center|bottom/,s=/[\+\-]\d+(\.[\d]+)?%?/,h=/^\w+/,c=/%$/,a=n.fn.position;n.position={scrollbarWidth:function(){if(void 0!==u)return u;var r,i,t=n("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'><\/div><\/div>"),f=t.children()[0];return n("body").append(t),r=f.offsetWidth,t.css("overflow","scroll"),i=f.offsetWidth,r===i&&(i=t[0].clientWidth),t.remove(),u=r-i},getScrollInfo:function(t){var i=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),r=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),u="scroll"===i||"auto"===i&&t.width<t.element[0].scrollWidth,f="scroll"===r||"auto"===r&&t.height<t.element[0].scrollHeight;return{width:f?n.position.scrollbarWidth():0,height:u?n.position.scrollbarWidth():0}},getWithinInfo:function(t){var i=n(t||window),r=n.isWindow(i[0]),u=!!i[0]&&9===i[0].nodeType,f=!r&&!u;return{element:i,isWindow:r,isDocument:u,offset:f?n(t).offset():{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:i.outerWidth(),height:i.outerHeight()}}};n.fn.position=function(u){if(!u||!u.of)return a.apply(this,arguments);u=n.extend({},u);var w,c,v,p,y,k,d=n(u.of),nt=n.position.getWithinInfo(u.within),tt=n.position.getScrollInfo(nt),b=(u.collision||"flip").split(" "),g={};return k=l(d),d[0].preventDefault&&(u.at="left top"),c=k.width,v=k.height,p=k.offset,y=n.extend({},p),n.each(["my","at"],function(){var t,i,n=(u[this]||"").split(" ");1===n.length&&(n=e.test(n[0])?n.concat(["center"]):o.test(n[0])?["center"].concat(n):["center","center"]);n[0]=e.test(n[0])?n[0]:"center";n[1]=o.test(n[1])?n[1]:"center";t=s.exec(n[0]);i=s.exec(n[1]);g[this]=[t?t[0]:0,i?i[0]:0];u[this]=[h.exec(n[0])[0],h.exec(n[1])[0]]}),1===b.length&&(b[1]=b[0]),"right"===u.at[0]?y.left+=c:"center"===u.at[0]&&(y.left+=c/2),"bottom"===u.at[1]?y.top+=v:"center"===u.at[1]&&(y.top+=v/2),w=f(g.at,c,v),y.left+=w[0],y.top+=w[1],this.each(function(){var a,k,o=n(this),s=o.outerWidth(),h=o.outerHeight(),it=i(this,"marginLeft"),rt=i(this,"marginTop"),ut=s+it+i(this,"marginRight")+tt.width,ft=h+rt+i(this,"marginBottom")+tt.height,e=n.extend({},y),l=f(g.my,o.outerWidth(),o.outerHeight());"right"===u.my[0]?e.left-=s:"center"===u.my[0]&&(e.left-=s/2);"bottom"===u.my[1]?e.top-=h:"center"===u.my[1]&&(e.top-=h/2);e.left+=l[0];e.top+=l[1];a={marginLeft:it,marginTop:rt};n.each(["left","top"],function(t,i){n.ui.position[b[t]]&&n.ui.position[b[t]][i](e,{targetWidth:c,targetHeight:v,elemWidth:s,elemHeight:h,collisionPosition:a,collisionWidth:ut,collisionHeight:ft,offset:[w[0]+l[0],w[1]+l[1]],my:u.my,at:u.at,within:nt,elem:o})});u.using&&(k=function(n){var i=p.left-e.left,a=i+c-s,f=p.top-e.top,y=f+v-h,l={target:{element:d,left:p.left,top:p.top,width:c,height:v},element:{element:o,left:e.left,top:e.top,width:s,height:h},horizontal:0>a?"left":i>0?"right":"center",vertical:0>y?"top":f>0?"bottom":"middle"};s>c&&c>t(i+a)&&(l.horizontal="center");h>v&&v>t(f+y)&&(l.vertical="middle");l.important=r(t(i),t(a))>r(t(f),t(y))?"horizontal":"vertical";u.using.call(this,n,l)});o.offset(n.extend(e,{using:k}))})};n.ui.position={fit:{left:function(n,t){var h,e=t.within,u=e.isWindow?e.scrollLeft:e.offset.left,o=e.width,s=n.left-t.collisionPosition.marginLeft,i=u-s,f=s+t.collisionWidth-o-u;t.collisionWidth>o?i>0&&0>=f?(h=n.left+i+t.collisionWidth-o-u,n.left+=i-h):n.left=f>0&&0>=i?u:i>f?u+o-t.collisionWidth:u:i>0?n.left+=i:f>0?n.left-=f:n.left=r(n.left-s,n.left)},top:function(n,t){var h,o=t.within,u=o.isWindow?o.scrollTop:o.offset.top,e=t.within.height,s=n.top-t.collisionPosition.marginTop,i=u-s,f=s+t.collisionHeight-e-u;t.collisionHeight>e?i>0&&0>=f?(h=n.top+i+t.collisionHeight-e-u,n.top+=i-h):n.top=f>0&&0>=i?u:i>f?u+e-t.collisionHeight:u:i>0?n.top+=i:f>0?n.top-=f:n.top=r(n.top-s,n.top)}},flip:{left:function(n,i){var o,s,r=i.within,y=r.offset.left+r.scrollLeft,c=r.width,h=r.isWindow?r.scrollLeft:r.offset.left,l=n.left-i.collisionPosition.marginLeft,a=l-h,v=l+i.collisionWidth-c-h,u="left"===i.my[0]?-i.elemWidth:"right"===i.my[0]?i.elemWidth:0,f="left"===i.at[0]?i.targetWidth:"right"===i.at[0]?-i.targetWidth:0,e=-2*i.offset[0];0>a?(o=n.left+u+f+e+i.collisionWidth-c-y,(0>o||t(a)>o)&&(n.left+=u+f+e)):v>0&&(s=n.left-i.collisionPosition.marginLeft+u+f+e-h,(s>0||v>t(s))&&(n.left+=u+f+e))},top:function(n,i){var o,s,r=i.within,y=r.offset.top+r.scrollTop,c=r.height,h=r.isWindow?r.scrollTop:r.offset.top,l=n.top-i.collisionPosition.marginTop,a=l-h,v=l+i.collisionHeight-c-h,p="top"===i.my[1],u=p?-i.elemHeight:"bottom"===i.my[1]?i.elemHeight:0,f="top"===i.at[1]?i.targetHeight:"bottom"===i.at[1]?-i.targetHeight:0,e=-2*i.offset[1];0>a?(s=n.top+u+f+e+i.collisionHeight-c-y,(0>s||t(a)>s)&&(n.top+=u+f+e)):v>0&&(o=n.top-i.collisionPosition.marginTop+u+f+e-h,(o>0||v>t(o))&&(n.top+=u+f+e))}},flipfit:{left:function(){n.ui.position.flip.left.apply(this,arguments);n.ui.position.fit.left.apply(this,arguments)},top:function(){n.ui.position.flip.top.apply(this,arguments);n.ui.position.fit.top.apply(this,arguments)}}}}();n.ui.position;n.extend(n.expr[":"],{data:n.expr.createPseudo?n.expr.createPseudo(function(t){return function(i){return!!n.data(i,t)}}):function(t,i,r){return!!n.data(t,r[3])}});n.fn.extend({disableSelection:function(){var n="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(n+".ui-disableSelection",function(n){n.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}});n.ui.focusable=function(t,i){var u,f,e,r,o,s=t.nodeName.toLowerCase();return"area"===s?(u=t.parentNode,f=u.name,t.href&&f&&"map"===u.nodeName.toLowerCase()?(e=n("img[usemap='#"+f+"']"),e.length>0&&e.is(":visible")):!1):(/^(input|select|textarea|button|object)$/.test(s)?(r=!t.disabled,r&&(o=n(t).closest("fieldset")[0],o&&(r=!o.disabled))):r="a"===s?t.href||i:i,r&&n(t).is(":visible")&&p(n(t)))};n.extend(n.expr[":"],{focusable:function(t){return n.ui.focusable(t,null!=n.attr(t,"tabindex"))}});n.ui.focusable;n.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):n(this[0].form)};n.ui.formResetMixin={_formResetHandler:function(){var t=n(this);setTimeout(function(){var i=t.data("ui-form-reset-instances");n.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var n=this.form.data("ui-form-reset-instances")||[];n.length||this.form.on("reset.ui-form-reset",this._formResetHandler);n.push(this);this.form.data("ui-form-reset-instances",n)}},_unbindFormResetHandler:function(){if(this.form.length){var t=this.form.data("ui-form-reset-instances");t.splice(n.inArray(this,t),1);t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}};n.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38};n.ui.escapeSelector=function(){var n=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g;return function(t){return t.replace(n,"\\$1")}}();n.fn.labels=function(){var t,r,u,i,f;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(i=this.eq(0).parents("label"),u=this.attr("id"),u&&(t=this.eq(0).parents().last(),f=t.add(t.length?t.siblings():this.siblings()),r="label[for='"+n.ui.escapeSelector(u)+"']",i=i.add(f.find(r).addBack(r))),this.pushStack(i))};n.fn.scrollParent=function(t){var i=this.css("position"),u="absolute"===i,f=t?/(auto|scroll|hidden)/:/(auto|scroll)/,r=this.parents().filter(function(){var t=n(this);return u&&"static"===t.css("position")?!1:f.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==i&&r.length?r:n(this[0].ownerDocument||document)};n.extend(n.expr[":"],{tabbable:function(t){var i=n.attr(t,"tabindex"),r=null!=i;return(!r||i>=0)&&n.ui.focusable(t,r)}});n.fn.extend({uniqueId:function(){var n=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++n)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&n(this).removeAttr("id")})}});n.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());i=!1;n(document).on("mouseup",function(){i=!1});n.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.on("mousedown."+this.widgetName,function(n){return t._mouseDown(n)}).on("click."+this.widgetName,function(i){if(!0===n.data(i.target,t.widgetName+".preventClickEvent"))return(n.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1)});this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName);this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!i){this._mouseMoved=!1;this._mouseStarted&&this._mouseUp(t);this._mouseDownEvent=t;var r=this,u=1===t.which,f="string"==typeof this.options.cancel&&t.target.nodeName?n(t.target).closest(this.options.cancel).length:!1;return u&&!f&&this._mouseCapture(t)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){r.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(t)!==!1,!this._mouseStarted)?(t.preventDefault(),!0):(!0===n.data(t.target,this.widgetName+".preventClickEvent")&&n.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(n){return r._mouseMove(n)},this._mouseUpDelegate=function(n){return r._mouseUp(n)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),i=!0,!0)):!0}},_mouseMove:function(t){if(this._mouseMoved){if(n.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button)return this._mouseUp(t);if(!t.which)if(t.originalEvent.altKey||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate);this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&n.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t));this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer);this.ignoreMissingWhich=!1;i=!1;t.preventDefault()},_mouseDistanceMet:function(n){return Math.max(Math.abs(this._mouseDownEvent.pageX-n.pageX),Math.abs(this._mouseDownEvent.pageY-n.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}});n.ui.plugin={add:function(t,i,r){var u,f=n.ui[t].prototype;for(u in r)f.plugins[u]=f.plugins[u]||[],f.plugins[u].push([i,r[u]])},call:function(n,t,i,r){var u,f=n.plugins[t];if(f&&(r||n.element[0].parentNode&&11!==n.element[0].parentNode.nodeType))for(u=0;f.length>u;u++)n.options[f[u][0]]&&f[u][1].apply(n.element,i)}};n.ui.safeActiveElement=function(n){var t;try{t=n.activeElement}catch(i){t=n.body}return t||(t=n.body),t.nodeName||(t=n.body),t};n.ui.safeBlur=function(t){t&&"body"!==t.nodeName.toLowerCase()&&n(t).trigger("blur")};n.widget("ui.draggable",n.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative();this.options.addClasses&&this._addClass("ui-draggable");this._setHandleClassName();this._mouseInit()},_setOption:function(n,t){this._super(n,t);"handle"===n&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?(this.destroyOnClear=!0,void 0):(this._removeHandleClassName(),this._mouseDestroy(),void 0)},_mouseCapture:function(t){var i=this.options;return this.helper||i.disabled||n(t.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(t),this.handle?(this._blurActiveElement(t),this._blockFrames(i.iframeFix===!0?"iframe":i.iframeFix),!0):!1)},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=n(this);return n("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var i=n.ui.safeActiveElement(this.document[0]),r=n(t.target);r.closest(i).length||n.ui.safeBlur(i)},_mouseStart:function(t){var i=this.options;return this.helper=this._createHelper(t),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),n.ui.ddmanager&&(n.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===n(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),n.ui.ddmanager&&!i.dropBehaviour&&n.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),n.ui.ddmanager&&n.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(n){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()};this.offset.click={left:n.pageX-this.offset.left,top:n.pageY-this.offset.top}},_mouseDrag:function(t,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var r=this._uiHash();if(this._trigger("drag",t,r)===!1)return this._mouseUp(new n.Event("mouseup",t)),!1;this.position=r.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",n.ui.ddmanager&&n.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var r=this,i=!1;return n.ui.ddmanager&&!this.options.dropBehaviour&&(i=n.ui.ddmanager.drop(this,t)),this.dropped&&(i=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!i||"valid"===this.options.revert&&i||this.options.revert===!0||n.isFunction(this.options.revert)&&this.options.revert.call(this.element,i)?n(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){r._trigger("stop",t)!==!1&&r._clear()}):this._trigger("stop",t)!==!1&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),n.ui.ddmanager&&n.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.trigger("focus"),n.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new n.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(t){return this.options.handle?!!n(t.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element;this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(t){var r=this.options,u=n.isFunction(r.helper),i=u?n(r.helper.apply(this.element[0],[t])):"clone"===r.helper?this.element.clone().removeAttr("id"):this.element;return i.parents("body").length||i.appendTo("parent"===r.appendTo?this.element[0].parentNode:r.appendTo),u&&i[0]===this.element[0]&&this._setPositionRelative(),i[0]===this.element[0]||/(fixed|absolute)/.test(i.css("position"))||i.css("position","absolute"),i},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" "));n.isArray(t)&&(t={left:+t[0],top:+t[1]||0});"left"in t&&(this.offset.click.left=t.left+this.margins.left);"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left);"top"in t&&(this.offset.click.top=t.top+this.margins.top);"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(n){return/(html|body)/i.test(n.tagName)||n===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&n.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var n=this.element.position(),t=this._isRootNode(this.scrollParent[0]);return{top:n.top-(parseInt(this.helper.css("top"),10)||0)+(t?0:this.scrollParent.scrollTop()),left:n.left-(parseInt(this.helper.css("left"),10)||0)+(t?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var f,t,i,r=this.options,u=this.document[0];return this.relativeContainer=null,r.containment?"window"===r.containment?(this.containment=[n(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,n(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,n(window).scrollLeft()+n(window).width()-this.helperProportions.width-this.margins.left,n(window).scrollTop()+(n(window).height()||u.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):"document"===r.containment?(this.containment=[0,0,n(u).width()-this.helperProportions.width-this.margins.left,(n(u).height()||u.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):r.containment.constructor===Array?(this.containment=r.containment,void 0):("parent"===r.containment&&(r.containment=this.helper[0].parentNode),t=n(r.containment),i=t[0],i&&(f=/(scroll|auto)/.test(t.css("overflow")),this.containment=[(parseInt(t.css("borderLeftWidth"),10)||0)+(parseInt(t.css("paddingLeft"),10)||0),(parseInt(t.css("borderTopWidth"),10)||0)+(parseInt(t.css("paddingTop"),10)||0),(f?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(t.css("borderRightWidth"),10)||0)-(parseInt(t.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(f?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(t.css("borderBottomWidth"),10)||0)-(parseInt(t.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=t),void 0):(this.containment=null,void 0)},_convertPositionTo:function(n,t){t||(t=this.position);var i="absolute"===n?1:-1,r=this._isRootNode(this.scrollParent[0]);return{top:t.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top)*i,left:t.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)*i}},_generatePosition:function(n,t){var i,s,u,f,r=this.options,h=this._isRootNode(this.scrollParent[0]),e=n.pageX,o=n.pageY;return h&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),t&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,n.pageX-this.offset.click.left<i[0]&&(e=i[0]+this.offset.click.left),n.pageY-this.offset.click.top<i[1]&&(o=i[1]+this.offset.click.top),n.pageX-this.offset.click.left>i[2]&&(e=i[2]+this.offset.click.left),n.pageY-this.offset.click.top>i[3]&&(o=i[3]+this.offset.click.top)),r.grid&&(u=r.grid[1]?this.originalPageY+Math.round((o-this.originalPageY)/r.grid[1])*r.grid[1]:this.originalPageY,o=i?u-this.offset.click.top>=i[1]||u-this.offset.click.top>i[3]?u:u-this.offset.click.top>=i[1]?u-r.grid[1]:u+r.grid[1]:u,f=r.grid[0]?this.originalPageX+Math.round((e-this.originalPageX)/r.grid[0])*r.grid[0]:this.originalPageX,e=i?f-this.offset.click.left>=i[0]||f-this.offset.click.left>i[2]?f:f-this.offset.click.left>=i[0]?f-r.grid[0]:f+r.grid[0]:f),"y"===r.axis&&(e=this.originalPageX),"x"===r.axis&&(o=this.originalPageY)),{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:h?0:this.offset.scroll.top),left:e-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:h?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging");this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove();this.helper=null;this.cancelHelperRemoval=!1;this.destroyOnClear&&this.destroy()},_trigger:function(t,i,r){return r=r||this._uiHash(),n.ui.plugin.call(this,t,[i,r,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),r.offset=this.positionAbs),n.Widget.prototype._trigger.call(this,t,i,r)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});n.ui.plugin.add("draggable","connectToSortable",{start:function(t,i,r){var u=n.extend({},i,{item:r.element});r.sortables=[];n(r.options.connectToSortable).each(function(){var i=n(this).sortable("instance");i&&!i.options.disabled&&(r.sortables.push(i),i.refreshPositions(),i._trigger("activate",t,u))})},stop:function(t,i,r){var u=n.extend({},i,{item:r.element});r.cancelHelperRemoval=!1;n.each(r.sortables,function(){var n=this;n.isOver?(n.isOver=0,r.cancelHelperRemoval=!0,n.cancelHelperRemoval=!1,n._storedCSS={position:n.placeholder.css("position"),top:n.placeholder.css("top"),left:n.placeholder.css("left")},n._mouseStop(t),n.options.helper=n.options._helper):(n.cancelHelperRemoval=!0,n._trigger("deactivate",t,u))})},drag:function(t,i,r){n.each(r.sortables,function(){var f=!1,u=this;u.positionAbs=r.positionAbs;u.helperProportions=r.helperProportions;u.offset.click=r.offset.click;u._intersectsWith(u.containerCache)&&(f=!0,n.each(r.sortables,function(){return this.positionAbs=r.positionAbs,this.helperProportions=r.helperProportions,this.offset.click=r.offset.click,this!==u&&this._intersectsWith(this.containerCache)&&n.contains(u.element[0],this.element[0])&&(f=!1),f}));f?(u.isOver||(u.isOver=1,r._parent=i.helper.parent(),u.currentItem=i.helper.appendTo(u.element).data("ui-sortable-item",!0),u.options._helper=u.options.helper,u.options.helper=function(){return i.helper[0]},t.target=u.currentItem[0],u._mouseCapture(t,!0),u._mouseStart(t,!0,!0),u.offset.click.top=r.offset.click.top,u.offset.click.left=r.offset.click.left,u.offset.parent.left-=r.offset.parent.left-u.offset.parent.left,u.offset.parent.top-=r.offset.parent.top-u.offset.parent.top,r._trigger("toSortable",t),r.dropped=u.element,n.each(r.sortables,function(){this.refreshPositions()}),r.currentItem=r.element,u.fromOutside=r),u.currentItem&&(u._mouseDrag(t),i.position=u.position)):u.isOver&&(u.isOver=0,u.cancelHelperRemoval=!0,u.options._revert=u.options.revert,u.options.revert=!1,u._trigger("out",t,u._uiHash(u)),u._mouseStop(t,!0),u.options.revert=u.options._revert,u.options.helper=u.options._helper,u.placeholder&&u.placeholder.remove(),i.helper.appendTo(r._parent),r._refreshOffsets(t),i.position=r._generatePosition(t,!0),r._trigger("fromSortable",t),r.dropped=!1,n.each(r.sortables,function(){this.refreshPositions()}))})}});n.ui.plugin.add("draggable","cursor",{start:function(t,i,r){var u=n("body"),f=r.options;u.css("cursor")&&(f._cursor=u.css("cursor"));u.css("cursor",f.cursor)},stop:function(t,i,r){var u=r.options;u._cursor&&n("body").css("cursor",u._cursor)}});n.ui.plugin.add("draggable","opacity",{start:function(t,i,r){var u=n(i.helper),f=r.options;u.css("opacity")&&(f._opacity=u.css("opacity"));u.css("opacity",f.opacity)},stop:function(t,i,r){var u=r.options;u._opacity&&n(i.helper).css("opacity",u._opacity)}});n.ui.plugin.add("draggable","scroll",{start:function(n,t,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1));i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(t,i,r){var u=r.options,o=!1,e=r.scrollParentNotHidden[0],f=r.document[0];e!==f&&"HTML"!==e.tagName?(u.axis&&"x"===u.axis||(r.overflowOffset.top+e.offsetHeight-t.pageY<u.scrollSensitivity?e.scrollTop=o=e.scrollTop+u.scrollSpeed:t.pageY-r.overflowOffset.top<u.scrollSensitivity&&(e.scrollTop=o=e.scrollTop-u.scrollSpeed)),u.axis&&"y"===u.axis||(r.overflowOffset.left+e.offsetWidth-t.pageX<u.scrollSensitivity?e.scrollLeft=o=e.scrollLeft+u.scrollSpeed:t.pageX-r.overflowOffset.left<u.scrollSensitivity&&(e.scrollLeft=o=e.scrollLeft-u.scrollSpeed))):(u.axis&&"x"===u.axis||(t.pageY-n(f).scrollTop()<u.scrollSensitivity?o=n(f).scrollTop(n(f).scrollTop()-u.scrollSpeed):n(window).height()-(t.pageY-n(f).scrollTop())<u.scrollSensitivity&&(o=n(f).scrollTop(n(f).scrollTop()+u.scrollSpeed))),u.axis&&"y"===u.axis||(t.pageX-n(f).scrollLeft()<u.scrollSensitivity?o=n(f).scrollLeft(n(f).scrollLeft()-u.scrollSpeed):n(window).width()-(t.pageX-n(f).scrollLeft())<u.scrollSensitivity&&(o=n(f).scrollLeft(n(f).scrollLeft()+u.scrollSpeed))));o!==!1&&n.ui.ddmanager&&!u.dropBehaviour&&n.ui.ddmanager.prepareOffsets(r,t)}});n.ui.plugin.add("draggable","snap",{start:function(t,i,r){var u=r.options;r.snapElements=[];n(u.snap.constructor!==String?u.snap.items||":data(ui-draggable)":u.snap).each(function(){var t=n(this),i=t.offset();this!==r.element[0]&&r.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:i.top,left:i.left})})},drag:function(t,i,r){for(var e,o,s,h,c,a,l,v,w,b=r.options,f=b.snapTolerance,y=i.offset.left,k=y+r.helperProportions.width,p=i.offset.top,d=p+r.helperProportions.height,u=r.snapElements.length-1;u>=0;u--)c=r.snapElements[u].left-r.margins.left,a=c+r.snapElements[u].width,l=r.snapElements[u].top-r.margins.top,v=l+r.snapElements[u].height,c-f>k||y>a+f||l-f>d||p>v+f||!n.contains(r.snapElements[u].item.ownerDocument,r.snapElements[u].item)?(r.snapElements[u].snapping&&r.options.snap.release&&r.options.snap.release.call(r.element,t,n.extend(r._uiHash(),{snapItem:r.snapElements[u].item})),r.snapElements[u].snapping=!1):("inner"!==b.snapMode&&(e=f>=Math.abs(l-d),o=f>=Math.abs(v-p),s=f>=Math.abs(c-k),h=f>=Math.abs(a-y),e&&(i.position.top=r._convertPositionTo("relative",{top:l-r.helperProportions.height,left:0}).top),o&&(i.position.top=r._convertPositionTo("relative",{top:v,left:0}).top),s&&(i.position.left=r._convertPositionTo("relative",{top:0,left:c-r.helperProportions.width}).left),h&&(i.position.left=r._convertPositionTo("relative",{top:0,left:a}).left)),w=e||o||s||h,"outer"!==b.snapMode&&(e=f>=Math.abs(l-p),o=f>=Math.abs(v-d),s=f>=Math.abs(c-y),h=f>=Math.abs(a-k),e&&(i.position.top=r._convertPositionTo("relative",{top:l,left:0}).top),o&&(i.position.top=r._convertPositionTo("relative",{top:v-r.helperProportions.height,left:0}).top),s&&(i.position.left=r._convertPositionTo("relative",{top:0,left:c}).left),h&&(i.position.left=r._convertPositionTo("relative",{top:0,left:a-r.helperProportions.width}).left)),!r.snapElements[u].snapping&&(e||o||s||h||w)&&r.options.snap.snap&&r.options.snap.snap.call(r.element,t,n.extend(r._uiHash(),{snapItem:r.snapElements[u].item})),r.snapElements[u].snapping=e||o||s||h||w)}});n.ui.plugin.add("draggable","stack",{start:function(t,i,r){var f,e=r.options,u=n.makeArray(n(e.stack)).sort(function(t,i){return(parseInt(n(t).css("zIndex"),10)||0)-(parseInt(n(i).css("zIndex"),10)||0)});u.length&&(f=parseInt(n(u[0]).css("zIndex"),10)||0,n(u).each(function(t){n(this).css("zIndex",f+t)}),this.css("zIndex",f+u.length))}});n.ui.plugin.add("draggable","zIndex",{start:function(t,i,r){var u=n(i.helper),f=r.options;u.css("zIndex")&&(f._zIndex=u.css("zIndex"));u.css("zIndex",f.zIndex)},stop:function(t,i,r){var u=r.options;u._zIndex&&n(i.helper).css("zIndex",u._zIndex)}});n.ui.draggable;n.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,i=this.options,r=i.accept;this.isover=!1;this.isout=!0;this.accept=n.isFunction(r)?r:function(n){return n.is(r)};this.proportions=function(){return arguments.length?(t=arguments[0],void 0):t?t:t={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}};this._addToManager(i.scope);i.addClasses&&this._addClass("ui-droppable")},_addToManager:function(t){n.ui.ddmanager.droppables[t]=n.ui.ddmanager.droppables[t]||[];n.ui.ddmanager.droppables[t].push(this)},_splice:function(n){for(var t=0;n.length>t;t++)n[t]===this&&n.splice(t,1)},_destroy:function(){var t=n.ui.ddmanager.droppables[this.options.scope];this._splice(t)},_setOption:function(t,i){if("accept"===t)this.accept=n.isFunction(i)?i:function(n){return n.is(i)};else if("scope"===t){var r=n.ui.ddmanager.droppables[this.options.scope];this._splice(r);this._addToManager(i)}this._super(t,i)},_activate:function(t){var i=n.ui.ddmanager.current;this._addActiveClass();i&&this._trigger("activate",t,this.ui(i))},_deactivate:function(t){var i=n.ui.ddmanager.current;this._removeActiveClass();i&&this._trigger("deactivate",t,this.ui(i))},_over:function(t){var i=n.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._addHoverClass(),this._trigger("over",t,this.ui(i)))},_out:function(t){var i=n.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeHoverClass(),this._trigger("out",t,this.ui(i)))},_drop:function(t,i){var r=i||n.ui.ddmanager.current,f=!1;return r&&(r.currentItem||r.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var i=n(this).droppable("instance");if(i.options.greedy&&!i.options.disabled&&i.options.scope===r.options.scope&&i.accept.call(i.element[0],r.currentItem||r.element)&&u(r,n.extend(i,{offset:i.element.offset()}),i.options.tolerance,t))return(f=!0,!1)}),f?!1:this.accept.call(this.element[0],r.currentItem||r.element)?(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",t,this.ui(r)),this.element):!1):!1},ui:function(n){return{draggable:n.currentItem||n.element,helper:n.helper,position:n.position,offset:n.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}});u=n.ui.intersect=function(){function n(n,t,i){return n>=t&&t+i>n}return function(t,i,r,u){if(!i.offset)return!1;var o=(t.positionAbs||t.position.absolute).left+t.margins.left,s=(t.positionAbs||t.position.absolute).top+t.margins.top,h=o+t.helperProportions.width,c=s+t.helperProportions.height,f=i.offset.left,e=i.offset.top,l=f+i.proportions().width,a=e+i.proportions().height;switch(r){case"fit":return o>=f&&l>=h&&s>=e&&a>=c;case"intersect":return o+t.helperProportions.width/2>f&&l>h-t.helperProportions.width/2&&s+t.helperProportions.height/2>e&&a>c-t.helperProportions.height/2;case"pointer":return n(u.pageY,e,i.proportions().height)&&n(u.pageX,f,i.proportions().width);case"touch":return(s>=e&&a>=s||c>=e&&a>=c||e>s&&c>a)&&(o>=f&&l>=o||h>=f&&l>=h||f>o&&h>l);default:return!1}}}();n.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,i){var r,f,u=n.ui.ddmanager.droppables[t.options.scope]||[],o=i?i.type:null,e=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();n:for(r=0;u.length>r;r++)if(!(u[r].options.disabled||t&&!u[r].accept.call(u[r].element[0],t.currentItem||t.element))){for(f=0;e.length>f;f++)if(e[f]===u[r].element[0]){u[r].proportions().height=0;continue n}u[r].visible="none"!==u[r].element.css("display");u[r].visible&&("mousedown"===o&&u[r]._activate.call(u[r],i),u[r].offset=u[r].element.offset(),u[r].proportions({width:u[r].element[0].offsetWidth,height:u[r].element[0].offsetHeight}))}},drop:function(t,i){var r=!1;return n.each((n.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&u(t,this,this.options.tolerance,i)&&(r=this._drop.call(this,i)||r),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),r},dragStart:function(t,i){t.element.parentsUntil("body").on("scroll.droppable",function(){t.options.refreshPositions||n.ui.ddmanager.prepareOffsets(t,i)})},drag:function(t,i){t.options.refreshPositions&&n.ui.ddmanager.prepareOffsets(t,i);n.each(n.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var r,o,e,s=u(t,this,this.options.tolerance,i),f=!s&&this.isover?"isout":s&&!this.isover?"isover":null;f&&(this.options.greedy&&(o=this.options.scope,e=this.element.parents(":data(ui-droppable)").filter(function(){return n(this).droppable("instance").options.scope===o}),e.length&&(r=n(e[0]).droppable("instance"),r.greedyChild="isover"===f)),r&&"isover"===f&&(r.isover=!1,r.isout=!0,r._out.call(r,i)),this[f]=!0,this["isout"===f?"isover":"isout"]=!1,this["isover"===f?"_over":"_out"].call(this,i),r&&"isout"===f&&(r.isout=!1,r.isover=!0,r._over.call(r,i)))}})},dragStop:function(t,i){t.element.parentsUntil("body").off("scroll.droppable");t.options.refreshPositions||n.ui.ddmanager.prepareOffsets(t,i)}};n.uiBackCompat!==!1&&n.widget("ui.droppable",n.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super();this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super();this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super();this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super();this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}});n.ui.droppable;n.widget("ui.resizable",n.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(n){return parseFloat(n)||0},_isNumber:function(n){return!isNaN(parseFloat(n))},_hasScroll:function(t,i){if("hidden"===n(t).css("overflow"))return!1;var r=i&&"left"===i?"scrollLeft":"scrollTop",u=!1;return t[r]>0?!0:(t[r]=1,u=t[r]>0,t[r]=0,u)},_create:function(){var r,t=this.options,i=this;this._addClass("ui-resizable");n.extend(this,{_aspectRatio:!!t.aspectRatio,aspectRatio:t.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:t.helper||t.ghost||t.animate?t.helper||"ui-resizable-helper":null});this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(n("<div class='ui-wrapper' style='overflow: hidden;'><\/div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,r={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(r),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(r),this._proportionallyResize());this._setupHandles();t.autoHide&&n(this.element).on("mouseenter",function(){t.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())}).on("mouseleave",function(){t.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())});this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,i=function(t){n(t).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(n,t){switch(this._super(n,t),n){case"handles":this._removeHandles();this._setupHandles()}},_setupHandles:function(){var i,r,u,o,t,f=this.options,e=this;if(this.handles=f.handles||(n(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=n(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),u=this.handles.split(","),this.handles={},r=0;u.length>r;r++)i=n.trim(u[r]),o="ui-resizable-"+i,t=n("<div>"),this._addClass(t,"ui-resizable-handle "+o),t.css({zIndex:f.zIndex}),this.handles[i]=".ui-resizable-"+i,this.element.append(t);this._renderAxis=function(t){var i,r,u,f;t=t||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=n(this.handles[i]),this._on(this.handles[i],{mousedown:e._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(r=n(this.handles[i],this.element),f=/sw|ne|nw|se|n|s/.test(i)?r.outerHeight():r.outerWidth(),u=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),t.css(u,f),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])};this._renderAxis(this.element);this._handles=this._handles.add(this.element.find(".ui-resizable-handle"));this._handles.disableSelection();this._handles.on("mouseover",function(){e.resizing||(this.className&&(t=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),e.axis=t&&t[1]?t[1]:"se")});f.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(t){var r,i,u=!1;for(r in this.handles)i=n(this.handles[r])[0],(i===t.target||n.contains(i,t.target))&&(u=!0);return!this.options.disabled&&u},_mouseStart:function(t){var u,f,e,r=this.options,i=this.element;return this.resizing=!0,this._renderProxy(),u=this._num(this.helper.css("left")),f=this._num(this.helper.css("top")),r.containment&&(u+=n(r.containment).scrollLeft()||0,f+=n(r.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:u,top:f},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:i.width(),height:i.height()},this.originalSize=this._helper?{width:i.outerWidth(),height:i.outerHeight()}:{width:i.width(),height:i.height()},this.sizeDiff={width:i.outerWidth()-i.width(),height:i.outerHeight()-i.height()},this.originalPosition={left:u,top:f},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof r.aspectRatio?r.aspectRatio:this.originalSize.width/this.originalSize.height||1,e=n(".ui-resizable-"+this.axis).css("cursor"),n("body").css("cursor","auto"===e?this.axis+"-resize":e),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var i,r,u=this.originalMousePosition,e=this.axis,o=t.pageX-u.left||0,s=t.pageY-u.top||0,f=this._change[e];return this._updatePrevProperties(),f?(i=f.apply(this,[t,o,s]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(i=this._updateRatio(i,t)),i=this._respectSize(i,t),this._updateCache(i),this._propagate("resize",t),r=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),n.isEmptyObject(r)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(t){this.resizing=!1;var r,u,f,e,o,s,h,c=this.options,i=this;return this._helper&&(r=this._proportionallyResizeElements,u=r.length&&/textarea/i.test(r[0].nodeName),f=u&&this._hasScroll(r[0],"left")?0:i.sizeDiff.height,e=u?0:i.sizeDiff.width,o={width:i.helper.width()-e,height:i.helper.height()-f},s=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,h=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null,c.animate||this.element.css(n.extend(o,{top:h,left:s})),i.helper.height(i.size.height),i.helper.width(i.size.width),this._helper&&!c.animate&&this._proportionallyResize()),n("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left};this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var n={};return this.position.top!==this.prevPosition.top&&(n.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(n.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(n.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(n.height=this.size.height+"px"),this.helper.css(n),n},_updateVirtualBoundaries:function(n){var r,u,f,e,t,i=this.options;t={minWidth:this._isNumber(i.minWidth)?i.minWidth:0,maxWidth:this._isNumber(i.maxWidth)?i.maxWidth:1/0,minHeight:this._isNumber(i.minHeight)?i.minHeight:0,maxHeight:this._isNumber(i.maxHeight)?i.maxHeight:1/0};(this._aspectRatio||n)&&(r=t.minHeight*this.aspectRatio,f=t.minWidth/this.aspectRatio,u=t.maxHeight*this.aspectRatio,e=t.maxWidth/this.aspectRatio,r>t.minWidth&&(t.minWidth=r),f>t.minHeight&&(t.minHeight=f),t.maxWidth>u&&(t.maxWidth=u),t.maxHeight>e&&(t.maxHeight=e));this._vBoundaries=t},_updateCache:function(n){this.offset=this.helper.offset();this._isNumber(n.left)&&(this.position.left=n.left);this._isNumber(n.top)&&(this.position.top=n.top);this._isNumber(n.height)&&(this.size.height=n.height);this._isNumber(n.width)&&(this.size.width=n.width)},_updateRatio:function(n){var t=this.position,i=this.size,r=this.axis;return this._isNumber(n.height)?n.width=n.height*this.aspectRatio:this._isNumber(n.width)&&(n.height=n.width/this.aspectRatio),"sw"===r&&(n.left=t.left+(i.width-n.width),n.top=null),"nw"===r&&(n.top=t.top+(i.height-n.height),n.left=t.left+(i.width-n.width)),n},_respectSize:function(n){var t=this._vBoundaries,i=this.axis,r=this._isNumber(n.width)&&t.maxWidth&&t.maxWidth<n.width,u=this._isNumber(n.height)&&t.maxHeight&&t.maxHeight<n.height,f=this._isNumber(n.width)&&t.minWidth&&t.minWidth>n.width,e=this._isNumber(n.height)&&t.minHeight&&t.minHeight>n.height,o=this.originalPosition.left+this.originalSize.width,s=this.originalPosition.top+this.originalSize.height,h=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return f&&(n.width=t.minWidth),e&&(n.height=t.minHeight),r&&(n.width=t.maxWidth),u&&(n.height=t.maxHeight),f&&h&&(n.left=o-t.minWidth),r&&h&&(n.left=o-t.maxWidth),e&&c&&(n.top=s-t.minHeight),u&&c&&(n.top=s-t.maxHeight),n.width||n.height||n.left||!n.top?n.width||n.height||n.top||!n.left||(n.left=null):n.top=null,n},_getPaddingPlusBorderDimensions:function(n){for(var t=0,i=[],r=[n.css("borderTopWidth"),n.css("borderRightWidth"),n.css("borderBottomWidth"),n.css("borderLeftWidth")],u=[n.css("paddingTop"),n.css("paddingRight"),n.css("paddingBottom"),n.css("paddingLeft")];4>t;t++)i[t]=parseFloat(r[t])||0,i[t]+=parseFloat(u[t])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var n,t=0,i=this.helper||this.element;this._proportionallyResizeElements.length>t;t++)n=this._proportionallyResizeElements[t],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(n)),n.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,i=this.options;this.elementOffset=t.offset();this._helper?(this.helper=this.helper||n("<div style='overflow:hidden;'><\/div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(n,t){return{width:this.originalSize.width+t}},w:function(n,t){var i=this.originalSize,r=this.originalPosition;return{left:r.left+t,width:i.width-t}},n:function(n,t,i){var r=this.originalSize,u=this.originalPosition;return{top:u.top+i,height:r.height-i}},s:function(n,t,i){return{height:this.originalSize.height+i}},se:function(t,i,r){return n.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,i,r]))},sw:function(t,i,r){return n.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,i,r]))},ne:function(t,i,r){return n.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,i,r]))},nw:function(t,i,r){return n.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,i,r]))}},_propagate:function(t,i){n.ui.plugin.call(this,t,[i,this.ui()]);"resize"!==t&&this._trigger(t,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});n.ui.plugin.add("resizable","animate",{stop:function(t){var i=n(this).resizable("instance"),u=i.options,r=i._proportionallyResizeElements,f=r.length&&/textarea/i.test(r[0].nodeName),s=f&&i._hasScroll(r[0],"left")?0:i.sizeDiff.height,h=f?0:i.sizeDiff.width,c={width:i.size.width-h,height:i.size.height-s},e=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,o=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(n.extend(c,o&&e?{top:o,left:e}:{}),{duration:u.animateDuration,easing:u.animateEasing,step:function(){var u={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};r&&r.length&&n(r[0]).css({width:u.width,height:u.height});i._updateCache(u);i._propagate("resize",t)}})}});n.ui.plugin.add("resizable","containment",{start:function(){var r,f,e,o,s,h,c,t=n(this).resizable("instance"),l=t.options,a=t.element,u=l.containment,i=u instanceof n?u.get(0):/parent/.test(u)?a.parent().get(0):u;i&&(t.containerElement=n(i),/document/.test(u)||u===document?(t.containerOffset={left:0,top:0},t.containerPosition={left:0,top:0},t.parentData={element:n(document),left:0,top:0,width:n(document).width(),height:n(document).height()||document.body.parentNode.scrollHeight}):(r=n(i),f=[],n(["Top","Right","Left","Bottom"]).each(function(n,i){f[n]=t._num(r.css("padding"+i))}),t.containerOffset=r.offset(),t.containerPosition=r.position(),t.containerSize={height:r.innerHeight()-f[3],width:r.innerWidth()-f[1]},e=t.containerOffset,o=t.containerSize.height,s=t.containerSize.width,h=t._hasScroll(i,"left")?i.scrollWidth:s,c=t._hasScroll(i)?i.scrollHeight:o,t.parentData={element:i,left:e.left,top:e.top,width:h,height:c}))},resize:function(t){var o,s,h,c,i=n(this).resizable("instance"),v=i.options,r=i.containerOffset,l=i.position,f=i._aspectRatio||t.shiftKey,e={top:0,left:0},a=i.containerElement,u=!0;a[0]!==document&&/static/.test(a.css("position"))&&(e=r);l.left<(i._helper?r.left:0)&&(i.size.width=i.size.width+(i._helper?i.position.left-r.left:i.position.left-e.left),f&&(i.size.height=i.size.width/i.aspectRatio,u=!1),i.position.left=v.helper?r.left:0);l.top<(i._helper?r.top:0)&&(i.size.height=i.size.height+(i._helper?i.position.top-r.top:i.position.top),f&&(i.size.width=i.size.height*i.aspectRatio,u=!1),i.position.top=i._helper?r.top:0);h=i.containerElement.get(0)===i.element.parent().get(0);c=/relative|absolute/.test(i.containerElement.css("position"));h&&c?(i.offset.left=i.parentData.left+i.position.left,i.offset.top=i.parentData.top+i.position.top):(i.offset.left=i.element.offset().left,i.offset.top=i.element.offset().top);o=Math.abs(i.sizeDiff.width+(i._helper?i.offset.left-e.left:i.offset.left-r.left));s=Math.abs(i.sizeDiff.height+(i._helper?i.offset.top-e.top:i.offset.top-r.top));o+i.size.width>=i.parentData.width&&(i.size.width=i.parentData.width-o,f&&(i.size.height=i.size.width/i.aspectRatio,u=!1));s+i.size.height>=i.parentData.height&&(i.size.height=i.parentData.height-s,f&&(i.size.width=i.size.height*i.aspectRatio,u=!1));u||(i.position.left=i.prevPosition.left,i.position.top=i.prevPosition.top,i.size.width=i.prevSize.width,i.size.height=i.prevSize.height)},stop:function(){var t=n(this).resizable("instance"),r=t.options,u=t.containerOffset,f=t.containerPosition,e=t.containerElement,i=n(t.helper),o=i.offset(),s=i.outerWidth()-t.sizeDiff.width,h=i.outerHeight()-t.sizeDiff.height;t._helper&&!r.animate&&/relative/.test(e.css("position"))&&n(this).css({left:o.left-f.left-u.left,width:s,height:h});t._helper&&!r.animate&&/static/.test(e.css("position"))&&n(this).css({left:o.left-f.left-u.left,width:s,height:h})}});n.ui.plugin.add("resizable","alsoResize",{start:function(){var t=n(this).resizable("instance"),i=t.options;n(i.alsoResize).each(function(){var t=n(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.width()),height:parseFloat(t.height()),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,i){var r=n(this).resizable("instance"),e=r.options,u=r.originalSize,f=r.originalPosition,o={height:r.size.height-u.height||0,width:r.size.width-u.width||0,top:r.position.top-f.top||0,left:r.position.left-f.left||0};n(e.alsoResize).each(function(){var t=n(this),u=n(this).data("ui-resizable-alsoresize"),r={},f=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];n.each(f,function(n,t){var i=(u[t]||0)+(o[t]||0);i&&i>=0&&(r[t]=i||null)});t.css(r)})},stop:function(){n(this).removeData("ui-resizable-alsoresize")}});n.ui.plugin.add("resizable","ghost",{start:function(){var t=n(this).resizable("instance"),i=t.size;t.ghost=t.originalElement.clone();t.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0});t._addClass(t.ghost,"ui-resizable-ghost");n.uiBackCompat!==!1&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost);t.ghost.appendTo(t.helper)},resize:function(){var t=n(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=n(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}});n.ui.plugin.add("resizable","grid",{resize:function(){var h,t=n(this).resizable("instance"),i=t.options,y=t.size,o=t.originalSize,s=t.originalPosition,c=t.axis,l="number"==typeof i.grid?[i.grid,i.grid]:i.grid,f=l[0]||1,e=l[1]||1,a=Math.round((y.width-o.width)/f)*f,v=Math.round((y.height-o.height)/e)*e,r=o.width+a,u=o.height+v,p=i.maxWidth&&r>i.maxWidth,w=i.maxHeight&&u>i.maxHeight,b=i.minWidth&&i.minWidth>r,k=i.minHeight&&i.minHeight>u;i.grid=l;b&&(r+=f);k&&(u+=e);p&&(r-=f);w&&(u-=e);/^(se|s|e)$/.test(c)?(t.size.width=r,t.size.height=u):/^(ne)$/.test(c)?(t.size.width=r,t.size.height=u,t.position.top=s.top-v):/^(sw)$/.test(c)?(t.size.width=r,t.size.height=u,t.position.left=s.left-a):((0>=u-e||0>=r-f)&&(h=t._getPaddingPlusBorderDimensions(this)),u-e>0?(t.size.height=u,t.position.top=s.top-v):(u=e-h.height,t.size.height=u,t.position.top=s.top+o.height-u),r-f>0?(t.size.width=r,t.position.left=s.left-a):(r=f-h.width,t.size.width=r,t.position.left=s.left+o.width-r))}});n.ui.resizable;n.widget("ui.selectable",n.ui.mouse,{version:"1.12.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var t=this;this._addClass("ui-selectable");this.dragged=!1;this.refresh=function(){t.elementPos=n(t.element[0]).offset();t.selectees=n(t.options.filter,t.element[0]);t._addClass(t.selectees,"ui-selectee");t.selectees.each(function(){var i=n(this),u=i.offset(),r={left:u.left-t.elementPos.left,top:u.top-t.elementPos.top};n.data(this,"selectable-item",{element:this,$element:i,left:r.left,top:r.top,right:r.left+i.outerWidth(),bottom:r.top+i.outerHeight(),startselected:!1,selected:i.hasClass("ui-selected"),selecting:i.hasClass("ui-selecting"),unselecting:i.hasClass("ui-unselecting")})})};this.refresh();this._mouseInit();this.helper=n("<div>");this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item");this._mouseDestroy()},_mouseStart:function(t){var i=this,r=this.options;this.opos=[t.pageX,t.pageY];this.elementPos=n(this.element[0]).offset();this.options.disabled||(this.selectees=n(r.filter,this.element[0]),this._trigger("start",t),n(r.appendTo).append(this.helper),this.helper.css({left:t.pageX,top:t.pageY,width:0,height:0}),r.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var r=n.data(this,"selectable-item");r.startselected=!0;t.metaKey||t.ctrlKey||(i._removeClass(r.$element,"ui-selected"),r.selected=!1,i._addClass(r.$element,"ui-unselecting"),r.unselecting=!0,i._trigger("unselecting",t,{unselecting:r.element}))}),n(t.target).parents().addBack().each(function(){var u,r=n.data(this,"selectable-item");if(r)return(u=!t.metaKey&&!t.ctrlKey||!r.$element.hasClass("ui-selected"),i._removeClass(r.$element,u?"ui-unselecting":"ui-selected")._addClass(r.$element,u?"ui-selecting":"ui-unselecting"),r.unselecting=!u,r.selecting=u,r.selected=u,u?i._trigger("selecting",t,{selecting:r.element}):i._trigger("unselecting",t,{unselecting:r.element}),!1)}))},_mouseDrag:function(t){if(this.dragged=!0,!this.options.disabled){var o,i=this,s=this.options,r=this.opos[0],u=this.opos[1],f=t.pageX,e=t.pageY;return r>f&&(o=f,f=r,r=o),u>e&&(o=e,e=u,u=o),this.helper.css({left:r,top:u,width:f-r,height:e-u}),this.selectees.each(function(){var o=n.data(this,"selectable-item"),c=!1,h={};o&&o.element!==i.element[0]&&(h.left=o.left+i.elementPos.left,h.right=o.right+i.elementPos.left,h.top=o.top+i.elementPos.top,h.bottom=o.bottom+i.elementPos.top,"touch"===s.tolerance?c=!(h.left>f||r>h.right||h.top>e||u>h.bottom):"fit"===s.tolerance&&(c=h.left>r&&f>h.right&&h.top>u&&e>h.bottom),c?(o.selected&&(i._removeClass(o.$element,"ui-selected"),o.selected=!1),o.unselecting&&(i._removeClass(o.$element,"ui-unselecting"),o.unselecting=!1),o.selecting||(i._addClass(o.$element,"ui-selecting"),o.selecting=!0,i._trigger("selecting",t,{selecting:o.element}))):(o.selecting&&((t.metaKey||t.ctrlKey)&&o.startselected?(i._removeClass(o.$element,"ui-selecting"),o.selecting=!1,i._addClass(o.$element,"ui-selected"),o.selected=!0):(i._removeClass(o.$element,"ui-selecting"),o.selecting=!1,o.startselected&&(i._addClass(o.$element,"ui-unselecting"),o.unselecting=!0),i._trigger("unselecting",t,{unselecting:o.element}))),o.selected&&(t.metaKey||t.ctrlKey||o.startselected||(i._removeClass(o.$element,"ui-selected"),o.selected=!1,i._addClass(o.$element,"ui-unselecting"),o.unselecting=!0,i._trigger("unselecting",t,{unselecting:o.element})))))}),!1}},_mouseStop:function(t){var i=this;return this.dragged=!1,n(".ui-unselecting",this.element[0]).each(function(){var r=n.data(this,"selectable-item");i._removeClass(r.$element,"ui-unselecting");r.unselecting=!1;r.startselected=!1;i._trigger("unselected",t,{unselected:r.element})}),n(".ui-selecting",this.element[0]).each(function(){var r=n.data(this,"selectable-item");i._removeClass(r.$element,"ui-selecting")._addClass(r.$element,"ui-selected");r.selecting=!1;r.selected=!0;r.startselected=!0;i._trigger("selected",t,{selected:r.element})}),this._trigger("stop",t),this.helper.remove(),!1}});n.widget("ui.sortable",n.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(n,t,i){return n>=t&&t+i>n},_isFloating:function(n){return/left|right/.test(n.css("float"))||/inline|table-cell/.test(n.css("display"))},_create:function(){this.containerCache={};this._addClass("ui-sortable");this.refresh();this.offset=this.element.offset();this._mouseInit();this._setHandleClassName();this.ready=!0},_setOption:function(n,t){this._super(n,t);"handle"===n&&this._setHandleClassName()},_setHandleClassName:function(){var t=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle");n.each(this.items,function(){t._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var n=this.items.length-1;n>=0;n--)this.items[n].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,i){var r=null,f=!1,u=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(t),n(t.target).parents().each(function(){if(n.data(this,u.widgetName+"-item")===u)return(r=n(this),!1)}),n.data(t.target,u.widgetName+"-item")===u&&(r=n(t.target)),r?!this.options.handle||i||(n(this.options.handle,r).find("*").addBack().each(function(){this===t.target&&(f=!0)}),f)?(this.currentItem=r,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(t,i,r){var f,e,u=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},n.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,u.cursorAt&&this._adjustOffsetFromHelper(u.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),u.containment&&this._setContainment(),u.cursor&&"auto"!==u.cursor&&(e=this.document.find("body"),this.storedCursor=e.css("cursor"),e.css("cursor",u.cursor),this.storedStylesheet=n("<style>*{ cursor: "+u.cursor+" !important; }<\/style>").appendTo(e)),u.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",u.opacity)),u.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",u.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!r)for(f=this.containers.length-1;f>=0;f--)this.containers[f]._trigger("activate",t,this._uiHash(this));return n.ui.ddmanager&&(n.ui.ddmanager.current=this),n.ui.ddmanager&&!u.dropBehaviour&&n.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var e,u,f,o,i=this.options,r=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<i.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+i.scrollSpeed:t.pageY-this.overflowOffset.top<i.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-i.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<i.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+i.scrollSpeed:t.pageX-this.overflowOffset.left<i.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-i.scrollSpeed)):(t.pageY-this.document.scrollTop()<i.scrollSensitivity?r=this.document.scrollTop(this.document.scrollTop()-i.scrollSpeed):this.window.height()-(t.pageY-this.document.scrollTop())<i.scrollSensitivity&&(r=this.document.scrollTop(this.document.scrollTop()+i.scrollSpeed)),t.pageX-this.document.scrollLeft()<i.scrollSensitivity?r=this.document.scrollLeft(this.document.scrollLeft()-i.scrollSpeed):this.window.width()-(t.pageX-this.document.scrollLeft())<i.scrollSensitivity&&(r=this.document.scrollLeft(this.document.scrollLeft()+i.scrollSpeed))),r!==!1&&n.ui.ddmanager&&!i.dropBehaviour&&n.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),e=this.items.length-1;e>=0;e--)if(u=this.items[e],f=u.item[0],o=this._intersectsWithPointer(u),o&&u.instance===this.currentContainer&&f!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==f&&!n.contains(this.placeholder[0],f)&&("semi-dynamic"===this.options.type?!n.contains(this.element[0],f):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(u))break;this._rearrange(t,u);this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),n.ui.ddmanager&&n.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,i){if(t){if(n.ui.ddmanager&&!this.options.dropBehaviour&&n.ui.ddmanager.drop(this,t),this.options.revert){var e=this,f=this.placeholder.offset(),r=this.options.axis,u={};r&&"x"!==r||(u.left=f.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft));r&&"y"!==r||(u.top=f.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop));this.reverting=!0;n(this.helper).animate(u,parseInt(this.options.revert,10)||500,function(){e._clear(t)})}else this._clear(t,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new n.Event("mouseup",{target:null}));"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),n.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?n(this.domPosition.prev).after(this.currentItem):n(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var r=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},n(r).each(function(){var r=(n(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);r&&i.push((t.key||r[1]+"[]")+"="+(t.key&&t.expression?r[1]:r[2]))}),!i.length&&t.key&&i.push(t.key+"="),i.join("&")},toArray:function(t){var r=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},r.each(function(){i.push(n(t.item||this).attr(t.attribute||"id")||"")}),i},_intersectsWith:function(n){var t=this.positionAbs.left,h=t+this.helperProportions.width,i=this.positionAbs.top,c=i+this.helperProportions.height,r=n.left,f=r+n.width,u=n.top,e=u+n.height,o=this.offset.click.top,s=this.offset.click.left,l="x"===this.options.axis||i+o>u&&e>i+o,a="y"===this.options.axis||t+s>r&&f>t+s,v=l&&a;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>n[this.floating?"width":"height"]?v:t+this.helperProportions.width/2>r&&f>h-this.helperProportions.width/2&&i+this.helperProportions.height/2>u&&e>c-this.helperProportions.height/2},_intersectsWithPointer:function(n){var t,i,r="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,n.top,n.height),u="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,n.left,n.width),f=r&&u;return f?(t=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection(),this.floating?"right"===i||"down"===t?2:1:t&&("down"===t?2:1)):!1},_intersectsWithSides:function(n){var r=this._isOverAxis(this.positionAbs.top+this.offset.click.top,n.top+n.height/2,n.height),u=this._isOverAxis(this.positionAbs.left+this.offset.click.left,n.left+n.width/2,n.width),t=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection();return this.floating&&i?"right"===i&&u||"left"===i&&!u:t&&("down"===t&&r||"up"===t&&!r)},_getDragVerticalDirection:function(){var n=this.positionAbs.top-this.lastPositionAbs.top;return 0!==n&&(n>0?"down":"up")},_getDragHorizontalDirection:function(){var n=this.positionAbs.left-this.lastPositionAbs.left;return 0!==n&&(n>0?"right":"left")},refresh:function(n){return this._refreshItems(n),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var n=this.options;return n.connectWith.constructor===String?[n.connectWith]:n.connectWith},_getItemsAsjQuery:function(t){function h(){s.push(this)}var r,u,e,i,s=[],f=[],o=this._connectWith();if(o&&t)for(r=o.length-1;r>=0;r--)for(e=n(o[r],this.document[0]),u=e.length-1;u>=0;u--)i=n.data(e[u],this.widgetFullName),i&&i!==this&&!i.options.disabled&&f.push([n.isFunction(i.options.items)?i.options.items.call(i.element):n(i.options.items,i.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),i]);for(f.push([n.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):n(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),r=f.length-1;r>=0;r--)f[r][0].each(h);return n(s)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=n.grep(this.items,function(n){for(var i=0;t.length>i;i++)if(t[i]===n.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[];this.containers=[this];var r,u,e,i,o,s,h,l,a=this.items,f=[[n.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):n(this.options.items,this.element),this]],c=this._connectWith();if(c&&this.ready)for(r=c.length-1;r>=0;r--)for(e=n(c[r],this.document[0]),u=e.length-1;u>=0;u--)i=n.data(e[u],this.widgetFullName),i&&i!==this&&!i.options.disabled&&(f.push([n.isFunction(i.options.items)?i.options.items.call(i.element[0],t,{item:this.currentItem}):n(i.options.items,i.element),i]),this.containers.push(i));for(r=f.length-1;r>=0;r--)for(o=f[r][1],s=f[r][0],u=0,l=s.length;l>u;u++)h=n(s[u]),h.data(this.widgetName+"-item",o),a.push({item:h,instance:o,width:0,height:0,left:0,top:0})},refreshPositions:function(t){this.floating=this.items.length?"x"===this.options.axis||this._isFloating(this.items[0].item):!1;this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());for(var r,f,u,i=this.items.length-1;i>=0;i--)r=this.items[i],r.instance!==this.currentContainer&&this.currentContainer&&r.item[0]!==this.currentItem[0]||(f=this.options.toleranceElement?n(this.options.toleranceElement,r.item):r.item,t||(r.width=f.outerWidth(),r.height=f.outerHeight()),u=f.offset(),r.left=u.left,r.top=u.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)u=this.containers[i].element.offset(),this.containers[i].containerCache.left=u.left,this.containers[i].containerCache.top=u.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(t){t=t||this;var r,i=t.options;i.placeholder&&i.placeholder.constructor!==String||(r=i.placeholder,i.placeholder={element:function(){var u=t.currentItem[0].nodeName.toLowerCase(),i=n("<"+u+">",t.document[0]);return t._addClass(i,"ui-sortable-placeholder",r||t.currentItem[0].className)._removeClass(i,"ui-sortable-helper"),"tbody"===u?t._createTrPlaceholder(t.currentItem.find("tr").eq(0),n("<tr>",t.document[0]).appendTo(i)):"tr"===u?t._createTrPlaceholder(t.currentItem,i):"img"===u&&i.attr("src",t.currentItem.attr("src")),r||i.css("visibility","hidden"),i},update:function(n,u){(!r||i.forcePlaceholderSize)&&(u.height()||u.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),u.width()||u.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}});t.placeholder=n(i.placeholder.element.call(t.element,t.currentItem));t.currentItem.after(t.placeholder);i.placeholder.update(t,t.placeholder)},_createTrPlaceholder:function(t,i){var r=this;t.children().each(function(){n("<td>&#160;<\/td>",r.document[0]).attr("colspan",n(this).attr("colspan")||1).appendTo(i)})},_contactContainers:function(t){for(var u,c,f,a,v,o,l,s,h,e=null,i=null,r=this.containers.length-1;r>=0;r--)if(!n.contains(this.currentItem[0],this.containers[r].element[0]))if(this._intersectsWith(this.containers[r].containerCache)){if(e&&n.contains(this.containers[r].element[0],e.element[0]))continue;e=this.containers[r];i=r}else this.containers[r].containerCache.over&&(this.containers[r]._trigger("out",t,this._uiHash(this)),this.containers[r].containerCache.over=0);if(e)if(1===this.containers.length)this.containers[i].containerCache.over||(this.containers[i]._trigger("over",t,this._uiHash(this)),this.containers[i].containerCache.over=1);else{for(c=1e4,f=null,s=e.floating||this._isFloating(this.currentItem),a=s?"left":"top",v=s?"width":"height",h=s?"pageX":"pageY",u=this.items.length-1;u>=0;u--)n.contains(this.containers[i].element[0],this.items[u].item[0])&&this.items[u].item[0]!==this.currentItem[0]&&(o=this.items[u].item.offset()[a],l=!1,t[h]-o>this.items[u][v]/2&&(l=!0),c>Math.abs(t[h]-o)&&(c=Math.abs(t[h]-o),f=this.items[u],this.direction=l?"up":"down"));if(!f&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[i])return this.currentContainer.containerCache.over||(this.containers[i]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1),void 0;f?this._rearrange(t,f,null,!0):this._rearrange(t,null,this.containers[i].element,!0);this._trigger("change",t,this._uiHash());this.containers[i]._trigger("change",t,this._uiHash(this));this.currentContainer=this.containers[i];this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[i]._trigger("over",t,this._uiHash(this));this.containers[i].containerCache.over=1}},_createHelper:function(t){var r=this.options,i=n.isFunction(r.helper)?n(r.helper.apply(this.element[0],[t,this.currentItem])):"clone"===r.helper?this.currentItem.clone():this.currentItem;return i.parents("body").length||n("parent"!==r.appendTo?r.appendTo:this.currentItem[0].parentNode)[0].appendChild(i[0]),i[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!i[0].style.width||r.forceHelperSize)&&i.width(this.currentItem.width()),(!i[0].style.height||r.forceHelperSize)&&i.height(this.currentItem.height()),i},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" "));n.isArray(t)&&(t={left:+t[0],top:+t[1]||0});"left"in t&&(this.offset.click.left=t.left+this.margins.left);"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left);"top"in t&&(this.offset.click.top=t.top+this.margins.top);"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&n.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&n.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var n=this.currentItem.position();return{top:n.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:n.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,r,u,i=this.options;"parent"===i.containment&&(i.containment=this.helper[0].parentNode);("document"===i.containment||"window"===i.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===i.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===i.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]);/^(document|window|parent)$/.test(i.containment)||(t=n(i.containment)[0],r=n(i.containment).offset(),u="hidden"!==n(t).css("overflow"),this.containment=[r.left+(parseInt(n(t).css("borderLeftWidth"),10)||0)+(parseInt(n(t).css("paddingLeft"),10)||0)-this.margins.left,r.top+(parseInt(n(t).css("borderTopWidth"),10)||0)+(parseInt(n(t).css("paddingTop"),10)||0)-this.margins.top,r.left+(u?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(n(t).css("borderLeftWidth"),10)||0)-(parseInt(n(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,r.top+(u?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(n(t).css("borderTopWidth"),10)||0)-(parseInt(n(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,i){i||(i=this.position);var r="absolute"===t?1:-1,u="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&n.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,f=/(html|body)/i.test(u[0].tagName);return{top:i.top+this.offset.relative.top*r+this.offset.parent.top*r-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():f?0:u.scrollTop())*r,left:i.left+this.offset.relative.left*r+this.offset.parent.left*r-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():f?0:u.scrollLeft())*r}},_generatePosition:function(t){var r,u,i=this.options,f=t.pageX,e=t.pageY,o="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&n.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,s=/(html|body)/i.test(o[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(f=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(e=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(f=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(e=this.containment[3]+this.offset.click.top)),i.grid&&(r=this.originalPageY+Math.round((e-this.originalPageY)/i.grid[1])*i.grid[1],e=this.containment?r-this.offset.click.top>=this.containment[1]&&r-this.offset.click.top<=this.containment[3]?r:r-this.offset.click.top>=this.containment[1]?r-i.grid[1]:r+i.grid[1]:r,u=this.originalPageX+Math.round((f-this.originalPageX)/i.grid[0])*i.grid[0],f=this.containment?u-this.offset.click.left>=this.containment[0]&&u-this.offset.click.left<=this.containment[2]?u:u-this.offset.click.left>=this.containment[0]?u-i.grid[0]:u+i.grid[0]:u)),{top:e-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():s?0:o.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():s?0:o.scrollLeft())}},_rearrange:function(n,t,i,r){i?i[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling);this.counter=this.counter?++this.counter:1;var u=this.counter;this._delay(function(){u===this.counter&&this.refreshPositions(!r)})},_clear:function(n,t){function u(n,t,i){return function(r){i._trigger(n,r,t._uiHash(t))}}this.reverting=!1;var i,r=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)("auto"===this._storedCSS[i]||"static"===this._storedCSS[i])&&(this._storedCSS[i]="");this.currentItem.css(this._storedCSS);this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!t&&r.push(function(n){this._trigger("receive",n,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||r.push(function(n){this._trigger("update",n,this._uiHash())}),this!==this.currentContainer&&(t||(r.push(function(n){this._trigger("remove",n,this._uiHash())}),r.push(function(n){return function(t){n._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),r.push(function(n){return function(t){n._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)t||r.push(u("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(r.push(u("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,t||this._trigger("beforeStop",n,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!t){for(i=0;r.length>i;i++)r[i].call(this,n);this._trigger("stop",n,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){n.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(t){var i=t||this;return{helper:i.helper,placeholder:i.placeholder||n([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:t?t.element:null}}});n.widget("ui.menu",{version:"1.12.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element;this.mouseHandled=!1;this.element.uniqueId().attr({role:this.options.role,tabIndex:0});this._addClass("ui-menu","ui-widget ui-widget-content");this._on({"mousedown .ui-menu-item":function(n){n.preventDefault()},"click .ui-menu-item":function(t){var i=n(t.target),r=n(n.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&r.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){if(!this.previousFilter){var r=n(t.target).closest(".ui-menu-item"),i=n(t.currentTarget);r[0]===i[0]&&(this._removeClass(i.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(t,i))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(n,t){var i=this.active||this.element.find(this.options.items).eq(0);t||this.focus(n,i)},blur:function(t){this._delay(function(){var i=!n.contains(this.element[0],n.ui.safeActiveElement(this.document[0]));i&&this.collapseAll(t)})},keydown:"_keydown"});this.refresh();this._on(this.document,{click:function(n){this._closeOnDocumentClick(n)&&this.collapseAll(n);this.mouseHandled=!1}})},_destroy:function(){var t=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),i=t.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show();i.children().each(function(){var t=n(this);t.data("ui-menu-submenu-caret")&&t.remove()})},_keydown:function(t){var i,u,r,f,e=!0;switch(t.keyCode){case n.ui.keyCode.PAGE_UP:this.previousPage(t);break;case n.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case n.ui.keyCode.HOME:this._move("first","first",t);break;case n.ui.keyCode.END:this._move("last","last",t);break;case n.ui.keyCode.UP:this.previous(t);break;case n.ui.keyCode.DOWN:this.next(t);break;case n.ui.keyCode.LEFT:this.collapse(t);break;case n.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case n.ui.keyCode.ENTER:case n.ui.keyCode.SPACE:this._activate(t);break;case n.ui.keyCode.ESCAPE:this.collapse(t);break;default:e=!1;u=this.previousFilter||"";f=!1;r=t.keyCode>=96&&105>=t.keyCode?""+(t.keyCode-96):String.fromCharCode(t.keyCode);clearTimeout(this.filterTimer);r===u?f=!0:r=u+r;i=this._filterMenuItems(r);i=f&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i;i.length||(r=String.fromCharCode(t.keyCode),i=this._filterMenuItems(r));i.length?(this.focus(t,i),this.previousFilter=r,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}e&&t.preventDefault()},_activate:function(n){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(n):this.select(n))},refresh:function(){var u,t,f,i,e,r=this,s=this.options.icons.submenu,o=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length);f=o.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=n(this),i=t.prev(),u=n("<span>").data("ui-menu-submenu-caret",!0);r._addClass(u,"ui-menu-icon","ui-icon "+s);i.attr("aria-haspopup","true").prepend(u);t.attr("aria-labelledby",i.attr("id"))});this._addClass(f,"ui-menu","ui-widget ui-widget-content ui-front");u=o.add(this.element);t=u.find(this.options.items);t.not(".ui-menu-item").each(function(){var t=n(this);r._isDivider(t)&&r._addClass(t,"ui-menu-divider","ui-widget-content")});i=t.not(".ui-menu-item, .ui-menu-divider");e=i.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()});this._addClass(i,"ui-menu-item")._addClass(e,"ui-menu-item-wrapper");t.filter(".ui-state-disabled").attr("aria-disabled","true");this.active&&!n.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(n,t){if("icons"===n){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,t.submenu)}this._super(n,t)},_setOptionDisabled:function(n){this._super(n);this.element.attr("aria-disabled",n+"");this._toggleClass(null,"ui-state-disabled",!!n)},focus:function(n,t){var i,r,u;this.blur(n,n&&"focus"===n.type);this._scrollIntoView(t);this.active=t.first();r=this.active.children(".ui-menu-item-wrapper");this._addClass(r,null,"ui-state-active");this.options.role&&this.element.attr("aria-activedescendant",r.attr("id"));u=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper");this._addClass(u,null,"ui-state-active");n&&"keydown"===n.type?this._close():this.timer=this._delay(function(){this._close()},this.delay);i=t.children(".ui-menu");i.length&&n&&/^mouse/.test(n.type)&&this._startOpening(i);this.activeMenu=t.parent();this._trigger("focus",n,{item:t})},_scrollIntoView:function(t){var e,o,i,r,u,f;this._hasScroll()&&(e=parseFloat(n.css(this.activeMenu[0],"borderTopWidth"))||0,o=parseFloat(n.css(this.activeMenu[0],"paddingTop"))||0,i=t.offset().top-this.activeMenu.offset().top-e-o,r=this.activeMenu.scrollTop(),u=this.activeMenu.height(),f=t.outerHeight(),0>i?this.activeMenu.scrollTop(r+i):i+f>u&&this.activeMenu.scrollTop(r+i-u+f))},blur:function(n,t){t||clearTimeout(this.timer);this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",n,{item:this.active}),this.active=null)},_startOpening:function(n){clearTimeout(this.timer);"true"===n.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close();this._open(n)},this.delay))},_open:function(t){var i=n.extend({"of":this.active},this.options.position);clearTimeout(this.timer);this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true");t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(t,i){clearTimeout(this.timer);this.timer=this._delay(function(){var r=i?this.element:n(t&&t.target).closest(this.element.find(".ui-menu"));r.length||(r=this.element);this._close(r);this.blur(t);this._removeClass(r.find(".ui-state-active"),null,"ui-state-active");this.activeMenu=r},this.delay)},_close:function(n){n||(n=this.active?this.active.parent():this.element);n.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(t){return!n(t.target).closest(".ui-menu").length},_isDivider:function(n){return!/[^\-\u2014\u2013\s]/.test(n.text())},collapse:function(n){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(n,t))},expand:function(n){var t=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(n,t)}))},next:function(n){this._move("next","first",n)},previous:function(n){this._move("prev","last",n)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(n,t,i){var r;this.active&&(r="first"===n||"last"===n?this.active["first"===n?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[n+"All"](".ui-menu-item").eq(0));r&&r.length&&this.active||(r=this.activeMenu.find(this.options.items)[t]());this.focus(i,r)},nextPage:function(t){var i,r,u;return this.active?(this.isLastItem()||(this._hasScroll()?(r=this.active.offset().top,u=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=n(this),0>i.offset().top-r-u}),this.focus(t,i)):this.focus(t,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(t),void 0)},previousPage:function(t){var i,r,u;return this.active?(this.isFirstItem()||(this._hasScroll()?(r=this.active.offset().top,u=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=n(this),i.offset().top-r+u>0}),this.focus(t,i)):this.focus(t,this.activeMenu.find(this.options.items).first())),void 0):(this.next(t),void 0)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||n(t.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0);this._trigger("select",t,i)},_filterMenuItems:function(t){var i=t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),r=RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return r.test(n.trim(n(this).children(".ui-menu-item-wrapper").text()))})}});n.widget("ui.autocomplete",{version:"1.12.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var t,i,r,u=this.element[0].nodeName.toLowerCase(),f="textarea"===u,e="input"===u;this.isMultiLine=f||!e&&this._isContentEditable(this.element);this.valueMethod=this.element[f||e?"val":"text"];this.isNewMenu=!0;this._addClass("ui-autocomplete-input");this.element.attr("autocomplete","off");this._on(this.element,{keydown:function(u){if(this.element.prop("readOnly"))return t=!0,r=!0,i=!0,void 0;t=!1;r=!1;i=!1;var f=n.ui.keyCode;switch(u.keyCode){case f.PAGE_UP:t=!0;this._move("previousPage",u);break;case f.PAGE_DOWN:t=!0;this._move("nextPage",u);break;case f.UP:t=!0;this._keyEvent("previous",u);break;case f.DOWN:t=!0;this._keyEvent("next",u);break;case f.ENTER:this.menu.active&&(t=!0,u.preventDefault(),this.menu.select(u));break;case f.TAB:this.menu.active&&this.menu.select(u);break;case f.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(u),u.preventDefault());break;default:i=!0;this._searchTimeout(u)}},keypress:function(r){if(t)return t=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&r.preventDefault(),void 0;if(!i){var u=n.ui.keyCode;switch(r.keyCode){case u.PAGE_UP:this._move("previousPage",r);break;case u.PAGE_DOWN:this._move("nextPage",r);break;case u.UP:this._keyEvent("previous",r);break;case u.DOWN:this._keyEvent("next",r)}}},input:function(n){return r?(r=!1,n.preventDefault(),void 0):(this._searchTimeout(n),void 0)},focus:function(){this.selectedItem=null;this.previous=this._value()},blur:function(n){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(n),this._change(n),void 0)}});this._initSource();this.menu=n("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance");this._addClass(this.menu.element,"ui-autocomplete","ui-front");this._on(this.menu.element,{mousedown:function(t){t.preventDefault();this.cancelBlur=!0;this._delay(function(){delete this.cancelBlur;this.element[0]!==n.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(t,i){var r,u;return this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type))?(this.menu.blur(),this.document.one("mousemove",function(){n(t.target).trigger(t.originalEvent)}),void 0):(u=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:u})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(u.value),r=i.item.attr("aria-label")||u.value,r&&n.trim(r).length&&(this.liveRegion.children().hide(),n("<div>").text(r).appendTo(this.liveRegion)),void 0)},menuselect:function(t,i){var r=i.item.data("ui-autocomplete-item"),u=this.previous;this.element[0]!==n.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=u,this._delay(function(){this.previous=u;this.selectedItem=r}));!1!==this._trigger("select",t,{item:r})&&this._value(r.value);this.term=this._value();this.close(t);this.selectedItem=r}});this.liveRegion=n("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body);this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible");this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching);this.element.removeAttr("autocomplete");this.menu.element.remove();this.liveRegion.remove()},_setOption:function(n,t){this._super(n,t);"source"===n&&this._initSource();"appendTo"===n&&this.menu.element.appendTo(this._appendTo());"disabled"===n&&t&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(t){var i=this.menu.element[0];return t.target===this.element[0]||t.target===i||n.contains(i,t.target)},_closeOnClickOutside:function(n){this._isEventTargetInWidget(n)||this.close()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?n(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front, dialog")),t.length||(t=this.document[0].body),t},_initSource:function(){var i,r,t=this;n.isArray(this.options.source)?(i=this.options.source,this.source=function(t,r){r(n.ui.autocomplete.filter(i,t.term))}):"string"==typeof this.options.source?(r=this.options.source,this.source=function(i,u){t.xhr&&t.xhr.abort();t.xhr=n.ajax({url:r,data:i,dataType:"json",success:function(n){u(n)},error:function(){u([])}})}):this.source=this.options.source},_searchTimeout:function(n){clearTimeout(this.searching);this.searching=this._delay(function(){var t=this.term===this._value(),i=this.menu.element.is(":visible"),r=n.altKey||n.ctrlKey||n.metaKey||n.shiftKey;t&&(!t||i||r)||(this.selectedItem=null,this.search(null,n))},this.options.delay)},search:function(n,t){return n=null!=n?n:this._value(),this.term=this._value(),n.length<this.options.minLength?this.close(t):this._trigger("search",t)!==!1?this._search(n):void 0},_search:function(n){this.pending++;this._addClass("ui-autocomplete-loading");this.cancelSearch=!1;this.source({term:n},this._response())},_response:function(){var t=++this.requestIndex;return n.proxy(function(n){t===this.requestIndex&&this.__response(n);this.pending--;this.pending||this._removeClass("ui-autocomplete-loading")},this)},__response:function(n){n&&(n=this._normalize(n));this._trigger("response",null,{content:n});!this.options.disabled&&n&&n.length&&!this.cancelSearch?(this._suggest(n),this._trigger("open")):this._close()},close:function(n){this.cancelSearch=!0;this._close(n)},_close:function(n){this._off(this.document,"mousedown");this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",n))},_change:function(n){this.previous!==this._value()&&this._trigger("change",n,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:n.map(t,function(t){return"string"==typeof t?{label:t,value:t}:n.extend({},t,{label:t.label||t.value,value:t.value||t.label})})},_suggest:function(t){var i=this.menu.element.empty();this._renderMenu(i,t);this.isNewMenu=!0;this.menu.refresh();i.show();this._resizeMenu();i.position(n.extend({"of":this.element},this.options.position));this.options.autoFocus&&this.menu.next();this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var n=this.menu.element;n.outerWidth(Math.max(n.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,i){var r=this;n.each(i,function(n,i){r._renderItemData(t,i)})},_renderItemData:function(n,t){return this._renderItem(n,t).data("ui-autocomplete-item",t)},_renderItem:function(t,i){return n("<li>").append(n("<div>").text(i.label)).appendTo(t)},_move:function(n,t){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(n)||this.menu.isLastItem()&&/^next/.test(n)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[n](t),void 0):(this.search(null,t),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(n,t){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(n,t),t.preventDefault())},_isContentEditable:function(n){if(!n.length)return!1;var t=n.prop("contentEditable");return"inherit"===t?this._isContentEditable(n.parent()):"true"===t}});n.extend(n.ui.autocomplete,{escapeRegex:function(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,i){var r=RegExp(n.ui.autocomplete.escapeRegex(i),"i");return n.grep(t,function(n){return r.test(n.label||n.value||n)})}});n.widget("ui.autocomplete",n.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(n){return n+(n>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var i;this._superApply(arguments);this.options.disabled||this.cancelSearch||(i=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.children().hide(),n("<div>").text(i).appendTo(this.liveRegion))}});n.ui.autocomplete;v=/ui-corner-([a-z]){2,6}/g;n.widget("ui.controlgroup",{version:"1.12.1",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar");this.refresh()},_destroy:function(){this._callChildMethod("destroy");this.childWidgets.removeData("ui-controlgroup-data");this.element.removeAttr("role");this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var t=this,i=[];n.each(this.options.items,function(r,u){var f,e={};if(u)return"controlgroupLabel"===r?(f=t.element.find(u),f.each(function(){var t=n(this);t.children(".ui-controlgroup-label-contents").length||t.contents().wrapAll("<span class='ui-controlgroup-label-contents'><\/span>")}),t._addClass(f,null,"ui-widget ui-widget-content ui-state-default"),i=i.concat(f.get()),void 0):(n.fn[r]&&(e=t["_"+r+"Options"]?t["_"+r+"Options"]("middle"):{classes:{}},t.element.find(u).each(function(){var u=n(this),f=u[r]("instance"),o=n.widget.extend({},e),s;"button"===r&&u.parent(".ui-spinner").length||(f||(f=u[r]()[r]("instance")),f&&(o.classes=t._resolveClassesValues(o.classes,f)),u[r](o),s=u[r]("widget"),n.data(s[0],"ui-controlgroup-data",f?f:u[r]("instance")),i.push(s[0]))})),void 0)});this.childWidgets=n(n.unique(i));this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(t){this.childWidgets.each(function(){var r=n(this),i=r.data("ui-controlgroup-data");i&&i[t]&&i[t]()})},_updateCornerClass:function(n,t){var i=this._buildSimpleOptions(t,"label").classes.label;this._removeClass(n,null,"ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all");this._addClass(n,null,i)},_buildSimpleOptions:function(n,t){var i="vertical"===this.options.direction,r={classes:{}};return r.classes[t]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[n],r},_spinnerOptions:function(n){var t=this._buildSimpleOptions(n,"ui-spinner");return t.classes["ui-spinner-up"]="",t.classes["ui-spinner-down"]="",t},_buttonOptions:function(n){return this._buildSimpleOptions(n,"ui-button")},_checkboxradioOptions:function(n){return this._buildSimpleOptions(n,"ui-checkboxradio-label")},_selectmenuOptions:function(n){var t="vertical"===this.options.direction;return{width:t?"auto":!1,classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(t?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(t?"top":"left")},last:{"ui-selectmenu-button-open":t?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(t?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[n]}},_resolveClassesValues:function(t,i){var r={};return n.each(t,function(u){var f=i.options.classes[u]||"";f=n.trim(f.replace(v,""));r[u]=(f+" "+t[u]).replace(/\s+/g," ")}),r},_setOption:function(n,t){return"direction"===n&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(n,t),"disabled"===n?(this._callChildMethod(t?"disable":"enable"),void 0):(this.refresh(),void 0)},refresh:function(){var t,i=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction);"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix");this._initWidgets();t=this.childWidgets;this.options.onlyVisible&&(t=t.filter(":visible"));t.length&&(n.each(["first","last"],function(n,r){var u=t[r]().data("ui-controlgroup-data"),f;u&&i["_"+u.widgetName+"Options"]?(f=i["_"+u.widgetName+"Options"](1===t.length?"only":r),f.classes=i._resolveClassesValues(f.classes,u),u.element[u.widgetName](f)):i._updateCornerClass(t[r](),r)}),this._callChildMethod("refresh"))}});n.widget("ui.checkboxradio",[n.ui.formResetMixin,{version:"1.12.1",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var t,i,u=this,r=this._super()||{};return this._readType(),i=this.element.labels(),this.label=n(i[i.length-1]),this.label.length||n.error("No label found for checkboxradio widget"),this.originalLabel="",this.label.contents().not(this.element[0]).each(function(){u.originalLabel+=3===this.nodeType?n(this).text():this.outerHTML}),this.originalLabel&&(r.label=this.originalLabel),t=this.element[0].disabled,null!=t&&(r.disabled=t),r},_create:function(){var n=this.element[0].checked;this._bindFormResetHandler();null==this.options.disabled&&(this.options.disabled=this.element[0].disabled);this._setOption("disabled",this.options.disabled);this._addClass("ui-checkboxradio","ui-helper-hidden-accessible");this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget");"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label");this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel);this._enhance();n&&(this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this.icon&&this._addClass(this.icon,null,"ui-state-hover"));this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var t=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type;"input"===t&&/radio|checkbox/.test(this.type)||n.error("Can't create checkboxradio on element.nodeName="+t+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var t,i=this.element[0].name,r="input[name='"+n.ui.escapeSelector(i)+"']";return i?(t=this.form.length?n(this.form[0].elements).filter(r):n(r).filter(function(){return 0===n(this).form().length}),t.not(this.element)):n([])},_toggleClasses:function(){var t=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t);this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",t)._toggleClass(this.icon,null,"ui-icon-blank",!t);"radio"===this.type&&this._getRadioGroup().each(function(){var t=n(this).checkboxradio("instance");t&&t._removeClass(t.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler();this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(n,t){if("label"!==n||t)return(this._super(n,t),"disabled"===n?(this._toggleClass(this.label,null,"ui-state-disabled",t),this.element[0].disabled=t,void 0):(this.refresh(),void 0))},_updateIcon:function(t){var i="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=n("<span>"),this.iconSpace=n("<span> <\/span>"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(i+=t?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,t?"ui-icon-blank":"ui-icon-check")):i+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",i),t||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var n=this.label.contents().not(this.element[0]);this.icon&&(n=n.not(this.icon[0]));this.iconSpace&&(n=n.not(this.iconSpace[0]));n.remove();this.label.append(this.options.label)},refresh:function(){var n=this.element[0].checked,t=this.element[0].disabled;this._updateIcon(n);this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",n);null!==this.options.label&&this._updateLabel();t!==this.options.disabled&&this._setOptions({disabled:t})}}]);n.ui.checkboxradio;n.widget("ui.button",{version:"1.12.1",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var n,t=this._super()||{};return this.isInput=this.element.is("input"),n=this.element[0].disabled,null!=n&&(t.disabled=n),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(t.label=this.originalLabel),t},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0);null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1);this.hasTitle=!!this.element.attr("title");this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label));this._addClass("ui-button","ui-widget");this._setOption("disabled",this.options.disabled);this._enhance();this.element.is("a")&&this._on({keyup:function(t){t.keyCode===n.ui.keyCode.SPACE&&(t.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button");this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title");this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(t,i){var u="iconPosition"!==t,r=u?this.options.iconPosition:i,f="top"===r||"bottom"===r;this.icon?u&&this._removeClass(this.icon,null,this.options.icon):(this.icon=n("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only"));u&&this._addClass(this.icon,null,i);this._attachIcon(r);f?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=n("<span> <\/span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(r))},_destroy:function(){this.element.removeAttr("role");this.icon&&this.icon.remove();this.iconSpace&&this.iconSpace.remove();this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(n){this.icon[/^(?:end|bottom)/.test(n)?"before":"after"](this.iconSpace)},_attachIcon:function(n){this.element[/^(?:end|bottom)/.test(n)?"append":"prepend"](this.icon)},_setOptions:function(n){var t=void 0===n.showLabel?this.options.showLabel:n.showLabel,i=void 0===n.icon?this.options.icon:n.icon;t||i||(n.showLabel=!0);this._super(n)},_setOption:function(n,t){"icon"===n&&(t?this._updateIcon(n,t):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove()));"iconPosition"===n&&this._updateIcon(n,t);"showLabel"===n&&(this._toggleClass("ui-button-icon-only",null,!t),this._updateTooltip());"label"===n&&(this.isInput?this.element.val(t):(this.element.html(t),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition))));this._super(n,t);"disabled"===n&&(this._toggleClass(null,"ui-state-disabled",t),this.element[0].disabled=t,t&&this.element.blur())},refresh:function(){var n=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");n!==this.options.disabled&&this._setOptions({disabled:n});this._updateTooltip()}});n.uiBackCompat!==!1&&(n.widget("ui.button",n.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text);!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel);this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end");this._super()},_setOption:function(n,t){return"text"===n?(this._super("showLabel",t),void 0):("showLabel"===n&&(this.options.text=t),"icon"===n&&(this.options.icons.primary=t),"icons"===n&&(t.primary?(this._super("icon",t.primary),this._super("iconPosition","beginning")):t.secondary&&(this._super("icon",t.secondary),this._super("iconPosition","end"))),this._superApply(arguments),void 0)}}),n.fn.button=function(t){return function(){return!this.length||this.length&&"INPUT"!==this[0].tagName||this.length&&"INPUT"===this[0].tagName&&"checkbox"!==this.attr("type")&&"radio"!==this.attr("type")?t.apply(this,arguments):(n.ui.checkboxradio||n.error("Checkboxradio widget missing"),0===arguments.length?this.checkboxradio({icon:!1}):this.checkboxradio.apply(this,arguments))}}(n.fn.button),n.fn.buttonset=function(){return n.ui.controlgroup||n.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))});n.ui.button;n.extend(n.ui,{datepicker:{version:"1.12.1"}});n.extend(h.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(n){return r(this._defaults,n||{}),this},_attachDatepicker:function(t,i){var r,f,u;r=t.nodeName.toLowerCase();f="div"===r||"span"===r;t.id||(this.uuid+=1,t.id="dp"+this.uuid);u=this._newInst(n(t),f);u.settings=n.extend({},i||{});"input"===r?this._connectDatepicker(t,u):f&&this._inlineDatepicker(t,u)},_newInst:function(t,i){var r=t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:r,input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?c(n("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'><\/div>")):this.dpDiv}},_connectDatepicker:function(t,i){var r=n(t);i.append=n([]);i.trigger=n([]);r.hasClass(this.markerClassName)||(this._attachments(r,i),r.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(i),n.data(t,"datepicker",i),i.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,i){var u,r,f,e=this._get(i,"appendText"),o=this._get(i,"isRTL");i.append&&i.append.remove();e&&(i.append=n("<span class='"+this._appendClass+"'>"+e+"<\/span>"),t[o?"before":"after"](i.append));t.off("focus",this._showDatepicker);i.trigger&&i.trigger.remove();u=this._get(i,"showOn");("focus"===u||"both"===u)&&t.on("focus",this._showDatepicker);("button"===u||"both"===u)&&(r=this._get(i,"buttonText"),f=this._get(i,"buttonImage"),i.trigger=n(this._get(i,"buttonImageOnly")?n("<img/>").addClass(this._triggerClass).attr({src:f,alt:r,title:r}):n("<button type='button'><\/button>").addClass(this._triggerClass).html(f?n("<img/>").attr({src:f,alt:r,title:r}):r)),t[o?"before":"after"](i.trigger),i.trigger.on("click",function(){return n.datepicker._datepickerShowing&&n.datepicker._lastInput===t[0]?n.datepicker._hideDatepicker():n.datepicker._datepickerShowing&&n.datepicker._lastInput!==t[0]?(n.datepicker._hideDatepicker(),n.datepicker._showDatepicker(t[0])):n.datepicker._showDatepicker(t[0]),!1}))},_autoSize:function(n){if(this._get(n,"autoSize")&&!n.inline){var r,u,f,t,i=new Date(2009,11,20),e=this._get(n,"dateFormat");e.match(/[DM]/)&&(r=function(n){for(u=0,f=0,t=0;n.length>t;t++)n[t].length>u&&(u=n[t].length,f=t);return f},i.setMonth(r(this._get(n,e.match(/MM/)?"monthNames":"monthNamesShort"))),i.setDate(r(this._get(n,e.match(/DD/)?"dayNames":"dayNamesShort"))+20-i.getDay()));n.input.attr("size",this._formatDate(n,i).length)}},_inlineDatepicker:function(t,i){var r=n(t);r.hasClass(this.markerClassName)||(r.addClass(this.markerClassName).append(i.dpDiv),n.data(t,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(t),i.dpDiv.css("display","block"))},_dialogDatepicker:function(t,i,u,f,e){var s,h,c,l,a,o=this._dialogInst;return o||(this.uuid+=1,s="dp"+this.uuid,this._dialogInput=n("<input type='text' id='"+s+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),n("body").append(this._dialogInput),o=this._dialogInst=this._newInst(this._dialogInput,!1),o.settings={},n.data(this._dialogInput[0],"datepicker",o)),r(o.settings,f||{}),i=i&&i.constructor===Date?this._formatDate(o,i):i,this._dialogInput.val(i),this._pos=e?e.length?e:[e.pageX,e.pageY]:null,this._pos||(h=document.documentElement.clientWidth,c=document.documentElement.clientHeight,l=document.documentElement.scrollLeft||document.body.scrollLeft,a=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[h/2-100+l,c/2-150+a]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),o.settings.onSelect=u,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),n.blockUI&&n.blockUI(this.dpDiv),n.data(this._dialogInput[0],"datepicker",o),this},_destroyDatepicker:function(i){var r,u=n(i),f=n.data(i,"datepicker");u.hasClass(this.markerClassName)&&(r=i.nodeName.toLowerCase(),n.removeData(i,"datepicker"),"input"===r?(f.append.remove(),f.trigger.remove(),u.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):("div"===r||"span"===r)&&u.removeClass(this.markerClassName).empty(),t===f&&(t=null))},_enableDatepicker:function(t){var i,r,u=n(t),f=n.data(t,"datepicker");u.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!1,f.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(r=u.children("."+this._inlineClass),r.children().removeClass("ui-state-disabled"),r.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=n.map(this._disabledInputs,function(n){return n===t?null:n}))},_disableDatepicker:function(t){var i,r,u=n(t),f=n.data(t,"datepicker");u.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!0,f.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(r=u.children("."+this._inlineClass),r.children().addClass("ui-state-disabled"),r.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=n.map(this._disabledInputs,function(n){return n===t?null:n}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(n){if(!n)return!1;for(var t=0;this._disabledInputs.length>t;t++)if(this._disabledInputs[t]===n)return!0;return!1},_getInst:function(t){try{return n.data(t,"datepicker")}catch(i){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(t,i,u){var e,h,o,s,f=this._getInst(t);return 2===arguments.length&&"string"==typeof i?"defaults"===i?n.extend({},n.datepicker._defaults):f?"all"===i?n.extend({},f.settings):this._get(f,i):null:(e=i||{},"string"==typeof i&&(e={},e[i]=u),f&&(this._curInst===f&&this._hideDatepicker(),h=this._getDateDatepicker(t,!0),o=this._getMinMaxDate(f,"min"),s=this._getMinMaxDate(f,"max"),r(f.settings,e),null!==o&&void 0!==e.dateFormat&&void 0===e.minDate&&(f.settings.minDate=this._formatDate(f,o)),null!==s&&void 0!==e.dateFormat&&void 0===e.maxDate&&(f.settings.maxDate=this._formatDate(f,s)),"disabled"in e&&(e.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments(n(t),f),this._autoSize(f),this._setDate(f,h),this._updateAlternate(f),this._updateDatepicker(f)),void 0)},_changeDatepicker:function(n,t,i){this._optionDatepicker(n,t,i)},_refreshDatepicker:function(n){var t=this._getInst(n);t&&this._updateDatepicker(t)},_setDateDatepicker:function(n,t){var i=this._getInst(n);i&&(this._setDate(i,t),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(n,t){var i=this._getInst(n);return i&&!i.inline&&this._setDateFromField(i,t),i?this._getDate(i):null},_doKeyDown:function(t){var u,e,f,i=n.datepicker._getInst(t.target),r=!0,o=i.dpDiv.is(".ui-datepicker-rtl");if(i._keyEvent=!0,n.datepicker._datepickerShowing)switch(t.keyCode){case 9:n.datepicker._hideDatepicker();r=!1;break;case 13:return f=n("td."+n.datepicker._dayOverClass+":not(."+n.datepicker._currentClass+")",i.dpDiv),f[0]&&n.datepicker._selectDay(t.target,i.selectedMonth,i.selectedYear,f[0]),u=n.datepicker._get(i,"onSelect"),u?(e=n.datepicker._formatDate(i),u.apply(i.input?i.input[0]:null,[e,i])):n.datepicker._hideDatepicker(),!1;case 27:n.datepicker._hideDatepicker();break;case 33:n.datepicker._adjustDate(t.target,t.ctrlKey?-n.datepicker._get(i,"stepBigMonths"):-n.datepicker._get(i,"stepMonths"),"M");break;case 34:n.datepicker._adjustDate(t.target,t.ctrlKey?+n.datepicker._get(i,"stepBigMonths"):+n.datepicker._get(i,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&n.datepicker._clearDate(t.target);r=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&n.datepicker._gotoToday(t.target);r=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&n.datepicker._adjustDate(t.target,o?1:-1,"D");r=t.ctrlKey||t.metaKey;t.originalEvent.altKey&&n.datepicker._adjustDate(t.target,t.ctrlKey?-n.datepicker._get(i,"stepBigMonths"):-n.datepicker._get(i,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&n.datepicker._adjustDate(t.target,-7,"D");r=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&n.datepicker._adjustDate(t.target,o?-1:1,"D");r=t.ctrlKey||t.metaKey;t.originalEvent.altKey&&n.datepicker._adjustDate(t.target,t.ctrlKey?+n.datepicker._get(i,"stepBigMonths"):+n.datepicker._get(i,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&n.datepicker._adjustDate(t.target,7,"D");r=t.ctrlKey||t.metaKey;break;default:r=!1}else 36===t.keyCode&&t.ctrlKey?n.datepicker._showDatepicker(this):r=!1;r&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var i,r,u=n.datepicker._getInst(t.target);if(n.datepicker._get(u,"constrainInput"))return(i=n.datepicker._possibleChars(n.datepicker._get(u,"dateFormat")),r=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||" ">r||!i||i.indexOf(r)>-1)},_doKeyUp:function(t){var r,i=n.datepicker._getInst(t.target);if(i.input.val()!==i.lastVal)try{r=n.datepicker.parseDate(n.datepicker._get(i,"dateFormat"),i.input?i.input.val():null,n.datepicker._getFormatConfig(i));r&&(n.datepicker._setDateFromField(i),n.datepicker._updateAlternate(i),n.datepicker._updateDatepicker(i))}catch(u){}return!0},_showDatepicker:function(t){if(t=t.target||t,"input"!==t.nodeName.toLowerCase()&&(t=n("input",t.parentNode)[0]),!n.datepicker._isDisabledDatepicker(t)&&n.datepicker._lastInput!==t){var i,o,s,u,f,e,h;i=n.datepicker._getInst(t);n.datepicker._curInst&&n.datepicker._curInst!==i&&(n.datepicker._curInst.dpDiv.stop(!0,!0),i&&n.datepicker._datepickerShowing&&n.datepicker._hideDatepicker(n.datepicker._curInst.input[0]));o=n.datepicker._get(i,"beforeShow");s=o?o.apply(t,[t,i]):{};s!==!1&&(r(i.settings,s),i.lastVal=null,n.datepicker._lastInput=t,n.datepicker._setDateFromField(i),n.datepicker._inDialog&&(t.value=""),n.datepicker._pos||(n.datepicker._pos=n.datepicker._findPos(t),n.datepicker._pos[1]+=t.offsetHeight),u=!1,n(t).parents().each(function(){return u|="fixed"===n(this).css("position"),!u}),f={left:n.datepicker._pos[0],top:n.datepicker._pos[1]},n.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),n.datepicker._updateDatepicker(i),f=n.datepicker._checkOffset(i,f,u),i.dpDiv.css({position:n.datepicker._inDialog&&n.blockUI?"static":u?"fixed":"absolute",display:"none",left:f.left+"px",top:f.top+"px"}),i.inline||(e=n.datepicker._get(i,"showAnim"),h=n.datepicker._get(i,"duration"),i.dpDiv.css("z-index",w(n(t))+1),n.datepicker._datepickerShowing=!0,n.effects&&n.effects.effect[e]?i.dpDiv.show(e,n.datepicker._get(i,"showOptions"),h):i.dpDiv[e||"show"](e?h:null),n.datepicker._shouldFocusInput(i)&&i.input.trigger("focus"),n.datepicker._curInst=i))}},_updateDatepicker:function(i){this.maxRows=4;t=i;i.dpDiv.empty().append(this._generateHTML(i));this._attachHandlers(i);var r,u=this._getNumberOfMonths(i),f=u[1],e=i.dpDiv.find("."+this._dayOverClass+" a");e.length>0&&l.apply(e.get(0));i.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");f>1&&i.dpDiv.addClass("ui-datepicker-multi-"+f).css("width",17*f+"em");i.dpDiv[(1!==u[0]||1!==u[1]?"add":"remove")+"Class"]("ui-datepicker-multi");i.dpDiv[(this._get(i,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");i===n.datepicker._curInst&&n.datepicker._datepickerShowing&&n.datepicker._shouldFocusInput(i)&&i.input.trigger("focus");i.yearshtml&&(r=i.yearshtml,setTimeout(function(){r===i.yearshtml&&i.yearshtml&&i.dpDiv.find("select.ui-datepicker-year:first").replaceWith(i.yearshtml);r=i.yearshtml=null},0))},_shouldFocusInput:function(n){return n.input&&n.input.is(":visible")&&!n.input.is(":disabled")&&!n.input.is(":focus")},_checkOffset:function(t,i,r){var u=t.dpDiv.outerWidth(),f=t.dpDiv.outerHeight(),h=t.input?t.input.outerWidth():0,o=t.input?t.input.outerHeight():0,e=document.documentElement.clientWidth+(r?0:n(document).scrollLeft()),s=document.documentElement.clientHeight+(r?0:n(document).scrollTop());return i.left-=this._get(t,"isRTL")?u-h:0,i.left-=r&&i.left===t.input.offset().left?n(document).scrollLeft():0,i.top-=r&&i.top===t.input.offset().top+o?n(document).scrollTop():0,i.left-=Math.min(i.left,i.left+u>e&&e>u?Math.abs(i.left+u-e):0),i.top-=Math.min(i.top,i.top+f>s&&s>f?Math.abs(f+o):0),i},_findPos:function(t){for(var i,r=this._getInst(t),u=this._get(r,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||n.expr.filters.hidden(t));)t=t[u?"previousSibling":"nextSibling"];return i=n(t).offset(),[i.left,i.top]},_hideDatepicker:function(t){var r,f,u,e,i=this._curInst;!i||t&&i!==n.data(t,"datepicker")||this._datepickerShowing&&(r=this._get(i,"showAnim"),f=this._get(i,"duration"),u=function(){n.datepicker._tidyDialog(i)},n.effects&&(n.effects.effect[r]||n.effects[r])?i.dpDiv.hide(r,n.datepicker._get(i,"showOptions"),f,u):i.dpDiv["slideDown"===r?"slideUp":"fadeIn"===r?"fadeOut":"hide"](r?f:null,u),r||u(),this._datepickerShowing=!1,e=this._get(i,"onClose"),e&&e.apply(i.input?i.input[0]:null,[i.input?i.input.val():"",i]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),n.blockUI&&(n.unblockUI(),n("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(n){n.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(n.datepicker._curInst){var i=n(t.target),r=n.datepicker._getInst(i[0]);(i[0].id===n.datepicker._mainDivId||0!==i.parents("#"+n.datepicker._mainDivId).length||i.hasClass(n.datepicker.markerClassName)||i.closest("."+n.datepicker._triggerClass).length||!n.datepicker._datepickerShowing||n.datepicker._inDialog&&n.blockUI)&&(!i.hasClass(n.datepicker.markerClassName)||n.datepicker._curInst===r)||n.datepicker._hideDatepicker()}},_adjustDate:function(t,i,r){var f=n(t),u=this._getInst(f[0]);this._isDisabledDatepicker(f[0])||(this._adjustInstDate(u,i+("M"===r?this._get(u,"showCurrentAtPos"):0),r),this._updateDatepicker(u))},_gotoToday:function(t){var r,u=n(t),i=this._getInst(u[0]);this._get(i,"gotoCurrent")&&i.currentDay?(i.selectedDay=i.currentDay,i.drawMonth=i.selectedMonth=i.currentMonth,i.drawYear=i.selectedYear=i.currentYear):(r=new Date,i.selectedDay=r.getDate(),i.drawMonth=i.selectedMonth=r.getMonth(),i.drawYear=i.selectedYear=r.getFullYear());this._notifyChange(i);this._adjustDate(u)},_selectMonthYear:function(t,i,r){var f=n(t),u=this._getInst(f[0]);u["selected"+("M"===r?"Month":"Year")]=u["draw"+("M"===r?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10);this._notifyChange(u);this._adjustDate(f)},_selectDay:function(t,i,r,u){var f,e=n(t);n(u).hasClass(this._unselectableClass)||this._isDisabledDatepicker(e[0])||(f=this._getInst(e[0]),f.selectedDay=f.currentDay=n("a",u).html(),f.selectedMonth=f.currentMonth=i,f.selectedYear=f.currentYear=r,this._selectDate(t,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear)))},_clearDate:function(t){var i=n(t);this._selectDate(i,"")},_selectDate:function(t,i){var u,f=n(t),r=this._getInst(f[0]);i=null!=i?i:this._formatDate(r);r.input&&r.input.val(i);this._updateAlternate(r);u=this._get(r,"onSelect");u?u.apply(r.input?r.input[0]:null,[i,r]):r.input&&r.input.trigger("change");r.inline?this._updateDatepicker(r):(this._hideDatepicker(),this._lastInput=r.input[0],"object"!=typeof r.input[0]&&r.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(t){var i,r,u,f=this._get(t,"altField");f&&(i=this._get(t,"altFormat")||this._get(t,"dateFormat"),r=this._getDate(t),u=this.formatDate(i,r,this._getFormatConfig(t)),n(f).val(u))},noWeekends:function(n){var t=n.getDay();return[t>0&&6>t,""]},iso8601Week:function(n){var i,t=new Date(n.getTime());return t.setDate(t.getDate()+4-(t.getDay()||7)),i=t.getTime(),t.setMonth(0),t.setDate(1),Math.floor(Math.round((i-t)/864e5)/7)+1},parseDate:function(t,i,r){if(null==t||null==i)throw"Invalid arguments";if(i="object"==typeof i?""+i:i+"",""===i)return null;for(var a,v,u,f=0,y=(r?r.shortYearCutoff:null)||this._defaults.shortYearCutoff,d="string"!=typeof y?y:(new Date).getFullYear()%100+parseInt(y,10),g=(r?r.dayNamesShort:null)||this._defaults.dayNamesShort,nt=(r?r.dayNames:null)||this._defaults.dayNames,tt=(r?r.monthNamesShort:null)||this._defaults.monthNamesShort,it=(r?r.monthNames:null)||this._defaults.monthNames,e=-1,s=-1,h=-1,p=-1,w=!1,l=function(n){var i=t.length>o+1&&t.charAt(o+1)===n;return i&&o++,i},c=function(n){var u=l(n),r="@"===n?14:"!"===n?20:"y"===n&&u?4:"o"===n?3:2,e="y"===n?r:1,o=RegExp("^\\d{"+e+","+r+"}"),t=i.substring(f).match(o);if(!t)throw"Missing number at position "+f;return f+=t[0].length,parseInt(t[0],10)},k=function(t,r,u){var e=-1,o=n.map(l(t)?u:r,function(n,t){return[[t,n]]}).sort(function(n,t){return-(n[1].length-t[1].length)});if(n.each(o,function(n,t){var r=t[1];if(i.substr(f,r.length).toLowerCase()===r.toLowerCase())return(e=t[0],f+=r.length,!1)}),-1!==e)return e+1;throw"Unknown name at position "+f;},b=function(){if(i.charAt(f)!==t.charAt(o))throw"Unexpected literal at position "+f;f++},o=0;t.length>o;o++)if(w)"'"!==t.charAt(o)||l("'")?b():w=!1;else switch(t.charAt(o)){case"d":h=c("d");break;case"D":k("D",g,nt);break;case"o":p=c("o");break;case"m":s=c("m");break;case"M":s=k("M",tt,it);break;case"y":e=c("y");break;case"@":u=new Date(c("@"));e=u.getFullYear();s=u.getMonth()+1;h=u.getDate();break;case"!":u=new Date((c("!")-this._ticksTo1970)/1e4);e=u.getFullYear();s=u.getMonth()+1;h=u.getDate();break;case"'":l("'")?b():w=!0;break;default:b()}if(i.length>f&&(v=i.substr(f),!/^\s+/.test(v)))throw"Extra/unparsed characters found in date: "+v;if(-1===e?e=(new Date).getFullYear():100>e&&(e+=(new Date).getFullYear()-(new Date).getFullYear()%100+(d>=e?0:-100)),p>-1)for(s=1,h=p;;){if(a=this._getDaysInMonth(e,s-1),a>=h)break;s++;h-=a}if(u=this._daylightSavingAdjust(new Date(e,s-1,h)),u.getFullYear()!==e||u.getMonth()+1!==s||u.getDate()!==h)throw"Invalid date";return u},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:864e9*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(n,t,i){if(!t)return"";var u,h=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,c=(i?i.dayNames:null)||this._defaults.dayNames,l=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,a=(i?i.monthNames:null)||this._defaults.monthNames,f=function(t){var i=n.length>u+1&&n.charAt(u+1)===t;return i&&u++,i},e=function(n,t,i){var r=""+t;if(f(n))for(;i>r.length;)r="0"+r;return r},s=function(n,t,i,r){return f(n)?r[t]:i[t]},r="",o=!1;if(t)for(u=0;n.length>u;u++)if(o)"'"!==n.charAt(u)||f("'")?r+=n.charAt(u):o=!1;else switch(n.charAt(u)){case"d":r+=e("d",t.getDate(),2);break;case"D":r+=s("D",t.getDay(),h,c);break;case"o":r+=e("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":r+=e("m",t.getMonth()+1,2);break;case"M":r+=s("M",t.getMonth(),l,a);break;case"y":r+=f("y")?t.getFullYear():(10>t.getFullYear()%100?"0":"")+t.getFullYear()%100;break;case"@":r+=t.getTime();break;case"!":r+=1e4*t.getTime()+this._ticksTo1970;break;case"'":f("'")?r+="'":o=!0;break;default:r+=n.charAt(u)}return r},_possibleChars:function(n){for(var i="",r=!1,u=function(i){var r=n.length>t+1&&n.charAt(t+1)===i;return r&&t++,r},t=0;n.length>t;t++)if(r)"'"!==n.charAt(t)||u("'")?i+=n.charAt(t):r=!1;else switch(n.charAt(t)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":u("'")?i+="'":r=!0;break;default:i+=n.charAt(t)}return i},_get:function(n,t){return void 0!==n.settings[t]?n.settings[t]:this._defaults[t]},_setDateFromField:function(n,t){if(n.input.val()!==n.lastVal){var f=this._get(n,"dateFormat"),r=n.lastVal=n.input?n.input.val():null,u=this._getDefaultDate(n),i=u,e=this._getFormatConfig(n);try{i=this.parseDate(f,r,e)||u}catch(o){r=t?"":r}n.selectedDay=i.getDate();n.drawMonth=n.selectedMonth=i.getMonth();n.drawYear=n.selectedYear=i.getFullYear();n.currentDay=r?i.getDate():0;n.currentMonth=r?i.getMonth():0;n.currentYear=r?i.getFullYear():0;this._adjustInstDate(n)}},_getDefaultDate:function(n){return this._restrictMinMax(n,this._determineDate(n,this._get(n,"defaultDate"),new Date))},_determineDate:function(t,i,r){var f=function(n){var t=new Date;return t.setDate(t.getDate()+n),t},e=function(i){try{return n.datepicker.parseDate(n.datepicker._get(t,"dateFormat"),i,n.datepicker._getFormatConfig(t))}catch(h){}for(var o=(i.toLowerCase().match(/^c/)?n.datepicker._getDate(t):null)||new Date,f=o.getFullYear(),e=o.getMonth(),r=o.getDate(),s=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,u=s.exec(i);u;){switch(u[2]||"d"){case"d":case"D":r+=parseInt(u[1],10);break;case"w":case"W":r+=7*parseInt(u[1],10);break;case"m":case"M":e+=parseInt(u[1],10);r=Math.min(r,n.datepicker._getDaysInMonth(f,e));break;case"y":case"Y":f+=parseInt(u[1],10);r=Math.min(r,n.datepicker._getDaysInMonth(f,e))}u=s.exec(i)}return new Date(f,e,r)},u=null==i||""===i?r:"string"==typeof i?e(i):"number"==typeof i?isNaN(i)?r:f(i):new Date(i.getTime());return u=u&&"Invalid Date"==""+u?r:u,u&&(u.setHours(0),u.setMinutes(0),u.setSeconds(0),u.setMilliseconds(0)),this._daylightSavingAdjust(u)},_daylightSavingAdjust:function(n){return n?(n.setHours(n.getHours()>12?n.getHours()+2:0),n):null},_setDate:function(n,t,i){var u=!t,f=n.selectedMonth,e=n.selectedYear,r=this._restrictMinMax(n,this._determineDate(n,t,new Date));n.selectedDay=n.currentDay=r.getDate();n.drawMonth=n.selectedMonth=n.currentMonth=r.getMonth();n.drawYear=n.selectedYear=n.currentYear=r.getFullYear();f===n.selectedMonth&&e===n.selectedYear||i||this._notifyChange(n);this._adjustInstDate(n);n.input&&n.input.val(u?"":this._formatDate(n))},_getDate:function(n){return!n.currentYear||n.input&&""===n.input.val()?null:this._daylightSavingAdjust(new Date(n.currentYear,n.currentMonth,n.currentDay))},_attachHandlers:function(t){var r=this._get(t,"stepMonths"),i="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){n.datepicker._adjustDate(i,-r,"M")},next:function(){n.datepicker._adjustDate(i,+r,"M")},hide:function(){n.datepicker._hideDatepicker()},today:function(){n.datepicker._gotoToday(i)},selectDay:function(){return n.datepicker._selectDay(i,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return n.datepicker._selectMonthYear(i,this,"M"),!1},selectYear:function(){return n.datepicker._selectMonthYear(i,this,"Y"),!1}};n(this).on(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(n){var b,s,rt,h,ut,k,ft,et,ri,c,ot,ui,fi,ei,oi,st,g,si,ht,nt,o,y,ct,p,lt,l,u,at,vt,yt,pt,tt,wt,i,bt,kt,d,a,it,dt=new Date,gt=this._daylightSavingAdjust(new Date(dt.getFullYear(),dt.getMonth(),dt.getDate())),f=this._get(n,"isRTL"),li=this._get(n,"showButtonPanel"),hi=this._get(n,"hideIfNoPrevNext"),ni=this._get(n,"navigationAsDateFormat"),e=this._getNumberOfMonths(n),ai=this._get(n,"showCurrentAtPos"),ci=this._get(n,"stepMonths"),ti=1!==e[0]||1!==e[1],ii=this._daylightSavingAdjust(n.currentDay?new Date(n.currentYear,n.currentMonth,n.currentDay):new Date(9999,9,9)),w=this._getMinMaxDate(n,"min"),v=this._getMinMaxDate(n,"max"),t=n.drawMonth-ai,r=n.drawYear;if(0>t&&(t+=12,r--),v)for(b=this._daylightSavingAdjust(new Date(v.getFullYear(),v.getMonth()-e[0]*e[1]+1,v.getDate())),b=w&&w>b?w:b;this._daylightSavingAdjust(new Date(r,t,1))>b;)t--,0>t&&(t=11,r--);for(n.drawMonth=t,n.drawYear=r,s=this._get(n,"prevText"),s=ni?this.formatDate(s,this._daylightSavingAdjust(new Date(r,t-ci,1)),this._getFormatConfig(n)):s,rt=this._canAdjustMonth(n,-1,r,t)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(f?"e":"w")+"'>"+s+"<\/span><\/a>":hi?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(f?"e":"w")+"'>"+s+"<\/span><\/a>",h=this._get(n,"nextText"),h=ni?this.formatDate(h,this._daylightSavingAdjust(new Date(r,t+ci,1)),this._getFormatConfig(n)):h,ut=this._canAdjustMonth(n,1,r,t)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+h+"'><span class='ui-icon ui-icon-circle-triangle-"+(f?"w":"e")+"'>"+h+"<\/span><\/a>":hi?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+h+"'><span class='ui-icon ui-icon-circle-triangle-"+(f?"w":"e")+"'>"+h+"<\/span><\/a>",k=this._get(n,"currentText"),ft=this._get(n,"gotoCurrent")&&n.currentDay?ii:gt,k=ni?this.formatDate(k,ft,this._getFormatConfig(n)):k,et=n.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(n,"closeText")+"<\/button>",ri=li?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(f?et:"")+(this._isInRange(n,ft)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+k+"<\/button>":"")+(f?"":et)+"<\/div>":"",c=parseInt(this._get(n,"firstDay"),10),c=isNaN(c)?0:c,ot=this._get(n,"showWeek"),ui=this._get(n,"dayNames"),fi=this._get(n,"dayNamesMin"),ei=this._get(n,"monthNames"),oi=this._get(n,"monthNamesShort"),st=this._get(n,"beforeShowDay"),g=this._get(n,"showOtherMonths"),si=this._get(n,"selectOtherMonths"),ht=this._getDefaultDate(n),nt="",y=0;e[0]>y;y++){for(ct="",this.maxRows=4,p=0;e[1]>p;p++){if(lt=this._daylightSavingAdjust(new Date(r,t,n.selectedDay)),l=" ui-corner-all",u="",ti){if(u+="<div class='ui-datepicker-group",e[1]>1)switch(p){case 0:u+=" ui-datepicker-group-first";l=" ui-corner-"+(f?"right":"left");break;case e[1]-1:u+=" ui-datepicker-group-last";l=" ui-corner-"+(f?"left":"right");break;default:u+=" ui-datepicker-group-middle";l=""}u+="'>"}for(u+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+l+"'>"+(/all|left/.test(l)&&0===y?f?ut:rt:"")+(/all|right/.test(l)&&0===y?f?rt:ut:"")+this._generateMonthYearHeader(n,t,r,w,v,y>0||p>0,ei,oi)+"<\/div><table class='ui-datepicker-calendar'><thead><tr>",at=ot?"<th class='ui-datepicker-week-col'>"+this._get(n,"weekHeader")+"<\/th>":"",o=0;7>o;o++)vt=(o+c)%7,at+="<th scope='col'"+((o+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+ui[vt]+"'>"+fi[vt]+"<\/span><\/th>";for(u+=at+"<\/tr><\/thead><tbody>",yt=this._getDaysInMonth(r,t),r===n.selectedYear&&t===n.selectedMonth&&(n.selectedDay=Math.min(n.selectedDay,yt)),pt=(this._getFirstDayOfMonth(r,t)-c+7)%7,tt=Math.ceil((pt+yt)/7),wt=ti?this.maxRows>tt?this.maxRows:tt:tt,this.maxRows=wt,i=this._daylightSavingAdjust(new Date(r,t,1-pt)),bt=0;wt>bt;bt++){for(u+="<tr>",kt=ot?"<td class='ui-datepicker-week-col'>"+this._get(n,"calculateWeek")(i)+"<\/td>":"",o=0;7>o;o++)d=st?st.apply(n.input?n.input[0]:null,[i]):[!0,""],a=i.getMonth()!==t,it=a&&!si||!d[0]||w&&w>i||v&&i>v,kt+="<td class='"+((o+c+6)%7>=5?" ui-datepicker-week-end":"")+(a?" ui-datepicker-other-month":"")+(i.getTime()===lt.getTime()&&t===n.selectedMonth&&n._keyEvent||ht.getTime()===i.getTime()&&ht.getTime()===lt.getTime()?" "+this._dayOverClass:"")+(it?" "+this._unselectableClass+" ui-state-disabled":"")+(a&&!g?"":" "+d[1]+(i.getTime()===ii.getTime()?" "+this._currentClass:"")+(i.getTime()===gt.getTime()?" ui-datepicker-today":""))+"'"+(a&&!g||!d[2]?"":" title='"+d[2].replace(/'/g,"&#39;")+"'")+(it?"":" data-handler='selectDay' data-event='click' data-month='"+i.getMonth()+"' data-year='"+i.getFullYear()+"'")+">"+(a&&!g?"&#xa0;":it?"<span class='ui-state-default'>"+i.getDate()+"<\/span>":"<a class='ui-state-default"+(i.getTime()===gt.getTime()?" ui-state-highlight":"")+(i.getTime()===ii.getTime()?" ui-state-active":"")+(a?" ui-priority-secondary":"")+"' href='#'>"+i.getDate()+"<\/a>")+"<\/td>",i.setDate(i.getDate()+1),i=this._daylightSavingAdjust(i);u+=kt+"<\/tr>"}t++;t>11&&(t=0,r++);u+="<\/tbody><\/table>"+(ti?"<\/div>"+(e[0]>0&&p===e[1]-1?"<div class='ui-datepicker-row-break'><\/div>":""):"");ct+=u}nt+=ct}return nt+=ri,n._keyEvent=!1,nt},_generateMonthYearHeader:function(n,t,i,r,u,f,e,o){var k,d,h,v,y,p,s,a,w=this._get(n,"changeMonth"),b=this._get(n,"changeYear"),g=this._get(n,"showMonthAfterYear"),c="<div class='ui-datepicker-title'>",l="";if(f||!w)l+="<span class='ui-datepicker-month'>"+e[t]+"<\/span>";else{for(k=r&&r.getFullYear()===i,d=u&&u.getFullYear()===i,l+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",h=0;12>h;h++)(!k||h>=r.getMonth())&&(!d||u.getMonth()>=h)&&(l+="<option value='"+h+"'"+(h===t?" selected='selected'":"")+">"+o[h]+"<\/option>");l+="<\/select>"}if(g||(c+=l+(!f&&w&&b?"":"&#xa0;")),!n.yearshtml)if(n.yearshtml="",f||!b)c+="<span class='ui-datepicker-year'>"+i+"<\/span>";else{for(v=this._get(n,"yearRange").split(":"),y=(new Date).getFullYear(),p=function(n){var t=n.match(/c[+\-].*/)?i+parseInt(n.substring(1),10):n.match(/[+\-].*/)?y+parseInt(n,10):parseInt(n,10);return isNaN(t)?y:t},s=p(v[0]),a=Math.max(s,p(v[1]||"")),s=r?Math.max(s,r.getFullYear()):s,a=u?Math.min(a,u.getFullYear()):a,n.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";a>=s;s++)n.yearshtml+="<option value='"+s+"'"+(s===i?" selected='selected'":"")+">"+s+"<\/option>";n.yearshtml+="<\/select>";c+=n.yearshtml;n.yearshtml=null}return c+=this._get(n,"yearSuffix"),g&&(c+=(!f&&w&&b?"":"&#xa0;")+l),c+"<\/div>"},_adjustInstDate:function(n,t,i){var u=n.selectedYear+("Y"===i?t:0),f=n.selectedMonth+("M"===i?t:0),e=Math.min(n.selectedDay,this._getDaysInMonth(u,f))+("D"===i?t:0),r=this._restrictMinMax(n,this._daylightSavingAdjust(new Date(u,f,e)));n.selectedDay=r.getDate();n.drawMonth=n.selectedMonth=r.getMonth();n.drawYear=n.selectedYear=r.getFullYear();("M"===i||"Y"===i)&&this._notifyChange(n)},_restrictMinMax:function(n,t){var i=this._getMinMaxDate(n,"min"),r=this._getMinMaxDate(n,"max"),u=i&&i>t?i:t;return r&&u>r?r:u},_notifyChange:function(n){var t=this._get(n,"onChangeMonthYear");t&&t.apply(n.input?n.input[0]:null,[n.selectedYear,n.selectedMonth+1,n])},_getNumberOfMonths:function(n){var t=this._get(n,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(n,t){return this._determineDate(n,this._get(n,t+"Date"),null)},_getDaysInMonth:function(n,t){return 32-this._daylightSavingAdjust(new Date(n,t,32)).getDate()},_getFirstDayOfMonth:function(n,t){return new Date(n,t,1).getDay()},_canAdjustMonth:function(n,t,i,r){var f=this._getNumberOfMonths(n),u=this._daylightSavingAdjust(new Date(i,r+(0>t?t:f[0]*f[1]),1));return 0>t&&u.setDate(this._getDaysInMonth(u.getFullYear(),u.getMonth())),this._isInRange(n,u)},_isInRange:function(n,t){var i,f,e=this._getMinMaxDate(n,"min"),o=this._getMinMaxDate(n,"max"),r=null,u=null,s=this._get(n,"yearRange");return s&&(i=s.split(":"),f=(new Date).getFullYear(),r=parseInt(i[0],10),u=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(r+=f),i[1].match(/[+\-].*/)&&(u+=f)),(!e||t.getTime()>=e.getTime())&&(!o||t.getTime()<=o.getTime())&&(!r||t.getFullYear()>=r)&&(!u||u>=t.getFullYear())},_getFormatConfig:function(n){var t=this._get(n,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(n,"dayNamesShort"),dayNames:this._get(n,"dayNames"),monthNamesShort:this._get(n,"monthNamesShort"),monthNames:this._get(n,"monthNames")}},_formatDate:function(n,t,i,r){t||(n.currentDay=n.selectedDay,n.currentMonth=n.selectedMonth,n.currentYear=n.selectedYear);var u=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(r,i,t)):this._daylightSavingAdjust(new Date(n.currentYear,n.currentMonth,n.currentDay));return this.formatDate(this._get(n,"dateFormat"),u,this._getFormatConfig(n))}});n.fn.datepicker=function(t){if(!this.length)return this;n.datepicker.initialized||(n(document).on("mousedown",n.datepicker._checkExternalClick),n.datepicker.initialized=!0);0===n("#"+n.datepicker._mainDivId).length&&n("body").append(n.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?n.datepicker["_"+t+"Datepicker"].apply(n.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof t?n.datepicker["_"+t+"Datepicker"].apply(n.datepicker,[this].concat(i)):n.datepicker._attachDatepicker(this,t)}):n.datepicker["_"+t+"Datepicker"].apply(n.datepicker,[this[0]].concat(i))};n.datepicker=new h;n.datepicker.initialized=!1;n.datepicker.uuid=(new Date).getTime();n.datepicker.version="1.12.1";n.datepicker;n.widget("ui.dialog",{version:"1.12.1",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center","of":window,collision:"fit",using:function(t){var i=n(this).css(t).offset().top;0>i&&n(this).css("top",t.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height};this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)};this.originalTitle=this.element.attr("title");null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle);this.options.disabled&&(this.options.disabled=!1);this._createWrapper();this.element.show().removeAttr("title").appendTo(this.uiDialog);this._addClass("ui-dialog-content","ui-widget-content");this._createTitlebar();this._createButtonPane();this.options.draggable&&n.fn.draggable&&this._makeDraggable();this.options.resizable&&n.fn.resizable&&this._makeResizable();this._isOpen=!1;this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?n(t):this.document.find(t||"body").eq(0)},_destroy:function(){var n,t=this.originalPosition;this._untrackInstance();this._destroyOverlay();this.element.removeUniqueId().css(this.originalCss).detach();this.uiDialog.remove();this.originalTitle&&this.element.attr("title",this.originalTitle);n=t.parent.children().eq(t.index);n.length&&n[0]!==this.element[0]?n.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},disable:n.noop,enable:n.noop,close:function(t){var i=this;this._isOpen&&this._trigger("beforeClose",t)!==!1&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||n.ui.safeBlur(n.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",t)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,i){var r=!1,f=this.uiDialog.siblings(".ui-front:visible").map(function(){return+n(this).css("z-index")}).get(),u=Math.max.apply(null,f);return u>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",u+1),r=!0),r&&!i&&this._trigger("focus",t),r},open:function(){var t=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),void 0):(this._isOpen=!0,this.opener=n(n.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable();t._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"),void 0)},_focusTabbable:function(){var n=this._focusedElement;n||(n=this.element.find("[autofocus]"));n.length||(n=this.element.find(":tabbable"));n.length||(n=this.uiDialogButtonPane.find(":tabbable"));n.length||(n=this.uiDialogTitlebarClose.filter(":tabbable"));n.length||(n=this.uiDialog);n.eq(0).trigger("focus")},_keepFocus:function(t){function i(){var t=n.ui.safeActiveElement(this.document[0]),i=this.uiDialog[0]===t||n.contains(this.uiDialog[0],t);i||this._focusTabbable()}t.preventDefault();i.call(this);this._delay(i)},_createWrapper:function(){this.uiDialog=n("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo());this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front");this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===n.ui.keyCode.ESCAPE)return t.preventDefault(),this.close(t),void 0;if(t.keyCode===n.ui.keyCode.TAB&&!t.isDefaultPrevented()){var i=this.uiDialog.find(":tabbable"),r=i.filter(":first"),u=i.filter(":last");t.target!==u[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==r[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(this._delay(function(){u.trigger("focus")}),t.preventDefault()):(this._delay(function(){r.trigger("focus")}),t.preventDefault())}},mousedown:function(n){this._moveToTop(n)&&this._focusTabbable()}});this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=n("<div>");this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix");this._on(this.uiDialogTitlebar,{mousedown:function(t){n(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}});this.uiDialogTitlebarClose=n("<button type='button'><\/button>").button({label:n("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar);this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close");this._on(this.uiDialogTitlebarClose,{click:function(n){n.preventDefault();this.close(n)}});t=n("<span>").uniqueId().prependTo(this.uiDialogTitlebar);this._addClass(t,"ui-dialog-title");this._title(t);this.uiDialogTitlebar.prependTo(this.uiDialog);this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(n){this.options.title?n.text(this.options.title):n.html("&#160;")},_createButtonPane:function(){this.uiDialogButtonPane=n("<div>");this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix");this.uiButtonSet=n("<div>").appendTo(this.uiDialogButtonPane);this._addClass(this.uiButtonSet,"ui-dialog-buttonset");this._createButtons()},_createButtons:function(){var i=this,t=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),n.isEmptyObject(t)||n.isArray(t)&&!t.length?(this._removeClass(this.uiDialog,"ui-dialog-buttons"),void 0):(n.each(t,function(t,r){var u,f;r=n.isFunction(r)?{click:r,text:t}:r;r=n.extend({type:"button"},r);u=r.click;f={icon:r.icon,iconPosition:r.iconPosition,showLabel:r.showLabel,icons:r.icons,text:r.text};delete r.click;delete r.icon;delete r.iconPosition;delete r.showLabel;delete r.icons;"boolean"==typeof r.text&&delete r.text;n("<button><\/button>",r).button(f).appendTo(i.uiButtonSet).on("click",function(){u.apply(i.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),void 0)},_makeDraggable:function(){function i(n){return{position:n.position,offset:n.offset}}var t=this,r=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(r,u){t._addClass(n(this),"ui-dialog-dragging");t._blockFrames();t._trigger("dragStart",r,i(u))},drag:function(n,r){t._trigger("drag",n,i(r))},stop:function(u,f){var e=f.offset.left-t.document.scrollLeft(),o=f.offset.top-t.document.scrollTop();r.position={my:"left top",at:"left"+(e>=0?"+":"")+e+" top"+(o>=0?"+":"")+o,"of":t.window};t._removeClass(n(this),"ui-dialog-dragging");t._unblockFrames();t._trigger("dragStop",u,i(f))}})},_makeResizable:function(){function r(n){return{originalPosition:n.originalPosition,originalSize:n.originalSize,position:n.position,size:n.size}}var t=this,i=this.options,u=i.resizable,f=this.uiDialog.css("position"),e="string"==typeof u?u:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:i.maxWidth,maxHeight:i.maxHeight,minWidth:i.minWidth,minHeight:this._minHeight(),handles:e,start:function(i,u){t._addClass(n(this),"ui-dialog-resizing");t._blockFrames();t._trigger("resizeStart",i,r(u))},resize:function(n,i){t._trigger("resize",n,r(i))},stop:function(u,f){var e=t.uiDialog.offset(),o=e.left-t.document.scrollLeft(),s=e.top-t.document.scrollTop();i.height=t.uiDialog.height();i.width=t.uiDialog.width();i.position={my:"left top",at:"left"+(o>=0?"+":"")+o+" top"+(s>=0?"+":"")+s,"of":t.window};t._removeClass(n(this),"ui-dialog-resizing");t._unblockFrames();t._trigger("resizeStop",u,r(f))}}).css("position",f)},_trackFocus:function(){this._on(this.widget(),{focusin:function(t){this._makeFocusTarget();this._focusedElement=n(t.target)}})},_makeFocusTarget:function(){this._untrackInstance();this._trackingInstances().unshift(this)},_untrackInstance:function(){var t=this._trackingInstances(),i=n.inArray(this,t);-1!==i&&t.splice(i,1)},_trackingInstances:function(){var n=this.document.data("ui-dialog-instances");return n||(n=[],this.document.data("ui-dialog-instances",n)),n},_minHeight:function(){var n=this.options;return"auto"===n.height?n.minHeight:Math.min(n.minHeight,n.height)},_position:function(){var n=this.uiDialog.is(":visible");n||this.uiDialog.show();this.uiDialog.position(this.options.position);n||this.uiDialog.hide()},_setOptions:function(t){var i=this,r=!1,u={};n.each(t,function(n,t){i._setOption(n,t);n in i.sizeRelatedOptions&&(r=!0);n in i.resizableRelatedOptions&&(u[n]=t)});r&&(this._size(),this._position());this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",u)},_setOption:function(t,i){var f,u,r=this.uiDialog;"disabled"!==t&&(this._super(t,i),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:n("<a>").text(""+this.options.closeText).html()}),"draggable"===t&&(f=r.is(":data(ui-draggable)"),f&&!i&&r.draggable("destroy"),!f&&i&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&(u=r.is(":data(ui-resizable)"),u&&!i&&r.resizable("destroy"),u&&"string"==typeof i&&r.resizable("option","handles",i),u||i===!1||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,i,r,n=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0});n.minWidth>n.width&&(n.width=n.minWidth);t=this.uiDialog.css({height:"auto",width:n.width}).outerHeight();i=Math.max(0,n.minHeight-t);r="number"==typeof n.maxHeight?Math.max(0,n.maxHeight-t):"none";"auto"===n.height?this.element.css({minHeight:i,maxHeight:r,height:"auto"}):this.element.height(Math.max(0,n.height-t));this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=n(this);return n("<div>").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return n(t.target).closest(".ui-dialog").length?!0:!!n(t.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var t=!0;this._delay(function(){t=!1});this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(n){t||this._allowInteraction(n)||(n.preventDefault(),this._trackingInstances()[0]._focusTabbable())}});this.overlay=n("<div>").appendTo(this._appendTo());this._addClass(this.overlay,null,"ui-widget-overlay ui-front");this._on(this.overlay,{mousedown:"_keepFocus"});this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var n=this.document.data("ui-dialog-overlays")-1;n?this.document.data("ui-dialog-overlays",n):(this._off(this.document,"focusin"),this.document.removeData("ui-dialog-overlays"));this.overlay.remove();this.overlay=null}}});n.uiBackCompat!==!1&&n.widget("ui.dialog",n.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super();this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(n,t){"dialogClass"===n&&this.uiDialog.removeClass(this.options.dialogClass).addClass(t);this._superApply(arguments)}});n.ui.dialog;n.widget("ui.tabs",{version:"1.12.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var n=/#.*$/;return function(t){var i,r;i=t.href.replace(n,"");r=location.href.replace(n,"");try{i=decodeURIComponent(i)}catch(u){}try{r=decodeURIComponent(r)}catch(u){}return t.hash.length>1&&i===r}}(),_create:function(){var i=this,t=this.options;this.running=!1;this._addClass("ui-tabs","ui-widget ui-widget-content");this._toggleClass("ui-tabs-collapsible",null,t.collapsible);this._processTabs();t.active=this._initialActive();n.isArray(t.disabled)&&(t.disabled=n.unique(t.disabled.concat(n.map(this.tabs.filter(".ui-state-disabled"),function(n){return i.tabs.index(n)}))).sort());this.active=this.options.active!==!1&&this.anchors.length?this._findActive(t.active):n();this._refresh();this.active.length&&this.load(t.active)},_initialActive:function(){var t=this.options.active,i=this.options.collapsible,r=location.hash.substring(1);return null===t&&(r&&this.tabs.each(function(i,u){if(n(u).attr("aria-controls")===r)return(t=i,!1)}),null===t&&(t=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===t||-1===t)&&(t=this.tabs.length?0:!1)),t!==!1&&(t=this.tabs.index(this.tabs.eq(t)),-1===t&&(t=i?!1:0)),!i&&t===!1&&this.anchors.length&&(t=0),t},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):n()}},_tabKeydown:function(t){var r=n(n.ui.safeActiveElement(this.document[0])).closest("li"),i=this.tabs.index(r),u=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case n.ui.keyCode.RIGHT:case n.ui.keyCode.DOWN:i++;break;case n.ui.keyCode.UP:case n.ui.keyCode.LEFT:u=!1;i--;break;case n.ui.keyCode.END:i=this.anchors.length-1;break;case n.ui.keyCode.HOME:i=0;break;case n.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),this._activate(i),void 0;case n.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),this._activate(i===this.options.active?!1:i),void 0;default:return}t.preventDefault();clearTimeout(this.activating);i=this._focusNextTab(i,u);t.ctrlKey||t.metaKey||(r.attr("aria-selected","false"),this.tabs.eq(i).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",i)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===n.ui.keyCode.UP&&(t.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(t){return t.altKey&&t.keyCode===n.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===n.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,i){function u(){return t>r&&(t=0),0>t&&(t=r),t}for(var r=this.tabs.length-1;-1!==n.inArray(u(),this.options.disabled);)t=i?t+1:t-1;return t},_focusNextTab:function(n,t){return n=this._findNextTab(n,t),this.tabs.eq(n).trigger("focus"),n},_setOption:function(n,t){return"active"===n?(this._activate(t),void 0):(this._super(n,t),"collapsible"===n&&(this._toggleClass("ui-tabs-collapsible",null,t),t||this.options.active!==!1||this._activate(0)),"event"===n&&this._setupEvents(t),"heightStyle"===n&&this._setupHeightStyle(t),void 0)},_sanitizeSelector:function(n){return n?n.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,i=this.tablist.children(":has(a[href])");t.disabled=n.map(i.filter(".ui-state-disabled"),function(n){return i.index(n)});this._processTabs();t.active!==!1&&this.anchors.length?this.active.length&&!n.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=n()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=n());this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled);this._setupEvents(this.options.event);this._setupHeightStyle(this.options.heightStyle);this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1});this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"});this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var t=this,i=this.tabs,r=this.anchors,u=this.panels;this.tablist=this._getList().attr("role","tablist");this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header");this.tablist.on("mousedown"+this.eventNamespace,"> li",function(t){n(this).is(".ui-state-disabled")&&t.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){n(this).closest("li").is(".ui-state-disabled")&&this.blur()});this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1});this._addClass(this.tabs,"ui-tabs-tab","ui-state-default");this.anchors=this.tabs.map(function(){return n("a",this)[0]}).attr({role:"presentation",tabIndex:-1});this._addClass(this.anchors,"ui-tabs-anchor");this.panels=n();this.anchors.each(function(i,r){var f,u,e,s=n(r).uniqueId().attr("id"),o=n(r).closest("li"),h=o.attr("aria-controls");t._isLocal(r)?(f=r.hash,e=f.substring(1),u=t.element.find(t._sanitizeSelector(f))):(e=o.attr("aria-controls")||n({}).uniqueId()[0].id,f="#"+e,u=t.element.find(f),u.length||(u=t._createPanel(e),u.insertAfter(t.panels[i-1]||t.tablist)),u.attr("aria-live","polite"));u.length&&(t.panels=t.panels.add(u));h&&o.data("ui-tabs-aria-controls",h);o.attr({"aria-controls":e,"aria-labelledby":s});u.attr("aria-labelledby",s)});this.panels.attr("role","tabpanel");this._addClass(this.panels,"ui-tabs-panel","ui-widget-content");i&&(this._off(i.not(this.tabs)),this._off(r.not(this.anchors)),this._off(u.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(t){return n("<div>").attr("id",t).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(t){var i,u,r;for(n.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1),r=0;u=this.tabs[r];r++)i=n(u),t===!0||-1!==n.inArray(r,t)?(i.attr("aria-disabled","true"),this._addClass(i,null,"ui-state-disabled")):(i.removeAttr("aria-disabled"),this._removeClass(i,null,"ui-state-disabled"));this.options.disabled=t;this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,t===!0)},_setupEvents:function(t){var i={};t&&n.each(t.split(" "),function(n,t){i[t]="_eventHandler"});this._off(this.anchors.add(this.tabs).add(this.panels));this._on(!0,this.anchors,{click:function(n){n.preventDefault()}});this._on(this.anchors,i);this._on(this.tabs,{keydown:"_tabKeydown"});this._on(this.panels,{keydown:"_panelKeydown"});this._focusable(this.tabs);this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,r=this.element.parent();"fill"===t?(i=r.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=n(this),r=t.css("position");"absolute"!==r&&"fixed"!==r&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=n(this).outerHeight(!0)}),this.panels.each(function(){n(this).height(Math.max(0,i-n(this).innerHeight()+n(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.panels.each(function(){i=Math.max(i,n(this).height("").height())}).height(i))},_eventHandler:function(t){var u=this.options,r=this.active,c=n(t.currentTarget),i=c.closest("li"),f=i[0]===r[0],e=f&&u.collapsible,o=e?n():this._getPanelForTab(i),s=r.length?this._getPanelForTab(r):n(),h={oldTab:r,oldPanel:s,newTab:e?n():i,newPanel:o};t.preventDefault();i.hasClass("ui-state-disabled")||i.hasClass("ui-tabs-loading")||this.running||f&&!u.collapsible||this._trigger("beforeActivate",t,h)===!1||(u.active=e?!1:this.tabs.index(i),this.active=f?n():i,this.xhr&&this.xhr.abort(),s.length||o.length||n.error("jQuery UI Tabs: Mismatching fragment identifier."),o.length&&this.load(this.tabs.index(i),t),this._toggle(t,h))},_toggle:function(t,i){function e(){r.running=!1;r._trigger("activate",t,i)}function o(){r._addClass(i.newTab.closest("li"),"ui-tabs-active","ui-state-active");u.length&&r.options.show?r._show(u,r.options.show,e):(u.show(),e())}var r=this,u=i.newPanel,f=i.oldPanel;this.running=!0;f.length&&this.options.hide?this._hide(f,this.options.hide,function(){r._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active");o()}):(this._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),f.hide(),o());f.attr("aria-hidden","true");i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"});u.length&&f.length?i.oldTab.attr("tabIndex",-1):u.length&&this.tabs.filter(function(){return 0===n(this).attr("tabIndex")}).attr("tabIndex",-1);u.attr("aria-hidden","false");i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var r,i=this._findActive(t);i[0]!==this.active[0]&&(i.length||(i=this.active),r=i.find(".ui-tabs-anchor")[0],this._eventHandler({target:r,currentTarget:r,preventDefault:n.noop}))},_findActive:function(t){return t===!1?n():this.tabs.eq(t)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+n.ui.escapeSelector(t)+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort();this.tablist.removeAttr("role").off(this.eventNamespace);this.anchors.removeAttr("role tabIndex").removeUniqueId();this.tabs.add(this.panels).each(function(){n.data(this,"ui-tabs-destroy")?n(this).remove():n(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")});this.tabs.each(function(){var t=n(this),i=t.data("ui-tabs-aria-controls");i?t.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")});this.panels.show();"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(t){var i=this.options.disabled;i!==!1&&(void 0===t?i=!1:(t=this._getIndex(t),i=n.isArray(i)?n.map(i,function(n){return n!==t?n:null}):n.map(this.tabs,function(n,i){return i!==t?i:null})),this._setOptionDisabled(i))},disable:function(t){var i=this.options.disabled;if(i!==!0){if(void 0===t)i=!0;else{if(t=this._getIndex(t),-1!==n.inArray(t,i))return;i=n.isArray(i)?n.merge([t],i).sort():[t]}this._setOptionDisabled(i)}},load:function(t,i){t=this._getIndex(t);var r=this,u=this.tabs.eq(t),e=u.find(".ui-tabs-anchor"),f=this._getPanelForTab(u),o={tab:u,panel:f},s=function(n,t){"abort"===t&&r.panels.stop(!1,!0);r._removeClass(u,"ui-tabs-loading");f.removeAttr("aria-busy");n===r.xhr&&delete r.xhr};this._isLocal(e[0])||(this.xhr=n.ajax(this._ajaxSettings(e,i,o)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(u,"ui-tabs-loading"),f.attr("aria-busy","true"),this.xhr.done(function(n,t,u){setTimeout(function(){f.html(n);r._trigger("load",i,o);s(u,t)},1)}).fail(function(n,t){setTimeout(function(){s(n,t)},1)})))},_ajaxSettings:function(t,i,r){var u=this;return{url:t.attr("href").replace(/#.*$/,""),beforeSend:function(t,f){return u._trigger("beforeLoad",i,n.extend({jqXHR:t,ajaxSettings:f},r))}}},_getPanelForTab:function(t){var i=n(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}});n.uiBackCompat!==!1&&n.widget("ui.tabs",n.ui.tabs,{_processTabs:function(){this._superApply(arguments);this._addClass(this.tabs,"ui-tab")}});n.ui.tabs;n.widget("ui.tooltip",{version:"1.12.1",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var t=n(this).attr("title")||"";return n("<a>").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(t,i){var r=(t.attr("aria-describedby")||"").split(/\s+/);r.push(i);t.data("ui-tooltip-id",i).attr("aria-describedby",n.trim(r.join(" ")))},_removeDescribedBy:function(t){var u=t.data("ui-tooltip-id"),i=(t.attr("aria-describedby")||"").split(/\s+/),r=n.inArray(u,i);-1!==r&&i.splice(r,1);t.removeData("ui-tooltip-id");i=n.trim(i.join(" "));i?t.attr("aria-describedby",i):t.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"});this.tooltips={};this.parents={};this.liveRegion=n("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body);this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible");this.disabledTitles=n([])},_setOption:function(t,i){var r=this;this._super(t,i);"content"===t&&n.each(this.tooltips,function(n,t){r._updateContent(t.element)})},_setOptionDisabled:function(n){this[n?"_disable":"_enable"]()},_disable:function(){var t=this;n.each(this.tooltips,function(i,r){var u=n.Event("blur");u.target=u.currentTarget=r.element[0];t.close(u,!0)});this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var t=n(this);if(t.is("[title]"))return t.data("ui-tooltip-title",t.attr("title")).removeAttr("title")}))},_enable:function(){this.disabledTitles.each(function(){var t=n(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))});this.disabledTitles=n([])},open:function(t){var r=this,i=n(t?t.target:this.element).closest(this.options.items);i.length&&!i.data("ui-tooltip-id")&&(i.attr("title")&&i.data("ui-tooltip-title",i.attr("title")),i.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&i.parents().each(function(){var i,t=n(this);t.data("ui-tooltip-open")&&(i=n.Event("blur"),i.target=i.currentTarget=this,r.close(i,!0));t.attr("title")&&(t.uniqueId(),r.parents[this.id]={element:this,title:t.attr("title")},t.attr("title",""))}),this._registerCloseHandlers(t,i),this._updateContent(i,t))},_updateContent:function(n,t){var r,i=this.options.content,u=this,f=t?t.type:null;return"string"==typeof i||i.nodeType||i.jquery?this._open(t,n,i):(r=i.call(n[0],function(i){u._delay(function(){n.data("ui-tooltip-open")&&(t&&(t.type=f),this._open(t,n,i))})}),r&&this._open(t,n,r),void 0)},_open:function(t,i,r){function o(n){s.of=n;u.is(":hidden")||u.position(s)}var f,u,h,e,s=n.extend({},this.options.position);if(r){if(f=this._find(i))return f.tooltip.find(".ui-tooltip-content").html(r),void 0;i.is("[title]")&&(t&&"mouseover"===t.type?i.attr("title",""):i.removeAttr("title"));f=this._tooltip(i);u=f.tooltip;this._addDescribedBy(i,u.attr("id"));u.find(".ui-tooltip-content").html(r);this.liveRegion.children().hide();e=n("<div>").html(u.find(".ui-tooltip-content").html());e.removeAttr("name").find("[name]").removeAttr("name");e.removeAttr("id").find("[id]").removeAttr("id");e.appendTo(this.liveRegion);this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:o}),o(t)):u.position(n.extend({"of":i},this.options.position));u.hide();this._show(u,this.options.show);this.options.track&&this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){u.is(":visible")&&(o(s.of),clearInterval(h))},n.fx.interval));this._trigger("open",t,{tooltip:u})}},_registerCloseHandlers:function(t,i){var r={keyup:function(t){if(t.keyCode===n.ui.keyCode.ESCAPE){var r=n.Event(t);r.currentTarget=i[0];this.close(r,!0)}}};i[0]!==this.element[0]&&(r.remove=function(){this._removeTooltip(this._find(i).tooltip)});t&&"mouseover"!==t.type||(r.mouseleave="close");t&&"focusin"!==t.type||(r.focusout="close");this._on(!0,i,r)},close:function(t){var u,f=this,i=n(t?t.currentTarget:this.element),r=this._find(i);return r?(u=r.tooltip,r.closing||(clearInterval(this.delayedShow),i.data("ui-tooltip-title")&&!i.attr("title")&&i.attr("title",i.data("ui-tooltip-title")),this._removeDescribedBy(i),r.hiding=!0,u.stop(!0),this._hide(u,this.options.hide,function(){f._removeTooltip(n(this))}),i.removeData("ui-tooltip-open"),this._off(i,"mouseleave focusout keyup"),i[0]!==this.element[0]&&this._off(i,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&n.each(this.parents,function(t,i){n(i.element).attr("title",i.title);delete f.parents[t]}),r.closing=!0,this._trigger("close",t,{tooltip:u}),r.hiding||(r.closing=!1)),void 0):(i.removeData("ui-tooltip-open"),void 0)},_tooltip:function(t){var i=n("<div>").attr("role","tooltip"),r=n("<div>").appendTo(i),u=i.uniqueId().attr("id");return this._addClass(r,"ui-tooltip-content"),this._addClass(i,"ui-tooltip","ui-widget ui-widget-content"),i.appendTo(this._appendTo(t)),this.tooltips[u]={element:t,tooltip:i}},_find:function(n){var t=n.data("ui-tooltip-id");return t?this.tooltips[t]:null},_removeTooltip:function(n){n.remove();delete this.tooltips[n.attr("id")]},_appendTo:function(n){var t=n.closest(".ui-front, dialog");return t.length||(t=this.document[0].body),t},_destroy:function(){var t=this;n.each(this.tooltips,function(i,r){var f=n.Event("blur"),u=r.element;f.target=f.currentTarget=u[0];t.close(f,!0);n("#"+i).remove();u.data("ui-tooltip-title")&&(u.attr("title")||u.attr("title",u.data("ui-tooltip-title")),u.removeData("ui-tooltip-title"))});this.liveRegion.remove()}});n.uiBackCompat!==!1&&n.widget("ui.tooltip",n.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var n=this._superApply(arguments);return this.options.tooltipClass&&n.tooltip.addClass(this.options.tooltipClass),n}});n.ui.tooltip;var f="ui-effects-",o="ui-effects-style",s="ui-effects-animated",y=n;n.effects={effect:{}},function(n,t){function f(n,t,i){var r=h[t.type]||{};return null==n?i||!t.def?null:t.def:(n=r.floor?~~n:parseFloat(n),isNaN(n)?t.def:r.mod?(n+r.mod)%r.mod:0>n?0:n>r.max?r.max:n)}function s(f){var o=i(),s=o._rgba=[];return f=f.toLowerCase(),r(v,function(n,i){var r,h=i.re.exec(f),c=h&&i.parse(h),e=i.space||"rgba";return c?(r=o[e](c),o[u[e].cache]=r[u[e].cache],s=o._rgba=r._rgba,!1):t}),s.length?("0,0,0,0"===s.join()&&n.extend(s,e.transparent),o):e[f]}function o(n,t,i){return i=(i+1)%1,1>6*i?n+6*(t-n)*i:1>2*i?t:2>3*i?n+6*(t-n)*(2/3-i):n}var e,a=/^([\-+])=\s*(\d+\.?\d*)/,v=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(n){return[n[1],n[2],n[3],n[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(n){return[2.55*n[1],2.55*n[2],2.55*n[3],n[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(n){return[parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(n){return[parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(n){return[n[1],n[2]/100,n[3]/100,n[4]]}}],i=n.Color=function(t,i,r,u){return new n.Color.fn.parse(t,i,r,u)},u={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},h={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},c=i.support={},l=n("<p>")[0],r=n.each;l.style.cssText="background-color:rgba(1,1,1,.5)";c.rgba=l.style.backgroundColor.indexOf("rgba")>-1;r(u,function(n,t){t.cache="_"+n;t.props.alpha={idx:3,type:"percent",def:1}});i.fn=n.extend(i.prototype,{parse:function(o,h,c,l){if(o===t)return this._rgba=[null,null,null,null],this;(o.jquery||o.nodeType)&&(o=n(o).css(h),h=t);var a=this,v=n.type(o),y=this._rgba=[];return h!==t&&(o=[o,h,c,l],v="array"),"string"===v?this.parse(s(o)||e._default):"array"===v?(r(u.rgba.props,function(n,t){y[t.idx]=f(o[t.idx],t)}),this):"object"===v?(o instanceof i?r(u,function(n,t){o[t.cache]&&(a[t.cache]=o[t.cache].slice())}):r(u,function(t,i){var u=i.cache;r(i.props,function(n,t){if(!a[u]&&i.to){if("alpha"===n||null==o[n])return;a[u]=i.to(a._rgba)}a[u][t.idx]=f(o[n],t,!0)});a[u]&&0>n.inArray(null,a[u].slice(0,3))&&(a[u][3]=1,i.from&&(a._rgba=i.from(a[u])))}),this):t},is:function(n){var o=i(n),f=!0,e=this;return r(u,function(n,i){var s,u=o[i.cache];return u&&(s=e[i.cache]||i.to&&i.to(e._rgba)||[],r(i.props,function(n,i){return null!=u[i.idx]?f=u[i.idx]===s[i.idx]:t})),f}),f},_space:function(){var n=[],t=this;return r(u,function(i,r){t[r.cache]&&n.push(i)}),n.pop()},transition:function(n,t){var e=i(n),c=e._space(),o=u[c],l=0===this.alpha()?i("transparent"):this,a=l[o.cache]||o.to(l._rgba),s=a.slice();return e=e[o.cache],r(o.props,function(n,i){var c=i.idx,r=a[c],u=e[c],o=h[i.type]||{};null!==u&&(null===r?s[c]=u:(o.mod&&(u-r>o.mod/2?r+=o.mod:r-u>o.mod/2&&(r-=o.mod)),s[c]=f((u-r)*t+r,i)))}),this[c](s)},blend:function(t){if(1===this._rgba[3])return this;var r=this._rgba.slice(),u=r.pop(),f=i(t)._rgba;return i(n.map(r,function(n,t){return(1-u)*f[t]+u*n}))},toRgbaString:function(){var i="rgba(",t=n.map(this._rgba,function(n,t){return null==n?t>2?1:0:n});return 1===t[3]&&(t.pop(),i="rgb("),i+t.join()+")"},toHslaString:function(){var i="hsla(",t=n.map(this.hsla(),function(n,t){return null==n&&(n=t>2?1:0),t&&3>t&&(n=Math.round(100*n)+"%"),n});return 1===t[3]&&(t.pop(),i="hsl("),i+t.join()+")"},toHexString:function(t){var i=this._rgba.slice(),r=i.pop();return t&&i.push(~~(255*r)),"#"+n.map(i,function(n){return n=(n||0).toString(16),1===n.length?"0"+n:n}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}});i.fn.parse.prototype=i.fn;u.hsla.to=function(n){if(null==n[0]||null==n[1]||null==n[2])return[null,null,null,n[3]];var s,h,i=n[0]/255,r=n[1]/255,f=n[2]/255,c=n[3],u=Math.max(i,r,f),e=Math.min(i,r,f),t=u-e,o=u+e,l=.5*o;return s=e===u?0:i===u?60*(r-f)/t+360:r===u?60*(f-i)/t+120:60*(i-r)/t+240,h=0===t?0:.5>=l?t/o:t/(2-o),[Math.round(s)%360,h,l,null==c?1:c]};u.hsla.from=function(n){if(null==n[0]||null==n[1]||null==n[2])return[null,null,null,n[3]];var r=n[0]/360,u=n[1],t=n[2],e=n[3],i=.5>=t?t*(1+u):t+u-t*u,f=2*t-i;return[Math.round(255*o(f,i,r+1/3)),Math.round(255*o(f,i,r)),Math.round(255*o(f,i,r-1/3)),e]};r(u,function(u,e){var s=e.props,o=e.cache,h=e.to,c=e.from;i.fn[u]=function(u){if(h&&!this[o]&&(this[o]=h(this._rgba)),u===t)return this[o].slice();var l,a=n.type(u),v="array"===a||"object"===a?u:arguments,e=this[o].slice();return r(s,function(n,t){var i=v["object"===a?n:t.idx];null==i&&(i=e[t.idx]);e[t.idx]=f(i,t)}),c?(l=i(c(e)),l[o]=e,l):i(e)};r(s,function(t,r){i.fn[t]||(i.fn[t]=function(i){var f,e=n.type(i),h="alpha"===t?this._hsla?"hsla":"rgba":u,o=this[h](),s=o[r.idx];return"undefined"===e?s:("function"===e&&(i=i.call(this,s),e=n.type(i)),null==i&&r.empty?this:("string"===e&&(f=a.exec(i),f&&(i=s+parseFloat(f[2])*("+"===f[1]?1:-1))),o[r.idx]=i,this[h](o)))})})});i.hook=function(t){var u=t.split(" ");r(u,function(t,r){n.cssHooks[r]={set:function(t,u){var o,f,e="";if("transparent"!==u&&("string"!==n.type(u)||(o=s(u)))){if(u=i(o||u),!c.rgba&&1!==u._rgba[3]){for(f="backgroundColor"===r?t.parentNode:t;(""===e||"transparent"===e)&&f&&f.style;)try{e=n.css(f,"backgroundColor");f=f.parentNode}catch(h){}u=u.blend(e&&"transparent"!==e?e:"_default")}u=u.toRgbaString()}try{t.style[r]=u}catch(h){}}};n.fx.step[r]=function(t){t.colorInit||(t.start=i(t.elem,r),t.end=i(t.end),t.colorInit=!0);n.cssHooks[r].set(t.elem,t.start.transition(t.end,t.pos))}})};i.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor");n.cssHooks.borderColor={expand:function(n){var t={};return r(["Top","Right","Bottom","Left"],function(i,r){t["border"+r+"Color"]=n}),t}};e=n.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(y),function(){function t(t){var r,u,i=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,f={};if(i&&i.length&&i[0]&&i[i[0]])for(u=i.length;u--;)r=i[u],"string"==typeof i[r]&&(f[n.camelCase(r)]=i[r]);else for(r in i)"string"==typeof i[r]&&(f[r]=i[r]);return f}function i(t,i){var r,f,e={};for(r in i)f=i[r],t[r]!==f&&(u[r]||(n.fx.step[r]||!isNaN(parseFloat(f)))&&(e[r]=f));return e}var r=["add","remove","toggle"],u={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};n.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,i){n.fx.step[i]=function(n){("none"===n.end||n.setAttr)&&(1!==n.pos||n.setAttr)||(y.style(n.elem,i,n.end),n.setAttr=!0)}});n.fn.addBack||(n.fn.addBack=function(n){return this.add(null==n?this.prevObject:this.prevObject.filter(n))});n.effects.animateClass=function(u,f,e,o){var s=n.speed(f,e,o);return this.queue(function(){var o,e=n(this),h=e.attr("class")||"",f=s.children?e.find("*").addBack():e;f=f.map(function(){var i=n(this);return{el:i,start:t(this)}});o=function(){n.each(r,function(n,t){u[t]&&e[t+"Class"](u[t])})};o();f=f.map(function(){return this.end=t(this.el[0]),this.diff=i(this.start,this.end),this});e.attr("class",h);f=f.map(function(){var i=this,t=n.Deferred(),r=n.extend({},s,{queue:!1,complete:function(){t.resolve(i)}});return this.el.animate(this.diff,r),t.promise()});n.when.apply(n,f.get()).done(function(){o();n.each(arguments,function(){var t=this.el;n.each(this.diff,function(n){t.css(n,"")})});s.complete.call(e[0])})})};n.fn.extend({addClass:function(t){return function(i,r,u,f){return r?n.effects.animateClass.call(this,{add:i},r,u,f):t.apply(this,arguments)}}(n.fn.addClass),removeClass:function(t){return function(i,r,u,f){return arguments.length>1?n.effects.animateClass.call(this,{remove:i},r,u,f):t.apply(this,arguments)}}(n.fn.removeClass),toggleClass:function(t){return function(i,r,u,f,e){return"boolean"==typeof r||void 0===r?u?n.effects.animateClass.call(this,r?{add:i}:{remove:i},u,f,e):t.apply(this,arguments):n.effects.animateClass.call(this,{toggle:i},r,u,f)}}(n.fn.toggleClass),switchClass:function(t,i,r,u,f){return n.effects.animateClass.call(this,{add:i,remove:t},r,u,f)}})}(),function(){function t(t,i,r,u){return n.isPlainObject(t)&&(i=t,t=t.effect),t={effect:t},null==i&&(i={}),n.isFunction(i)&&(u=i,r=null,i={}),("number"==typeof i||n.fx.speeds[i])&&(u=r,r=i,i={}),n.isFunction(r)&&(u=r,r=null),i&&n.extend(t,i),r=r||i.duration,t.duration=n.fx.off?0:"number"==typeof r?r:r in n.fx.speeds?n.fx.speeds[r]:n.fx.speeds._default,t.complete=u||i.complete,t}function i(t){return!t||"number"==typeof t||n.fx.speeds[t]?!0:"string"!=typeof t||n.effects.effect[t]?n.isFunction(t)?!0:"object"!=typeof t||t.effect?!1:!0:!0}function r(n,t){var r=t.outerWidth(),u=t.outerHeight(),i=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(n)||["",0,r,u,0];return{top:parseFloat(i[1])||0,right:"auto"===i[2]?r:parseFloat(i[2]),bottom:"auto"===i[3]?u:parseFloat(i[3]),left:parseFloat(i[4])||0}}n.expr&&n.expr.filters&&n.expr.filters.animated&&(n.expr.filters.animated=function(t){return function(i){return!!n(i).data(s)||t(i)}}(n.expr.filters.animated));n.uiBackCompat!==!1&&n.extend(n.effects,{save:function(n,t){for(var i=0,r=t.length;r>i;i++)null!==t[i]&&n.data(f+t[i],n[0].style[t[i]])},restore:function(n,t){for(var r,i=0,u=t.length;u>i;i++)null!==t[i]&&(r=n.data(f+t[i]),n.css(t[i],r))},setMode:function(n,t){return"toggle"===t&&(t=n.is(":hidden")?"show":"hide"),t},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var i={width:t.outerWidth(!0),height:t.outerHeight(!0),float:t.css("float")},u=n("<div><\/div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),f={width:t.width(),height:t.height()},r=document.activeElement;try{r.id}catch(e){r=document.body}return t.wrap(u),(t[0]===r||n.contains(t[0],r))&&n(r).trigger("focus"),u=t.parent(),"static"===t.css("position")?(u.css({position:"relative"}),t.css({position:"relative"})):(n.extend(i,{position:t.css("position"),zIndex:t.css("z-index")}),n.each(["top","left","bottom","right"],function(n,r){i[r]=t.css(r);isNaN(parseInt(i[r],10))&&(i[r]="auto")}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(f),u.css(i).show()},removeWrapper:function(t){var i=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===i||n.contains(t[0],i))&&n(i).trigger("focus")),t}});n.extend(n.effects,{version:"1.12.1",define:function(t,i,r){return r||(r=i,i="effect"),n.effects.effect[t]=r,n.effects.effect[t].mode=i,r},scaledDimensions:function(n,t,i){if(0===t)return{height:0,width:0,outerHeight:0,outerWidth:0};var r="horizontal"!==i?(t||100)/100:1,u="vertical"!==i?(t||100)/100:1;return{height:n.height()*u,width:n.width()*r,outerHeight:n.outerHeight()*u,outerWidth:n.outerWidth()*r}},clipToBox:function(n){return{width:n.clip.right-n.clip.left,height:n.clip.bottom-n.clip.top,left:n.clip.left,top:n.clip.top}},unshift:function(n,t,i){var r=n.queue();t>1&&r.splice.apply(r,[1,0].concat(r.splice(t,i)));n.dequeue()},saveStyle:function(n){n.data(o,n[0].style.cssText)},restoreStyle:function(n){n[0].style.cssText=n.data(o)||"";n.removeData(o)},mode:function(n,t){var i=n.is(":hidden");return"toggle"===t&&(t=i?"show":"hide"),(i?"hide"===t:"show"===t)&&(t="none"),t},getBaseline:function(n,t){var i,r;switch(n[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=n[0]/t.height}switch(n[1]){case"left":r=0;break;case"center":r=.5;break;case"right":r=1;break;default:r=n[1]/t.width}return{x:r,y:i}},createPlaceholder:function(t){var i,r=t.css("position"),u=t.position();return t.css({marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()),/^(static|relative)/.test(r)&&(r="absolute",i=n("<"+t[0].nodeName+">").insertAfter(t).css({display:/^(inline|ruby)/.test(t.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight"),float:t.css("float")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"),t.data(f+"placeholder",i)),t.css({position:r,left:u.left,top:u.top}),i},removePlaceholder:function(n){var t=f+"placeholder",i=n.data(t);i&&(i.remove(),n.removeData(t))},cleanUp:function(t){n.effects.restoreStyle(t);n.effects.removePlaceholder(t)},setTransition:function(t,i,r,u){return u=u||{},n.each(i,function(n,i){var f=t.cssUnit(i);f[0]>0&&(u[i]=f[0]*r+f[1])}),u}});n.fn.extend({effect:function(){function o(t){function c(){o.removeData(s);n.effects.cleanUp(o);"hide"===i.mode&&o.hide();h()}function h(){n.isFunction(f)&&f.call(o[0]);n.isFunction(t)&&t()}var o=n(this);i.mode=l.shift();n.uiBackCompat===!1||u?"none"===i.mode?(o[r](),h()):e.call(o[0],i,c):(o.is(":hidden")?"hide"===r:"show"===r)?(o[r](),h()):e.call(o[0],i,h)}var i=t.apply(this,arguments),e=n.effects.effect[i.effect],u=e.mode,h=i.queue,c=h||"fx",f=i.complete,r=i.mode,l=[],a=function(t){var f=n(this),i=n.effects.mode(f,r)||u;f.data(s,!0);l.push(i);u&&("show"===i||i===u&&"hide"===i)&&f.show();u&&"none"===i||n.effects.saveStyle(f);n.isFunction(t)&&t()};return n.fx.off||!e?r?this[r](i.duration,f):this.each(function(){f&&f.call(this)}):h===!1?this.each(a).each(o):this.queue(c,a).queue(c,o)},show:function(n){return function(r){if(i(r))return n.apply(this,arguments);var u=t.apply(this,arguments);return u.mode="show",this.effect.call(this,u)}}(n.fn.show),hide:function(n){return function(r){if(i(r))return n.apply(this,arguments);var u=t.apply(this,arguments);return u.mode="hide",this.effect.call(this,u)}}(n.fn.hide),toggle:function(n){return function(r){if(i(r)||"boolean"==typeof r)return n.apply(this,arguments);var u=t.apply(this,arguments);return u.mode="toggle",this.effect.call(this,u)}}(n.fn.toggle),cssUnit:function(t){var i=this.css(t),r=[];return n.each(["em","px","%","pt"],function(n,t){i.indexOf(t)>0&&(r=[parseFloat(i),t])}),r},cssClip:function(n){return n?this.css("clip","rect("+n.top+"px "+n.right+"px "+n.bottom+"px "+n.left+"px)"):r(this.css("clip"),this)},transfer:function(t,i){var u=n(this),r=n(t.to),f="fixed"===r.css("position"),e=n("body"),o=f?e.scrollTop():0,s=f?e.scrollLeft():0,h=r.offset(),l={top:h.top-o,left:h.left-s,height:r.innerHeight(),width:r.innerWidth()},c=u.offset(),a=n("<div class='ui-effects-transfer'><\/div>").appendTo("body").addClass(t.className).css({top:c.top-o,left:c.left-s,height:u.innerHeight(),width:u.innerWidth(),position:f?"fixed":"absolute"}).animate(l,t.duration,t.easing,function(){a.remove();n.isFunction(i)&&i()})}});n.fx.step.clip=function(t){t.clipInit||(t.start=n(t.elem).cssClip(),"string"==typeof t.end&&(t.end=r(t.end,t.elem)),t.clipInit=!0);n(t.elem).cssClip({top:t.pos*(t.end.top-t.start.top)+t.start.top,right:t.pos*(t.end.right-t.start.right)+t.start.right,bottom:t.pos*(t.end.bottom-t.start.bottom)+t.start.bottom,left:t.pos*(t.end.left-t.start.left)+t.start.left})}}(),function(){var t={};n.each(["Quad","Cubic","Quart","Quint","Expo"],function(n,i){t[i]=function(t){return Math.pow(t,n+2)}});n.extend(t,{Sine:function(n){return 1-Math.cos(n*Math.PI/2)},Circ:function(n){return 1-Math.sqrt(1-n*n)},Elastic:function(n){return 0===n||1===n?n:-Math.pow(2,8*(n-1))*Math.sin((80*(n-1)-7.5)*Math.PI/15)},Back:function(n){return n*n*(3*n-2)},Bounce:function(n){for(var t,i=4;((t=Math.pow(2,--i))-1)/11>n;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*t-2)/22-n,2)}});n.each(t,function(t,i){n.easing["easeIn"+t]=i;n.easing["easeOut"+t]=function(n){return 1-i(1-n)};n.easing["easeInOut"+t]=function(n){return.5>n?i(2*n)/2:1-i(-2*n+2)/2}})}();n.effects}),window.MutationObserver=window.MutationObserver||function(n){"use strict";function r(n){this._watched=[];this._listener=n}function v(n){(function t(){var i=n.takeRecords();i.length&&n._listener(i,n);n._timeout=setTimeout(t,r._period)})()}function t(t){var r={type:null,target:null,addedNodes:[],removedNodes:[],previousSibling:null,nextSibling:null,attributeName:null,attributeNamespace:null,oldValue:null};for(var i in t)a(r,i)&&t[i]!==n&&(r[i]=t[i]);return r}function y(n,i){var r=s(n,i);return function(u){var o=u.length,e;i.charData&&n.nodeType===3&&n.nodeValue!==r.charData&&u.push(new t({type:"characterData",target:n,oldValue:r.charData}));i.attr&&r.attr&&f(u,n,r.attr,i.afilter);(i.kids||i.descendents)&&(e=b(u,n,r,i));(e||u.length!==o)&&(r=s(n,i))}}function p(n,t){return t.value}function w(n,t){return t.name!=="style"?t.value:n.style.cssText}function f(n,i,r,f){for(var s={},h=i.attributes,o,e,c=h.length;c--;)o=h[c],e=o.name,(!f||a(f,e))&&(u(i,o)!==r[e]&&n.push(t({type:"attributes",target:i,attributeName:e,oldValue:r[e],attributeNamespace:o.namespaceURI})),s[e]=!0);for(e in r)s[e]||n.push(t({target:i,type:"attributes",attributeName:e,oldValue:r[e]}))}function b(i,r,u,e){function c(n,r,u,s,h){for(var v=n.length-1,y=-~((v-h)/2),c,l,a;a=n.pop();)c=u[a.i],l=s[a.j],e.kids&&y&&Math.abs(a.i-a.j)>=v&&(i.push(t({type:"childList",target:r,addedNodes:[c],removedNodes:[c],nextSibling:c.nextSibling,previousSibling:c.previousSibling})),y--),e.attr&&l.attr&&f(i,c,l.attr,e.afilter),e.charData&&c.nodeType===3&&c.nodeValue!==l.charData&&i.push(t({type:"characterData",target:c,oldValue:l.charData})),e.descendents&&o(c,l)}function o(r,u){for(var g=r.childNodes,y=u.kids,ut=g.length,ft=y?y.length:0,nt,w,tt,it,v,a,b,rt=0,d=0,p=0;d<ut||p<ft;)a=g[d],v=y[p],b=v&&v.node,a===b?(e.attr&&v.attr&&f(i,a,v.attr,e.afilter),e.charData&&v.charData!==n&&a.nodeValue!==v.charData&&i.push(t({type:"characterData",target:a,oldValue:v.charData})),w&&c(w,r,g,y,rt),e.descendents&&(a.childNodes.length||v.kids&&v.kids.length)&&o(a,v),d++,p++):(s=!0,nt||(nt={},w=[]),a&&(nt[tt=h(a)]||(nt[tt]=!0,(it=k(y,a,p))===-1?e.kids&&(i.push(t({type:"childList",target:r,addedNodes:[a],nextSibling:a.nextSibling,previousSibling:a.previousSibling})),rt++):w.push({i:d,j:it})),d++),b&&b!==g[d]&&(nt[tt=h(b)]||(nt[tt]=!0,(it=l(g,b,d))===-1?e.kids&&(i.push(t({type:"childList",target:u.node,removedNodes:[b],nextSibling:y[p+1],previousSibling:y[p-1]})),rt--):w.push({i:it,j:p})),p++));w&&c(w,r,g,y,rt)}var s;return o(r,u),s}function s(n,t){var i=!0;return function r(n){var f={node:n};return t.charData&&(n.nodeType===3||n.nodeType===8)?f.charData=n.nodeValue:(t.attr&&i&&n.nodeType===1&&(f.attr=c(n.attributes,function(i,r){return(!t.afilter||t.afilter[r.name])&&(i[r.name]=u(n,r)),i},{})),i&&(t.kids||t.charData||t.attr&&t.descendents)&&(f.kids=d(n.childNodes,r)),i=t.descendents),f}(n)}function k(n,t,i){return l(n,t,i,g("node"))}function h(n){try{return n.id||(n[o]=n[o]||e++)}catch(t){try{return n.nodeValue}catch(i){return e++}}}function d(n,t){for(var r=[],i=0;i<n.length;i++)r[i]=t(n[i],i,n);return r}function c(n,t,i){for(var r=0;r<n.length;r++)i=t(i,n[r],r,n);return i}function l(n,t,i,r){for(;i<n.length;i++)if((r?n[i][r]:n[i])===t)return i;return-1}function a(t,i){return t[i]!==n}function g(n){return n}var i,u,e,o;return r._period=30,r.prototype={observe:function(n,t){for(var u={attr:!!(t.attributes||t.attributeFilter||t.attributeOldValue),kids:!!t.childList,descendents:!!t.subtree,charData:!!(t.characterData||t.characterDataOldValue)},i=this._watched,r=0;r<i.length;r++)i[r].tar===n&&i.splice(r,1);t.attributeFilter&&(u.afilter=c(t.attributeFilter,function(n,t){return n[t]=!0,n},{}));i.push({tar:n,fn:y(n,u)});this._timeout||v(this)},takeRecords:function(){for(var t=[],i=this._watched,n=0;n<i.length;n++)i[n].fn(t);return t},disconnect:function(){this._watched=[];clearTimeout(this._timeout);this._timeout=null}},i=document.createElement("i"),i.style.top=0,i=i.attributes.style.value!="null",u=i?p:w,e=1,o="mo_id",r}(void 0),function(n,t){"use strict";function o(n){this.time=n.time;this.target=n.target;this.rootBounds=n.rootBounds;this.boundingClientRect=n.boundingClientRect;this.intersectionRect=n.intersectionRect||f();this.isIntersecting=!!n.intersectionRect;var t=this.boundingClientRect,i=t.width*t.height,r=this.intersectionRect,u=r.width*r.height;this.intersectionRatio=i?u/i:this.isIntersecting?1:0}function i(n,t){var i=t||{};if(typeof n!="function")throw new Error("callback must be a function");if(i.root&&i.root.nodeType!=1)throw new Error("root must be an Element");this._checkForIntersections=a(this._checkForIntersections.bind(this),this.THROTTLE_TIMEOUT);this._callback=n;this._observationTargets=[];this._queuedEntries=[];this._rootMarginValues=this._parseRootMargin(i.rootMargin);this.thresholds=this._initThresholds(i.threshold);this.root=i.root||null;this.rootMargin=this._rootMarginValues.map(function(n){return n.value+n.unit}).join(" ")}function l(){return n.performance&&performance.now&&performance.now()}function a(n,t){var i=null;return function(){i||(i=setTimeout(function(){n();i=null},t))}}function s(n,t,i,r){typeof n.addEventListener=="function"?n.addEventListener(t,i,r||!1):typeof n.attachEvent=="function"&&n.attachEvent("on"+t,i)}function h(n,t,i,r){typeof n.removeEventListener=="function"?n.removeEventListener(t,i,r||!1):typeof n.detatchEvent=="function"&&n.detatchEvent("on"+t,i)}function v(n,t){var i=Math.max(n.top,t.top),r=Math.min(n.bottom,t.bottom),u=Math.max(n.left,t.left),f=Math.min(n.right,t.right),e=f-u,o=r-i;return e>=0&&o>=0&&{top:i,bottom:r,left:u,right:f,width:e,height:o}}function u(n){var t;try{t=n.getBoundingClientRect()}catch(i){}return t?(t.width&&t.height||(t={top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.right-t.left,height:t.bottom-t.top}),t):f()}function f(){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}function c(n,t){for(var i=t;i;){if(i==n)return!0;i=e(i)}return!1}function e(n){var t=n.parentNode;return t&&t.nodeType==11&&t.host?t.host:t}if("IntersectionObserver"in n&&"IntersectionObserverEntry"in n&&"intersectionRatio"in n.IntersectionObserverEntry.prototype){"isIntersecting"in n.IntersectionObserverEntry.prototype||Object.defineProperty(n.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});return}var r=[];i.prototype.THROTTLE_TIMEOUT=100;i.prototype.POLL_INTERVAL=null;i.prototype.USE_MUTATION_OBSERVER=!0;i.prototype.observe=function(n){var t=this._observationTargets.some(function(t){return t.element==n});if(!t){if(!(n&&n.nodeType==1))throw new Error("target must be an Element");this._registerInstance();this._observationTargets.push({element:n,entry:null});this._monitorIntersections();this._checkForIntersections()}};i.prototype.unobserve=function(n){this._observationTargets=this._observationTargets.filter(function(t){return t.element!=n});this._observationTargets.length||(this._unmonitorIntersections(),this._unregisterInstance())};i.prototype.disconnect=function(){this._observationTargets=[];this._unmonitorIntersections();this._unregisterInstance()};i.prototype.takeRecords=function(){var n=this._queuedEntries.slice();return this._queuedEntries=[],n};i.prototype._initThresholds=function(n){var t=n||[0];return Array.isArray(t)||(t=[t]),t.sort().filter(function(n,t,i){if(typeof n!="number"||isNaN(n)||n<0||n>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return n!==i[t-1]})};i.prototype._parseRootMargin=function(n){var i=n||"0px",t=i.split(/\s+/).map(function(n){var t=/^(-?\d*\.?\d+)(px|%)$/.exec(n);if(!t)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(t[1]),unit:t[2]}});return t[1]=t[1]||t[0],t[2]=t[2]||t[0],t[3]=t[3]||t[1],t};i.prototype._monitorIntersections=function(){this._monitoringIntersections||(this._monitoringIntersections=!0,this.POLL_INTERVAL?this._monitoringInterval=setInterval(this._checkForIntersections,this.POLL_INTERVAL):(s(n,"resize",this._checkForIntersections,!0),s(t,"scroll",this._checkForIntersections,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in n&&(this._domObserver=new MutationObserver(this._checkForIntersections),this._domObserver.observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))))};i.prototype._unmonitorIntersections=function(){this._monitoringIntersections&&(this._monitoringIntersections=!1,clearInterval(this._monitoringInterval),this._monitoringInterval=null,h(n,"resize",this._checkForIntersections,!0),h(t,"scroll",this._checkForIntersections,!0),this._domObserver&&(this._domObserver.disconnect(),this._domObserver=null))};i.prototype._checkForIntersections=function(){var n=this._rootIsInDom(),t=n?this._getRootRect():f();this._observationTargets.forEach(function(i){var r=i.element,h=u(r),s=this._rootContainsTarget(r),f=i.entry,c=n&&s&&this._computeTargetAndRootIntersection(r,t),e=i.entry=new o({time:l(),target:r,boundingClientRect:h,rootBounds:t,intersectionRect:c});f?n&&s?this._hasCrossedThreshold(f,e)&&this._queuedEntries.push(e):f&&f.isIntersecting&&this._queuedEntries.push(e):this._queuedEntries.push(e)},this);this._queuedEntries.length&&this._callback(this.takeRecords(),this)};i.prototype._computeTargetAndRootIntersection=function(i,r){var o,h;if(n.getComputedStyle(i).display!="none"){for(var l=u(i),s=l,f=e(i),c=!1;!c;){if(o=null,h=f.nodeType==1?n.getComputedStyle(f):{},h.display=="none")return;if(f==this.root||f==t?(c=!0,o=r):f!=t.body&&f!=t.documentElement&&h.overflow!="visible"&&(o=u(f)),o&&(s=v(o,s),!s))break;f=e(f)}return s}};i.prototype._getRootRect=function(){var r,n,i;return this.root?r=u(this.root):(n=t.documentElement,i=t.body,r={top:0,left:0,right:n.clientWidth||i.clientWidth,width:n.clientWidth||i.clientWidth,bottom:n.clientHeight||i.clientHeight,height:n.clientHeight||i.clientHeight}),this._expandRectByRootMargin(r)};i.prototype._expandRectByRootMargin=function(n){var i=this._rootMarginValues.map(function(t,i){return t.unit=="px"?t.value:t.value*(i%2?n.width:n.height)/100}),t={top:n.top-i[0],right:n.right+i[1],bottom:n.bottom+i[2],left:n.left-i[3]};return t.width=t.right-t.left,t.height=t.bottom-t.top,t};i.prototype._hasCrossedThreshold=function(n,t){var u=n&&n.isIntersecting?n.intersectionRatio||0:-1,f=t.isIntersecting?t.intersectionRatio||0:-1,r,i;if(u!==f)for(r=0;r<this.thresholds.length;r++)if(i=this.thresholds[r],i==u||i==f||i<u!=i<f)return!0};i.prototype._rootIsInDom=function(){return!this.root||c(t,this.root)};i.prototype._rootContainsTarget=function(n){return c(this.root||t,n)};i.prototype._registerInstance=function(){r.indexOf(this)<0&&r.push(this)};i.prototype._unregisterInstance=function(){var n=r.indexOf(this);n!=-1&&r.splice(n,1)};n.IntersectionObserver=i;n.IntersectionObserverEntry=o}(window,document),typeof jQuery=="undefined")throw new Error("Bootstrap's JavaScript requires jQuery");+function(n){"use strict";var t=n.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||t[0]==1&&t[1]==9&&t[2]<1||t[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4");}(jQuery);+function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.carousel"),f=n.extend({},t.DEFAULTS,u.data(),typeof i=="object"&&i),e=typeof i=="string"?i:f.slide;r||u.data("bs.carousel",r=new t(this,f));typeof i=="number"?r.to(i):e?r[e]():f.interval&&r.pause().cycle()})}var t=function(t,i){this.$element=n(t);this.$indicators=this.$element.find(".carousel-indicators");this.options=i;this.paused=null;this.sliding=null;this.interval=null;this.$active=null;this.$items=null;this.options.keyboard&&this.$element.on("keydown.bs.carousel",n.proxy(this.keydown,this));this.options.pause!="hover"||"ontouchstart"in document.documentElement||this.$element.on("mouseenter.bs.carousel",n.proxy(this.pause,this)).on("mouseleave.bs.carousel",n.proxy(this.cycle,this))},u,r;t.VERSION="3.4.1";t.TRANSITION_DURATION=600;t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0};t.prototype.keydown=function(n){if(!/input|textarea/i.test(n.target.tagName)){switch(n.which){case 37:this.prev();break;case 39:this.next();break;default:return}n.preventDefault()}};t.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(n.proxy(this.next,this),this.options.interval)),this};t.prototype.getItemIndex=function(n){return this.$items=n.parent().children(".item"),this.$items.index(n||this.$active)};t.prototype.getItemForDirection=function(n,t){var i=this.getItemIndex(t),f=n=="prev"&&i===0||n=="next"&&i==this.$items.length-1,r,u;return f&&!this.options.wrap?t:(r=n=="prev"?-1:1,u=(i+r)%this.$items.length,this.$items.eq(u))};t.prototype.to=function(n){var i=this,t=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(n>this.$items.length-1)&&!(n<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){i.to(n)}):t==n?this.pause().cycle():this.slide(n>t?"next":"prev",this.$items.eq(n))};t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&n.support.transition&&(this.$element.trigger(n.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this};t.prototype.next=function(){if(!this.sliding)return this.slide("next")};t.prototype.prev=function(){if(!this.sliding)return this.slide("prev")};t.prototype.slide=function(i,r){var e=this.$element.find(".item.active"),u=r||this.getItemForDirection(i,e),l=this.interval,f=i=="next"?"left":"right",a=this,o,s,h,c;return u.hasClass("active")?this.sliding=!1:(o=u[0],s=n.Event("slide.bs.carousel",{relatedTarget:o,direction:f}),this.$element.trigger(s),s.isDefaultPrevented())?void 0:(this.sliding=!0,l&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),h=n(this.$indicators.children()[this.getItemIndex(u)]),h&&h.addClass("active")),c=n.Event("slid.bs.carousel",{relatedTarget:o,direction:f}),n.support.transition&&this.$element.hasClass("slide")?(u.addClass(i),typeof u=="object"&&u.length&&u[0].offsetWidth,e.addClass(f),u.addClass(f),e.one("bsTransitionEnd",function(){u.removeClass([i,f].join(" ")).addClass("active");e.removeClass(["active",f].join(" "));a.sliding=!1;setTimeout(function(){a.$element.trigger(c)},0)}).emulateTransitionEnd(t.TRANSITION_DURATION)):(e.removeClass("active"),u.addClass("active"),this.sliding=!1,this.$element.trigger(c)),l&&this.cycle(),this)};u=n.fn.carousel;n.fn.carousel=i;n.fn.carousel.Constructor=t;n.fn.carousel.noConflict=function(){return n.fn.carousel=u,this};r=function(t){var u=n(this),f=u.attr("href"),s,r,o,e;(f&&(f=f.replace(/.*(?=#[^\s]+$)/,"")),s=u.attr("data-target")||f,r=n(document).find(s),r.hasClass("carousel"))&&(o=n.extend({},r.data(),u.data()),e=u.attr("data-slide-to"),e&&(o.interval=!1),i.call(r,o),e&&r.data("bs.carousel").to(e),t.preventDefault())};n(document).on("click.bs.carousel.data-api","[data-slide]",r).on("click.bs.carousel.data-api","[data-slide-to]",r);n(window).on("load",function(){n('[data-ride="carousel"]').each(function(){var t=n(this);i.call(t,t.data())})})}(jQuery);+function(n){"use strict";function i(i,r){return this.each(function(){var f=n(this),u=f.data("bs.modal"),e=n.extend({},t.DEFAULTS,f.data(),typeof i=="object"&&i);u||f.data("bs.modal",u=new t(this,e));typeof i=="string"?u[i](r):e.show&&u.show(r)})}var t=function(t,i){this.options=i;this.$body=n(document.body);this.$element=n(t);this.$dialog=this.$element.find(".modal-dialog");this.$backdrop=null;this.isShown=null;this.originalBodyPad=null;this.scrollbarWidth=0;this.ignoreBackdropClick=!1;this.fixedContent=".navbar-fixed-top, .navbar-fixed-bottom";this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,n.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))},r;t.VERSION="3.4.1";t.TRANSITION_DURATION=300;t.BACKDROP_TRANSITION_DURATION=150;t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0};t.prototype.toggle=function(n){return this.isShown?this.hide():this.show(n)};t.prototype.show=function(i){var r=this,u=n.Event("show.bs.modal",{relatedTarget:i});if(this.$element.trigger(u),!this.isShown&&!u.isDefaultPrevented()){this.isShown=!0;this.checkScrollbar();this.setScrollbar();this.$body.addClass("modal-open");this.escape();this.resize();this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',n.proxy(this.hide,this));this.$dialog.on("mousedown.dismiss.bs.modal",function(){r.$element.one("mouseup.dismiss.bs.modal",function(t){n(t.target).is(r.$element)&&(r.ignoreBackdropClick=!0)})});this.backdrop(function(){var f=n.support.transition&&r.$element.hasClass("fade"),u;r.$element.parent().length||r.$element.appendTo(r.$body);r.$element.show().scrollTop(0);r.adjustDialog();f&&r.$element[0].offsetWidth;r.$element.addClass("in");r.enforceFocus();u=n.Event("shown.bs.modal",{relatedTarget:i});f?r.$dialog.one("bsTransitionEnd",function(){r.$element.trigger("focus").trigger(u)}).emulateTransitionEnd(t.TRANSITION_DURATION):r.$element.trigger("focus").trigger(u)})}};t.prototype.hide=function(i){(i&&i.preventDefault(),i=n.Event("hide.bs.modal"),this.$element.trigger(i),this.isShown&&!i.isDefaultPrevented())&&(this.isShown=!1,this.escape(),this.resize(),n(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),n.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",n.proxy(this.hideModal,this)).emulateTransitionEnd(t.TRANSITION_DURATION):this.hideModal())};t.prototype.enforceFocus=function(){n(document).off("focusin.bs.modal").on("focusin.bs.modal",n.proxy(function(n){document===n.target||this.$element[0]===n.target||this.$element.has(n.target).length||this.$element.trigger("focus")},this))};t.prototype.escape=function(){if(this.isShown&&this.options.keyboard)this.$element.on("keydown.dismiss.bs.modal",n.proxy(function(n){n.which==27&&this.hide()},this));else this.isShown||this.$element.off("keydown.dismiss.bs.modal")};t.prototype.resize=function(){if(this.isShown)n(window).on("resize.bs.modal",n.proxy(this.handleUpdate,this));else n(window).off("resize.bs.modal")};t.prototype.hideModal=function(){var n=this;this.$element.hide();this.backdrop(function(){n.$body.removeClass("modal-open");n.resetAdjustments();n.resetScrollbar();n.$element.trigger("hidden.bs.modal")})};t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove();this.$backdrop=null};t.prototype.backdrop=function(i){var e=this,f=this.$element.hasClass("fade")?"fade":"",r,u;if(this.isShown&&this.options.backdrop){r=n.support.transition&&f;this.$backdrop=n(document.createElement("div")).addClass("modal-backdrop "+f).appendTo(this.$body);this.$element.on("click.dismiss.bs.modal",n.proxy(function(n){if(this.ignoreBackdropClick){this.ignoreBackdropClick=!1;return}n.target===n.currentTarget&&(this.options.backdrop=="static"?this.$element[0].focus():this.hide())},this));if(r&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!i)return;r?this.$backdrop.one("bsTransitionEnd",i).emulateTransitionEnd(t.BACKDROP_TRANSITION_DURATION):i()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),u=function(){e.removeBackdrop();i&&i()},n.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",u).emulateTransitionEnd(t.BACKDROP_TRANSITION_DURATION):u()):i&&i()};t.prototype.handleUpdate=function(){this.adjustDialog()};t.prototype.adjustDialog=function(){var n=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&n?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!n?this.scrollbarWidth:""})};t.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})};t.prototype.checkScrollbar=function(){var n=window.innerWidth,t;n||(t=document.documentElement.getBoundingClientRect(),n=t.right-Math.abs(t.left));this.bodyIsOverflowing=document.body.clientWidth<n;this.scrollbarWidth=this.measureScrollbar()};t.prototype.setScrollbar=function(){var i=parseInt(this.$body.css("padding-right")||0,10),t;this.originalBodyPad=document.body.style.paddingRight||"";t=this.scrollbarWidth;this.bodyIsOverflowing&&(this.$body.css("padding-right",i+t),n(this.fixedContent).each(function(i,r){var u=r.style.paddingRight,f=n(r).css("padding-right");n(r).data("padding-right",u).css("padding-right",parseFloat(f)+t+"px")}))};t.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad);n(this.fixedContent).each(function(t,i){var r=n(i).data("padding-right");n(i).removeData("padding-right");i.style.paddingRight=r?r:""})};t.prototype.measureScrollbar=function(){var n=document.createElement("div"),t;return n.className="modal-scrollbar-measure",this.$body.append(n),t=n.offsetWidth-n.clientWidth,this.$body[0].removeChild(n),t};r=n.fn.modal;n.fn.modal=i;n.fn.modal.Constructor=t;n.fn.modal.noConflict=function(){return n.fn.modal=r,this};n(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var r=n(this),f=r.attr("href"),e=r.attr("data-target")||f&&f.replace(/.*(?=#[^\s]+$)/,""),u=n(document).find(e),o=u.data("bs.modal")?"toggle":n.extend({remote:!/#/.test(f)&&f},u.data(),r.data());r.is("a")&&t.preventDefault();u.one("show.bs.modal",function(n){if(!n.isDefaultPrevented())u.one("hidden.bs.modal",function(){r.is(":visible")&&r.trigger("focus")})});i.call(u,o,this)})}(jQuery);+function(n){"use strict";function s(t,i){var u=t.nodeName.toLowerCase(),s,r,h;if(n.inArray(u,i)!==-1)return n.inArray(u,f)!==-1?Boolean(t.nodeValue.match(e)||t.nodeValue.match(o)):!0;for(s=n(i).filter(function(n,t){return t instanceof RegExp}),r=0,h=s.length;r<h;r++)if(u.match(s[r]))return!0;return!1}function i(t,i,r){var e,a,c,o,v,u,l,h,y,f,p;if(t.length===0)return t;if(r&&typeof r=="function")return r(t);if(!document.implementation||!document.implementation.createHTMLDocument)return t;for(e=document.implementation.createHTMLDocument("sanitization"),e.body.innerHTML=t,a=n.map(i,function(n,t){return t}),c=n(e.body).find("*"),o=0,v=c.length;o<v;o++){if(u=c[o],l=u.nodeName.toLowerCase(),n.inArray(l,a)===-1){u.parentNode.removeChild(u);continue}for(h=n.map(u.attributes,function(n){return n}),y=[].concat(i["*"]||[],i[l]||[]),f=0,p=h.length;f<p;f++)s(h[f],y)||u.removeAttribute(h[f].nodeName)}return e.body.innerHTML}function h(i){return this.each(function(){var u=n(this),r=u.data("bs.tooltip"),f=typeof i=="object"&&i;(r||!/destroy|hide/.test(i))&&(r||u.data("bs.tooltip",r=new t(this,f)),typeof i=="string"&&r[i]())})}var u=["sanitize","whiteList","sanitizeFn"],f=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],e=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,o=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i,t=function(n,t){this.type=null;this.options=null;this.enabled=null;this.timeout=null;this.hoverState=null;this.$element=null;this.inState=null;this.init("tooltip",n,t)},r;t.VERSION="3.4.1";t.TRANSITION_DURATION=150;t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"><\/div><div class="tooltip-inner"><\/div><\/div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]}};t.prototype.init=function(t,i,r){var f,e,u,o,s;if(this.enabled=!0,this.type=t,this.$element=n(i),this.options=this.getOptions(r),this.$viewport=this.options.viewport&&n(document).find(n.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(f=this.options.trigger.split(" "),e=f.length;e--;)if(u=f[e],u=="click")this.$element.on("click."+this.type,this.options.selector,n.proxy(this.toggle,this));else if(u!="manual"){o=u=="hover"?"mouseenter":"focusin";s=u=="hover"?"mouseleave":"focusout";this.$element.on(o+"."+this.type,this.options.selector,n.proxy(this.enter,this));this.$element.on(s+"."+this.type,this.options.selector,n.proxy(this.leave,this))}this.options.selector?this._options=n.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()};t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.getOptions=function(t){var r=this.$element.data();for(var f in r)r.hasOwnProperty(f)&&n.inArray(f,u)!==-1&&delete r[f];return t=n.extend({},this.getDefaults(),r,t),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t.sanitize&&(t.template=i(t.template,t.whiteList,t.sanitizeFn)),t};t.prototype.getDelegateOptions=function(){var t={},i=this.getDefaults();return this._options&&n.each(this._options,function(n,r){i[n]!=r&&(t[n]=r)}),t};t.prototype.enter=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget).data("bs."+this.type);if(i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)),t instanceof n.Event&&(i.inState[t.type=="focusin"?"focus":"hover"]=!0),i.tip().hasClass("in")||i.hoverState=="in"){i.hoverState="in";return}if(clearTimeout(i.timeout),i.hoverState="in",!i.options.delay||!i.options.delay.show)return i.show();i.timeout=setTimeout(function(){i.hoverState=="in"&&i.show()},i.options.delay.show)};t.prototype.isInStateTrue=function(){for(var n in this.inState)if(this.inState[n])return!0;return!1};t.prototype.leave=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget).data("bs."+this.type);if(i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)),t instanceof n.Event&&(i.inState[t.type=="focusout"?"focus":"hover"]=!1),!i.isInStateTrue()){if(clearTimeout(i.timeout),i.hoverState="out",!i.options.delay||!i.options.delay.hide)return i.hide();i.timeout=setTimeout(function(){i.hoverState=="out"&&i.hide()},i.options.delay.hide)}};t.prototype.show=function(){var c=n.Event("show.bs."+this.type),l,p,e,w,h;if(this.hasContent()&&this.enabled){if(this.$element.trigger(c),l=n.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]),c.isDefaultPrevented()||!l)return;var u=this,r=this.tip(),a=this.getUID(this.type);this.setContent();r.attr("id",a);this.$element.attr("aria-describedby",a);this.options.animation&&r.addClass("fade");var i=typeof this.options.placement=="function"?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,v=/\s?auto?\s?/i,y=v.test(i);y&&(i=i.replace(v,"")||"top");r.detach().css({top:0,left:0,display:"block"}).addClass(i).data("bs."+this.type,this);this.options.container?r.appendTo(n(document).find(this.options.container)):r.insertAfter(this.$element);this.$element.trigger("inserted.bs."+this.type);var f=this.getPosition(),o=r[0].offsetWidth,s=r[0].offsetHeight;y&&(p=i,e=this.getPosition(this.$viewport),i=i=="bottom"&&f.bottom+s>e.bottom?"top":i=="top"&&f.top-s<e.top?"bottom":i=="right"&&f.right+o>e.width?"left":i=="left"&&f.left-o<e.left?"right":i,r.removeClass(p).addClass(i));w=this.getCalculatedOffset(i,f,o,s);this.applyPlacement(w,i);h=function(){var n=u.hoverState;u.$element.trigger("shown.bs."+u.type);u.hoverState=null;n=="out"&&u.leave(u)};n.support.transition&&this.$tip.hasClass("fade")?r.one("bsTransitionEnd",h).emulateTransitionEnd(t.TRANSITION_DURATION):h()}};t.prototype.applyPlacement=function(t,i){var r=this.tip(),l=r[0].offsetWidth,e=r[0].offsetHeight,o=parseInt(r.css("margin-top"),10),s=parseInt(r.css("margin-left"),10),h,f,u;isNaN(o)&&(o=0);isNaN(s)&&(s=0);t.top+=o;t.left+=s;n.offset.setOffset(r[0],n.extend({using:function(n){r.css({top:Math.round(n.top),left:Math.round(n.left)})}},t),0);r.addClass("in");h=r[0].offsetWidth;f=r[0].offsetHeight;i=="top"&&f!=e&&(t.top=t.top+e-f);u=this.getViewportAdjustedDelta(i,t,h,f);u.left?t.left+=u.left:t.top+=u.top;var c=/top|bottom/.test(i),a=c?u.left*2-l+h:u.top*2-e+f,v=c?"offsetWidth":"offsetHeight";r.offset(t);this.replaceArrow(a,r[0][v],c)};t.prototype.replaceArrow=function(n,t,i){this.arrow().css(i?"left":"top",50*(1-n/t)+"%").css(i?"top":"left","")};t.prototype.setContent=function(){var t=this.tip(),n=this.getTitle();this.options.html?(this.options.sanitize&&(n=i(n,this.options.whiteList,this.options.sanitizeFn)),t.find(".tooltip-inner").html(n)):t.find(".tooltip-inner").text(n);t.removeClass("fade in top bottom left right")};t.prototype.hide=function(i){function e(){r.hoverState!="in"&&u.detach();r.$element&&r.$element.removeAttr("aria-describedby").trigger("hidden.bs."+r.type);i&&i()}var r=this,u=n(this.$tip),f=n.Event("hide.bs."+this.type);if(this.$element.trigger(f),!f.isDefaultPrevented())return u.removeClass("in"),n.support.transition&&u.hasClass("fade")?u.one("bsTransitionEnd",e).emulateTransitionEnd(t.TRANSITION_DURATION):e(),this.hoverState=null,this};t.prototype.fixTitle=function(){var n=this.$element;(n.attr("title")||typeof n.attr("data-original-title")!="string")&&n.attr("data-original-title",n.attr("title")||"").attr("title","")};t.prototype.hasContent=function(){return this.getTitle()};t.prototype.getPosition=function(t){t=t||this.$element;var r=t[0],u=r.tagName=="BODY",i=r.getBoundingClientRect();i.width==null&&(i=n.extend({},i,{width:i.right-i.left,height:i.bottom-i.top}));var f=window.SVGElement&&r instanceof window.SVGElement,e=u?{top:0,left:0}:f?null:t.offset(),o={scroll:u?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},s=u?{width:n(window).width(),height:n(window).height()}:null;return n.extend({},i,o,s,e)};t.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.left+t.width/2-i/2}:n=="left"?{top:t.top+t.height/2-r/2,left:t.left-i}:{top:t.top+t.height/2-r/2,left:t.left+t.width}};t.prototype.getViewportAdjustedDelta=function(n,t,i,r){var f={top:0,left:0},e,u,o,s,h,c;return this.$viewport?(e=this.options.viewport&&this.options.viewport.padding||0,u=this.getPosition(this.$viewport),/right|left/.test(n)?(o=t.top-e-u.scroll,s=t.top+e-u.scroll+r,o<u.top?f.top=u.top-o:s>u.top+u.height&&(f.top=u.top+u.height-s)):(h=t.left-e,c=t.left+e+i,h<u.left?f.left=u.left-h:c>u.right&&(f.left=u.left+u.width-c)),f):f};t.prototype.getTitle=function(){var t=this.$element,n=this.options;return t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title)};t.prototype.getUID=function(n){do n+=~~(Math.random()*1e6);while(document.getElementById(n));return n};t.prototype.tip=function(){if(!this.$tip&&(this.$tip=n(this.options.template),this.$tip.length!=1))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")};t.prototype.enable=function(){this.enabled=!0};t.prototype.disable=function(){this.enabled=!1};t.prototype.toggleEnabled=function(){this.enabled=!this.enabled};t.prototype.toggle=function(t){var i=this;t&&(i=n(t.currentTarget).data("bs."+this.type),i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)));t?(i.inState.click=!i.inState.click,i.isInStateTrue()?i.enter(i):i.leave(i)):i.tip().hasClass("in")?i.leave(i):i.enter(i)};t.prototype.destroy=function(){var n=this;clearTimeout(this.timeout);this.hide(function(){n.$element.off("."+n.type).removeData("bs."+n.type);n.$tip&&n.$tip.detach();n.$tip=null;n.$arrow=null;n.$viewport=null;n.$element=null})};t.prototype.sanitizeHtml=function(n){return i(n,this.options.whiteList,this.options.sanitizeFn)};r=n.fn.tooltip;n.fn.tooltip=h;n.fn.tooltip.Constructor=t;n.fn.tooltip.noConflict=function(){return n.fn.tooltip=r,this}}(jQuery);+function(n){"use strict";function r(i){return this.each(function(){var u=n(this),r=u.data("bs.popover"),f=typeof i=="object"&&i;(r||!/destroy|hide/.test(i))&&(r||u.data("bs.popover",r=new t(this,f)),typeof i=="string"&&r[i]())})}var t=function(n,t){this.init("popover",n,t)},i;if(!n.fn.tooltip)throw new Error("Popover requires tooltip.js");t.VERSION="3.4.1";t.DEFAULTS=n.extend({},n.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"><\/div><h3 class="popover-title"><\/h3><div class="popover-content"><\/div><\/div>'});t.prototype=n.extend({},n.fn.tooltip.Constructor.prototype);t.prototype.constructor=t;t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.setContent=function(){var n=this.tip(),i=this.getTitle(),t=this.getContent(),r;this.options.html?(r=typeof t,this.options.sanitize&&(i=this.sanitizeHtml(i),r==="string"&&(t=this.sanitizeHtml(t))),n.find(".popover-title").html(i),n.find(".popover-content").children().detach().end()[r==="string"?"html":"append"](t)):(n.find(".popover-title").text(i),n.find(".popover-content").children().detach().end().text(t));n.removeClass("fade top bottom left right in");n.find(".popover-title").html()||n.find(".popover-title").hide()};t.prototype.hasContent=function(){return this.getTitle()||this.getContent()};t.prototype.getContent=function(){var t=this.$element,n=this.options;return t.attr("data-content")||(typeof n.content=="function"?n.content.call(t[0]):n.content)};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};i=n.fn.popover;n.fn.popover=r;n.fn.popover.Constructor=t;n.fn.popover.noConflict=function(){return n.fn.popover=i,this}}(jQuery);+function(n){"use strict";function r(i){return this.each(function(){var u=n(this),r=u.data("bs.tab");r||u.data("bs.tab",r=new t(this));typeof i=="string"&&r[i]()})}var t=function(t){this.element=n(t)},u,i;t.VERSION="3.4.1";t.TRANSITION_DURATION=150;t.prototype.show=function(){var t=this.element,f=t.closest("ul:not(.dropdown-menu)"),i=t.data("target"),u;if(i||(i=t.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var r=f.find(".active:last a"),e=n.Event("hide.bs.tab",{relatedTarget:t[0]}),o=n.Event("show.bs.tab",{relatedTarget:r[0]});(r.trigger(e),t.trigger(o),o.isDefaultPrevented()||e.isDefaultPrevented())||(u=n(document).find(i),this.activate(t.closest("li"),f),this.activate(u,u.parent(),function(){r.trigger({type:"hidden.bs.tab",relatedTarget:t[0]});t.trigger({type:"shown.bs.tab",relatedTarget:r[0]})}))}};t.prototype.activate=function(i,r,u){function o(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1);i.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0);e?(i[0].offsetWidth,i.addClass("in")):i.removeClass("fade");i.parent(".dropdown-menu").length&&i.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0);u&&u()}var f=r.find("> .active"),e=u&&n.support.transition&&(f.length&&f.hasClass("fade")||!!r.find("> .fade").length);f.length&&e?f.one("bsTransitionEnd",o).emulateTransitionEnd(t.TRANSITION_DURATION):o();f.removeClass("in")};u=n.fn.tab;n.fn.tab=r;n.fn.tab.Constructor=t;n.fn.tab.noConflict=function(){return n.fn.tab=u,this};i=function(t){t.preventDefault();r.call(n(this),"show")};n(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery);+function(n){"use strict";function t(){var i=document.createElement("bootstrap"),n={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var t in n)if(i.style[t]!==undefined)return{end:n[t]};return!1}n.fn.emulateTransitionEnd=function(t){var i=!1,u=this,r;n(this).one("bsTransitionEnd",function(){i=!0});return r=function(){i||n(u).trigger(n.support.transition.end)},setTimeout(r,t),this};n(function(){(n.support.transition=t(),n.support.transition)&&(n.event.special.bsTransitionEnd={bindType:n.support.transition.end,delegateType:n.support.transition.end,handle:function(t){if(n(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})})}(jQuery),function(n){typeof define=="function"&&define.amd?define(["jquery"],n):typeof exports=="object"?n(require("jquery")):n(window.jQuery||window.Zepto)}(function(n){var o="Close",pt="BeforeClose",ti="AfterClose",ii="BeforeAppend",it="MarkupParse",rt="Open",wt="Change",ut="mfp",u="."+ut,p="mfp-ready",bt="mfp-removing",ft="mfp-prevent-close",t,w=function(){},et=!!window.jQuery,ot,s=n(window),f,b,h,kt,r=function(n,i){t.ev.on(ut+n+u,i)},l=function(t,i,r,u){var f=document.createElement("div");return f.className="mfp-"+t,r&&(f.innerHTML=r),u?i&&i.appendChild(f):(f=n(f),i&&f.appendTo(i)),f},i=function(i,r){t.ev.triggerHandler(ut+i,r);t.st.callbacks&&(i=i.charAt(0).toLowerCase()+i.slice(1),t.st.callbacks[i]&&t.st.callbacks[i].apply(t,n.isArray(r)?r:[r]))},st=function(i){return i===kt&&t.currTemplate.closeBtn||(t.currTemplate.closeBtn=n(t.st.closeMarkup.replace("%title%",t.st.tClose)),kt=i),t.currTemplate.closeBtn},ht=function(){n.magnificPopup.instance||(t=new w,t.init(),n.magnificPopup.instance=t)},ri=function(){var n=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(n.transition!==undefined)return!0;while(t.length)if(t.pop()+"Transition"in n)return!0;return!1},k,a,d,g,ct,e,gt,at,ni,nt,yt,tt;w.prototype={constructor:w,init:function(){var i=navigator.appVersion;t.isLowIE=t.isIE8=document.all&&!document.addEventListener;t.isAndroid=/android/gi.test(i);t.isIOS=/iphone|ipad|ipod/gi.test(i);t.supportsTransition=ri();t.probablyMobile=t.isAndroid||t.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent);f=n(document);t.popupsCache={}},open:function(e){var o,w,c,b,a,k,v,d,y;if(e.isObj===!1){for(t.items=e.items.toArray(),t.index=0,w=e.items,o=0;o<w.length;o++)if(c=w[o],c.parsed&&(c=c.el[0]),c===e.el[0]){t.index=o;break}}else t.items=n.isArray(e.items)?e.items:[e.items],t.index=e.index||0;if(t.isOpen){t.updateItemHTML();return}for(t.types=[],h="",t.ev=e.mainEl&&e.mainEl.length?e.mainEl.eq(0):f,e.key?(t.popupsCache[e.key]||(t.popupsCache[e.key]={}),t.currTemplate=t.popupsCache[e.key]):t.currTemplate={},t.st=n.extend(!0,{},n.magnificPopup.defaults,e),t.fixedContentPos=t.st.fixedContentPos==="auto"?!t.probablyMobile:t.st.fixedContentPos,t.st.modal&&(t.st.closeOnContentClick=!1,t.st.closeOnBgClick=!1,t.st.showCloseBtn=!1,t.st.enableEscapeKey=!1),t.bgOverlay||(t.bgOverlay=l("bg").on("click"+u,function(){t.close()}),t.wrap=l("wrap").attr("tabindex",-1).on("click"+u,function(n){t._checkIfClose(n.target)&&t.close()}),t.container=l("container",t.wrap)),t.contentContainer=l("content"),t.st.preloader&&(t.preloader=l("preloader",t.container,t.st.tLoading)),b=n.magnificPopup.modules,o=0;o<b.length;o++)a=b[o],a=a.charAt(0).toUpperCase()+a.slice(1),t["init"+a].call(t);if(i("BeforeOpen"),t.st.showCloseBtn&&(t.st.closeBtnInside?(r(it,function(n,t,i,r){i.close_replaceWith=st(r.type)}),h+=" mfp-close-btn-in"):t.wrap.append(st())),t.st.alignTop&&(h+=" mfp-align-top"),t.fixedContentPos?t.wrap.css({overflow:t.st.overflowY,overflowX:"hidden",overflowY:t.st.overflowY}):t.wrap.css({top:s.scrollTop(),position:"absolute"}),t.st.fixedBgPos!==!1&&(t.st.fixedBgPos!=="auto"||t.fixedContentPos)||t.bgOverlay.css({height:f.height(),position:"absolute"}),t.st.enableEscapeKey)f.on("keyup"+u,function(n){n.keyCode===27&&t.close()});s.on("resize"+u,function(){t.updateSize()});return t.st.closeOnContentClick||(h+=" mfp-auto-cursor"),h&&t.wrap.addClass(h),k=t.wH=s.height(),v={},t.fixedContentPos&&t._hasScrollBar(k)&&(d=t._getScrollbarSize(),d&&(v.marginRight=d)),t.fixedContentPos&&(t.isIE7?n("body, html").css("overflow","hidden"):v.overflow="hidden"),y=t.st.mainClass,t.isIE7&&(y+=" mfp-ie7"),y&&t._addClassToMFP(y),t.updateItemHTML(),i("BuildControls"),n("html").css(v),n("html").toggleClass("mfp-open",!0),t.bgOverlay.add(t.wrap).prependTo(t.st.prependTo||n(document.body)),t._lastFocusedEl=document.activeElement,setTimeout(function(){t.content?(t._addClassToMFP(p),t._setFocus()):t.bgOverlay.addClass(p);f.on("focusin"+u,t._onFocusIn)},16),t.isOpen=!0,t.updateSize(k),i(rt),e},close:function(){t.isOpen&&(i(pt),t.isOpen=!1,t.st.removalDelay&&!t.isLowIE&&t.supportsTransition?(t._addClassToMFP(bt),setTimeout(function(){t._close()},t.st.removalDelay)):t._close())},_close:function(){var r,e;i(o);r=bt+" "+p+" ";t.bgOverlay.detach();t.wrap.detach();t.container.empty();t.st.mainClass&&(r+=t.st.mainClass+" ");t._removeClassFromMFP(r);t.fixedContentPos&&(e={marginRight:""},t.isIE7?n("body, html").css("overflow",""):e.overflow="",n("html").css(e),n("html").removeClass("mfp-open"));f.off("keyup"+u+" focusin"+u);t.ev.off(u);t.wrap.attr("class","mfp-wrap").removeAttr("style");t.bgOverlay.attr("class","mfp-bg");t.container.attr("class","mfp-container");t.st.showCloseBtn&&(!t.st.closeBtnInside||t.currTemplate[t.currItem.type]===!0)&&t.currTemplate.closeBtn&&t.currTemplate.closeBtn.detach();t.st.autoFocusLast&&t._lastFocusedEl&&n(t._lastFocusedEl).focus();t.currItem=null;t.content=null;t.currTemplate=null;t.prevHeight=0;i(ti)},updateSize:function(n){if(t.isIOS){var u=document.documentElement.clientWidth/window.innerWidth,r=window.innerHeight*u;t.wrap.css("height",r);t.wH=r}else t.wH=n||s.height();t.fixedContentPos||t.wrap.css("height",t.wH);i("Resize")},updateItemHTML:function(){var u=t.items[t.index],r,f,e;t.contentContainer.detach();t.content&&t.content.detach();u.parsed||(u=t.parseEl(t.index));r=u.type;i("BeforeChange",[t.currItem?t.currItem.type:"",r]);t.currItem=u;t.currTemplate[r]||(f=t.st[r]?t.st[r].markup:!1,i("FirstMarkupParse",f),t.currTemplate[r]=f?n(f):!0);b&&b!==u.type&&t.container.removeClass("mfp-"+b+"-holder");e=t["get"+r.charAt(0).toUpperCase()+r.slice(1)](u,t.currTemplate[r]);t.appendContent(e,r);u.preloaded=!0;i(wt,u);b=u.type;t.container.prepend(t.contentContainer);i("AfterChange")},appendContent:function(n,r){t.content=n;n?t.st.showCloseBtn&&t.st.closeBtnInside&&t.currTemplate[r]===!0?t.content.find(".mfp-close").length||t.content.append(st()):t.content=n:t.content="";i(ii);t.container.addClass("mfp-"+r+"-holder");t.contentContainer.append(t.content)},parseEl:function(r){var u=t.items[r],o,e,f;if(u.tagName?u={el:n(u)}:(o=u.type,u={data:u,src:u.src}),u.el){for(e=t.types,f=0;f<e.length;f++)if(u.el.hasClass("mfp-"+e[f])){o=e[f];break}u.src=u.el.attr("data-mfp-src");u.src||(u.src=u.el.attr("href"))}return u.type=o||t.st.type||"inline",u.index=r,u.parsed=!0,t.items[r]=u,i("ElementParse",u),t.items[r]},addGroup:function(n,i){var u=function(r){r.mfpEl=this;t._openClick(r,n,i)},r;if(i||(i={}),r="click.magnificPopup",i.mainEl=n,i.items){i.isObj=!0;n.off(r).on(r,u)}else if(i.isObj=!1,i.delegate)n.off(r).on(r,i.delegate,u);else{i.items=n;n.off(r).on(r,u)}},_openClick:function(i,r,u){var e=u.midClick!==undefined?u.midClick:n.magnificPopup.defaults.midClick,f;if(e||!(i.which===2||i.ctrlKey||i.metaKey||i.altKey||i.shiftKey)){if(f=u.disableOn!==undefined?u.disableOn:n.magnificPopup.defaults.disableOn,f)if(n.isFunction(f)){if(!f.call(t,i))return!0}else if(s.width()<f)return!0;i.type&&(i.preventDefault(),t.isOpen&&i.stopPropagation());u.el=n(i.mfpEl);u.delegate&&(u.items=r.find(u.delegate));t.open(u)}},updateStatus:function(n,r){if(t.preloader){ot!==n&&t.container.removeClass("mfp-s-"+ot);r||n!=="loading"||(r=t.st.tLoading);var u={status:n,text:r};i("UpdateStatus",u);n=u.status;r=u.text;t.preloader.html(r);t.preloader.find("a").on("click",function(n){n.stopImmediatePropagation()});t.container.addClass("mfp-s-"+n);ot=n}},_checkIfClose:function(i){if(!n(i).hasClass(ft)){var r=t.st.closeOnContentClick,u=t.st.closeOnBgClick;if(r&&u||!t.content||n(i).hasClass("mfp-close")||t.preloader&&i===t.preloader[0])return!0;if(i===t.content[0]||n.contains(t.content[0],i)){if(r)return!0}else if(u&&n.contains(document,i))return!0;return!1}},_addClassToMFP:function(n){t.bgOverlay.addClass(n);t.wrap.addClass(n)},_removeClassFromMFP:function(n){this.bgOverlay.removeClass(n);t.wrap.removeClass(n)},_hasScrollBar:function(n){return(t.isIE7?f.height():document.body.scrollHeight)>(n||s.height())},_setFocus:function(){(t.st.focus?t.content.find(t.st.focus).eq(0):t.wrap).focus()},_onFocusIn:function(i){if(i.target!==t.wrap[0]&&!n.contains(t.wrap[0],i.target))return t._setFocus(),!1},_parseMarkup:function(t,r,f){var e;f.data&&(r=n.extend(f.data,r));i(it,[t,r,f]);n.each(r,function(i,r){var f,o;if(r===undefined||r===!1)return!0;e=i.split("_");e.length>1?(f=t.find(u+"-"+e[0]),f.length>0&&(o=e[1],o==="replaceWith"?f[0]!==r[0]&&f.replaceWith(r):o==="img"?f.is("img")?f.attr("src",r):f.replaceWith(n("<img>").attr("src",r).attr("class",f.attr("class"))):f.attr(e[1],r))):t.find(u+"-"+i).html(r)})},_getScrollbarSize:function(){if(t.scrollbarSize===undefined){var n=document.createElement("div");n.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;";document.body.appendChild(n);t.scrollbarSize=n.offsetWidth-n.clientWidth;document.body.removeChild(n)}return t.scrollbarSize}};n.magnificPopup={instance:null,proto:w.prototype,modules:[],open:function(t,i){return ht(),t=t?n.extend(!0,{},t):{},t.isObj=!0,t.index=i||0,this.instance.open(t)},close:function(){return n.magnificPopup.instance&&n.magnificPopup.instance.close()},registerModule:function(t,i){i.options&&(n.magnificPopup.defaults[t]=i.options);n.extend(this.proto,i.proto);this.modules.push(t)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&#215;<\/button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}};n.fn.magnificPopup=function(i){var r,u,f,e;return ht(),r=n(this),typeof i=="string"?i==="open"?(f=et?r.data("magnificPopup"):r[0].magnificPopup,e=parseInt(arguments[1],10)||0,f.items?u=f.items[e]:(u=r,f.delegate&&(u=u.find(f.delegate)),u=u.eq(e)),t._openClick({mfpEl:u},r,f)):t.isOpen&&t[i].apply(t,Array.prototype.slice.call(arguments,1)):(i=n.extend(!0,{},i),et?r.data("magnificPopup",i):r[0].magnificPopup=i,t.addGroup(r,i)),r};k="inline";ct=function(){g&&(d.after(g.addClass(a)).detach(),g=null)};n.magnificPopup.registerModule(k,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){t.types.push(k);r(o+"."+k,function(){ct()})},getInline:function(i,r){var f,u,e;return(ct(),i.src)?(f=t.st.inline,u=n(i.src),u.length?(e=u[0].parentNode,e&&e.tagName&&(d||(a=f.hiddenClass,d=l(a),a="mfp-"+a),g=u.after(d).detach().removeClass(a)),t.updateStatus("ready")):(t.updateStatus("error",f.tNotFound),u=n("<div>")),i.inlineElement=u,u):(t.updateStatus("ready"),t._parseMarkup(r,{},i),r)}}});var v="ajax",y,lt=function(){y&&n(document.body).removeClass(y)},dt=function(){lt();t.req&&t.req.abort()};n.magnificPopup.registerModule(v,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content<\/a> could not be loaded.'},proto:{initAjax:function(){t.types.push(v);y=t.st.ajax.cursor;r(o+"."+v,dt);r("BeforeChange."+v,dt)},getAjax:function(r){y&&n(document.body).addClass(y);t.updateStatus("loading");var u=n.extend({url:r.src,success:function(u,f,e){var o={data:u,xhr:e};i("ParseAjax",o);t.appendContent(n(o.data),v);r.finished=!0;lt();t._setFocus();setTimeout(function(){t.wrap.addClass(p)},16);t.updateStatus("ready");i("AjaxContentAdded")},error:function(){lt();r.finished=r.loadError=!0;t.updateStatus("error",t.st.ajax.tError.replace("%url%",r.src))}},t.st.ajax.settings);return t.req=n.ajax(u),""}}});gt=function(i){if(i.data&&i.data.title!==undefined)return i.data.title;var r=t.st.image.titleSrc;if(r){if(n.isFunction(r))return r.call(t,i);if(i.el)return i.el.attr(r)||""}return""};n.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"><\/div><figure><div class="mfp-img"><\/div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"><\/div><div class="mfp-counter"><\/div><\/div><\/figcaption><\/figure><\/div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image<\/a> could not be loaded.'},proto:{initImage:function(){var i=t.st.image,f=".image";t.types.push("image");r(rt+f,function(){t.currItem.type==="image"&&i.cursor&&n(document.body).addClass(i.cursor)});r(o+f,function(){i.cursor&&n(document.body).removeClass(i.cursor);s.off("resize"+u)});r("Resize"+f,t.resizeImage);t.isLowIE&&r("AfterChange",t.resizeImage)},resizeImage:function(){var n=t.currItem,i;n&&n.img&&t.st.image.verticalFit&&(i=0,t.isLowIE&&(i=parseInt(n.img.css("padding-top"),10)+parseInt(n.img.css("padding-bottom"),10)),n.img.css("max-height",t.wH-i))},_onImageHasSize:function(n){n.img&&(n.hasSize=!0,e&&clearInterval(e),n.isCheckingImgSize=!1,i("ImageHasSize",n),n.imgHidden&&(t.content&&t.content.removeClass("mfp-loading"),n.imgHidden=!1))},findImageSize:function(n){var i=0,u=n.img[0],r=function(f){e&&clearInterval(e);e=setInterval(function(){if(u.naturalWidth>0){t._onImageHasSize(n);return}i>200&&clearInterval(e);i++;i===3?r(10):i===40?r(50):i===100&&r(500)},f)};r(1)},getImage:function(r,u){var o=0,s=function(){r&&(r.img[0].complete?(r.img.off(".mfploader"),r===t.currItem&&(t._onImageHasSize(r),t.updateStatus("ready")),r.hasSize=!0,r.loaded=!0,i("ImageLoadComplete")):(o++,o<200?setTimeout(s,100):h()))},h=function(){r&&(r.img.off(".mfploader"),r===t.currItem&&(t._onImageHasSize(r),t.updateStatus("error",c.tError.replace("%url%",r.src))),r.hasSize=!0,r.loaded=!0,r.loadError=!0)},c=t.st.image,l=u.find(".mfp-img"),f;return(l.length&&(f=document.createElement("img"),f.className="mfp-img",r.el&&r.el.find("img").length&&(f.alt=r.el.find("img").attr("alt")),r.img=n(f).on("load.mfploader",s).on("error.mfploader",h),f.src=r.src,l.is("img")&&(r.img=r.img.clone()),f=r.img[0],f.naturalWidth>0?r.hasSize=!0:f.width||(r.hasSize=!1)),t._parseMarkup(u,{title:gt(r),img_replaceWith:r.img},r),t.resizeImage(),r.hasSize)?(e&&clearInterval(e),r.loadError?(u.addClass("mfp-loading"),t.updateStatus("error",c.tError.replace("%url%",r.src))):(u.removeClass("mfp-loading"),t.updateStatus("ready")),u):(t.updateStatus("loading"),r.loading=!0,r.hasSize||(r.imgHidden=!0,u.addClass("mfp-loading"),t.findImageSize(r)),u)}}});ni=function(){return at===undefined&&(at=document.createElement("p").style.MozTransform!==undefined),at};n.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(n){return n.is("img")?n:n.find("img")}},proto:{initZoom:function(){var f=t.st.zoom,s=".zoom",u;if(f.enabled&&t.supportsTransition){var c=f.duration,l=function(n){var r=n.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),u="all "+f.duration/1e3+"s "+f.easing,t={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},i="transition";return t["-webkit-"+i]=t["-moz-"+i]=t["-o-"+i]=t[i]=u,r.css(t),r},h=function(){t.content.css("visibility","visible")},e,n;r("BuildControls"+s,function(){if(t._allowZoom()){if(clearTimeout(e),t.content.css("visibility","hidden"),u=t._getItemToZoom(),!u){h();return}n=l(u);n.css(t._getOffset());t.wrap.append(n);e=setTimeout(function(){n.css(t._getOffset(!0));e=setTimeout(function(){h();setTimeout(function(){n.remove();u=n=null;i("ZoomAnimationEnded")},16)},c)},16)}});r(pt+s,function(){if(t._allowZoom()){if(clearTimeout(e),t.st.removalDelay=c,!u){if(u=t._getItemToZoom(),!u)return;n=l(u)}n.css(t._getOffset(!0));t.wrap.append(n);t.content.css("visibility","hidden");setTimeout(function(){n.css(t._getOffset())},16)}});r(o+s,function(){t._allowZoom()&&(h(),n&&n.remove(),u=null)})}},_allowZoom:function(){return t.currItem.type==="image"},_getItemToZoom:function(){return t.currItem.hasSize?t.currItem.img:!1},_getOffset:function(i){var r,u;r=i?t.currItem.img:t.st.zoom.opener(t.currItem.el||t.currItem);var f=r.offset(),e=parseInt(r.css("padding-top"),10),o=parseInt(r.css("padding-bottom"),10);return f.top-=n(window).scrollTop()-e,u={width:r.width(),height:(et?r.innerHeight():r[0].offsetHeight)-o-e},ni()?u["-moz-transform"]=u.transform="translate("+f.left+"px,"+f.top+"px)":(u.left=f.left,u.top=f.top),u}}});var c="iframe",ui="//about:blank",vt=function(n){if(t.currTemplate[c]){var i=t.currTemplate[c].find("iframe");i.length&&(n||(i[0].src=ui),t.isIE8&&i.css("display",n?"block":"none"))}};n.magnificPopup.registerModule(c,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"><\/div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen><\/iframe><\/div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){t.types.push(c);r("BeforeChange",function(n,t,i){t!==i&&(t===c?vt():i===c&&vt(!0))});r(o+"."+c,function(){vt()})},getIframe:function(i,r){var u=i.src,f=t.st.iframe,e;return n.each(f.patterns,function(){if(u.indexOf(this.index)>-1)return this.id&&(u=typeof this.id=="string"?u.substr(u.lastIndexOf(this.id)+this.id.length,u.length):this.id.call(this,u)),u=this.src.replace("%id%",u),!1}),e={},f.srcAction&&(e[f.srcAction]=u),t._parseMarkup(r,e,i),t.updateStatus("ready"),r}}});nt=function(n){var i=t.items.length;return n>i-1?n-i:n<0?i+n:n};yt=function(n,t,i){return n.replace(/%curr%/gi,t+1).replace(/%total%/gi,i)};n.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"><\/button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var u=t.st.gallery,i=".mfp-gallery";if(t.direction=!0,!u||!u.enabled)return!1;h+=" mfp-gallery";r(rt+i,function(){if(u.navigateByImgClick)t.wrap.on("click"+i,".mfp-img",function(){if(t.items.length>1)return t.next(),!1});f.on("keydown"+i,function(n){n.keyCode===37?t.prev():n.keyCode===39&&t.next()})});r("UpdateStatus"+i,function(n,i){i.text&&(i.text=yt(i.text,t.currItem.index,t.items.length))});r(it+i,function(n,i,r,f){var e=t.items.length;r.counter=e>1?yt(u.tCounter,f.index,e):""});r("BuildControls"+i,function(){if(t.items.length>1&&u.arrows&&!t.arrowLeft){var i=u.arrowMarkup,r=t.arrowLeft=n(i.replace(/%title%/gi,u.tPrev).replace(/%dir%/gi,"left")).addClass(ft),f=t.arrowRight=n(i.replace(/%title%/gi,u.tNext).replace(/%dir%/gi,"right")).addClass(ft);r.click(function(){t.prev()});f.click(function(){t.next()});t.container.append(r.add(f))}});r(wt+i,function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout);t._preloadTimeout=setTimeout(function(){t.preloadNearbyImages();t._preloadTimeout=null},16)});r(o+i,function(){f.off(i);t.wrap.off("click"+i);t.arrowRight=t.arrowLeft=null})},next:function(){t.direction=!0;t.index=nt(t.index+1);t.updateItemHTML()},prev:function(){t.direction=!1;t.index=nt(t.index-1);t.updateItemHTML()},goTo:function(n){t.direction=n>=t.index;t.index=n;t.updateItemHTML()},preloadNearbyImages:function(){for(var i=t.st.gallery.preload,r=Math.min(i[0],t.items.length),u=Math.min(i[1],t.items.length),n=1;n<=(t.direction?u:r);n++)t._preloadItem(t.index+n);for(n=1;n<=(t.direction?r:u);n++)t._preloadItem(t.index-n)},_preloadItem:function(r){if(r=nt(r),!t.items[r].preloaded){var u=t.items[r];u.parsed||(u=t.parseEl(r));i("LazyLoad",u);u.type==="image"&&(u.img=n('<img class="mfp-img" />').on("load.mfploader",function(){u.hasSize=!0}).on("error.mfploader",function(){u.hasSize=!0;u.loadError=!0;i("LazyLoadError",u)}).attr("src",u.src));u.preloaded=!0}}}});tt="retina";n.magnificPopup.registerModule(tt,{options:{replaceSrc:function(n){return n.src.replace(/\.\w+$/,function(n){return"@2x"+n})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var i=t.st.retina,n=i.ratio;n=isNaN(n)?n():n;n>1&&(r("ImageHasSize."+tt,function(t,i){i.img.css({"max-width":i.img[0].naturalWidth/n,width:"100%"})}),r("ElementParse."+tt,function(t,r){r.src=i.replaceSrc(r,n)}))}}}});ht()});window.Modernizr=function(n,t,i){function w(n){b.cssText=n}function o(n,t){return typeof n===t}var r={},u=t.documentElement,f="modernizr",v=t.createElement(f),b=v.style,k,g={}.toString,h={},y=[],c=y.slice,e,p=function(n,i,r,e){var l,a,c,v,o=t.createElement("div"),h=t.body,s=h||t.createElement("body");if(parseInt(r,10))while(r--)c=t.createElement("div"),c.id=e?e[r]:f+(r+1),o.appendChild(c);return l=["&#173;",'<style id="s',f,'">',n,"<\/style>"].join(""),o.id=f,(h?o:s).innerHTML+=l,s.appendChild(o),h||(s.style.background="",s.style.overflow="hidden",v=u.style.overflow,u.style.overflow="hidden",u.appendChild(s)),a=i(o,n),h?o.parentNode.removeChild(o):(s.parentNode.removeChild(s),u.style.overflow=v),!!a},d=function(t){var i=n.matchMedia||n.msMatchMedia,r;return i?i(t)&&i(t).matches||!1:(p("@media "+t+" { #"+f+" { position: absolute; } }",function(t){r=(n.getComputedStyle?getComputedStyle(t,null):t.currentStyle).position=="absolute"}),r)},l={}.hasOwnProperty,a,s;a=o(l,"undefined")||o(l.call,"undefined")?function(n,t){return t in n&&o(n.constructor.prototype[t],"undefined")}:function(n,t){return l.call(n,t)};Function.prototype.bind||(Function.prototype.bind=function(n){var t=this,i,r;if(typeof t!="function")throw new TypeError;return i=c.call(arguments,1),r=function(){var f,e,u;return this instanceof r?(f=function(){},f.prototype=t.prototype,e=new f,u=t.apply(e,i.concat(c.call(arguments))),Object(u)===u)?u:e:t.apply(n,i.concat(c.call(arguments)))},r});for(s in h)a(h,s)&&(e=s.toLowerCase(),r[e]=h[s](),y.push((r[e]?"":"no-")+e));return r.addTest=function(n,t){if(typeof n=="object")for(var f in n)a(n,f)&&r.addTest(f,n[f]);else{if(n=n.toLowerCase(),r[n]!==i)return r;t=typeof t=="function"?t():t;typeof enableClasses!="undefined"&&enableClasses&&(u.className+=" "+(t?"":"no-")+n);r[n]=t}return r},w(""),v=k=null,r._version="2.8.3",r.mq=d,r.testStyles=p,r}(this,this.document);Modernizr.addTest("mediaqueries",Modernizr.mq("only all")),function(n){"use strict";n.fn.fitVids=function(t){var i={customSelector:null,ignore:null};if(!document.getElementById("fit-vids-style")){var u=document.head||document.getElementsByTagName("head")[0],r=document.createElement("div");r.innerHTML='<p>x<\/p><style id="fit-vids-style">.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}<\/style>';u.appendChild(r.childNodes[1])}return t&&n.extend(i,t),this.each(function(){var u=['iframe[src*="player.vimeo.com"]','iframe[src*="youtube.com"]','iframe[src*="youtube-nocookie.com"]','iframe[src*="kickstarter.com"][src*="video.html"]',"object","embed"],r,t;i.customSelector&&u.push(i.customSelector);r=".fitvidsignore";i.ignore&&(r=r+", "+i.ignore);t=n(this).find(u.join(","));t=t.not("object object");t=t.not(r);t.each(function(t){var i=n(this),u;if(!(i.parents(r).length>0)&&(this.tagName.toLowerCase()!=="embed"||!i.parent("object").length)&&!i.parent(".fluid-width-video-wrapper").length){i.css("height")||i.css("width")||!(isNaN(i.attr("height"))||isNaN(i.attr("width")))||(i.attr("height",9),i.attr("width",16));var f=this.tagName.toLowerCase()==="object"||i.attr("height")&&!isNaN(parseInt(i.attr("height"),10))?parseInt(i.attr("height"),10):i.height(),e=isNaN(parseInt(i.attr("width"),10))?i.width():parseInt(i.attr("width"),10),o=f/e;i.attr("id")||(u="fitvid"+t,i.attr("id",u));i.wrap('<div class="fluid-width-video-wrapper"><\/div>').parent(".fluid-width-video-wrapper").css("padding-top",o*100+"%");i.removeAttr("height").removeAttr("width")}})})}}(window.jQuery||window.Zepto),function(n){typeof define=="function"&&define.amd?define(["jquery"],n):n(jQuery)}(function(n){function i(t){return n.isFunction(t)||typeof t=="object"?t:{top:t,left:t}}var t=n.scrollTo=function(t,i,r){return n(window).scrollTo(t,i,r)};return t.defaults={axis:"xy",duration:parseFloat(n.fn.jquery)>=1.3?0:1,limit:!0},t.window=function(){return n(window)._scrollable()},n.fn._scrollable=function(){return this.map(function(){var t=this,r=!t.nodeName||n.inArray(t.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1,i;return r?(i=(t.contentWindow||t).document||t.ownerDocument||t,/webkit/i.test(navigator.userAgent)||i.compatMode=="BackCompat"?i.body:i.documentElement):t})},n.fn.scrollTo=function(r,u,f){return typeof u=="object"&&(f=u,u=0),typeof f=="function"&&(f={onAfter:f}),r=="max"&&(r=9e9),f=n.extend({},t.defaults,f),u=u||f.duration,f.queue=f.queue&&f.axis.length>1,f.queue&&(u/=2),f.offset=i(f.offset),f.over=i(f.over),this._scrollable().each(function(){function v(n){h.animate(o,u,f.easing,n&&function(){n.call(this,e,f)})}var a;if(r!=null){var s=this,h=n(s),e=r,c,o={},l=h.is("html,body");switch(typeof e){case"number":case"string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(e)){e=i(e);break}if(e=l?n(e):n(e,this),!e.length)return;case"object":(e.is||e.style)&&(c=(e=n(e)).offset())}a=n.isFunction(f.offset)&&f.offset(s,e)||f.offset;n.each(f.axis.split(""),function(n,i){var p=i=="x"?"Left":"Top",u=p.toLowerCase(),r="scroll"+p,w=s[r],b=t.max(s,i),y;c?(o[r]=c[u]+(l?0:w-h.offset()[u]),f.margin&&(o[r]-=parseInt(e.css("margin"+p))||0,o[r]-=parseInt(e.css("border"+p+"Width"))||0),o[r]+=a[u]||0,f.over[u]&&(o[r]+=e[i=="x"?"width":"height"]()*f.over[u])):(y=e[u],o[r]=y.slice&&y.slice(-1)=="%"?parseFloat(y)/100*b:y);f.limit&&/^\d+$/.test(o[r])&&(o[r]=o[r]<=0?0:Math.min(o[r],b));!n&&f.queue&&(w!=o[r]&&v(f.onAfterFirst),delete o[r])});v(f.onAfter)}}).end()},t.max=function(t,i){var r=i=="x"?"Width":"Height",u="scroll"+r;if(!n(t).is("html,body"))return t[u]-n(t)[r.toLowerCase()]();var f="client"+r,e=t.ownerDocument.documentElement,o=t.ownerDocument.body;return Math.max(e[u],o[u])-Math.min(e[f],o[f])},t}),function(n){n.fn.hoverIntent=function(t,i){var r={sensitivity:7,interval:100,timeout:0};r=n.extend(r,i?{over:t,out:i}:t);var u,f,e,o,s=function(n){u=n.pageX;f=n.pageY},h=function(t,i){if(i.hoverIntent_t=clearTimeout(i.hoverIntent_t),Math.abs(e-u)+Math.abs(o-f)<r.sensitivity)return n(i).unbind("mousemove",s),i.hoverIntent_s=1,r.over.apply(i,[t]);e=u;o=f;i.hoverIntent_t=setTimeout(function(){h(t,i)},r.interval)},l=function(n,t){return t.hoverIntent_t=clearTimeout(t.hoverIntent_t),t.hoverIntent_s=0,r.out.apply(t,[n])},c=function(t){var u=jQuery.extend({},t),i=this;i.hoverIntent_t&&(i.hoverIntent_t=clearTimeout(i.hoverIntent_t));t.type=="mouseenter"?(e=u.pageX,o=u.pageY,n(i).bind("mousemove",s),i.hoverIntent_s!=1&&(i.hoverIntent_t=setTimeout(function(){h(u,i)},r.interval))):(n(i).unbind("mousemove",s),i.hoverIntent_s==1&&(i.hoverIntent_t=setTimeout(function(){l(u,i)},r.timeout)))};return this.bind("mouseenter",c).bind("mouseleave",c)}}(jQuery),function(n,t,i){var d="TEXTAREA",g="function",nt="password",c="maxLength",a="type",r="",u=!0,tt="placeholder",e=!1,it="watermark",o=it,s="watermarkClass",y="watermarkFocus",v="watermarkSubmit",p="watermarkMaxLength",h="watermarkPassword",f="watermarkText",l=/\r/g,ut=/^(button|checkbox|hidden|image|radio|range|reset|submit)$/i,rt="input:data("+o+"),textarea:data("+o+")",w=":watermarkable",b=["Page_ClientValidate"],k=e,ft=tt in document.createElement("input");n.watermark=n.watermark||{version:"3.1.4",runOnce:u,options:{className:it,useNative:u,hideBeforeUnload:u},hide:function(t){n(t).filter(rt).each(function(){n.watermark._hide(n(this))})},_hide:function(n,i){var o=n[0],b=(o.value||r).replace(l,r),v=n.data(f)||r,y=n.data(p)||0,w=n.data(s),u,e;v.length&&b==v&&(o.value=r,n.data(h)&&(n.attr(a)||r)==="text"&&(u=n.data(h)||[],e=n.parent()||[],u.length&&e.length&&(e[0].removeChild(n[0]),e[0].appendChild(u[0]),n=u)),y&&(n.attr(c,y),n.removeData(p)),i&&(n.attr("autocomplete","off"),t.setTimeout(function(){n.select()},1)));w&&n.removeClass(w)},show:function(t){n(t).filter(rt).each(function(){n.watermark._show(n(this))})},_show:function(t){var w=t[0],d=(w.value||r).replace(l,r),i=t.data(f)||r,b=t.attr(a)||r,g=t.data(s),e,o,v;d.length!=0&&d!=i||t.data(y)?n.watermark._hide(t):(k=u,t.data(h)&&b===nt&&(e=t.data(h)||[],o=t.parent()||[],e.length&&o.length&&(o[0].removeChild(t[0]),o[0].appendChild(e[0]),t=e,t.attr(c,i.length),w=t[0])),(b==="text"||b==="search")&&(v=t.attr(c)||0,v>0&&i.length>v&&(t.data(p,v),t.attr(c,i.length))),g&&t.addClass(g),w.value=i)},hideAll:function(){k&&(n.watermark.hide(w),k=e)},showAll:function(){n.watermark.show(w)}};n.fn.watermark=n.fn.watermark||function(i,p){var it="string",k,b;return this.length?(k=e,b=typeof i==it,b&&(i=i.replace(l,r)),typeof p=="object"?(k=typeof p.className==it,p=n.extend({},n.watermark.options,p)):typeof p==it?(k=u,p=n.extend({},n.watermark.options,{className:p})):p=n.watermark.options,typeof p.useNative!=g&&(p.useNative=p.useNative?function(){return u}:function(){return e}),this.each(function(){var et="dragleave",ot="dragenter",ut=this,e=n(ut),st,g,it,rt;if(e.is(w)){if(e.data(o))(b||k)&&(n.watermark._hide(e),b&&e.data(f,i),k&&e.data(s,p.className));else{if(ft&&p.useNative.call(ut,e)&&(e.attr("tagName")||r)!==d){b&&e.attr(tt,i);return}e.data(f,b?i:r);e.data(s,p.className);e.data(o,1);(e.attr(a)||r)===nt?(st=e.wrap("<span>").parent(),g=n(st.html().replace(/type=["']?password["']?/i,'type="text"')),g.data(f,e.data(f)),g.data(s,e.data(s)),g.data(o,1),g.attr(c,i.length),g.focus(function(){n.watermark._hide(g,u)}).bind(ot,function(){n.watermark._hide(g)}).bind("dragend",function(){t.setTimeout(function(){g.blur()},1)}),e.blur(function(){n.watermark._show(e)}).bind(et,function(){n.watermark._show(e)}),g.data(h,e),e.data(h,g)):e.focus(function(){e.data(y,1);n.watermark._hide(e,u)}).blur(function(){e.data(y,0);n.watermark._show(e)}).bind(ot,function(){n.watermark._hide(e)}).bind(et,function(){n.watermark._show(e)}).bind("dragend",function(){t.setTimeout(function(){n.watermark._show(e)},1)}).bind("drop",function(n){var t=e[0],i=n.originalEvent.dataTransfer.getData("Text");(t.value||r).replace(l,r).replace(i,r)===e.data(f)&&(t.value=i);e.focus()});ut.form&&(it=ut.form,rt=n(it),rt.data(v)||(rt.submit(n.watermark.hideAll),it.submit?(rt.data(v,it.submit),it.submit=function(t,i){return function(){var r=i.data(v);n.watermark.hideAll();r.apply?r.apply(t,Array.prototype.slice.call(arguments)):r()}}(it,rt)):(rt.data(v,1),it.submit=function(t){return function(){n.watermark.hideAll();delete t.submit;t.submit()}}(it))))}n.watermark._show(e)}})):this};n.watermark.runOnce&&(n.watermark.runOnce=e,n.extend(n.expr[":"],{data:n.expr.createPseudo?n.expr.createPseudo(function(t){return function(i){return!!n.data(i,t)}}):function(t,i,r){return!!n.data(t,r[3])},watermarkable:function(n){var t,i=n.nodeName;return i===d?u:i!=="INPUT"?e:(t=n.getAttribute(a),!t||!ut.test(t))}}),function(t){n.fn.val=function(){var u=this,e=Array.prototype.slice.call(arguments),s;return u.length?e.length?(t.apply(u,e),n.watermark.show(u),u):u.data(o)?(s=(u[0].value||r).replace(l,r),s===(u.data(f)||r)?r:s):t.apply(u):e.length?u:i}}(n.fn.val),b.length&&n(function(){for(var i,r,u=b.length-1;u>=0;u--)i=b[u],r=t[i],typeof r==g&&(t[i]=function(t){return function(){return n.watermark.hideAll(),t.apply(null,Array.prototype.slice.call(arguments))}}(r))}),n(t).bind("beforeunload",function(){n.watermark.options.hideBeforeUnload&&n.watermark.hideAll()}))}(jQuery,window),function(n,t,i){typeof define=="function"&&define.amd?define(["jquery"],function(r){return i(r,n,t),r.mobile}):i(n.jQuery,n,t)}(this,document,function(n,t,i){(function(n,t,i,r){function h(n){while(n&&typeof n.originalEvent!="undefined")n=n.originalEvent;return n}function vt(t,i){var u=t.type,e,o,l,f,s,a,v,c,y;if(t=n.Event(t),t.type=i,e=t.originalEvent,o=n.event.props,u.search(/^(mouse|click)/)>-1&&(o=gt),e)for(v=o.length,f;v;)f=o[--v],t[f]=e[f];if(u.search(/mouse(down|up)|click/)>-1&&!t.which&&(t.which=1),u.search(/^touch/)!==-1&&(l=h(e),u=l.touches,s=l.changedTouches,a=u&&u.length?u[0]:s&&s.length?s[0]:r,a))for(c=0,y=ct.length;c<y;c++)f=ct[c],t[f]=a[f];return t}function v(t){for(var i={},r,u;t;){r=n.data(t,o);for(u in r)r[u]&&(i[u]=i.hasVirtualBinding=!0);t=t.parentNode}return i}function yt(t,i){for(var r;t;){if(r=n.data(t,o),r&&(!i||r[i]))return t;t=t.parentNode}return null}function pt(){l=!1}function tt(){l=!0}function wt(){s=0;y.length=0;d=!1;tt()}function bt(){pt()}function w(){it();c=setTimeout(function(){c=0;wt()},n.vmouse.resetTimerDuration)}function it(){c&&(clearTimeout(c),c=0)}function f(t,i,r){var u;return(r&&r[t]||!r&&yt(i.target,t))&&(u=vt(i,t),n(i.target).trigger(u)),u}function rt(t){var r=n.data(t.target,b),i;d||s&&s===r||(i=f("v"+t.type,t),i&&(i.isDefaultPrevented()&&t.preventDefault(),i.isPropagationStopped()&&t.stopPropagation(),i.isImmediatePropagationStopped()&&t.stopImmediatePropagation()))}function ut(t){var o=h(t).touches,r,i,u;o&&o.length===1&&(r=t.target,i=v(r),i.hasVirtualBinding&&(s=ni++,n.data(r,b,s),it(),bt(),e=!1,u=h(t).touches[0],lt=u.pageX,at=u.pageY,f("vmouseover",t,i),f("vmousedown",t,i)))}function ft(n){l||(e||f("vmousecancel",n,v(n.target)),e=!0,w())}function et(t){if(!l){var i=h(t).touches[0],o=e,r=n.vmouse.moveDistanceThreshold,u=v(t.target);e=e||Math.abs(i.pageX-lt)>r||Math.abs(i.pageY-at)>r;e&&!o&&f("vmousecancel",t,u);f("vmousemove",t,u);w()}}function ot(n){if(!l){tt();var t=v(n.target),i,r;f("vmouseup",n,t);e||(i=f("vclick",n,t),i&&i.isDefaultPrevented()&&(r=h(n).changedTouches[0],y.push({touchID:s,x:r.clientX,y:r.clientY}),d=!0));f("vmouseout",n,t);e=!1;w()}}function st(t){var i=n.data(t,o),r;if(i)for(r in i)if(i[r])return!0;return!1}function ht(){}function kt(t){var i=t.substr(1);return{setup:function(){st(this)||n.data(this,o,{});var r=n.data(this,o);r[t]=!0;u[t]=(u[t]||0)+1;u[t]===1&&p.bind(i,rt);n(this).bind(i,ht);g&&(u.touchstart=(u.touchstart||0)+1,u.touchstart===1&&p.bind("touchstart",ut).bind("touchend",ot).bind("touchmove",et).bind("scroll",ft))},teardown:function(){--u[t];u[t]||p.unbind(i,rt);g&&(--u.touchstart,u.touchstart||p.unbind("touchstart",ut).unbind("touchmove",et).unbind("touchend",ot).unbind("scroll",ft));var r=n(this),f=n.data(this,o);f&&(f[t]=!1);r.unbind(i,ht);st(this)||r.removeData(o)}}}var o="virtualMouseBindings",b="virtualTouchID",k="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),ct="clientX clientY pageX pageY screenX screenY".split(" "),dt=n.event.mouseHooks?n.event.mouseHooks.props:[],gt=n.event.props.concat(dt),u={},c=0,lt=0,at=0,e=!1,y=[],d=!1,l=!1,g="addEventListener"in i,p=n(i),ni=1,s=0,nt,a;for(n.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,resetTimerDuration:1500},a=0;a<k.length;a++)n.event.special[k[a]]=kt(k[a]);g&&i.addEventListener("click",function(t){var f=y.length,e=t.target,o,s,i,r,u,h;if(f)for(o=t.clientX,s=t.clientY,nt=n.vmouse.clickDistanceThreshold,i=e;i;){for(r=0;r<f;r++)if(u=y[r],h=0,i===e&&Math.abs(u.x-o)<nt&&Math.abs(u.y-s)<nt||n.data(i,b)===u.touchID){t.preventDefault();t.stopPropagation();return}i=i.parentNode}},!0)})(n,t,i),function(n){n.mobile={}}(n),function(n){var t={touch:"ontouchend"in i};n.mobile.support=n.mobile.support||{};n.extend(n.support,t);n.extend(n.mobile.support,t)}(n),function(n,t,r){function f(t,i,u,f){var e=u.type;u.type=i;f?n.event.trigger(u,r,t):n.event.dispatch.call(t,u);u.type=e}var u=n(i),e=n.mobile.support.touch,s="touchmove scroll",h=e?"touchstart":"mousedown",c=e?"touchend":"mouseup",o=e?"touchmove":"mousemove";n.each("touchstart touchmove touchend tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "),function(t,i){n.fn[i]=function(n){return n?this.bind(i,n):this.trigger(i)};n.attrFn&&(n.attrFn[i]=!0)});n.event.special.scrollstart={enabled:!0,setup:function(){function i(n,i){t=i;f(r,t?"scrollstart":"scrollstop",n)}var r=this,e=n(r),t,u;e.bind(s,function(r){n.event.special.scrollstart.enabled&&(t||i(r,!0),clearTimeout(u),u=setTimeout(function(){i(r,!1)},50))})},teardown:function(){n(this).unbind(s)}};n.event.special.tap={tapholdThreshold:750,emitTapOnTaphold:!0,setup:function(){var i=this,r=n(i),t=!1;r.bind("vmousedown",function(e){function o(){clearTimeout(l)}function s(){o();r.unbind("vclick",h).unbind("vmouseup",o);u.unbind("vmousecancel",s)}function h(n){s();!t&&c===n.target?f(i,"tap",n):t&&n.preventDefault()}if(t=!1,e.which&&e.which!==1)return!1;var c=e.target,l;r.bind("vmouseup",o).bind("vclick",h);u.bind("vmousecancel",s);l=setTimeout(function(){n.event.special.tap.emitTapOnTaphold||(t=!0);f(i,"taphold",n.Event("taphold",{target:c}))},n.event.special.tap.tapholdThreshold)})},teardown:function(){n(this).unbind("vmousedown").unbind("vclick").unbind("vmouseup");u.unbind("vmousecancel")}};n.event.special.swipe={scrollSupressionThreshold:30,durationThreshold:1e3,horizontalDistanceThreshold:30,verticalDistanceThreshold:30,getLocation:function(n){var u=t.pageXOffset,f=t.pageYOffset,i=n.clientX,r=n.clientY;return n.pageY===0&&Math.floor(r)>Math.floor(n.pageY)||n.pageX===0&&Math.floor(i)>Math.floor(n.pageX)?(i-=u,r-=f):(r<n.pageY-f||i<n.pageX-u)&&(i=n.pageX-u,r=n.pageY-f),{x:i,y:r}},start:function(t){var r=t.originalEvent.touches?t.originalEvent.touches[0]:t,i=n.event.special.swipe.getLocation(r);return{time:(new Date).getTime(),coords:[i.x,i.y],origin:n(t.target)}},stop:function(t){var r=t.originalEvent.touches?t.originalEvent.touches[0]:t,i=n.event.special.swipe.getLocation(r);return{time:(new Date).getTime(),coords:[i.x,i.y]}},handleSwipe:function(t,i,r,u){if(i.time-t.time<n.event.special.swipe.durationThreshold&&Math.abs(t.coords[0]-i.coords[0])>n.event.special.swipe.horizontalDistanceThreshold&&Math.abs(t.coords[1]-i.coords[1])<n.event.special.swipe.verticalDistanceThreshold){var e=t.coords[0]>i.coords[0]?"swipeleft":"swiperight";return f(r,"swipe",n.Event("swipe",{target:u,swipestart:t,swipestop:i}),!0),f(r,e,n.Event(e,{target:u,swipestart:t,swipestop:i}),!0),!0}return!1},eventInProgress:!1,setup:function(){var i,r=this,f=n(r),t={};i=n.data(this,"mobile-events");i||(i={length:0},n.data(this,"mobile-events",i));i.length++;i.swipe=t;t.start=function(i){if(!n.event.special.swipe.eventInProgress){n.event.special.swipe.eventInProgress=!0;var e,s=n.event.special.swipe.start(i),h=i.target,f=!1;t.move=function(t){s&&!t.isDefaultPrevented()&&(e=n.event.special.swipe.stop(t),f||(f=n.event.special.swipe.handleSwipe(s,e,r,h),f&&(n.event.special.swipe.eventInProgress=!1)),Math.abs(s.coords[0]-e.coords[0])>n.event.special.swipe.scrollSupressionThreshold&&t.preventDefault())};t.stop=function(){f=!0;n.event.special.swipe.eventInProgress=!1;u.off(o,t.move);t.move=null};u.on(o,t.move).one(c,t.stop)}};f.on(h,t.start)},teardown:function(){var i,t;i=n.data(this,"mobile-events");i&&(t=i.swipe,delete i.swipe,i.length--,i.length===0&&n.removeData(this,"mobile-events"));t&&(t.start&&n(this).off(h,t.start),t.move&&u.off(o,t.move),t.stop&&u.off(c,t.stop))}};n.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe.left",swiperight:"swipe.right"},function(t,i){n.event.special[t]={setup:function(){n(this).bind(i,n.noop)},teardown:function(){n(this).unbind(i)}}})}(n,this)});BlogEngine={$:function(n){return document.getElementById(n)},webRoot:"/",i18n:{hasRated:"",savingTheComment:"",comments:"",commentWasSaved:"",commentWaitingModeration:"",cancel:"",filter:"",apmlDescription:"",beTheFirstToRate:"",currentlyRated:"",ratingHasBeenRegistered:"",rateThisXStars:""},getSiteSectionUrlFragment:function(){return window.g_hasSiteSections!==!1&&g_siteSection?(g_siteSection==="lifesciences"?"life-sciences":"medical")+"/":""},convertToAbsoluteUrl:function(n){if(/^https?:/i.test(n))return n;var t=n.indexOf("/")===0?n.substr(1):n;return document.location.protocol+"//"+document.location.host+"/"+t},getParameterByName:function(n){n=n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i="[\\?&]"+n+"=([^&#]*)",r=new RegExp(i),t=r.exec(window.location.href);return t==null?"":decodeURIComponent(t[1].replace(/\+/g," "))},getQueryVariable:function(n){for(var i,u=window.location.search.substring(1),r=u.split("&"),t=0;t<r.length;t++)if(i=r[t].split("="),i[0]==n)return decodeURIComponent($.trim(i[1]||""))},setFlag:function(n){n.length>0?$("#imgFlag").attr("src",BlogEngine.webRoot+"pics/flags/"+n+".png"):$("#imgFlag").attr("src",BlogEngine.webRoot+"pics/pixel.png")},getNewCaptchaIdAndUpdateImage:function(){return},composeComment:function(){var n=this.$("compose");n&&(n.className="selected")},updateCaptcha:function(){BlogEngine.getNewCaptchaIdAndUpdateImage()},initComments:function(){$(function(){$("#commentblock").on("click","a.like-comment-btn",function(n){return BlogEngine.likeComment(this,n)});$("#commentblock").on("click","a.dislike-comment-btn",function(n){return BlogEngine.dislikeComment(this,n)});$("#post-comment").click(function(n){return BlogEngine.addComment(this,n)});$("#tbCommentBody").blur(function(){$(this).removeClass("error")});var n=BlogEngine.getQueryVariable("reply-cid");n&&n.length==36&&BlogEngine.replyToComment(n);$("#tbCommentTitle").watermark("Quirky Comment Title (optional)",{className:"is-watermark"})})},updateCommentStatus:function(n,t,i,r){var f=$("#comment-status"),e=n&&n.length>0,u;e?(u="",t&&(u=$.trim(u+" success")),i&&(u=$.trim(u+" pleaseWait")),r&&(u=$.trim(u+" error")),f.html(n),f[0].className=u,f.show()):(f.html(""),f.hide())},getCurrentMathCaptchaId:function(){var t="",i=$("#imgAnswer").attr("src"),n;return i&&(n=BlogEngine.extractParamFromUri(i,"cid"),n&&n.toString().length===36&&(t=n)),t},toggleCommentSavingButton:function(n,t){var i=$(n);i.toggleClass("is-disabled",t);t?i.html("Saving..."):i.html("Post")},validateCommentForm:function(){var n=!0,t=$.trim($("#tbCommentBody").val());return t.length<1&&($("#tbCommentBody").addClass("error"),n=!1),n},addComment:function(n){if($(n).hasClass("is-disabled")||!BlogEngine.validateCommentForm())return!1;if(AZoProfileUtils.pendingSocialAction={action:"comment",triggerClickElement:$(n)},!AZoProfileUtils.isLoggedIntoAZoProfile())return AZoProfileUtils.showAZoProfileLoginFullOverlay(null,null),!1;var t=$.trim($("#tbCommentTitle").val()),i=$.trim($("#tbCommentBody").val()),r=$("#hiddenReplyTo").val(),u={commentToItemType:currentCommentItemTypeId,commentToItemId:currentCommentItemId,replyToCommentId:r,isPreview:!1,title:t,impressionId:Azom.impressionId||"",body:i};BlogEngine.updateCommentStatus("",!1,!1,!1);BlogEngine.toggleCommentSavingButton(n,!0);$.ajax({type:"POST",url:BlogEngine.convertToAbsoluteUrl("/site_services.asmx/SaveNewComment"),cache:!1,data:JSON.stringify(u),contentType:"application/json; charset=utf-8",dataType:"json",success:function(n){(BlogEngine.toggleCommentSavingButton($("#post-comment"),!1),n&&n.d)&&(n=n.d,n.ImpressionId&&Azom.initNewImpression(n),BlogEngine.appendComment(n))},error:function(n,t,i){BlogEngine.toggleCommentSavingButton($("#post-comment"),!1);var r=t;console.log("error SaveNewComment. textStatus: "+(t||"---")+", errorThrown: "+(i||""));BlogEngine.updateCommentStatus("An unexpected problem occurred saving your comment.",!1,!1,!0)}})},cancelReply:function(){this.replyToComment("")},moveCommentFormBackToBottomHolder:function(){var n=BlogEngine.$("comment-form-bottom-holder"),t=BlogEngine.$("comment-form");n.appendChild(t);$("#hiddenReplyTo").val("");BlogEngine.$("cancelReply")&&(BlogEngine.$("cancelReply").style.display="none");$("#azoprofile-identity-box-top").html("Post a new comment")},replyToComment:function(n){var r,t,i;$("#hiddenReplyTo").val(n||"");r=BlogEngine.$("comment-form");n&&n!=""&&n!=null&&n!="00000000-0000-0000-0000-000000000000"?(BlogEngine.$("cancelReply").style.display="",t=BlogEngine.$("id_"+n),t.appendChild(r),i=$(t).find(".vcard .fn").html(),i&&$("#azoprofile-identity-box-top").text("Reply to "+i)):BlogEngine.moveCommentFormBackToBottomHolder();$("#tbCommentTitle").focus()},appendComment:function(n){var u,i,f,r,e,t,o;if(n.Message){console.log("appendComment, data.Message: "+n.Message);BlogEngine.updateCommentStatus(n.Message,!1,!1,!0);return}if(n.RequiresLogin){console.log("requires login...");AZoProfileUtils.updateAZoProfileLoginStatusDisplay(null);return}if(!n.IsSuccessful){console.log("appendComment, no message, but unsuccessful.");BlogEngine.updateCommentStatus("Sorry, your comment was not saved for an unknown reason.",!1,!1,!0);return}u=n.CommentMarkup&&n.CommentMarkup.length>20;u&&(i=BlogEngine.$("singlecomments"),i||(f=$("#comments-wrap"),f.length<1?BlogEngine.logInConsole("cannot find #comments-wrap - this is unexpected."):($(document.createElement("ol")).attr("id","singlecomments").addClass("commentlist").appendTo(f),i=BlogEngine.$("singlecomments"))),i&&(BlogEngine.$("commentsBlockWrapper").style.display="block",r=$("#hiddenReplyTo").val(),r!=""?(e=BlogEngine.$("id_"+r),t=BlogEngine.$("replies_"+r),t==null&&(t=document.createElement("ul"),t.className="children",t.setAttribute("id")="replies_"+r,e.appendChild(t)),t.style.display="",t.innerHTML+=n.CommentMarkup):(i.innerHTML+=n.CommentMarkup,i.style.display="block")));AZoProfileUtils.pendingSocialAction=null;!0&&($("#tbCommentBody").val(""),$("#tbCommentTitle").val(""),BlogEngine.moveCommentFormBackToBottomHolder());u&&(o=n.IsPendingApproval?"Thank you for the feedback.  Your comment will appear once approved.":"The comment was saved. Thank you for the feedback.",BlogEngine.updateCommentStatus(o,!0,!1,!1))},getCommentIdFromChildElement:function(n){var r=$(n),i=r.closest("li.comment"),t;return i.length===1&&(t=i.attr("id"),t&&t.indexOf("id_")===0)?$.trim(t.substr(3)):null},updateCommentData:function(n){var i;if(n&&n.CommentId&&(i=$("#id_"+n.CommentId),i.length===1)){var t=i.find("div.like-dislike").first(),r=t.find(".like-count").first(),u=t.find(".dislike-count").first();t.removeClass("user-is-like user-is-dislike");n.IsLike!==null&&t.addClass(n.IsLike?"user-is-like":"user-is-dislike");r.html(n.Likes.toString());u.html(n.Dislikes.toString())}},updateCommentDataAll:function(n){if(n&&n.length)for(var t=0;t<n.length;t++)BlogEngine.updateCommentData(n[t])},getUpdateCommentData:function(){if(typeof currentCommentItemId=="string"){var n={action:"GetCommentData",itemTypeId:currentCommentItemTypeId,itemId:currentCommentItemId};$.ajax({type:"GET",url:BlogEngine.convertToAbsoluteUrl("/DataServices.axd"),cache:!1,data:n,contentType:"application/x-www-form-urlencoded; charset=UTF-8",dataType:"json",success:function(n){if(n){if(n.Message){console.log("getUpdateCommentData, data.Message: "+n.Message);return}BlogEngine.updateCommentDataAll(n.Comments)}},error:function(n,t,i){var r=t;console.log("error getUpdateCommentData. textStatus: "+(t||"---")+", errorThrown: "+(i||""))}})}},processCommentLikeDislikeResponse:function(n){if(n&&n.d){if(n=n.d,n.Message){console.log("processCommentLikeDislikeResponse, data.Message: "+n.Message);return}if(n.RequiresLogin){console.log("requires login...");AZoProfileUtils.updateAZoProfileLoginStatusDisplay(null);return}AZoProfileUtils.pendingSocialAction=null;BlogEngine.updateCommentData(n.Comment)}},submitCommentLikeDislike:function(n,t){var i={commentId:n,isLike:!!t};$.ajax({type:"POST",url:BlogEngine.convertToAbsoluteUrl("/site_services.asmx/LikeDislikeComment"),cache:!1,data:JSON.stringify(i),contentType:"application/json; charset=utf-8",dataType:"json",success:BlogEngine.processCommentLikeDislikeResponse,error:function(n,t,i){var r=t;console.log("error submitCommentLikeDislike. textStatus: "+(t||"---")+", errorThrown: "+(i||""))}})},likeComment:function(n){var t=BlogEngine.getCommentIdFromChildElement(n);return t?(AZoProfileUtils.pendingSocialAction={action:"like",triggerClickElement:$(n)},!AZoProfileUtils.isLoggedIntoAZoProfile())?(AZoProfileUtils.showAZoProfileLoginFullOverlay(null,null),!1):(BlogEngine.submitCommentLikeDislike(t,!0),!1):(console.log("likeComment: could not identify the commentId"),!1)},dislikeComment:function(n){var t=BlogEngine.getCommentIdFromChildElement(n);return t?(AZoProfileUtils.pendingSocialAction={action:"dislike",triggerClickElement:$(n)},!AZoProfileUtils.isLoggedIntoAZoProfile())?(AZoProfileUtils.showAZoProfileLoginFullOverlay(null,null),!1):(BlogEngine.submitCommentLikeDislike(t,!1),!1):(console.log("dislikeComment: could not identify the commentId"),!1)},clearSearchInput:function(n){var i=$(n),t=i.siblings('input[type="search"]');return t.length===1&&t.val("").focus(),!1},search:function(n,t,i,r){var c=!r,o,u,f,h;n=n||"globalSearchField";o=BlogEngine.$(n);t=t||BlogEngine.getParameterByName("t")||"all";var e=BlogEngine.getParameterByName("sort"),s="";if(i&&i.length)for(u=0;u<i.length;u++)i[u].k&&i[u].v&&(i[u].k==="sort"?e=i[u].v:s+="&"+i[u].k+"="+i[u].v);return f=o.value,jQuery&&jQuery.trim&&(f=jQuery.trim(f)),h=r&&typeof pageVars!="undefined"&&pageVars.isKeywordPageSearch,window.location.href="/"+BlogEngine.getSiteSectionUrlFragment()+"search?q="+encodeURIComponent(f)+"&t="+encodeURIComponent(t)+(e.length>0?"&sort="+encodeURIComponent(e):"")+(h?"&kp=1":"")+(c?"&fsb=1":"")+s,!1},searchKeyPress:function(n,t,i,r){var u;return(u=window.event?window.event.keyCode:n.which,u==13)?BlogEngine.search(t,i,r):!0},searchClear:function(n){var t=BlogEngine.$("globalSearchField");t.value==n?t.value="":t.value==""&&(t.value=n)},rate:function(n,t,i){BlogEngine.createCallback("rating.axd",BlogEngine.ratingCallback,"POST",null,"id="+n+"&rating="+t+"&pagelocation="+i+"&contenttype="+contentViewData.type+"&contentid="+contentViewData.id)},ratingCallback:function(n){var r=JSON.parse(n),t=$(".rating > p"),u=r.Message,f;if(u==="Unable to update rating. Please try again later."||u==="You have already rated this article.")t.stop(!0,!0).fadeTo(0,1).fadeOut("slow",function(){t.text(u).fadeIn("slow",function(){t.fadeOut(1e3,function(){t.text(t.data("original-text")).fadeIn(1e3)})})});else{var i=r.Rating,o=i.SelectedRating,e=r.PageLocation;if(t.text(BlogEngine.ratingMessage(i.Rate,i.TotalRatings)),t.attr("data-original-text",t.text()),t.text(BlogEngine.ratingMessage(i.Rate,i.TotalRatings)),t.attr("data-original-text",t.text()),f=$("div.ratingcontainer"),f.length<1)return;f.each(function(){var n=$(this).data("id");$(this).data("raters",i.TotalRatings);$(this).data("rating",i.Rate);BlogEngine.showRating(this,n,i.TotalRatings,i.Rate)});e=="SocialIconsSidebar"&&$(".sidebar-ratings .ratingcontainer").hide();BlogEngine.showFeedbackDialog(o,e)}},showFeedbackDialog:function(n,t){var i;switch(t){case"BottomOfContent":i=$("#azo-feedback-dialog");i.length<1&&(i=$(document.createElement("div")).attr("id","azo-feedback-dialog"),i.insertAfter($(".ratingcontainer").last()));BlogEngine.getInfoContent("feedbackDialog","","#azo-feedback-dialog","azoFeedbackDialog",function(){BlogEngine.initialiseFeedbackDialog(n,t)});break;case"SocialIconsSidebar":i=$("#azo-feedback-dialog");i.length<1&&(i=$(document.createElement("div")).attr("id","azo-feedback-dialog").addClass("mp-common-dialog mfp-with-anim mp-rounded-corners"),i.insertAfter($(".ratingcontainer").first()));BlogEngine.getInfoContent("feedbackDialog","","#azo-feedback-dialog","azoFeedbackDialog",function(){$.magnificPopup.open({type:"inline",modal:!1,items:{src:"#azo-feedback-dialog"},mainClass:"mfp-3d-unfold",removalDelay:500,midClick:!0,callbacks:{}});BlogEngine.initialiseFeedbackDialog(n,t)})}},initialiseFeedbackDialog:function(n,t){var f=$(".feedback-dialog-header"),e=$("ul.feedback-emotions-negative"),o=$("ul.feedback-emotions-positive"),s=$("ul.feedback-choices-negative"),h=$("ul.feedback-choices-positive"),c=$(".ratingcontainer").parent(".ratingWrap"),i,r,u;$(".feedback-emotions-negative li, .feedback-emotions-positive li").on("click",BlogEngine.setFeedbackEmotions);$(".feedback-choices-negative li, .feedback-choices-positive li").on("click",BlogEngine.setFeedbackChoices);n<=3?(e.css("display","table-row"),s.css("display","table-row")):(f.text("How helpful was it?"),o.css("display","table-row"),h.css("display","table-row"));switch(t){case"BottomOfContent":i=$(".sharebox-top");u=$(".feedback-dialog").offset();r=i.length>0?c.length>0?$(".ratingWrap").offset().top:$(".ratingcontainer").offset().top:u.top+=$(".feedback-dialog").outerHeight(!0);$("html, body").animate({scrollTop:r})}$(".feedback-dialog").data("selected-rating",n);$(".feedback-dialog").data("page-location",t);$(".feedback-dialog").slideDown("fast")},setFeedbackEmotions:function(){var n=$(this).data("emotion");$(".screen-one").data("feedback-emotion",n);$(".screen-one").fadeOut("fast",function(){$(".screen-two").fadeIn("fast").css("display","table");$(".breadcrumb-item.two").addClass("active")})},setFeedbackChoices:function(){var t=$(this).data("choice"),n=$(".screen-three p.message-header");$(".screen-two").data("feedback-choice",t);switch(t){case"ContentInaccurate":n.text("What was inaccurate in the content?");break;case"MissingInformation":n.text("What is missing from the content?");break;case"ContentHelpedMe":n.text("How did the content help you?");break;case"InformativeContent":n.text("How was it informative?")}$(".screen-two").fadeOut("fast",function(){$(".screen-three").fadeIn("fast");$(".breadcrumb-item.three").addClass("active")})},createCallback2:function(n,t,i){var r=BlogEngine.getHttpObject(),u;r.open("GET",BlogEngine.convertToAbsoluteUrl(n),!0);u=setTimeout(function(){r.abort()},4e4);r.onreadystatechange=function(){r.readyState==4&&(clearTimeout(u),r.responseText.length>0&&t!=null?t(r.responseText):i&&i("No response was returned for this action.  Please try again."))};r.send(null)},createCallback:function(n,t,i,r,u){i=i||"GET";i==="GET"&&u&&(u="");!r&&u&&(r="application/x-www-form-urlencoded");var f=BlogEngine.getHttpObject();f.open(i,BlogEngine.convertToAbsoluteUrl(n),!0);r&&f.setRequestHeader&&f.setRequestHeader("Content-Type",r);f.onreadystatechange=function(){f.readyState==4&&f.responseText.length>0&&t!=null&&t(f.responseText)};f.send(u?u:null)},getHttpObject:function(){if(typeof XMLHttpRequest!="undefined")return new XMLHttpRequest;try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(n){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(n){}}return!1},updateCalendar:function(n,t){var i=BlogEngine.$("calendarContainer");i.innerHTML=n;BlogEngine.Calendar.months[t]=n},toggleMonth:function(n){var u=BlogEngine.$("monthList"),t=u.getElementsByTagName("ul"),r;for(i=0;i<t.length;i++)if(t[i].id==n){r=t[i].className=="open"?"":"open";t[i].className=r;break}},equal:function(n,t){var i=n.toLowerCase().replace(new RegExp(" ","gi"),""),r=t.toLowerCase().replace(new RegExp(" ","gi"),"");return i==r},showRating:function(n,t,i,r){var y=Math.floor(r),p=r%1,e=document.createElement("div"),o,s,h,v,u,f,c,l;e.className="rating";o=document.createElement("p");e.appendChild(o);o.innerHTML=i==0?BlogEngine.i18n.beTheFirstToRate:BlogEngine.ratingMessage(r,i);o.setAttribute("data-original-text",o.innerHTML);s=document.createElement("input");s.className="current-rating";s.setAttribute("type","hidden");s.setAttribute("value",r);e.appendChild(s);let a=$(n).attr("data-page-location");for(h="icon-star-empty",v=[],u=5;u>=1;u--)f=document.createElement("a"),f.href="#",f.id=a+"-star-"+u,f.setAttribute("data-value",u),u<=y&&(h="icon-star-full"),f.className=this.englishNumber(u)+" "+h,f.title=BlogEngine.i18n.rateThisXStars.replace("{0}",u.toString()).replace("{1}",u==1?"":"s"),f.onclick=function(){var n=$(this);return BlogEngine.rate(t,n.attr("data-value"),a),!1},v.push(f),e.appendChild(f);n.innerHTML="";n.appendChild(e);c=$(".icon-star-empty");l=c.length;l!==0&&p!==0&&$(c[l-1]).removeClass("icon-star-empty").addClass("icon-star-half");n.style.visibility="visible"},applyRatings:function(){var t=$("div.ratingcontainer"),n;t.length<1||(t.each(function(){var t=$(this).data("id"),i=$(this).data("rating");n=$(this).data("raters");BlogEngine.showRating(this,t,n,i)}),BlogEngine.applyStarRatingCount(n))},applyStarRatingCount:function(n){if(n>0){var t=$("div.share-box");t.find("div.count-ratings").text(n).addClass("show");t.find("li.sidebar-ratings").addClass("has-count")}},ratingMessage:function(n,t){var i="people",r;return t==1&&(i="person"),r=BlogEngine.i18n.currentlyRated.replace("{0}",new Number(n).toFixed(1)).replace("{1}",t),r.replace("{2}",i)},englishNumber:function(n){return n==1?"one-star":n==2?"two-stars":n==3?"three-stars":n==4?"four-stars":"five-stars"},addLoadEvent:function(n){var t=window.onload;window.onload=typeof onload!="function"?n:function(){t();n()}},filterByAPML:function(){var o=document.documentElement.clientWidth+document.documentElement.scrollLeft,h=document.documentElement.clientHeight+document.documentElement.scrollTop,t,n,e,r,i,u,s,f;document.body.style.position="static";t=document.createElement("div");t.style.zIndex=2;t.id="layer";t.style.position="absolute";t.style.top="0px";t.style.left="0px";t.style.height=document.documentElement.scrollHeight+"px";t.style.width=o+"px";t.style.backgroundColor="black";t.style.opacity=".6";t.style.filter+="progid:DXImageTransform.Microsoft.Alpha(opacity=60)";document.body.appendChild(t);n=document.createElement("div");n.style.zIndex=3;n.id="apmlfilter";n.style.position=navigator.userAgent.indexOf("MSIE 6")>-1?"absolute":"fixed";n.style.top="200px";n.style.left=o/2-200+"px";n.style.height="50px";n.style.width="400px";n.style.backgroundColor="white";n.style.border="2px solid silver";n.style.padding="20px";document.body.appendChild(n);e=document.createElement("p");e.innerHTML=BlogEngine.i18n.apmlDescription;e.style.margin="0px";n.appendChild(e);r=document.createElement("form");r.method="get";r.style.display="inline";r.action=BlogEngine.webRoot;n.appendChild(r);i=document.createElement("input");i.type="text";i.value=BlogEngine.getCookieValue("url")||"http://";i.style.width="320px";i.id="txtapml";i.name="apml";i.style.background="url("+BlogEngine.webRoot+"pics/apml.png) no-repeat 2px center";i.style.paddingLeft="16px";r.appendChild(i);i.focus();u=document.createElement("input");u.type="submit";u.value=BlogEngine.i18n.filter;u.onclick=function(){location.href=BlogEngine.webRoot+"?apml="+encodeURIComponent(BlogEngine.$("txtapml").value)};r.appendChild(u);s=document.createElement("br");n.appendChild(s);f=document.createElement("a");f.innerHTML=BlogEngine.i18n.cancel;f.href="javascript:void(0)";f.onclick=function(){document.body.removeChild(BlogEngine.$("layer"));document.body.removeChild(BlogEngine.$("apmlfilter"));document.body.style.position=""};n.appendChild(f)},getCookieValue:function(n){var t=new String(document.cookie),i,r;return t!=null&&t.indexOf("comment=")>-1&&(i=t.indexOf(n+"=")+n.length+1,r=t.indexOf("&",i),r>i&&i>-1)?t.substring(i,r):null},findFirstElementWithIdContaining:function(n,t){var r,i,u;if(n.firstChild){for(t=t.toUpperCase(),r=0;r<n.childNodes.length;r++){if(i=n.childNodes[r],i.nodeType==1&&i.id&&i.id.toUpperCase().indexOf(t)!=-1)return i;if(i.firstChild&&(u=BlogEngine.findFirstElementWithIdContaining(i,t),u))return u}return null}},initExpandableSection:function(){$(".expandable-section").on("click",".toggle-expand",function(n){var i=$(n.currentTarget),t=i.siblings(".expand-item"),r=t.is(":visible");return t.toggle(!r),!1})},comments:{flagImage:null,contentBox:null,moderation:null,checkName:null,postAuthor:null,titleBox:null,nameBox:null,emailBox:null,websiteBox:null,countryDropDown:null,captchaField:null,controlId:null,replyToId:null},getSearchAutoSuggestMarkup:function(n){for(var i=[],t=0;t<n.News.length;t++)i.push({type:"news",value:n.News[t]});for(t=0;t<n.Health.length;t++)i.push({type:"health",value:n.Health[t]});for(t=0;t<n.LifeSciences.length;t++)i.push({type:"lifesciences",value:n.LifeSciences[t]});for(t=0;t<n.Drugs.length;t++)i.push({type:"drugs",value:n.Drugs[t]});return i},getSearchAutoSuggestInitialLoadingData:function(){return{outputCounts:{any:!1,news:0,drugs:0,health:0,lifesciences:0}}},invokeSearch:function(n){var f=$(n.currentTarget),r=f.data("search-box-selector"),t,i,u;return r?(t=$(r),t.length!==1)?(Azom.logInConsole("search-box-selector element not found (or found too many). search-box-selector: "+r),!1):(i=t.data("azosearch"),!i)?(Azom.logInConsole("have $searchBox but there is no azosearch data."),!1):(u=i.searchTypes.length===1?i.searchTypes[0]:"",BlogEngine.search(t.attr("id"),u,null,!1)):(Azom.logInConsole("missing search-box-selector."),!1)},initSearchAutoComplete:function(n){var r,t,u,i,f,e,o;if(n.length===1){if(n.attr("autocomplete","off"),r=$.trim(n.attr("data-search-types")||""),t=[],r)for(u=r.split(","),i=0;i<u.length;i++)f=$.trim(u[i]),f&&t.push(f);if(n.data("azosearch",{autoSuggestCache:{},autoSuggestCacheCount:0,lastAutoSuggestXhr:null,searchTypes:t,searchTypesJoined:t.join(",")}),n.autocomplete({minLength:1,delay:15,classes:{"ui-autocomplete":"search-ac-box"},create:function(){var n=$(this);n.autocomplete("widget").menu("option","items",".ui-selectable-item")},open:function(){navigator.userAgent.match(/(iPod|iPhone|iPad)/)&&$(".ui-autocomplete").off("menufocus hover mouseover")},close:function(){},position:{offset:"-4px 3px"},source:function(n,t){var u=this.element,i=u.data("azosearch"),r=$.trim(n.term||""),f,e,o;if(r.length!==0){if(f="term-"+r.toLowerCase(),e=i.autoSuggestCache[f],typeof e!="undefined"){o=BlogEngine.getSearchAutoSuggestMarkup(e,r);u.data("loading",BlogEngine.getSearchAutoSuggestInitialLoadingData());t(o);return}n.types=i.searchTypesJoined;i.lastAutoSuggestXhr=$.getJSON("/ac-search.axd?r="+Math.random(),n,function(n,e,o){if(i.autoSuggestCache[f]=n,i.autoSuggestCacheCount++,i.autoSuggestCacheCount>500&&(i.autoSuggestCacheCount=0,i.autoSuggestCache={}),o===i.lastAutoSuggestXhr){i.lastAutoSuggestXhr=null;var s=BlogEngine.getSearchAutoSuggestMarkup(n,r);u.data("loading",BlogEngine.getSearchAutoSuggestInitialLoadingData());t(s)}})}}}).data("ui-autocomplete")._renderItem=function(n,t){var e=this.element,o=e.data("azosearch"),u=o.searchTypes.length===0,i=e.data("loading"),f,r;return i.outputCounts.any||(i.outputCounts.any=!0,u&&$("<li><\/li>").addClass("as-top-hdr").html("Suggestions...").on("click",function(){return!1}).data("ui-autocomplete-item",{isSuggestionsTopHeader:!0}).appendTo(n)),f=t.type,r="",f==="news"?(u&&i.outputCounts.news===0&&(r="Top News Searches"),i.outputCounts.news++):f==="drugs"?(u&&i.outputCounts.drugs===0&&(r="Top Drug Searches"),i.outputCounts.drugs++):f==="health"?(u&&i.outputCounts.health===0&&(r="Top Health Searches"),i.outputCounts.health++):f==="lifesciences"&&(u&&i.outputCounts.lifesciences===0&&(r="Top Life Sciences Searches"),i.outputCounts.lifesciences++),r&&$("<li><\/li>").addClass("as-section-hdr").on("click",function(){return!1}).data("ui-autocomplete-item",{isSectionHeader:!0}).html(r).appendTo(n),$("<li><\/li>").data("item.autocomplete",t).append("<a>"+Encoder.htmlEncode(t.label)+"<\/a>").addClass("ui-selectable-item").appendTo(n)},n.data("search-box-selector","#"+n.attr("id")).keypress(function(n){if(n.keyCode===13)return!1}).keyup(function(n){if(n.keyCode===13)return BlogEngine.invokeSearch(n)}),e=$.trim((n.attr("data-search-btn-selector")||"").toString()),e&&(o=$(e),o.length))o.data("search-box-selector","#"+n.attr("id")).on("keypress click",BlogEngine.invokeSearch)}},applyHighlightEffect:function(n){$(n).css("backgroundColor","#ffc").delay(800).slideDown(600,function(){$(this).delay(100).animate({backgroundColor:"#ff3"},1800,function(){$(this).delay(500).animate({backgroundColor:"#ffc"},1e3)})})},animateCommonInfoBoxSlide:function(n,t){var r=$(t),i=$(n);if(!(r.length<1)&&!(i.length<1)){var u=i.height(),f=i.outerHeight(),e=r.width();i.css("height",u.toString()+"px");r.css("position","absolute");r.css("top",f.toString()+"px").css("left","10px").css("visibility","visible");window.setTimeout(function(){r.animate({top:"5px"},800,function(){window.setTimeout(function(){i.delay(200).animate({backgroundColor:"#ffff33"},1800,function(){window.setTimeout(function(){i.animate({backgroundColor:"#ffffcc"},300,function(){i.css({height:""});r.css({position:""})})},500)})},250)})},800)}},revertRfqExchangeSlotBgColorToNormal:function(n){$("#"+n)},applyRfqExchangeSlotHighlight:function(){},animateRfqExchangeSlotIcon:function(n){var t=$("#"+n+" .widget-highlight-contents a.icon")},animateRfqExchangeSlotContent:function(n){var t=$("#"+n+" .widget-highlight-contents .rfq-exchange-content")},initRfqExchangeSlotSlide:function(n){var t=$("#"+n);if(t.length===1)var u=t.find(".widget-highlight-contents a.icon, .widget-highlight-contents .rfq-exchange-content"),i=t.find(".widget-highlight-contents"),f=i.height(),e=i.outerHeight(),o=t.find(".widget-highlight-contents a.icon"),r=t.find(".widget-highlight-contents .rfq-exchange-content"),s=r.width()},applyRfqWidgetHighlightEffect:function(n){BlogEngine.initRfqExchangeSlotSlide(n)},getTranslationDisclaimer:function(n,t,i){!n||n.length>5||$.ajax({type:"GET",url:BlogEngine.convertToAbsoluteUrl("/DataServices.axd"),cache:!1,data:{action:"GetTranslationDisclaimer",language:n},contentType:"application/x-www-form-urlencoded; charset=UTF-8",dataType:"json",success:function(n){if(n&&!n.Message&&n.Disclaimer)$(".disclaimer-contents",$(t)).html(n.Disclaimer),BlogEngine.animateCommonInfoBoxSlide(t,i);else{var r=n?n.Message:"";r||(r="Failed to get the Translation Disclaimer.  The response follows.");Azom.logInConsole(r);Azom.logInConsole(n)}},error:function(n,t,i){var r=i}})},calculateSearchOptionContentsHeight:function(){var n=$("#search-options-contents"),t;n&&n.length>0&&!n.is(":visible")&&(n.css("visibility","hidden").css("display",""),t=n.height(),t>20&&n.css("height",t.toString()+"px"),n.css("display","none").css("visibility",""))},initializeSearch:function(){$("#search-more-menu").appendTo($(document.body));$("#more-search a").contextMenu({menu:"search-more-menu"},function(n){document.location.href="s"+n})},toggleSearchOptions:function(){return BlogEngine.calculateSearchOptionContentsHeight(),$("#search-options-contents").slideToggle(function(){$("#search-options-contents").css("height","")}),!1},infoContentCache:{},isInfoContentInCache:function(n){if(!n)return!1;return typeof BlogEngine.infoContentCache[n]!="undefined"},getInfoContent:function(n,t,i,r,u){var f=!!u;if(i&&$(i)[0].firstChild)return f&&u(),!0;if(r&&BlogEngine.isInfoContentInCache(r))return i&&$(i).html(BlogEngine.infoContentCache[r]),f&&u(),!0;var o="Sorry, the information you're looking for is currently unavailable.",e=!1,s=BlogEngine.convertToAbsoluteUrl("/content-bank.aspx?contentType="+encodeURIComponent(n)+"&site-section="+(window.g_siteSection||"")+(t||""));return $.ajax({type:"GET","async":f,url:s,dataType:"html",success:function(n){var t=n.match(/<!-- contents-start -->([\s\S]*?)<!-- contents-end -->/i);t&&t.length===2&&(t=t[1]);r&&(BlogEngine.infoContentCache[r]=t);i&&$(i).html(t);f&&u();e=!0},error:function(){alert(o)}}),f||e||Azom.isMagnificPopupOpen()&&$.magnificPopup.close(),e},selectContentTab:function(n,t){var r=$(n),i=r.closest("li"),u=i.siblings("li");return u.removeClass("selected").addClass("normal"),i.addClass("selected").removeClass("normal"),$(".content-tab-pane").hide(),$(t).show(),!1},savedBrowserSupportsFixedPosition:null,doesBrowserSupportFixedPosition:function(){var n,t;return BlogEngine.savedBrowserSupportsFixedPosition!==null?BlogEngine.savedBrowserSupportsFixedPosition:(document.createElement&&(n=document.createElement("div"),n&&n.style&&(n.style.position="fixed",n.style.top="10px",t=document.body,t&&t.appendChild&&t.removeChild&&(t.appendChild(n),BlogEngine.savedBrowserSupportsFixedPosition=n.offsetTop===10,t.removeChild(n)))),BlogEngine.savedBrowserSupportsFixedPosition===null&&(BlogEngine.savedBrowserSupportsFixedPosition=!0),BlogEngine.savedBrowserSupportsFixedPosition)},doesBrowserSupportInputPlaceholder:function(){var n=!1,t;return document.createElement&&(t=document.createElement("input"),n="placeholder"in t),n},doesShareBoxAnchorToBottom:function(){return window.location.hostname.indexOf("news-medical")!==-1},initFixedPosition:function(n,t,i,r){var u,f,e,o;if(BlogEngine.doesBrowserSupportFixedPosition()&&(u=$(n),u.length===1)&&(f=$(t),f.length===1)){u.toggleClass("fix-pos-el",!0);e=null;o=null;i&&(e=$(i),o=$(r),e.length!==1&&(e=null,elFixWithoutExceedingHeight=null));var s=$(window),h=$("body"),c=function(){var v=f.offset(),y=v.top,p=s.scrollTop(),n=!1,w=0,t=0,b=h.hasClass("hideheader"),k,c,l,i,a;h.hasClass("sharebox-top-show")&&!BlogEngine.doesShareBoxAnchorToBottom()?(k=b?0:105,t=k+40+20):t=b?20:135;var d=!1,g=u.hasClass("fix-pos-fixed"),nt=u.hasClass("fix-pos-absolute"),tt=!g&&!nt,it=p+t>y,rt=!1;if(e){rt=Azom.isSidebarUnderMainContent(e);var ut=u.outerHeight(!0),ft=e.offset().top,r=e.height();o&&o.length&&(c=o.height(),c>r?r=c:tt&&(d=!0));l=ft+r;n=it&&ut+(p+t)>l;n&&(w=l-ut-y)}i=!n&&it;a=!n&&!i;rt&&(n=!1,i=!1,a=!0);d||(a?tt||(u.css("top","").css("left","").css("width","").removeClass("fix-pos-fixed fix-pos-absolute"),f.css("height","")):n?(nt||(f.css("height",f.height().toString()+"px"),u.css("left","0").css("width",u.width().toString()+"px").removeClass("fix-pos-fixed").addClass("fix-pos-absolute notransitions")),u.css("top",w.toString()+"px")):i&&(g||(f.css("height",f.height().toString()+"px"),u.css("width",u.width().toString()+"px").removeClass("fix-pos-absolute").addClass("fix-pos-fixed notransitions"),window.setTimeout(function(){u.hasClass("fix-pos-fixed")&&u.removeClass("notransitions")},10)),u.css({left:v.left.toString()+"px",top:t.toString()+"px"})))};s.on("scroll resize",c);c()}},handleImageWithCaption:function(n,t){var i=$(n),r=i.closest(t),f;if(i.length>0&&r.length>0){var o=i.css("max-width"),u=!!o,h=u?n.style&&n.style.maxWidth?!0:!1:!1;u&&i.css("max-width","none");f=i.width();u&&i.css("max-width",h?o:"");var e=r.closest(".item-body").width(),c=e/2,l=f>c?!0:!1,s=Math.min(e,f);(e-s<160||l)&&r.addClass("content-item-img-full-width");r.css("width",s.toString()+"px")}},initContentImages:function(n){var t=$(n+" img");t.length<1||t.each(function(){this.width&&this.height?BlogEngine.handleImageWithCaption(this,n):$(this).load(function(t){BlogEngine.handleImageWithCaption(t.target,n)})})},logInConsole:function(n){typeof console!="undefined"&&typeof console.log=="function"&&console.log(n)},extractParamFromUri:function(n,t){var n,i,f,e,r,u;if(n&&(n=n.split("#")[0],i=n.split("?"),i.length!=1))for(f=decodeURI(i[1]),t+="=",e=f.split("&"),r=0;u=e[r];++r)if(u.indexOf(t)===0)return unescape(u.split("=")[1])},abbreviateNumber:function(n,t){var r,i,u;if((number=(n||"").toString().replace(/[,]+/gi,""),!number)||isNaN(number))return n;for(t=Math.pow(10,t),r=["k","m","b","t"],i=r.length-1;i>=0;i--)if(u=Math.pow(10,(i+1)*3),u<=number){number=Math.round(number*t/u)/t;number==1e3&&i<r.length-1&&(number=1,i++);number+=r[i];break}return number},numberWithCommas:function(n){var t=n.toString().split(".");return t[0].replace(/\B(?=(\d{3})+(?!\d))/g,",")+(t[1]?"."+t[1]:"")},onLinkedInShare:function(){Azom.pushAnalyticsEvent("share",{method:"LinkedIn"});Azom.recordClientEvent(!0,"share",[{name:"sharing-service",value:"LinkedIn"}],!0,null);BlogEngine.logInConsole("social interaction, LinkedIn, share")},recordFbLike:function(){typeof FB!="undefined"&&FB.Event&&FB.Event.subscribe&&(FB.Event.subscribe("edge.create",function(n){Azom.pushAnalyticsEvent("share",{method:"Facebook"});Azom.recordClientEvent(!0,"share",[{name:"sharing-service",value:"Facebook"}],!0,null);BlogEngine.logInConsole("social interaction, facebook, like, "+n)}),FB.Event.subscribe("edge.remove",function(n){BlogEngine.logInConsole("social interaction, facebook, unlike, "+n)}),FB.Event.subscribe("message.send",function(n){BlogEngine.logInConsole("social interaction, facebook, send, "+n)}))},recordTweetActivity:function(n){var t,i;(n&&n.type=="tweet"||n.type=="click")&&(n.target.nodeName=="IFRAME"&&(t=BlogEngine.extractParamFromUri(n.target.src,"url")),i=n.type,Azom.pushAnalyticsEvent("share",{method:"Twitter"}),Azom.recordClientEvent(!0,"share",[{name:"sharing-service",value:"Twitter"}],!0,null),BlogEngine.logInConsole("social interaction, twitter, "+i+", "+(t||"---")))},initTweetAnalyticsTracking:function(){typeof twttr!="undefined"&&twttr.events&&twttr.events.bind&&twttr.events.bind("tweet",function(n){BlogEngine.recordTweetActivity(n)})},loadTwitterAsync:function(){window.twttr=function(n,t,i){var u,r,f=n.getElementsByTagName(t)[0];if(!n.getElementById(i))return r=n.createElement(t),r.id=i,r.src="//platform.twitter.com/widgets.js",f.parentNode.insertBefore(r,f),window.twttr||(u={_e:[],ready:function(n){u._e.push(n)}})}(document,"script","twitter-wjs");twttr.ready(function(){BlogEngine.initTweetAnalyticsTracking()})},recordGooglePlusOneEvent:function(n){n&&n.state&&n.state==="on"&&Azom.recordClientEvent(!0,"share",[{name:"sharing-service",value:"Google +1"}],!0,null);BlogEngine.logInConsole("social interaction, Google +1, event.state: "+(n?n.state:"???"))},onAddThisShare:function(n){if(n&&n.data&&n.data.service){var t=n.data.service.toLowerCase();if(t==="linkedin"||t==="twitter"||t==="tweet"||t==="facebook"||t==="facebook_like"||t==="facebook_unlike"||t.indexOf("facebook_")===0||t==="google_plusone_share"){BlogEngine.logInConsole("skipping addthis event.  service: "+n.data.service);return}Azom.recordClientEvent(!0,"share",[{name:"sharing-service",value:n.data.service}],!0,null);BlogEngine.logInConsole("social interaction, AddThis, share, "+n.data.service)}},initCookieNoticeBar:function(){var i=$("#cookie-notice-bar"),t,n;if((window.g_countryCode==="GB"&&$("body").toggleClass("cntry-gb",!0),!(i.length<1))&&(t=BlogEngine.getVisitorCookieAndPrivacyPreferences().haveKind==="PreferencesReceived",!t)){if(!window.g_countryCode){console.error("country code missing");return}n=$("html");(!n.hasClass("show-cookie-bar")||bStrictCookies)&&(n.toggleClass("show-cookie-bar",!0),n.toggleClass("show-cookie-bar-standard",!bStrictCookies),n.toggleClass("show-cookie-bar-full",bStrictCookies));Azom.readCookie("cookiebarshown")||window.setTimeout(function(){var n=BlogEngine.getVisitorCookieAndPrivacyPreferences().haveKind==="PreferencesReceived";n||(Azom.createCookie("cookiebarshown","1",0),BlogEngine.wasCookieBarShownCookieSetOnThisPageView=!0)},3e3)}},arePerformanceScriptsLoaded:!1,loadPerformanceScripts:function(){BlogEngine.arePerformanceScriptsLoaded||BlogEngine.getVisitorCookieAndPrivacyPreferences().performance&&(BlogEngine.arePerformanceScriptsLoaded=!0,window._qevents=window._qevents||[],function(){var n=document.createElement("script"),t;n.src=(document.location.protocol=="https:"?"https://secure":"http://edge")+".quantserve.com/quant.js";n.async=!0;n.type="text/javascript";t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(n,t)}(),window._qevents.push({qacct:"p-44YZJYpg6LiCA"}),window.hotjarConfig&&window.hotjarConfig.id&&function(n,t,i,r,u,f){n.hj=n.hj||function(){(n.hj.q=n.hj.q||[]).push(arguments)};n._hjSettings={hjid:window.hotjarConfig.id,hjsv:6};u=t.getElementsByTagName("head")[0];f=t.createElement("script");f.async=1;f.src=i+n._hjSettings.hjid+r+n._hjSettings.hjsv;u.appendChild(f)}(window,document,"https://static.hotjar.com/c/hotjar-",".js?sv="),window.zohoPageSenseConfig&&window.zohoPageSenseConfig.id&&window.contentViewData&&window.contentViewData.type&&(window.contentViewData.type==="Webinar"||window.contentViewData.type==="IndustryFocus")&&function(){var n=document.createElement("script"),t;n.type="text/javascript";n.async=!0;n.src="https://cdn-eu.pagesense.io/js/azonetworkukltd/"+window.zohoPageSenseConfig.id+".js";t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(n,t)}(window,"script"))},areTargetingScriptsLoaded:!1,loadTargetingScripts:function(){BlogEngine.areTargetingScriptsLoaded||BlogEngine.getVisitorCookieAndPrivacyPreferences().targeting&&(BlogEngine.areTargetingScriptsLoaded=!0,window.g_endemicId&&BlogEngine.loadEndemicPixel(),typeof g_loadAim=="function"&&window.g_loadAim())},loadConsentDependentScripts:function(){BlogEngine.loadPerformanceScripts();BlogEngine.loadTargetingScripts()},loadEndemicPixel:function(){var n=function(n){var t=!n||!Array.isArray(n)||!n.length?"":JSON.stringify(n),i="https://bh.contextweb.com/cp?p="+window.g_endemicId+"&token=CK9XBQGDKSQB&ch=1&us_privacy=&gpp="+(t?"1":"0")+"&gpp_sid="+t+"&param1=[PARAM_1]&param2=[PARAM_2]&param3=[PARAM_3]&param4=[PARAM_4]&param5=[PARAM_5]";(function(){var n=document.createElement("script"),t;n.src=i;n.async=!0;n.type="text/javascript";t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(n,t)})()};window.g_isIabGppInUse&&window.__gpp?__gpp("ping",function(t,i){i?n(t.applicableSections):(console.error("Failed to retrieve GPP data."),n(null))}):n(null)},recordCookieConsentGoogleAnalyticsEvent:function(n,t){var i=window.g_cmpKind===1?$.trim((bStrictCookies?"[Strict]":"[Standard]")+" "+(t||"")):$.trim(t||"");Azom.pushAnalyticsEvent("cookie_consent_"+n,{event_label:i})},wasCookieBarShownCookieSetOnThisPageView:!1,saveCookiePreferences:function(n,t){var r,i,u;window.g_cmpKind===1&&(Azom.createCookie("cookiepolicy",n,365),Azom.readCookie("cookiebarshown")&&Azom.eraseCookie("cookiebarshown"),r=Azom.getCookieSettingsTextForAnalyticsEvent(n),BlogEngine.recordCookieConsentGoogleAnalyticsEvent(t,r));typeof updateGoogleConsentModeUserPreferences=="function"&&updateGoogleConsentModeUserPreferences();i=[];i.push({name:"current-url",value:window.location.href});Azom.impressionId&&i.push({name:"impression-id",value:Azom.impressionId||""});document.referrer&&i.push({name:"referrer",value:document.referrer});u=typeof contentViewData!="undefined"&&contentViewData.type&&contentViewData.id;Azom.recordClientEvent(!0,"cookie-preferences-updated",i,u,null);BlogEngine.loadConsentDependentScripts()},onOneTrustConsentsUpdated:function(){var n=BlogEngine.getVisitorCookieAndPrivacyPreferences(),t=(n.performance?"1":"0")+(n.functional?"1":"0")+(n.targeting?"1":"0");BlogEngine.saveCookiePreferences(t,"onetrust_consents_updated")},tcData:null,tcfListener:function(n,t){if(BlogEngine.tcData=n,t&&(n.eventStatus==="tcloaded"||n.eventStatus==="useractioncomplete")&&n.gdprApplies)var i=n.purpose.consents[1]||!1,r=n.purpose.consents[3]||!1,u=n.purpose.consents[4]||!1,f=n.vendor.consents[755]||!1},onAcceptAllCookiesClick:function(){return BlogEngine.saveCookiePreferences("111","accept_all_on_cookie_bar"),BlogEngine.closeCookieNotice(!1),!1},onRejectAllCookiesClick:function(){return BlogEngine.saveCookiePreferences("000","reject_all_on_cookie_bar"),BlogEngine.closeCookieNotice(!1),!1},getVisitorCookieAndPrivacyPreferences:function(){var n;return window.g_cmpKind===2?!window.g_areInitialOneTrustConsentsAvailable||typeof OnetrustActiveGroups!="string"?(console.error("OneTrust consents are not yet available."),{haveKind:"NoPreferences",performance:!1,functional:!1,targeting:!1}):{haveKind:"PreferencesReceived",performance:OnetrustActiveGroups.includes("C0002"),functional:OnetrustActiveGroups.includes("C0003"),targeting:OnetrustActiveGroups.includes("C0004")}:(n=Azom.readCookie("cookiepolicy"),!n||n.length!==3||!/^[01]{3}$/gi.test(n))?(typeof bStrictCookies=="undefined"&&window.g_cookiePolicyStatus===3&&console.error("bStrictCookies is undefined when it needs to be evaluated and g_cookiePolicyStatus is 3. g_cookiePolicyStatus: "+window.g_cookiePolicyStatus),bStrictCookies||!Azom.readCookie("cookiebarshown")||BlogEngine.wasCookieBarShownCookieSetOnThisPageView?{haveKind:"NoPreferences",performance:!1,functional:!1,targeting:!1}:{haveKind:"SoftOptInPreferenes",performance:!0,functional:!0,targeting:!0}):{haveKind:"PreferencesReceived",performance:n[0]==="1",functional:n[1]==="1",targeting:n[2]==="1"}},displayCookieSettings:function(n){var t,i;return window.g_cmpKind===2?(Optanon.ToggleInfoDisplay(),!1):(t=$("#azo-cookie-settings-dialog"),t.length<1&&(t=$(document.createElement("div")).attr("id","azo-cookie-settings-dialog").addClass("mp-common-dialog mfp-with-anim"),t.appendTo($("body").first())),i="",BlogEngine.getInfoContent("cookieSettingsDialog",i,"#azo-cookie-settings-dialog","azo-cookie-settings-dialog",function(){$.magnificPopup.open({type:"inline",modal:!1,items:{src:"#azo-cookie-settings-dialog"},mainClass:"mfp-3d-unfold",removalDelay:500,midClick:!0,callbacks:{}});$("#allowAllCookieSettings").css({display:bStrictCookies?"inline-block":"none"});$("#rejectAllCookieSettings").css({display:bStrictCookies?"inline-block":"none"});$("#azo-cookie-saved-wrapper").hide();$(".cookie-settings-dialog-body").show();$(".cookie-setting-tabs li").removeClass("active");$(".cookie-settings-tab-content").removeClass("active").addClass("hide");$(".cookie-setting-tabs li > a[data-tab-id='privacy']").parent("li").addClass("active");$("div#privacy").removeClass("hide").addClass("active");Azom.applyCookieSettings();BlogEngine.recordCookieConsentGoogleAnalyticsEvent("settings_opened","Source of Open: "+(n||"???"))}),!1)},closeCookieNotice:function(n){return $("#cookie-notice-bar").fadeOut(function(){$("html").removeClass("show-cookie-bar show-cookie-bar-full show-cookie-bar-standard")}),n&&BlogEngine.recordCookieConsentGoogleAnalyticsEvent("bar_closed_via_x_click",null),!1},displayProfileDetails:function(n){var t=$("#profile-details-dialog"),i,r;return t.length<1&&(t=$(document.createElement("div")).attr("id","profile-details-dialog").addClass("mp-common-dialog mfp-with-anim"),t.appendTo($("body").first())),i="&pid="+n.toString(),r="profile-"+n.toString()+"-details-dialog",t.empty(),BlogEngine.getInfoContent("employeeProfileDetailsDialog",i,"#profile-details-dialog",r,function(){$.magnificPopup.open({type:"inline",modal:!1,items:{src:"#profile-details-dialog"},closeBtnInside:!0,mainClass:"mfp-3d-unfold",removalDelay:500,midClick:!0,callbacks:{}})}),!1},toggleHoverMenu:function(n,t){var i=$(n);t?i.slideDown("fast"):i.slideUp("fast")},isHoverMenuVisible:function(n){return $(n).is(":visible")},onMenuHoverOver:function(){},onMenuHoverOut:function(n){BlogEngine.toggleHoverMenu(n,!1)},onHoverMenuClick:function(n){var t=BlogEngine.isHoverMenuVisible(n);return BlogEngine.toggleHoverMenu(n,!t),!1},onNavSubMenuHoverOver:function(){},onNavSubMenuLinkHoverOver:function(n){var e=$(n),i=e.closest("li");i.closest("ul").find("li.showSubTab").removeClass("showSubTab");var l=i.position(),f=l.top,o=e.siblings("div.navSubTab"),v=i.index(),a=f*-1;i.addClass("showSubTab");var r=o.height(),t=r/-2+10,s=function(n,t){return n+t},h=function(n,t){return n+t},u=s(f,t),c=h(u,r);c>400&&(t=r*-1+30,u=s(f,t),c=h(u,r));u<0&&(t=a);o.css("top",t.toString()+"px")},onNavSubMenuHoverOut:function(n){var t=$(n);$(t).removeClass("showSubTab")},initNavSubMenus:function(){var n=$("#nav_fmt div.navDrop li:has(div.navSubTab) > a"),t,i;n.length<1||(t=n.closest("li"),i={sensitivity:7,interval:0,over:function(){BlogEngine.onNavSubMenuHoverOver(this)},timeout:600,out:function(){BlogEngine.onNavSubMenuHoverOut(this)}},t.hoverIntent(i),n.mouseenter(function(){BlogEngine.onNavSubMenuLinkHoverOver(this)}),$("#nav_fmt li:has(div.navTab)").mouseenter(function(){$(this).find("li.showSubTab").removeClass("showSubTab")}),$("#nav_fmt div.navSubTabUninit").removeClass("navSubTabUninit"))},toggleAllOfferBlockItems:function(n){var i=$(n),r=i.closest("div.offer-target-block"),t=r.find("div.offer-target-block-all"),u=t.is(":visible");return u?t.stop(!0,!0).slideUp():t.stop(!0,!0).slideDown(),!1},initUniform:function(){$("div.azo-uniform input:not(:submit), div.azo-uniform select, div.azo-uniform textarea").uniform()},hideLanguagesMenu:function(){$("body").off("touchstart.languagesdisplay");var n=$("#translation-view-options");n.removeClass("show-all-langs").data("is-open",!1)},initContentLanguages:function(){var i=$("#translation-view-options"),n,t;if(!(i.length<1)){if(i.children().length<1){if(typeof pageContentLanguages!="object")return;for(n="",n='<div class="translation-view-options-inner">',n+='<div class="lang-label">Read in:<\/div>',n+='<div class="article-meta lang">',t=0;t<pageContentLanguages.langs.length;t++){t===1&&(n+='<span class="other-langs-wrap">');var r=pageContentLanguages.langs[t],u=t===0,f=r.code.toLowerCase()==="en",e=f?"":"&lang="+r.code,o=f?"":' rel="nofollow"';n+=u?'<span class="current-lang">':'<a href="?'+pageContentLanguages.pageContentQsParmName+"="+pageContentLanguages.pageContentId.toString()+e+'"'+o+">";n+=Encoder.htmlEncode(r.name);n+=u?"<\/span>":"<\/a>";t===pageContentLanguages.langs.length-1&&(n+="<\/span>")}n+="<\/div>";n+="<\/div>";i.html(n)}i.on("click",function(n){n.stopImmediatePropagation();var t=$(this),i=!!t.data("is-open");if(!i){t.addClass("show-all-langs").data("is-open",!0);$("body").off("touchstart.languagesdisplay").on("touchstart.languagesdisplay",function(n){$(n.target).closest("#translation-view-options").length>0||BlogEngine.hideLanguagesMenu(n)})}}).on("mouseleave",function(n){BlogEngine.hideLanguagesMenu(n)})}},createOfferDisplayTrackingText:function(n){var u,r,t,i;if(typeof g_pageOffers=="undefined"||!g_pageOffers.length)return BlogEngine.logInConsole("g_pageOffers is undefined in createOfferDisplayTrackingText."),"";if(u=$(n),r=u.attr("id"),!r)return BlogEngine.logInConsole("could not get linkId in createOfferDisplayTrackingText."),"";for(t=null,i=0;i<g_pageOffers.length;i++)if(g_pageOffers[i].id===r){t=g_pageOffers[i];break}return t?t.offerName+" - "+t.displayType:(BlogEngine.logInConsole("offerData is null in createOfferDisplayTrackingText - could not find the offer."),"")},onOfferDisplayClick:function(n){var t,i,r,u;return Azom.isGa4Loaded()?(t=$(n.currentTarget),i=BlogEngine.createOfferDisplayTrackingText(t),!i)?!0:(r="is-click-recorded",t.data(r))?(BlogEngine.logInConsole("click already recorded for offer link: "+i),!0):(BlogEngine.logInConsole("tracking Offer Display/Content Placements: "+i),t.data(r,!0),u=t.attr("href"),gtag("event","offer_display_click",{event_label:i,event_callback:function(){u&&(document.location.href=u)}}),n.preventDefault(),n.stopPropagation(),!1):(BlogEngine.logInConsole("gtag is undefined or not loaded in onOfferDisplayClick."),!0)},initOfferDisplays:function(){var f=(document.location.pathname||"").toString().toLowerCase(),i,t,u,r,n;if(f.indexOf("/offers/")===0){BlogEngine.logInConsole("already on offers page, skipping initOfferDisplays.");return}if(i=$("a.to-offer"),!(i.length<1)){for(t=[],n=0;n<i.length;n++)u=$(i[n]),r=BlogEngine.createOfferDisplayTrackingText(u),r&&($.inArray(r,t)===-1&&t.push(r),u.click(BlogEngine.onOfferDisplayClick));for(n=0;n<t.length;n++)Azom.pushAnalyticsEvent("offer_display_impression",{event_label:t[n]})}},initItemImagesWithLinks:function(){var t,n,i;if(!$(document).data("is-init-item-images-with-links")){for(t=$("div.item-images-and-links .item-images"),n=0;n<t.length;n++)i=$(t[n]),i.find(".item-image img").removeAttr("alt"),i.find(".item-image a").tipTip();$(document).data("is-init-item-images-with-links",!0)}},initLinkLightboxes:function(){var n=$("a.lightbox-image");n.length<1||n.magnificPopup({type:"image",mainClass:"mfp-zoom-in",callbacks:{imageLoadComplete:function(){var n=this;setTimeout(function(){n.wrap.addClass("mfp-image-loaded")},16)},close:function(){this.wrap.removeClass("mfp-image-loaded")}},removalDelay:300,midClick:!0,verticalFit:!0})},imageEnlargingImageInitRollover:function(n){var t=$(n.target),r,u,f,i;t.data("is-enlarging-image-rollover-init")||(r=t.width(),u=t.height(),r&&u)&&((f=t.closest("a.enlarge-image"),f.length<1)||(i=$(document.createElement("a")).addClass("enlarge-image-rollover").attr("href","#").css("width",r.toString()+"px").css("height",u.toString()+"px").css("opacity","0"),i.appendTo(f),i.hover(function(){$(this).stop().fadeTo("normal",.35)},function(){$(this).stop().fadeTo("normal",0)}),i.click(function(n){var t=$(this).parent("a");t.trigger("click");n.stopPropagation();n.preventDefault()}),t.data("is-enlarging-image-rollover-init",!0)))},initImageEnlarging:function(){var n=$("a.enlarge-image:has(img)"),t;n.length<1||(n.magnificPopup({type:"image",mainClass:"mfp-zoom-in",callbacks:{imageLoadComplete:function(){var n=this;setTimeout(function(){n.wrap.addClass("mfp-image-loaded")},16)},close:function(){this.wrap.removeClass("mfp-image-loaded")}},removalDelay:300,midClick:!0,verticalFit:!0}),t=n.find("img"),t.each(function(){var n=$(this),i=(this.width||0)+(this.height||0)>0,t;i&&(t=n.hasClass("lazy-load-image")&&!n.hasClass("lazy-image-loaded"),t||BlogEngine.imageEnlargingImageInitRollover({target:this}));n.on("load",BlogEngine.imageEnlargingImageInitRollover)}))},clampText:function(n,t){var k=Azom.doesDeviceSupportLineClamps(),i,a,b,s,u,f,h,y;if(!k&&n&&(i=$(n),i.length===1)&&i.is(":visible")&&(n=i[0],a=$.trim((i.text()||"").toString().replace(/\n/g," ").replace(/\s{2,}/g," ")),a)){var c=0,e=0,o=!1,v=null,r=null,l=null,p=n.style.display,d=!!p,w=!1;for(i.css("display")!=="block"&&(w=!0,i.css("display","block")),b=i.width(),w&&i.css("display",d?p:""),s=$(document.createElement("span")).css({position:"absolute",whiteSpace:"pre",visibility:"hidden"}),i.empty(),i.append(s),u=a.split(/\s/g),f=0;f<u.length;f++)if(h=f>=u.length-1,r=u.slice(e,f+1).join(" ")+" ",s.text(r),y=s.width()>b,(h||y)&&(c++,c>=t?(o=!0,r=u.slice(e,u.length).join(" ")):e===f?(e=f+1,h&&(o=!0)):h&&!y?o=!0:(r=u.slice(e,f).join(" ")+" ",e=f),o&&r&&r[r.length-1]===" "&&(r=r.substr(0,r.length-1)),l=$(document.createElement("span")).text(r).appendTo(i),v=l,!o&&h&&(c++,r=u.slice(e,u.length).join(" "),l=$(document.createElement("span")).text(r).appendTo(i),v=l)),c>=t)break;s.remove();v.css({display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"100%"})}},clampTextWhereNeeded:function(n,t){var u=Azom.doesDeviceSupportLineClamps(),i,r;u||n&&n.length&&(i=n.first().parent().height(),r=0,n.each(function(){var n=$(this).height();if(n<=i)return!0;r++;BlogEngine.clampText(this,t)}))},socialSharerWindow:null,openSocialSharer:function(n,t,i){if(BlogEngine.socialSharerWindow&&!BlogEngine.socialSharerWindow.closed&&BlogEngine.socialSharerWindow.focus)BlogEngine.socialSharerWindow.location.href=n,BlogEngine.socialSharerWindow.focus();else{var r=typeof screen!="undefined"&&screen.width?screen.width:$(window).width(),u=typeof screen!="undefined"&&screen.height?screen.height:$(window).height(),f=Math.max(0,parseInt(r/2-t/2,10)),e=Math.max(0,parseInt((u/2-i/2)*.85,10)),o="width="+t.toString()+",height="+i.toString()+",left="+f.toString()+",top="+e.toString()+",resizable=yes,scrollbars=yes,location=no,status=no,toolbar=no,menubar=no";BlogEngine.socialSharerWindow=window.open(n,"socialsharer",o);BlogEngine.socialSharerWindow&&!BlogEngine.socialSharerWindow.closed&&BlogEngine.socialSharerWindow.focus&&BlogEngine.socialSharerWindow.focus()}return!1},onBlogSharingLinkClick:function(n){n.preventDefault();var t=$(n.currentTarget);if(t.parent().hasClass("email")||t.parent().hasClass("sidebar-ratings")||t.parent().hasClass("rating")||t.parent().hasClass("pdf-download"))return!1;openSocialSharingLink(t)},onWebinarSharingLinkClick:function(n){n.preventDefault();var t=$(n.currentTarget);if(t.parent().hasClass("webinar-share-link-copylink")){let n=decodeURIComponent($(".webinar-share-link-copylink a").attr("href"));return $(".webinar-share-copy-link-input").val(n),$(".webinar-share-copylink-content").is(":visible")?$(".webinar-share-copylink-content").hide(500):$(".webinar-share-copylink-content").show(500),!1}openSocialSharingLink(t)},initSharingLinks:function(){var r=$(".share-box"),i;if(!(r.length<1)){r.on("click","li a",BlogEngine.onBlogSharingLinkClick);$(".webinar-share-link-item").on("click","a",BlogEngine.onWebinarSharingLinkClick);var t=$(window),n=$("body"),u=function(){var u=t.width(),i=$("#wide-screen-container"),f=i.length===1&&i.hasClass("widest-screen-for-right-block")&&i.hasClass("right-block-filled"),e=i.length===1&&i.hasClass("wide-screen-for-right-block")&&i.hasClass("right-block-filled"),s=!f&&!e,r=!1,o;s?r=u<1235:e?r=u<1415:f&&(r=u<1560);o=n.hasClass("sharebox-top");o!==r&&n.toggleClass("sharebox-top",r)};t.on("resize",u);i=function(){var r=n.hasClass("sharebox-top"),u=n.hasClass("sharebox-top-show"),i=r&&t.scrollTop()>600;i!==u&&n.toggleClass("sharebox-top-show",i)};t.on("scroll",i);$("body").removeClass("sharebox-pending-init");u();i()}},navShadowTimeout:null,initNavShadow:function(){var n=$(window),t=$("body"),i=function(){BlogEngine.navShadowTimeout=null;var r=t.hasClass("navshadow"),i=n.scrollTop()>20;i!==r&&t.toggleClass("navshadow",i)};n.on("scroll resize",function(){BlogEngine.navShadowTimeout&&(window.clearTimeout(BlogEngine.navShadowTimeout),BlogEngine.navShadowTimeout=null);BlogEngine.navShadowTimeout=window.setTimeout(i,15)});i()},onSharingButtonCountsRetrieved:function(n){var r,i,t;if(!n.IsSuccessful){r=n.Message||"Unable to retrieve the social sharing counts.";return}i=typeof n.FacebookCount=="string"&&!isNaN(n.FacebookCount)&&n.FacebookCount!=="0";t=$("div.share-box");i&&(t.find("div.count-facebook").text(BlogEngine.abbreviateNumber(n.FacebookCount,1)).addClass("show"),t.find("li.facebook").addClass("has-count"))},initSharingCounts:function(){var n=$("input#url-to-share").val(),t;n&&(t={action:"GetShareCounts",url:n},$.ajax({type:"GET",url:"/DataServices.axd",cache:!1,data:t,contentType:"application/x-www-form-urlencoded; charset=UTF-8",dataType:"json",success:BlogEngine.onSharingButtonCountsRetrieved,error:function(n,t){var i=t}}))},trackNewsletterSocialSquareClicks:function(){var n=$(".top-self-ad .wide-promo a"),t;if(!(n.length<1)&&(t=(n.first().attr("href")||"").toString().toLowerCase().indexOf("newsletters")!==-1,t))n.on("click",function(n){var t=$(n.currentTarget).attr("href");if(Azom.logInConsole("newsletters social square clicked. href: "+t),!Azom.isGa4Loaded())return BlogEngine.logInConsole("gtag is undefined or not loaded in newsletters social square click."),!0;gtag("event","newsletters_social_square_click",{event_label:"Newsletters Social Square",event_callback:function(){t&&(document.location.href=t)}})})},onRecommendedContentItemHover:function(n,t){var u=$(n.delegateTarget||n.target),i=u.find(".rc-hover-slider"),e=!!u.data("using-transitions"),r,o,f;t?(r=i.clone(),r.css({visibility:"hidden",height:"auto"}).removeClass("with-transitions").addClass("rc-hover-slider-temp-clone"),o=r.find(".rc-hover-slider-contents"),o.css({whiteSpace:"inherit"}),r.appendTo(u),f=r.height(),r.remove(),e?i.css("height",f.toString()+"px"):i.stop(!0,!1).animate({height:f.toString()+"px"},300,"easeOutCubic")):e?i.css("height","18px"):i.stop(!0,!1).animate({height:"18px"},300,"easeOutCubic");i.toggleClass("rc-hover-showing",t)},checkForSuggestedContentDisplay:function(){var f=$(window),p=$(document),n=$("#suggested-content-slider"),r,u,e,o,i,h,y;if(!(n.length<1)){var c=!!n.data("is-closed"),s=f.scrollTop(),l=f.width(),a=f.height(),v=n.data("show-screen-bottom-threshold")||500,t=l>600&&s>175&&s+a>=v;(c&&(t=!1),r=!!n.data("is-visible"),r&&t)||(r||t)&&(u=!!n.data("using-transitions"),e=10,r&&!t?(i=n.outerHeight()||130,o=(i+e)*-1,u?n.css("bottom",o.toString()+"px"):n.stop(!0,!1).animate({bottom:o.toString()+"px"},500,"easeOutCubic")):!r&&t&&(i=0,n.data("shown-first-time")?i=n.outerHeight():(n.data("shown-first-time",!0),n.show(),i=n.outerHeight(),h=(i+e)*-1,n.css({bottom:h.toString()+"px"}),u&&(y=n.css("bottom"),n.addClass("with-transitions"))),u?n.css("bottom","10px"):n.stop(!0,!1).animate({bottom:"10px"},500,"easeOutCubic")),n.data("is-visible",t))}},onSuggestedContentClose:function(){var n=$("#suggested-content-slider");if(!(n.length<1))return n.data("is-closed",!0),BlogEngine.checkForSuggestedContentDisplay(),!1},initSuggestedContent:function(){var n,r,u,i,t;if((typeof g_outputtingAnchorAd!="boolean"||!g_outputtingAnchorAd)&&(n=$("#suggested-content-slider"),!(n.length<1))&&(r=$(window),!(r.width()<600))){if(u=Azom.doesDeviceSupportCssTransitions(),u&&(n.data("shown-first-time",!1),n.data("using-transitions",!0)),i=0,t=$("div.item-body .content").first(),t.length<1&&(t=$("#main").first()),t.length>0){var f=t.offset(),e=t.height(),o=f.top+e;i=o-350}else i=$(document).height()-450;n.data("show-screen-bottom-threshold",i);n.find("button.sgcnt-close").on("click",BlogEngine.onSuggestedContentClose);r.on("scroll",BlogEngine.checkForSuggestedContentDisplay);BlogEngine.checkForSuggestedContentDisplay()}},initBelowContentRecommends:function(){var n=$(".below-content-recommends"),t;n.length<1||(t=n.find(".rc-text a"),t.each(function(){BlogEngine.clampText(this,5)}))},initCommonImageLists:function(){var n=$(".widget.common-img-list-outer"),t;n.length<1||(t=n.find("a.common-img-list-text"),t.each(function(){BlogEngine.clampText(this,5)}))},initSiteVideos:function(){var n=$("video.site-content-video"),t,r,i,u;if(!(n.length<1)&&typeof n.mediaelementplayer!="undefined"){for(t=0;t<n.length;t++)r=$(n[t]),i=r.attr("id"),i||(i="video-"+Math.random().toString().replace(/\D+/i,""),r.attr("id",i));u=["playpause","progress","current","duration","tracks","volume"];n.mediaelementplayer({features:u})}},onInterstitialClose:function(){$(".ui-widget-overlay").removeClass("nm-interstitial-dialog-overlay-a")},onInterstitialShown:function(n){var i,t,r;$(".ui-widget-overlay").toggleClass("nm-interstitial-dialog-overlay-a",!0);i=$(n.target);t=i.data("opts");t.impressionUrl&&(r=$(document.createElement("img")).css({border:"none",width:"1px",height:"1px",position:"absolute",left:"-9000px"}).addClass("nm-interstitial-impression").attr("src",t.impressionUrl),$("body").first().append(r))},displayInterstitial:function(n){var t,i;if(n=n||{},!n.containerSelector||!n.impressionUrl){BlogEngine.logInConsole("Missing containerSelector or impressionUrl in displayInterstitial.");return}if(t=$(n.containerSelector),t.length!==1){BlogEngine.logInConsole('"containerSelector" element in displayInterstitial not found.');return}t.addClass("nm-interstitial-contents-a");i=$("#interstitial-spot-dialog");i.data("opts",n);t.show();var u=t.width(),f=t.height(),e=u,o=f+60,r=null;if(Azom.isTouchDevice())r={my:"center center"};else{var s=$(window),h=s.height(),c=h-25,l=c>750;r={my:l?"center center-5%":"center center"}}t.css("height","auto");i.dialog({autoOpen:!1,height:o,width:e,modal:!0,show:"fade",hide:"fade",resizable:!1,draggable:!1,dialogClass:"nm-interstitial-dialog-a",position:r,open:BlogEngine.onInterstitialShown,close:BlogEngine.onInterstitialClose});i.dialog("open")},setupInterstitialDisplay:function(n){$(function(){BlogEngine.displayInterstitial(n)})},getTopicUpdateNotificationTagIds:function(n){var r=[],u,f,t,i;if(!BlogEngine.getVisitorCookieAndPrivacyPreferences().functional)return r;if(u=$.trim((Azom.readCookie(n)||"").toString()),u)for(f=u.split(","),t=0;t<f.length;t++)i=$.trim(f[t]||""),i&&!isNaN(i)&&r.push(parseInt(i,10));return r},getTopicUpdateNotificationSignedUpTagIds:function(){return BlogEngine.getTopicUpdateNotificationTagIds("azo_tun_su_tagids")},getTopicUpdateNotificationTurnedDownTagIds:function(){return BlogEngine.getTopicUpdateNotificationTagIds("azo_tun_td_tagids")},getTopicUpdateNotificationSinceLastPromptedPageCounter:function(){var n=0,t;return BlogEngine.getVisitorCookieAndPrivacyPreferences().functional?(t=$.trim((Azom.readCookie("azo_tun_slp_pgcntr")||"").toString()),t&&!isNaN(t)&&(n=parseInt(t,10),n<0&&(n=0)),n):n},resetTopicUpdateNotificationPageCounter:function(){BlogEngine.getVisitorCookieAndPrivacyPreferences().functional&&Azom.eraseCookie("azo_tun_slp_pgcntr")},incrementedTopicUpdateNotificationPageCounter:!1,incrementTopicUpdateNotificationPageCounter:function(){var n=BlogEngine.getTopicUpdateNotificationSinceLastPromptedPageCounter(),t=n+1;BlogEngine.getVisitorCookieAndPrivacyPreferences().functional&&Azom.createCookie("azo_tun_slp_pgcntr",t.toString(),null);BlogEngine.incrementedTopicUpdateNotificationPageCounter=!0},displayTopicNotificationRequestValidationMsg:function(n){var t=!!n,r=$("#topic-notification-request-validation-message"),i;r.text(t?n:"");i=$("#topic-notification-request-validation-message-p2");i.text(t?n:"")},toggleTopicNotificationRequestSubmitting:function(n){var r=!1,t=$("#tnsbox-button"),i,u;t.is(":visible")||(r=!0,t=$("#tnsbox-button-p2"));i=t.data("original-text");i||(i=t.text(),t.data("original-text",i));u=r?"Saving...":i||"Processing...";t.toggleClass("is-submitting",n).text(n?u:i)},onTopicNotificationRequestSubmitError:function(){BlogEngine.toggleTopicNotificationRequestSubmitting(!1);BlogEngine.displayTopicNotificationRequestValidationMsg("An unexpected error occurred submitting your information. Please try again soon.")},onTopicNotificationRequestSubmitSuccess:function(n){var s,t,i,r,u,h,e,f,o,c;if(n=n.d,!n||n.Message||!n.IsSuccessful){s=n&&n.Message?n.Message:"An unexpected error occurred submitting your information. Please try again soon.";BlogEngine.toggleTopicNotificationRequestSubmitting(!1);BlogEngine.displayTopicNotificationRequestValidationMsg(s);return}if(t=BlogEngine.getTopicUpdateNotificationSignedUpTagIds(),n.SignedUpForTopicTags&&n.SignedUpForTopicTags.length){for(g_topicNotify.signedUpForTopicTags=n.SignedUpForTopicTags,i="",r=0;r<n.SignedUpForTopicTags.length;r++)u=n.SignedUpForTopicTags[r],i.length>0&&(i+=", "),i+=u.Value,h=$.inArray(u.Key,t)!==-1,h?BlogEngine.logInConsole("person signed up for topic notifications, however found a topic Tag ID that is already in the signed-up tag IDs cookie, this is unexpected."):t.unshift(u.Key);BlogEngine.getVisitorCookieAndPrivacyPreferences().functional&&(e=500,f=t.length,f>e&&(o=f-e,t.splice(f-o,o)),c=t.join(","),Azom.createCookie("azo_tun_su_tagids",c,1825));i&&Azom.pushAnalyticsEvent("topic_updates_signed_up",{event_label:i})}else BlogEngine.logInConsole("data.SignedUpForTopicTags is not available in onTopicNotificationRequestSubmitSuccess, this is unexpected.");var l=$("#topic-notification-request-step-one, #topic-notification-request-step-one-p2").filter(function(){return $(this).is(":visible")}),v=l.outerHeight(),a=$("#topic-notification-request-step-completed");a.find(".topic-notification-request-completed-msg").html('<div class="topic-notification-request-completed-msg-header">Many Thanks for Signing Up<\/div><p>We&rsquo;ve noted your preferences and are looking forward to helping you find the latest '+(g_siteSection==="lifesciences"?"life sciences":"medical")+' news that matters to you.<\/p><p>We also offer condition specific <a href="/'+BlogEngine.getSiteSectionUrlFragment()+'newsletters" target="_blank">Newsletters<\/a> you may be interested in.<\/p><button class="tnsbox-close" type="button">Close<\/button>');l.hide();a.css({height:v.toString()+"px",opacity:0}).show().fadeTo(400,1,function(){var n,t;Azom.isMagnificPopupOpen()&&(n=$(".mfp-wrap"),n.length===1&&(t=n.offset(),$(window).scrollTop(t.top)))});BlogEngine.resetTopicUpdateNotificationPageCounter()},submitTopicNotificationRequest:function(n,t){var d=$("#tnsbox-button, #tnsbox-button-p2"),u,h,k;if(d.is(".is-submitting"))return!1;BlogEngine.displayTopicNotificationRequestValidationMsg(null);var f=BlogEngine.validateTopicUpdateNotificationEmail(!0),c=$.trim($("#tnsbox-firstname").val()),l=$.trim($("#tnsbox-lastname").val());if(!f.isValid)return BlogEngine.displayTopicNotificationRequestValidationMsg("Please enter a valid email address at the top."),!1;if(c==="")return BlogEngine.displayTopicNotificationRequestValidationMsg("Please enter a first name."),!1;if(l==="")return BlogEngine.displayTopicNotificationRequestValidationMsg("Please enter a last name."),!1;var a=$("#tnsETechsConsent"),e=$("#tnsNewslettersConsent"),v=$("#tnsTermsAgree"),r=e.length===1,g=!r||!a.is(":visible")?null:a.is(":checked"),y=!r||!e.is(":visible")?null:e.is(":checked"),p=v.is(":visible")?v.is(":checked"):null;if(!n){if(p===!1)return BlogEngine.displayTopicNotificationRequestValidationMsg("Please confirm you accept the terms."),!1;if(r&&y===!1)return BlogEngine.displayTopicNotificationRequestValidationMsg('We need you to consent to "Receive Newsletters Relevant to My Interests" before we can send you the newsletter.'),!1}var nt=$("#topic-notification-request-form-svc").is(":visible"),tt=$("#topic-notification-request-form-svc input:radio:checked"),w=$.trim(tt.val()||"");if(!w&&nt)return BlogEngine.displayTopicNotificationRequestValidationMsg("Please let us know above what best describes you."),!1;var it=$.trim($("#topic-notification-request-form-interests").val()),b=[g_topicNotify.primaryTopicTag.k],o=$("#topic-notification-request-form-additional-tags input:checkbox:checked");if(o.length>0)for(u=0;u<o.length;u++){var rt=$(o[u]),s=$.trim((rt.val()||"").toString()),i=0;(s||!isNaN(s))&&(i=parseInt(s,10),(!i||i<1)&&(i=0));i?b.push(i):BlogEngine.logInConsole("unable to parse a selected additional topic tag ID, this is unexpected.")}return n&&!t?(h=function(n,t,i){var u=$("#topic-notification-request-step-one").attr("data-is-using-cpr-version")==="true",e,r,o,f;$("#topic-notification-request-step-one-p2 .azoForm-hide-for-conditional-page2-questions").toggle(n);$("#topic-notification-request-step-one-p2").toggleClass("azoForm-page2-partial",!n);e=!u||n;$("#tnsTermsAgreeContainer").toggle(e);$("#tnsETechsConsentContainer").toggle(u&&t);$("#tnsNewslettersConsentContainer").toggle(u&&i);document.getElementById("topic-notification-request-step-one").style.display="none";document.getElementById("topic-notification-request-step-one-p2").style.display="inline-block";Azom.isMagnificPopupOpen()||(r=$("#tnsbox-form"),r.css({"max-height":"","overflow-y":""}),o=r.height(),f=$(window).height()-20,o>f&&r.css({"max-height":f.toString()+"px","overflow-y":"auto"}));Azom.pushAnalyticsEvent("topic_updates_page2_opened",{event_label:g_topicNotify.primaryTopicTag.v})},BlogEngine.toggleTopicNotificationRequestSubmitting(!0),Azom.checkIfTermsAndConsentsRequired(f.email,0,!1,!0,!1,function(n){var i,t;if(BlogEngine.toggleTopicNotificationRequestSubmitting(!1),n=n.d,!n||n.Message){i=n.Message||"Sorry, an unexpected error occurred. Please try clicking Continue again.";BlogEngine.displayTopicNotificationRequestValidationMsg(i);return}if($("#topic-notification-request-step-one").attr("data-is-using-cpr-version",n.ApplyCpr?"true":"false"),!n.DisplayFullPage&&n.DisplayETechsQuestion&&(n.DisplayETechsQuestion=!1),t=n.DisplayETechsQuestion||n.DisplayNewslettersQuestion,t||Azom.pushAnalyticsEvent("topic_updates_page2_not_needed",{event_label:g_topicNotify.primaryTopicTag.v}),!t){BlogEngine.submitTopicNotificationRequest(!0,!0);return}h(n.DisplayFullPage,n.DisplayETechsQuestion,n.DisplayNewslettersQuestion)},function(n,t,i){BlogEngine.toggleTopicNotificationRequestSubmitting(!1);Azom.logInConsole("error checking if terms and consents are required. error: "+(i||"---"));Azom.pushAnalyticsEvent("topic_updates_consent_check_error",{event_label:g_topicNotify.primaryTopicTag.v});h(!0,!0,!0)}),!1):(n||Azom.pushAnalyticsEvent("topic_updates_page2_submit",{event_label:g_topicNotify.primaryTopicTag.v}),k={itemType:g_topicNotify.itemType,itemId:g_topicNotify.itemId,pageUrl:window.location.href.toString(),pageTitle:document.title||"",timeOnPage:Azom.pageLoadedOn?((new Date).getTime()-Azom.pageLoadedOn.getTime()).toString():"",email:f.email,siteVisitorClassification:w,firstName:c,lastName:l,areasOfInterest:it,topicTagIds:b.join(","),impressionId:Azom.impressionId,isUsingCprVersion:r,isTermsAgreed:p,eTechsOptIn:g,newslettersOptIn:y},$.ajax({type:"POST",url:BlogEngine.convertToAbsoluteUrl("/site_services.asmx/SaveTopicUpdateNotificationRequest"),data:JSON.stringify(k),contentType:"application/json; charset=utf-8",dataType:"json",success:BlogEngine.onTopicNotificationRequestSubmitSuccess,error:BlogEngine.onTopicNotificationRequestSubmitError}),BlogEngine.toggleTopicNotificationRequestSubmitting(!0),!1)},closeSlideUpMessageBox:function(n){var r,u,t,f,e,i;if(n==="#topic-notification-signup-box"&&(BlogEngine.resetTopicUpdateNotificationPageCounter(),typeof g_topicNotify!="undefined"&&g_topicNotify.primaryTopicTag&&!g_topicNotify.signedUpForTopicTags&&Azom.pushAnalyticsEvent("topic_updates_closed_without_signup",{event_label:g_topicNotify.primaryTopicTag.v}),r=BlogEngine.getTopicUpdateNotificationSignedUpTagIds(),g_topicNotify.primaryTopicTag&&g_topicNotify.primaryTopicTag.k?(u=$.inArray(g_topicNotify.primaryTopicTag.k,r)!==-1,u||BlogEngine.getVisitorCookieAndPrivacyPreferences().functional&&(t=BlogEngine.getTopicUpdateNotificationTurnedDownTagIds(),f=$.inArray(g_topicNotify.primaryTopicTag.k,t)!==-1,f?BlogEngine.logInConsole("the primary topic tag ID is already a turned down tag ID in onTopicUpdateNotificationDialogClose, this is unexpected."):(t.push(g_topicNotify.primaryTopicTag.k),e=t.join(","),Azom.createCookie("azo_tun_td_tagids",e,null)))):BlogEngine.logInConsole("g_topicNotify.primaryTopicTag is not available in onTopicUpdateNotificationDialogClose, this is unexpected.")),Azom.isMagnificPopupOpen()&&$.magnificPopup.close(),i=$(n),!(i.length<1))return i.data("is-closed",!0),BlogEngine.checkForSlideUpMessageBox(n),!1},showTopicEmailField:function(){var n=$("ul.topic-notification-request-form"),i=n.is(":visible"),r=!i,t=r?"topic_updates_email_show":"topic_updates_email_hide";n.data(t)||(n.data(t,!0),Azom.pushAnalyticsEvent(t,{event_label:g_topicNotify.primaryTopicTag.v}));n.slideToggle("fast",function(){var n=$("button.interested");$("ul.topic-notification-request-form").is(":visible")?n.addClass("icon-arrow-down").removeClass("icon-arrow-right"):n.addClass("icon-arrow-right").removeClass("icon-arrow-down")})},displayTopicNotificationFields:function(){var n=$("#topic-notification-signup-box");if(!n.data("enlarged")){n.data("enlarged",!0);Azom.pushAnalyticsEvent("topic_updates_page1_opened",{event_label:g_topicNotify.primaryTopicTag.v});var t=$("li#topic-notification-request-fields"),i=$(window),r=i.width(),u=r<550;u?(t.show(),n.css({position:"static"}),$.magnificPopup.open({type:"inline",items:{src:"#topic-notification-signup-box"},midClick:!0,closeOnBgClick:!1,callbacks:{open:function(){window.setTimeout(function(){$.magnificPopup.instance&&$.magnificPopup.instance.st&&($.magnificPopup.instance.st.closeOnBgClick=!0)},100)},afterClose:function(){$("#topic-notification-signup-box").data("is-closed",!0);BlogEngine.checkForSlideUpMessageBox("#topic-notification-signup-box")}}})):t.slideDown("fast")}},validateTopicUpdateNotificationEmail:function(n){var r=$("#tnsbox-email"),t=$.trim(r.val()),u=t.length>0,i=u&&Azom.isEmailAddressValid2(t),f=n&&!i||u&&!i;return r.toggleClass("error",f),{email:t,isValid:i}},configureTopicUpdateNotificationForm:function(){var u=$("#topic-notification-signup-box"),t,i,r,n;if(u.length===1&&(u.find(".topic-notification-request-form-itemname").text(g_topicNotify.primaryTopicTag.v),t=$("#topic-notification-request-form-additional-tags"),i=g_topicNotify.additionalTopicTags&&g_topicNotify.additionalTopicTags.length>0,i||t.find("ul").remove(),t.toggleClass("topic-notification-not-applicable-item",!i),i)){let i=$(document.createElement("fieldset")).addClass("additional-tag-fieldset"),u=$(document.createElement("legend")).addClass("topic-notification-request-form-legend").text("Please check any of these additional areas you'd like to receive updates on:");for(u.appendTo(i),r=$(document.createElement("ul")).addClass("topic-notification-request-form-options topic-notification-request-form-options-across"),n=0;n<g_topicNotify.additionalTopicTags.length;n++){var f=g_topicNotify.additionalTopicTags[n],o=$(document.createElement("li")),e="topic-notification-request-form-additional-tag-"+(n+1).toString(),s=$(document.createElement("input")).attr("type","checkbox").attr("id",e).attr("name","topic-notification-request-form-additional-tags").val(f.k.toString()),h=$(document.createElement("label")).attr("for",e).text(f.v);o.append(s).append(h).appendTo(r)}i.append(r);t.append(i)}},checkForSlideUpMessageBox:function(n){var o=$(window),b=$(document),t=$(n),r,f,h,c,u,a,w,v,e;if(!(t.length<1)){var s=!!t.data("is-closed"),l=o.scrollTop(),y=o.height(),p=t.data("show-screen-bottom-threshold")||500,i=l>175&&l+y>=p;(s&&((n==="#hcp-question-container"||n==="#hcp-return-modal")&&Azom.recordHcpStatusCheckedThisSession(),i=!1),r=!!t.data("is-visible"),i||!r||s||n!="#topic-notification-signup-box"||$("#topic-notification-request-step-one-p2").is(":visible")&&(i=!0),r&&i)||(r||i)&&(f=!!t.data("using-transitions"),h=10,r&&!i?(u=t.outerHeight()||130,c=(u+h)*-1,f?t.css("bottom",c.toString()+"px"):t.stop(!0,!1).animate({bottom:c.toString()+"px"},500,"easeOutCubic"),s&&(o.off("scroll.topicupdatenotification"),window.setTimeout(function(){$(n).remove()},1e3))):!r&&i&&(u=0,t.data("shown-first-time")?u=t.outerHeight():(t.data("shown-first-time",!0),t.show(),u=t.outerHeight(),a=(u+h)*-1,t.css({bottom:a.toString()+"px"}),f&&(w=t.css("bottom"),t.addClass("with-transitions")),n==="#hcp-question-container"?(v=t.attr("data-question-version")||"",Azom.pushAnalyticsEvent("hcp_question_initial_question_view",{event_label:"Version: "+v})):n==="#hcp-return-modal"?Azom.pushAnalyticsEvent("hcp_question_returning_question_view",null):n=="#topic-notification-signup-box"&&Azom.pushAnalyticsEvent("topic_updates_box_slideup",{event_label:g_topicNotify.primaryTopicTag.v})),e=0,$("#cookie-notice-bar").is(":visible")&&(e=$("#cookie-notice-bar").outerHeight()),f?t.css("bottom",e.toString()+"px"):t.stop(!0,!1).animate({bottom:e.toString()+"px"},500,"easeOutCubic")),t.data("is-visible",i))}},onSlideUpMessageBoxClose:function(n){var t;if(n==="#hcp-question-container"){if(t=$(n),t.length===1){var u=$("#hcpQ1").is(":visible"),i=$("#hcpQ2Hcp").is(":visible"),f=$("#hcpQ2NotHcp").is(":visible"),e="HCP Question - Ver "+(t.attr("data-question-version")||""),r="";r=u?"Response: Initial Question - HCP? X Clicked":i||f?"Response: HCP: "+(i?"Yes":"No")+". 2nd Question - Create AZoProfile? X Clicked":"???";Azom.pushAnalyticsEvent("hcp_question_initial_x_click",{event_label:r})}}else n==="#hcp-return-modal"&&Azom.pushAnalyticsEvent("hcp_question_returning_x_click",null);return BlogEngine.closeSlideUpMessageBox(n),!1},getSlideUpMessageContentArea:function(){var n=$(".item-body .content").first();return n.length<1&&(n=$(".item-body").first()),n},initSlideUpMessageBox:function(n){var t=$(n),u;if(!(t.length<1)){u=Azom.doesDeviceSupportCssTransitions();u&&(t.data("shown-first-time",!1),t.data("using-transitions",!0));var f=$(window),i=0,r=BlogEngine.getSlideUpMessageContentArea();if(r.length>0){var e=r.offset(),o=r.height(),s=e.top+o;i=s-250}else i=$(document).height()*.65;$("#topic-notification-request-step-one button.interested").on("click",BlogEngine.showTopicEmailField);$("#tnsbox-email").on("change",BlogEngine.validateTopicUpdateNotificationEmail);$("#tnsbox-email").on("focus",BlogEngine.displayTopicNotificationFields);t.data("show-screen-bottom-threshold",i);t.on("click",".tnsbox-close",function(){BlogEngine.onSlideUpMessageBoxClose(n)});BlogEngine.configureTopicUpdateNotificationForm();n==="#topic-notification-signup-box"&&Azom.pushAnalyticsEvent("topic_updates_box_initialized",{event_label:g_topicNotify.primaryTopicTag.v});f.on("scroll.topicupdatenotification",function(){BlogEngine.checkForSlideUpMessageBox(n)});BlogEngine.checkForSlideUpMessageBox(n)}},getTopicUpdateNotificationDialogMarkup:function(){BlogEngine.getInfoContent("topic-update-notification-request-form","","#topic-notification-signup-box",null,function(){BlogEngine.initSlideUpMessageBox("#topic-notification-signup-box")})},initTopicUpdateNotifications:function(){var u,e,r,n,f;if(BlogEngine.incrementedTopicUpdateNotificationPageCounter||BlogEngine.logInConsole("in initTopicUpdateNotifications, BlogEngine.incrementedTopicUpdateNotificationPageCounter is false."),u=!1,typeof g_topicNotify!="undefined"&&g_topicNotify.allTags&&g_topicNotify.allTags.length&&(e=BlogEngine.getTopicUpdateNotificationSinceLastPromptedPageCounter(),e>1||BlogEngine.getVisitorCookieAndPrivacyPreferences().haveKind!=="NoPreferences")){var o=BlogEngine.getTopicUpdateNotificationTurnedDownTagIds(),s=BlogEngine.getTopicUpdateNotificationSignedUpTagIds(),t=null,i=[];for(r=0;r<g_topicNotify.allTags.length;r++){if(n=g_topicNotify.allTags[r],$.inArray(n.k,o)!==-1)continue;else if($.inArray(n.k,s)!==-1)continue;if(n.cbp&&!t?t=n:i.length<3&&i.push(n),t&&i.length>=3)break}t&&(g_topicNotify.primaryTopicTag=t,g_topicNotify.additionalTopicTags=i,u=!0)}if(!u){BlogEngine.initSuggestedContent();return}(f=BlogEngine.getSlideUpMessageContentArea(),f.length<1)||f.height()<1200||$(BlogEngine.getTopicUpdateNotificationDialogMarkup)},onLinkedTermClicked:function(n){var t,i,r,u;return Azom.isGa4Loaded()?(t=$(n.currentTarget),i=$.trim((t.text()||"").toString()),!i)?!0:(r="is-click-recorded",t.data(r))?(BlogEngine.logInConsole("click already recorded for linked term: "+i),!0):(BlogEngine.logInConsole("tracking linked term click: "+i),t.data(r,!0),u=t.attr("href"),gtag("event","linked_term_click",{event_label:i,event_callback:function(){u&&(document.location.href=u)}}),n.preventDefault(),n.stopPropagation(),!1):(window.googleAnalyticsConfig&&BlogEngine.logInConsole("gtag is undefined or not loaded in onLinkedTermClicked."),!0)},initLinkedTerms:function(){$("a.linked-term").on("click",BlogEngine.onLinkedTermClicked)},getDigitsFromUnits:function(n){var t=(n||"").toString().replace(/[^-\d\.]/gi,"");return isNaN(t)?0:parseInt(t,10)},initRelatedContentTabsMultilineMonitoring:function(n){var t=function(){var r=n.find("li"),t,i;n.removeClass("related-content-tabs-multiline-layout");t=null;i=!1;r.each(function(){var r=$(this),n=r.offset().top;return t&&t!==n&&(i=!0),t=n,i?!1:void 0});i&&n.addClass("related-content-tabs-multiline-layout")};$(window).on("resize",t);t()},toggleSupplierCompanyOverview:function(n){$("#tab_supplier_profile").toggle(n)},toggleSupplierContentSection:function(n){$(".supplier-content-section").toggle(n)},filterContentByCategory:function(n){var i,e;const h=$(".content-types ul > li.selected:visible").data("content-type"),o=$(".content-types ul > li.selected:visible").data("tab-label"),u=$(n),s=u.parent();if($(n).closest("ul").children().find("a").removeClass("selected"),u.addClass("selected"),s.hasClass("company-overview"))return BlogEngine.toggleSupplierCompanyOverview(!0),BlogEngine.toggleSupplierContentSection(!1),!1;else{BlogEngine.toggleSupplierCompanyOverview(!1);BlogEngine.toggleSupplierContentSection(!0);i=u.parent().data("category-id").toString();e="Products, Articles & More";$(".content-types li").removeClass("selected").addClass("normal");var r=$(".supplier-item"),t=$([]),f=[];i==="0"?(BlogEngine.applyCssClassesToItemImageItems(r),f=BlogEngine.getContentTypesFromItems(r,i),r.show()):(r.hide(),$.each(r,function(n,r){var u=$(r),f;u.hide();u.attr("data-category-ids")&&(f=u.data("category-ids").toString().split(","),$.inArray(i,f)>-1&&(t=t.add(u)))}),e=u.text());t.length>0&&(f=BlogEngine.getContentTypesFromItems(t,i),BlogEngine.applyCssClassesToItemImageItems(t),t.show());$(".category-content-header").text(e);BlogEngine.outputContentTypeTabs(f);let n=$(".content-types ul > li:visible > a").first();return f.includes(o)&&(n=".content-types ul > li[data-tab-label='"+o+"'] > a"),BlogEngine.filterContentByContentType($(n)),!1}},filterContentByContentType:function(n){let c=$(n),o=c.parent(),l=o.data("content-type"),r=o.data("tab-label"),s=0,u=$(".supplier-categories li.category-item a.selected").parent().data("category-id").toString(),v=c.parent().siblings("li");v.removeClass("selected").addClass("normal");o.addClass("selected").removeClass("normal");let f=$("div.items-with-no-image ul > li"),h=$(".supplier-item"),i=$("div.archived-news ul > li.archived-news-item"),e=$("div.archived-news h2"),t=$([]),a=0;h.hide();u!=="0"?($.each(h,function(n,i){let f=$(i),h=f.data("content-type"),s=f.data("tab-label"),e=f.attr("data-category-ids"),o=[];e!==undefined&&(o=e.toString().split(","),s===r&&$.inArray(u,o)>-1&&(t=t.add(f)))}),f.length>0&&$.each(f,function(n,t){let i=$(t),o=i.data("content-type"),e=i.data("tab-label"),f=i.attr("data-category-ids");f!==undefined&&(categoryIds=f.toString().split(","),e===r&&$.inArray(u,categoryIds)>-1?(i.show(),s++):i.hide())}),i.length>0&&l===3&&$.each(i,function(n,t){let i=$(t),r=i.attr("data-category-ids");r!==undefined&&(categoryIds=r.toString().split(","),$.inArray(u,categoryIds)>-1?(i.show(),a++):i.hide())}),a>0?e.show():(i.hide(),e.hide())):($.each(h,function(n,i){let u=$(i),f=u.data("tab-label");f===r&&(t=t.add(u))}),f.length>0&&$.each(f,function(n,t){let i=$(t),u=i.data("tab-label");r===u?(i.show(),s++):i.hide()}),i.length>0&&l===3?(i.show(),e.show()):(i.hide(),e.hide()));t.length>0&&(BlogEngine.applyCssClassesToItemImageItems(t),t.show());var y=$("div.item-images div.supplier-item:visible").length;return s>0&&y>0?$("div.item-images-and-links h2").show():$("div.item-images-and-links h2").hide(),!1},applyCssClassesToItemImageItems:function(n){let t,i="";$.each(n,function(n,r){var u=$(r);u.children().removeClass("item-image-cols3-left item-image-cols3-middle item-image-cols3-right");u.children().removeClass("item-image-cols2-left item-image-cols2-middle item-image-cols2-right");n%3==0?t="item-image-cols3-left":n%3==1?t="item-image-cols3-middle":n%3==2&&(t="item-image-cols3-right");n%2==0?i="item-image-cols2-left":n%2==1&&(i="item-image-cols2-right");u.children().addClass(t);u.children().addClass(i)})},getContentTypesFromItems:function(n){var t=[];return $.each(n,function(n,i){var r=$(i),u=r.data("tab-label");$.inArray(u,t)===-1&&t.push(r.data("tab-label"))}),t},outputContentTypeTabs:function(n){var t=$(".content-types ul > li");t.removeClass("selected").addClass("normal").hide();t.each(function(t,i){let r=$(i);n.includes(r.data("tab-label"))&&r.show()})}};$(function(){BlogEngine.initUniform();BlogEngine.initSharingLinks();BlogEngine.initNavShadow();typeof registerVariables!="undefined"&&registerVariables();BlogEngine.initSiteVideos();$(".searchfield").each(function(){BlogEngine.initSearchAutoComplete($(this))});$(".search-clear").click(function(){return BlogEngine.clearSearchInput(this)});BlogEngine.applyRatings();BlogEngine.initImageEnlarging();BlogEngine.initLinkLightboxes();BlogEngine.initBelowContentRecommends();BlogEngine.initCommonImageLists();BlogEngine.initLinkedTerms();BlogEngine.initSharingCounts()});$(".webinar-share-copy-link-button").on("click",function(){copyToClipboard(".webinar-share-copy-link-input");showWebinarCopyShareLinkBox();hideWebinarCopyShareLinkBox()});$(window).on("orientationchange",function(){$(".nav-tabs a").click(function(n){n.preventDefault();$(this).tab("show")})});g_headerOffset=null;g_headerWindowWidth=null;g_isNoUserMenuApplied=!1;$(function(){var t,r,i,u,n;navigator.userAgent.match(/IEMobile\/10\.0/)&&(t=document.createElement("style"),t.appendChild(document.createTextNode("@-ms-viewport{width:auto!important}")),document.querySelector("head").appendChild(t));r=$(window);stickyHeader();BlogEngine.doesShareBoxAnchorToBottom()||r.on("scroll",toggleGrayHeaderBarForMobile).each(toggleGrayHeaderBarForMobile);initSyncHeaderHideOnScroll();i=$(".carousel");u=$(".hp-feature");i.carousel().swiperight(function(){$(this).carousel("prev")}).swipeleft(function(){$(this).carousel("next")}).on("slide.bs.carousel",function(n){var i=$(n.relatedTarget).find("img"),r,t;i.hasClass("lazy-load-image")&&(r=$(n.target),t=r.height(),t&&i.css("height",t.toString()+"px"))});if($(".nav-tabs a").click(function(n){n.preventDefault();$(this).tab("show")}),initNavMoreMenu(),initContentHubMenu(),initSiteSectionMenuBtnsHoverMenuToggling(),n=Azom.doesDeviceSupportCssTransitions(),i.toggleClass("with-transitions",n).hover(function(n){toggleCarouselDescriptions(n,!0)},function(n){toggleCarouselDescriptions(n,!1)}).each(function(){$(this).data("use-transitions",n)}),u.toggleClass("with-transitions",n).hover(function(n){toggleHpfeatureDescriptions(n,!0)},function(n){toggleHpfeatureDescriptions(n,!1)}).each(function(){$(this).data("use-transitions",n)}),$(".video").hover(function(){$(this).find(".video-caption").slideDown(200)},function(){$(this).find(".video-caption").slideUp(200)}),$(".item-body").fitVids(),window.g_pageHasSupplierProfileVideoWrap&&initSupplierProfileVideoRepositioning(),$("img.toi-img").length>0){fitTextOnImages();$(window).off("resize.textonimage").on("resize.textonimage",fitTextOnImages)}$("#ddlContentCategorySelector").on("change",function(){var n=$("option:selected",this),t=n.data("category-url");return window.location.href=t,!1});$(".view-more-categories-link a").on("click",function(n){let t=$(this).parent().parent().find("li.hidden"),i=$(this).parent().parent().find("li.was-hidden"),r="hidden",u="was-hidden",f=t.length>0?"View less categories":"View more categories",e=t.length>0?"icon-arrow-down":"icon-arrow-up",o=t.length==0?"icon-arrow-down":"icon-arrow-up";t.length>0?t.slideDown(350).removeClass(r).addClass(u):i.length>0&&i.slideUp(350,function(){i.removeClass(u).addClass(r)});$(this).children("span:first-child").text(f);$(this).children("span").eq(1).removeClass(e).addClass(o);n.preventDefault()})});AZoProfileUtils={azoProfileLoginStatusUpdateFns:[],pendingSocialAction:null,loggedInAZoProfileData:null,isLoggedIntoAZoProfile:function(){return!!(AZoProfileUtils.loggedInAZoProfileData&&AZoProfileUtils.loggedInAZoProfileData.Fullname)},updateAZoProfileLoginStatusDisplay:function(n,t){var e,i,u,r,f;if(AZoProfileUtils.loggedInAZoProfileData=n,e=!!(n&&n.Fullname),AZoProfileUtils.azoProfileLoginStatusUpdateFns&&AZoProfileUtils.azoProfileLoginStatusUpdateFns.length)for(i=0;i<AZoProfileUtils.azoProfileLoginStatusUpdateFns.length;i++)typeof AZoProfileUtils.azoProfileLoginStatusUpdateFns[i]=="function"&&AZoProfileUtils.azoProfileLoginStatusUpdateFns[i](n);if(u=$("#profile-login-content"),r=$("#profile-login-bottom-bar-content"),$("body").toggleClass("azoprofile-logged-in",e),u.length>0||r.length>0)if(e){var o=!!n.Firstname,s=o?n.Firstname:n.Fullname,h=!!n.ThumbnailUrl,c=h?n.ThumbnailUrl:"/pics/anonymous_avatar.gif",f="<div class='profile-photo'>    <a href='/azoprofile/account/'><img alt=\""+Encoder.htmlEncode(n.Fullname)+'" src="'+Encoder.htmlEncode(c)+"\" /><\/a><\/div><div class='profile-non-photo'>    <div class='profile-name'>Welcome back <br />"+Encoder.htmlEncode(s)+"<\/div>    <div class='profile-options'>        <a href='/azoprofile/account/'>Account<\/a> |        <a href='#' onclick='return AZoProfileUtils.logoffAZoProfile()'>Logoff<\/a>    <\/div><\/div><div style='clear:both;'><\/div>";u.html(f);r.html(f);$(".profile-photo img").attr("onerror","this.onerror=null; this.src='/pics/anonymous_avatar.gif';")}else u.empty(),r.empty(),f="<div class='profile-status-logged-out'>    <div class='profile-logged-out-non-photo'>        <div class='profile-login-options'><a href='#' onclick='return AZoProfileUtils.onShowAZoFullLogin()'>Login<\/a><\/div>    <\/div>    <div class='profile-logged-out-photo'>        <a href='#' onclick='return AZoProfileUtils.onShowAZoFullLogin()'><img alt=\"Login\" src=\"/pics/anonymous_avatar.gif\" /><\/a>    <\/div>    <div style='clear:both;'><\/div>",r.html(f),t&&window.location.pathname.indexOf("/azoprofile/account/")===0&&(window.location.href="/")},updateAZoProfileLinksUi:function(n){const t=!!(n&&n.Fullname);let i=$(".mobile-menu-profile-become-member"),r=$(".mobile-menu-profile-logged-in");if(t&&r.length<1){let n=`<li class="hidden-sm hidden-md hidden-lg mobile-menu-profile-logged-in mobile-menu-profile-account">
					<a href='/azoprofile/account/'><span>My Account</span></a>
				</li>
				<li class="hidden-sm hidden-md hidden-lg mobile-menu-profile-logged-in mobile-menu-profile-logoff">
					<a href='#' onclick='return AZoProfileUtils.logoffAZoProfile()'><span>Logoff</span></a>
				</li>`,t=`<li class="mobile-menu-profile-logged-in mobile-menu-profile-account">
					<a href='/azoprofile/account/'><span>My Account</span></a>
				</li>
				<li class="mobile-menu-profile-logged-in mobile-menu-profile-logoff">
					<a href='#' onclick='return AZoProfileUtils.logoffAZoProfile()'><span>Logoff</span></a>
				</li>`;$(".mobile-main").append(t);$("header .menu").append(n);$(".mobile-menu-profile-become-member").remove()}else if(!t&&i.length<1){let n=`<li class="hidden-sm hidden-md hidden-lg mobile-menu-profile-become-member">
					<a href="/azoprofile/login/" onclick="return AZoProfileUtils.showAZoProfileLoginFullOverlay(null);" class="login-signup"><span>Become a Member</span></a>
				</li>`,t=`<li class="mobile-menu-profile-become-member">
					<a href="/azoprofile/login/" onclick="return AZoProfileUtils.showAZoProfileLoginFullOverlay(null);" class="login-signup"><span>Become a Member</span></a>
				</li>`;$(".mobile-main").append(t);$("header .menu").append(n);$(".mobile-menu-profile-account, .mobile-menu-profile-logoff").remove()}},logoffAZoProfile:function(){return $.ajax({type:"POST",url:"/site_services.asmx/LogoffAZoProfile",cache:!1,data:" { } ",contentType:"application/json; charset=utf-8",dataType:"json",success:function(n){if(n&&n.d){if(n=n.d,n.Message){console.log("logoffAZoProfile, data.Message: "+n.Message);return}AZoProfileUtils.updateAZoProfileLoginStatusDisplay({},!0)}},error:function(n,t,i){var r=t;console.log("error in logoffAZoProfile. textStatus: "+(t||"---")+", errorThrown: "+(i||""))}}),!1},checkAZoProfileLoginStatus:function(){if(typeof pageVars!="undefined"&&pageVars.subscriptionsAZoProfileStatus){AZoProfileUtils.updateAZoProfileLoginStatusDisplay(pageVars.subscriptionsAZoProfileStatus,!1);return}$.ajax({type:"GET",url:"/DataServices.axd",cache:!1,data:{action:"GetAZoProfileLoginStatus"},contentType:"application/x-www-form-urlencoded; charset=UTF-8",dataType:"json",success:function(n){if(n){if(n.Message){console.log("checkAZoProfileLoginStatus, data.Message: "+n.Message);return}AZoProfileUtils.updateAZoProfileLoginStatusDisplay(n,!1)}},error:function(n,t,i){var r=t;console.log("error checking AZoProfileLoginStatus. textStatus: "+(t||"---")+", errorThrown: "+(i||""))}})},onAZoProfileBoxIdentityLogout:function(){return AZoProfileUtils.logoffAZoProfile(),!1},showAZoProfileBoxLoggedInDetails:function(n){$(".azoprofile-identity-box-name").text(n.Fullname);var t=$(".azoprofile-identity-box-pic img"),i=!!n.ThumbnailUrl;i?t.attr("src",n.ThumbnailUrl):t.attr("src","/pics/anonymous_avatar.gif");$(".azoprofile-identity-box-login-wrap").hide();$(".azoprofile-identity-box-loggedin").show()},followThruOnPendingSocialAction:function(){if(AZoProfileUtils.pendingSocialAction){var n=AZoProfileUtils.pendingSocialAction;AZoProfileUtils.pendingSocialAction=null;switch(n.action){case"like":case"dislike":case"post":case"comment":default:n.triggerClickElement?n.triggerClickElement.trigger("click"):n.callbackFn&&typeof n.callbackFn=="function"&&n.callbackFn()}}},isInitialAZoProfileLoggedInCheck:!0,updateAZoProfileBoxIdentityView:function(n){var i=AZoProfileUtils.isInitialAZoProfileLoggedInCheck,t;AZoProfileUtils.isInitialAZoProfileLoggedInCheck=!1;t=!!(n&&n.Fullname);(i||t)&&typeof BlogEngine!="undefined"&&typeof BlogEngine.getUpdateCommentData!="undefined"&&BlogEngine.getUpdateCommentData();t?AZoProfileUtils.showAZoProfileBoxLoggedInDetails(n):($(".azoprofile-identity-box-pic img").attr("src","/pics/anonymous_avatar.gif"),$(".azoprofile-identity-box-login-wrap").show(),$(".azoprofile-identity-box-loggedin").hide(),$("#commentblock li.comment div.like-dislike").removeClass("user-is-like user-is-dislike"))},onAZoProfileAuthenticated:function(){var n=$("#social-login-overlay-full-container"),t=n.closest(".mfp-wrap").length===1;return Azom.logInConsole("is authenticated"),$("#social-login-overlay-simple-container").hide(),t&&(AZoProfileUtils.pendingSocialAction&&AZoProfileUtils.pendingSocialAction.removeCloseDelayOnCurrentMagnificPopupInstance&&Azom.removeCloseDelayOnCurrentMagnificPopupInstance(),$.magnificPopup.close()),AZoProfileUtils.checkAZoProfileLoginStatus(),!1},onShowAZoFullLogin:function(){return Azom.logInConsole("onShowAZoFullLogin..."),AZoProfileUtils.showAZoProfileLoginFullOverlay(null,null),!1},onShowAZoCompleteProfile:function(n){Azom.logInConsole("onShowAZoCompleteProfile, tsiid: "+n);AZoProfileUtils.showAZoProfileLoginFullOverlay(n,null)},onFullLoginOverlayFullyLoaded:function(){},setSocialIdentityLoginBoxDimensions:function(){var t=$("#social-login-overlay-simple-container iframe"),u,n,f,i,r;t.length<1||(u=t.contents(),n=u.find("#page"),n.length<1)||(n.css("float","left"),$("#social-login-overlay-simple-container").css("width","1000px").css("height","auto"),f=n.width(),i=n.height(),n.css("float","none"),r=$("#social-login-overlay-simple-container"),r.css("width",f.toString()+"px"),r.css("height",i.toString()+"px"),t.css("height",i.toString()+"px"))},onDocClickForSocialFeedbackContainer:function(){$("#social-login-overlay-simple-container").hide()},onSocialLoginBlockUiClosed:function(){var n=$("#social-login-overlay-full-container");n.empty()},onAZoProfileLoginFullOverlayStart:function(){var t=$("#social-login-overlay-full-container"),r=t.data("tsiid")||"",u=t.data("defaultProfession")||"",i=t.find("iframe"),n;i.length<1&&(i=$(document.createElement("iframe")).attr("frameborder","0").appendTo(t));n="/social-login-overlay-full.aspx?sitesection="+(window.g_siteSection||"")+"&defaultProfession="+encodeURIComponent(u);r&&(n+=(n.indexOf("?")===-1?"?":"&")+"tsiid="+encodeURIComponent(r));n=Azom.appendContentViewDataSourceParameters(n);i.attr("src",n)},closeAZoProfileLoginFullOverlay:function(){return $.magnificPopup.close(),!1},showAZoProfileLoginFullOverlay:function(n,t){$("#social-login-overlay-simple-container").hide();Azom.isMagnificPopupOpen()&&(Azom.removeCloseDelayOnCurrentMagnificPopupInstance(),$.magnificPopup.close());var i=$("#social-login-overlay-full-container");return i.empty(),i.data("tsiid",n),i.data("defaultProfession",t||""),$.magnificPopup.open({type:"inline",items:{src:"#social-login-overlay-full-container"},mainClass:"mfp-3d-unfold",removalDelay:500,midClick:!0,callbacks:{beforeOpen:AZoProfileUtils.onAZoProfileLoginFullOverlayStart,afterClose:AZoProfileUtils.onSocialLoginBlockUiClosed}}),!1},switchActiveLoginPane:function(n){return $(".azo-profile-login-box").toggle(n==="password-login"),$(".azo-profile-passwordless-login-box").toggle(n==="passwordless-login"),!1},processPasswordlessLogin:function(){var n=$.trim(($("#tbAzoProfilePasswordlessLoginEmail").val()||"").toString()),i;if(!n)return alert("Email Address is required."),!1;var r=$.trim((Azom.getQueryVariable("returnUrl")||"").toString()),u=(document.referrer||"").toString(),t=window.location.href;try{t=window.top.location.href}catch(f){}i="email-address="+encodeURIComponent(n||"")+"&return-url="+encodeURIComponent(r||"")+"&referrer="+encodeURIComponent(u||"")+"&current-url="+encodeURIComponent(t||"");$.ajax({type:"POST",url:"/DataServices.axd?action=process-azoprofile-passwordless-login",cache:!1,data:i,contentType:"application/x-www-form-urlencoded; charset=UTF-8",dataType:"json",success:function(n){var t,i;if(toggleForSubmit(!1,"azo-profile-passwordless-login",$(".real-login-btn"),$(".dummy-login-btn"),$("img.logging-in-wait")),t=$("#divPasswordlessLoginMessage"),console.log(n),n){if(!n.IsSuccess||n.Message||!n.SuccessMessage){i=n.Message||"Sorry, an unexpected error occurred processing your request.";t.removeClass("passwordless-login-message-success").toggleClass("passwordless-login-message-error",!0).text(i).show();return}t.removeClass("passwordless-login-message-error").toggleClass("passwordless-login-message-success",!0).html(n.SuccessMessage).show();$("#tbAzoProfilePasswordlessLoginEmail").val("")}},error:function(n,t,i){var r,u;toggleForSubmit(!1,"azo-profile-passwordless-login",$(".real-login-btn"),$(".dummy-login-btn"),$("img.logging-in-wait"));r=$("#divPasswordlessLoginMessage");r.removeClass("passwordless-login-message-success").toggleClass("passwordless-login-message-error",!0).text("Sorry, an unexpected error occurred processing your request.").show();u=t;console.log("error in processPasswordlessLogin. textStatus: "+(t||"---")+", errorThrown: "+(i||""))}})},initAZoProfileIdentityBox:function(){$(function(){$("body").click(AZoProfileUtils.onDocClickForSocialFeedbackContainer);$("a.azoprofile-identity-box-login-btn").click(function(){return AZoProfileUtils.showAZoProfileLoginFullOverlay(null,null)});AZoProfileUtils.azoProfileLoginStatusUpdateFns.push(AZoProfileUtils.updateAZoProfileBoxIdentityView);AZoProfileUtils.azoProfileLoginStatusUpdateFns.push(AZoProfileUtils.followThruOnPendingSocialAction)})},resizeSocialLoginOverlayFullContainer:function(n){if(n&&!isNaN(n)&&!(n<200)){var t=$("#social-login-overlay-full-container iframe");t.length===1&&t.css("height",n.toString()+"px")}},handleResizingOneAllIframe:function(){var n=$("#social-login-container-full");if(!(n.length<1)){var t=n.width(),i=!0,r=function(){currentIframeContainerWidth=n.width();var r=currentIframeContainerWidth<392,u=t<392;(i||r!==u)&&n.children("iframe").css("height",r?"204px":"102px");i=!1;t=currentIframeContainerWidth};$(window).on("resize",Azom.azoDebounce(r,100));r()}},professionDdValidation:function(n,t){document.getElementById("otherProfession").style.display="none";t.Value==="select"&&(t.IsValid=!1)},giDdValidation:function(n,t){var i=document.getElementById("drProfession").value;i==="generalInterest"&&(document.getElementById("otherProfession").style.display=t.Value==="other"?"inline":"none",t.Value==="select"&&(t.IsValid=!1))},hcpDdValidation:function(n,t){var i=document.getElementById("drProfession").value;i==="hcp"&&(document.getElementById("otherProfession").style.display=t.Value==="other"?"inline":"none",t.Value==="select"&&(t.IsValid=!1))},researcherDdValidation:function(n,t){var i=document.getElementById("drProfession").value;i==="researcher"&&(document.getElementById("otherProfession").style.display=t.Value==="other"?"inline":"none",t.Value==="select"&&(t.IsValid=!1))},manufacturerDdValidation:function(n,t){var i=document.getElementById("drProfession").value;i==="manufacturer"&&(document.getElementById("otherProfession").style.display=t.Value==="other"?"inline":"none",t.Value==="select"&&(t.IsValid=!1))},otherTbValidation:function(n,t){(document.getElementById("generalInterestSelect").value==="other"||document.getElementById("hcpSelect").value==="other"||document.getElementById("researcherSelect").value==="other"||document.getElementById("manufacturerSelect").value==="other")&&t.Value===""&&(t.IsValid=!1)},validatePassword:function(n){const t={chosenPassword:n};return $.ajax({type:"POST",url:BlogEngine.convertToAbsoluteUrl("/site_services.asmx/VerifyAzoProfilePassword"),cache:!1,data:JSON.stringify(t),contentType:"application/json; charset=utf-8",dataType:"json",success:function(){},error:function(n,t,i){var r=t;console.log("error in processPasswordlessLogin. textStatus: "+(t||"---")+", errorThrown: "+(i||""))}})},validatedPasswordResults:[],newPasswordValidator:function(n,t){const i=$.trim((t.Value||"").toString());if(i.length>=8){const n=AZoProfileUtils.validatedPasswordResults.find(n=>n.password.toLowerCase()===i.toLowerCase());n?t.IsValid=n.isValid:AZoProfileUtils.validatePassword(i).done(function(n){const t=n.d;$(".new-password-validator").toggle(!t.IsValid);const i={isValid:t.IsValid,password:t.Password};AZoProfileUtils.validatedPasswordResults.push(i)})}}},function(n){n.fn.tipTip=function(t){var e={activation:"hover",keepAlive:!1,maxWidth:"200px",edgeOffset:3,defaultPosition:"bottom",delay:400,fadeIn:200,fadeOut:200,attribute:"title",closeOnClick:!1,content:!1,enter:function(){},exit:function(){}},i=n.extend(e,t);if(n("#tiptip_holder").length<=0){var r=n('<div id="tiptip_holder" style="max-width:'+i.maxWidth+';"><\/div>'),f=n('<div id="tiptip_content"><\/div>'),u=n('<div id="tiptip_arrow"><\/div>');n("body").append(r.html(f).prepend(u.html('<div id="tiptip_arrow_inner"><\/div>')))}else var r=n("#tiptip_holder"),f=n("#tiptip_content"),u=n("#tiptip_arrow");return this.each(function(){var t=n(this),o,e;if(o=i.content?i.content:t.attr(i.attribute),o!=""){i.content||t.removeAttr(i.attribute);e=!1;i.activation=="hover"?(t.hover(function(){h()},function(){i.keepAlive||s()}),i.keepAlive&&r.hover(function(){},function(){s()})):i.activation=="focus"?t.focus(function(){h()}).blur(function(){s()}):i.activation=="click"&&(t.click(function(){return i.closeOnClick&&r.is(":visible")?s():h(),!1}).hover(function(){},function(){i.keepAlive||s()}),i.keepAlive&&r.hover(function(){},function(){s()}));function h(){var nt,tt,k,d;i.enter.call(this);f.html(o);r.hide().removeAttr("class").css("margin","0");u.removeAttr("style");var c=parseInt(t.offset().top),a=parseInt(t.offset().left),it=parseInt(t.outerWidth()),y=parseInt(t.outerHeight()),v=r.outerWidth(),l=r.outerHeight(),b=Math.round((it-v)/2),rt=Math.round((y-l)/2),p=Math.round(a+b),h=Math.round(c+y+i.edgeOffset),s="",w="",g=Math.round(v-12)/2;i.defaultPosition=="bottom"?s="_bottom":i.defaultPosition=="top"?s="_top":i.defaultPosition=="left"?s="_left":i.defaultPosition=="right"&&(s="_right");nt=b+a<parseInt(n(window).scrollLeft());tt=v+a>parseInt(n(window).width());nt&&b<0||s=="_right"&&!tt||s=="_left"&&a<v+i.edgeOffset+5?(s="_right",w=Math.round(l-13)/2,g=-12,p=Math.round(a+it+i.edgeOffset),h=Math.round(c+rt)):(tt&&b<0||s=="_left"&&!nt)&&(s="_left",w=Math.round(l-13)/2,g=Math.round(v),p=Math.round(a-(v+i.edgeOffset+5)),h=Math.round(c+rt));k=c+y+i.edgeOffset+l+8>parseInt(n(window).height()+n(window).scrollTop());d=c+y-(i.edgeOffset+l+8)<0;k||s=="_bottom"&&k||s=="_top"&&!d?(s=s=="_top"||s=="_bottom"?"_top":s+"_top",w=l,h=Math.round(c-(l+5+i.edgeOffset))):(d|(s=="_top"&&d)||s=="_bottom"&&!k)&&(s=s=="_top"||s=="_bottom"?"_bottom":s+"_bottom",w=-12,h=Math.round(c+y+i.edgeOffset));s=="_right_top"||s=="_left_top"?h=h+5:(s=="_right_bottom"||s=="_left_bottom")&&(h=h-5);(s=="_left_top"||s=="_left_bottom")&&(p=p+5);u.css({"margin-left":g+"px","margin-top":w+"px"});r.css({"margin-left":p+"px","margin-top":h+"px"}).attr("class","tip"+s);e&&clearTimeout(e);e=setTimeout(function(){r.stop(!0,!0).fadeIn(i.fadeIn)},i.delay)}function s(){i.exit.call(this);e&&clearTimeout(e);r.fadeOut(i.fadeOut)}}})}}(jQuery);this.JSON||(this.JSON={}),function(){function i(n){return n<10?"0"+n:n}function o(n){return e.lastIndex=0,e.test(n)?'"'+n.replace(e,function(n){var t=s[n];return typeof t=="string"?t:"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+n+'"'}function u(i,f){var c,l,s,a,v=n,h,e=f[i];e&&typeof e=="object"&&typeof e.toJSON=="function"&&(e=e.toJSON(i));typeof t=="function"&&(e=t.call(f,i,e));switch(typeof e){case"string":return o(e);case"number":return isFinite(e)?String(e):"null";case"boolean":case"null":return String(e);case"object":if(!e)return"null";if(n+=r,h=[],Object.prototype.toString.apply(e)==="[object Array]"){for(a=e.length,c=0;c<a;c+=1)h[c]=u(c,e)||"null";return s=h.length===0?"[]":n?"[\n"+n+h.join(",\n"+n)+"\n"+v+"]":"["+h.join(",")+"]",n=v,s}if(t&&typeof t=="object")for(a=t.length,c=0;c<a;c+=1)l=t[c],typeof l=="string"&&(s=u(l,e),s&&h.push(o(l)+(n?": ":":")+s));else for(l in e)Object.hasOwnProperty.call(e,l)&&(s=u(l,e),s&&h.push(o(l)+(n?": ":":")+s));return s=h.length===0?"{}":n?"{\n"+n+h.join(",\n"+n)+"\n"+v+"}":"{"+h.join(",")+"}",n=v,s}}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+i(this.getUTCMonth()+1)+"-"+i(this.getUTCDate())+"T"+i(this.getUTCHours())+":"+i(this.getUTCMinutes())+":"+i(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var f=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n,r,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},t;typeof JSON.stringify!="function"&&(JSON.stringify=function(i,f,e){var o;if(n="",r="",typeof e=="number")for(o=0;o<e;o+=1)r+=" ";else typeof e=="string"&&(r=e);if(t=f,f&&typeof f!="function"&&(typeof f!="object"||typeof f.length!="number"))throw new Error("JSON.stringify");return u("",{"":i})});typeof JSON.parse!="function"&&(JSON.parse=function(n,t){function r(n,i){var f,e,u=n[i];if(u&&typeof u=="object")for(f in u)Object.hasOwnProperty.call(u,f)&&(e=r(u,f),e!==undefined?u[f]=e:delete u[f]);return t.call(n,i,u)}var i;if(n=String(n),f.lastIndex=0,f.test(n)&&(n=n.replace(f,function(n){return"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(n.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return i=eval("("+n+")"),typeof t=="function"?r({"":i},""):i;throw new SyntaxError("JSON.parse");})}(),function(n,t){"use strict";function r(t){n.fn.cycle.debug&&i(t)}function i(){window.console&&console.log&&console.log("[cycle] "+Array.prototype.join.call(arguments," "))}function u(t,i,r){var u=n(t).data("cycle.opts"),f;u&&(f=!!t.cyclePause,f&&u.paused?u.paused(t,u,i,r):!f&&u.resumed&&u.resumed(t,u,i,r))}function l(r,e,o){function c(t,r,u){if(!t&&r===!0){var e=n(u).data("cycle.opts");if(!e)return i("options not found, can not resume"),!1;u.cycleTimeout&&(clearTimeout(u.cycleTimeout),u.cycleTimeout=0);f(e.elements,e,1,!e.backwards)}}var s,h;if(r.cycleStop===t&&(r.cycleStop=0),(e===t||e===null)&&(e={}),e.constructor==String){switch(e){case"destroy":case"stop":return(s=n(r).data("cycle.opts"),!s)?!1:(r.cycleStop++,r.cycleTimeout&&clearTimeout(r.cycleTimeout),r.cycleTimeout=0,s.elements&&n(s.elements).stop(),n(r).removeData("cycle.opts"),e=="destroy"&&a(r,s),!1);case"toggle":return r.cyclePause=r.cyclePause===1?0:1,c(r.cyclePause,o,r),u(r),!1;case"pause":return r.cyclePause=1,u(r),!1;case"resume":return r.cyclePause=0,c(!1,o,r),u(r),!1;case"prev":case"next":return(s=n(r).data("cycle.opts"),!s)?(i('options not found, "prev/next" ignored'),!1):(typeof o=="string"&&(s.oneTimeFx=o),n.fn.cycle[e](s),!1);default:e={fx:e}}return e}return e.constructor==Number?(h=e,e=n(r).data("cycle.opts"),!e)?(i("options not found, can not advance slide"),!1):h<0||h>=e.elements.length?(i("invalid slide index: "+h),!1):(e.nextSlide=h,r.cycleTimeout&&(clearTimeout(r.cycleTimeout),r.cycleTimeout=0),typeof o=="string"&&(e.oneTimeFx=o),f(e.elements,e,1,h>=e.currSlide),!1):e}function o(t,i){if(!n.support.opacity&&i.cleartype&&t.style.filter)try{t.style.removeAttribute("filter")}catch(r){}}function a(t,i){i.next&&n(i.next).unbind(i.prevNextEvent);i.prev&&n(i.prev).unbind(i.prevNextEvent);(i.pager||i.pagerAnchorBuilder)&&n.each(i.pagerAnchors||[],function(){this.unbind().remove()});i.pagerAnchors=null;n(t).unbind("mouseenter.cycle mouseleave.cycle");i.destroy&&i.destroy(i)}function v(r,s,c,l,a){var at,v=n.extend({},n.fn.cycle.defaults,l||{},n.metadata?r.metadata():n.meta?r.data():{}),vt=n.isFunction(r.data)?r.data(v.metaAttr):null,rt,ut,tt,k,yt,nt,d,ft,ht,ct,pt,lt,g;if(vt&&(v=n.extend(v,vt)),v.autostop&&(v.countdown=v.autostopCount||c.length),rt=r[0],r.data("cycle.opts",v),v.$cont=r,v.stopCount=rt.cycleStop,v.elements=c,v.before=v.before?[v.before]:[],v.after=v.after?[v.after]:[],!n.support.opacity&&v.cleartype&&v.after.push(function(){o(this,v)}),v.continuous&&v.after.push(function(){f(c,v,0,!v.backwards)}),y(v),n.support.opacity||!v.cleartype||v.cleartypeNoBg||h(s),r.css("position")=="static"&&r.css("position","relative"),v.width&&r.width(v.width),v.height&&v.height!="auto"&&r.height(v.height),v.startingSlide!==t?(v.startingSlide=parseInt(v.startingSlide,10),v.startingSlide>=c.length||v.startSlide<0?v.startingSlide=0:at=!0):v.startingSlide=v.backwards?c.length-1:0,v.random){for(v.randomMap=[],ut=0;ut<c.length;ut++)v.randomMap.push(ut);if(v.randomMap.sort(function(){return Math.random()-.5}),at)for(tt=0;tt<c.length;tt++)v.startingSlide==v.randomMap[tt]&&(v.randomIndex=tt);else v.randomIndex=1,v.startingSlide=v.randomMap[1]}else v.startingSlide>=c.length&&(v.startingSlide=0);if(v.currSlide=v.startingSlide||0,k=v.startingSlide,s.css({position:"absolute",top:0,left:0}).hide().each(function(t){var i;i=v.backwards?k?t<=k?c.length+(t-k):k-t:c.length-t:k?t>=k?c.length-(t-k):k-t:c.length-t;n(this).css("z-index",i)}),n(c[k]).css("opacity",1).show(),o(c[k],v),v.fit&&(v.aspect?s.each(function(){var t=n(this),i=v.aspect===!0?t.width()/t.height():v.aspect;v.width&&t.width()!=v.width&&(t.width(v.width),t.height(v.width/i));v.height&&t.height()<v.height&&(t.height(v.height),t.width(v.height*i))}):(v.width&&s.width(v.width),v.height&&v.height!="auto"&&s.height(v.height))),v.center&&(!v.fit||v.aspect)&&s.each(function(){var t=n(this);t.css({"margin-left":v.width?(v.width-t.width())/2+"px":0,"margin-top":v.height?(v.height-t.height())/2+"px":0})}),!v.center||v.fit||v.slideResize||s.each(function(){var t=n(this);t.css({"margin-left":v.width?(v.width-t.width())/2+"px":0,"margin-top":v.height?(v.height-t.height())/2+"px":0})}),yt=(v.containerResize||v.containerResizeHeight)&&r.innerHeight()<1,yt){for(nt=0,d=0,ft=0;ft<c.length;ft++){var it=n(c[ft]),et=it[0],ot=it.outerWidth(),st=it.outerHeight();ot||(ot=et.offsetWidth||et.width||it.attr("width"));st||(st=et.offsetHeight||et.height||it.attr("height"));nt=ot>nt?ot:nt;d=st>d?st:d}v.containerResize&&nt>0&&d>0&&r.css({width:nt+"px",height:d+"px"});v.containerResizeHeight&&d>0&&r.css({height:d+"px"})}if((ht=!1,v.pause&&r.bind("mouseenter.cycle",function(){ht=!0;this.cyclePause++;u(rt,!0)}).bind("mouseleave.cycle",function(){ht&&this.cyclePause--;u(rt,!0)}),p(v)===!1)||(ct=!1,l.requeueAttempts=l.requeueAttempts||0,s.each(function(){var t=n(this),r;if(this.cycleH=v.fit&&v.height?v.height:t.height()||this.offsetHeight||this.height||t.attr("height")||0,this.cycleW=v.fit&&v.width?v.width:t.width()||this.offsetWidth||this.width||t.attr("width")||0,t.is("img")&&(r=this.cycleH===0&&this.cycleW===0&&!this.complete,r)){if(a.s&&v.requeueOnImageNotLoaded&&++l.requeueAttempts<100)return i(l.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH),setTimeout(function(){n(a.s,a.c).cycle(l)},v.requeueTimeout),ct=!0,!1;i("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}return!0}),ct))return!1;if(v.cssBefore=v.cssBefore||{},v.cssAfter=v.cssAfter||{},v.cssFirst=v.cssFirst||{},v.animIn=v.animIn||{},v.animOut=v.animOut||{},s.not(":eq("+k+")").css(v.cssBefore),n(s[k]).css(v.cssFirst),v.timeout)for(v.timeout=parseInt(v.timeout,10),v.speed.constructor==String&&(v.speed=n.fx.speeds[v.speed]||parseInt(v.speed,10)),v.sync||(v.speed=v.speed/2),pt=v.fx=="none"?0:v.fx=="shuffle"?500:250;v.timeout-v.speed<pt;)v.timeout+=v.speed;if(v.easing&&(v.easeIn=v.easeOut=v.easing),v.speedIn||(v.speedIn=v.speed),v.speedOut||(v.speedOut=v.speed),v.slideCount=c.length,v.currSlide=v.lastSlide=k,v.random?(++v.randomIndex==c.length&&(v.randomIndex=0),v.nextSlide=v.randomMap[v.randomIndex]):v.nextSlide=v.backwards?v.startingSlide===0?c.length-1:v.startingSlide-1:v.startingSlide>=c.length-1?0:v.startingSlide+1,!v.multiFx)if(lt=n.fn.cycle.transitions[v.fx],n.isFunction(lt))lt(r,s,v);else if(v.fx!="custom"&&!v.multiFx)return i("unknown transition: "+v.fx,"; slideshow terminating"),!1;return g=s[k],v.skipInitializationCallbacks||(v.before.length&&v.before[0].apply(g,[g,g,v,!0]),v.after.length&&v.after[0].apply(g,[g,g,v,!0])),v.next&&n(v.next).bind(v.prevNextEvent,function(){return e(v,1)}),v.prev&&n(v.prev).bind(v.prevNextEvent,function(){return e(v,0)}),(v.pager||v.pagerAnchorBuilder)&&b(c,v),w(v,c),v}function y(t){t.original={before:[],after:[]};t.original.cssBefore=n.extend({},t.cssBefore);t.original.cssAfter=n.extend({},t.cssAfter);t.original.animIn=n.extend({},t.animIn);t.original.animOut=n.extend({},t.animOut);n.each(t.before,function(){t.original.before.push(this)});n.each(t.after,function(){t.original.after.push(this)})}function p(t){var u,e,f=n.fn.cycle.transitions,s,o,h,c;if(t.fx.indexOf(",")>0){for(t.multiFx=!0,t.fxs=t.fx.replace(/\s*/g,"").split(","),u=0;u<t.fxs.length;u++)s=t.fxs[u],e=f[s],e&&f.hasOwnProperty(s)&&n.isFunction(e)||(i("discarding unknown transition: ",s),t.fxs.splice(u,1),u--);if(!t.fxs.length)return i("No valid transitions named; slideshow terminating."),!1}else if(t.fx=="all"){t.multiFx=!0;t.fxs=[];for(o in f)f.hasOwnProperty(o)&&(e=f[o],f.hasOwnProperty(o)&&n.isFunction(e)&&t.fxs.push(o))}if(t.multiFx&&t.randomizeEffects){for(h=Math.floor(Math.random()*20)+30,u=0;u<h;u++)c=Math.floor(Math.random()*t.fxs.length),t.fxs.push(t.fxs.splice(c,1)[0]);r("randomized fx sequence: ",t.fxs)}return!0}function w(t,i){t.addSlide=function(r,u){var f=n(r),e=f[0];if(t.autostopCount||t.countdown++,i[u?"unshift":"push"](e),t.els&&t.els[u?"unshift":"push"](e),t.slideCount=i.length,t.random&&(t.randomMap.push(t.slideCount-1),t.randomMap.sort(function(){return Math.random()-.5})),f.css("position","absolute"),f[u?"prependTo":"appendTo"](t.$cont),u&&(t.currSlide++,t.nextSlide++),n.support.opacity||!t.cleartype||t.cleartypeNoBg||h(f),t.fit&&t.width&&f.width(t.width),t.fit&&t.height&&t.height!="auto"&&f.height(t.height),e.cycleH=t.fit&&t.height?t.height:f.height(),e.cycleW=t.fit&&t.width?t.width:f.width(),f.css(t.cssBefore),(t.pager||t.pagerAnchorBuilder)&&n.fn.cycle.createPagerAnchor(i.length-1,e,n(t.pager),i,t),n.isFunction(t.onAddSlide))t.onAddSlide(f);else f.hide()}}function f(i,u,e,o){function w(){var n=0,t=u.timeout;u.timeout&&!u.continuous?(n=s(i[u.currSlide],i[u.nextSlide],u,o),u.fx=="shuffle"&&(n-=u.speedOut)):u.continuous&&l.cyclePause&&(n=10);n>0&&(l.cycleTimeout=setTimeout(function(){f(i,u,0,!u.backwards)},n))}var l=u.$cont[0],c=i[u.currSlide],h=i[u.nextSlide],y,v,p,a;if(e&&u.busy&&u.manualTrump&&(r("manualTrump in go(), stopping active transition"),n(i).stop(!0,!0),u.busy=0,clearTimeout(l.cycleTimeout)),u.busy){r("transition active, ignoring new tx request");return}if(l.cycleStop==u.stopCount&&(l.cycleTimeout!==0||e)){if(!e&&!l.cyclePause&&!u.bounce&&(u.autostop&&--u.countdown<=0||u.nowrap&&!u.random&&u.nextSlide<u.currSlide)){u.end&&u.end(u);return}y=!1;(e||!l.cyclePause)&&u.nextSlide!=u.currSlide?(y=!0,v=u.fx,c.cycleH=c.cycleH||n(c).height(),c.cycleW=c.cycleW||n(c).width(),h.cycleH=h.cycleH||n(h).height(),h.cycleW=h.cycleW||n(h).width(),u.multiFx&&(o&&(u.lastFx===t||++u.lastFx>=u.fxs.length)?u.lastFx=0:!o&&(u.lastFx===t||--u.lastFx<0)&&(u.lastFx=u.fxs.length-1),v=u.fxs[u.lastFx]),u.oneTimeFx&&(v=u.oneTimeFx,u.oneTimeFx=null),n.fn.cycle.resetState(u,v),u.before.length&&n.each(u.before,function(n,t){l.cycleStop==u.stopCount&&t.apply(h,[c,h,u,o])}),p=function(){u.busy=0;n.each(u.after,function(n,t){l.cycleStop==u.stopCount&&t.apply(h,[c,h,u,o])});l.cycleStop||w()},r("tx firing("+v+"); currSlide: "+u.currSlide+"; nextSlide: "+u.nextSlide),u.busy=1,u.fxFn?u.fxFn(c,h,u,p,o,e&&u.fastOnEvent):n.isFunction(n.fn.cycle[u.fx])?n.fn.cycle[u.fx](c,h,u,p,o,e&&u.fastOnEvent):n.fn.cycle.custom(c,h,u,p,o,e&&u.fastOnEvent)):w();(y||u.nextSlide==u.currSlide)&&(u.lastSlide=u.currSlide,u.random?(u.currSlide=u.nextSlide,++u.randomIndex==i.length&&(u.randomIndex=0,u.randomMap.sort(function(){return Math.random()-.5})),u.nextSlide=u.randomMap[u.randomIndex],u.nextSlide==u.currSlide&&(u.nextSlide=u.currSlide==u.slideCount-1?0:u.currSlide+1)):u.backwards?(a=u.nextSlide-1<0,a&&u.bounce?(u.backwards=!u.backwards,u.nextSlide=1,u.currSlide=0):(u.nextSlide=a?i.length-1:u.nextSlide-1,u.currSlide=a?0:u.nextSlide+1)):(a=u.nextSlide+1==i.length,a&&u.bounce?(u.backwards=!u.backwards,u.nextSlide=i.length-2,u.currSlide=i.length-1):(u.nextSlide=a?0:u.nextSlide+1,u.currSlide=a?i.length-1:u.nextSlide-1)));y&&u.pager&&u.updateActivePagerLink(u.pager,u.currSlide,u.activePagerClass)}}function s(n,t,i,u){if(i.timeoutFn){for(var f=i.timeoutFn.call(n,n,t,i,u);i.fx!="none"&&f-i.speed<250;)f+=i.speed;if(r("calculated timeout: "+f+"; speed: "+i.speed),f!==!1)return f}return i.timeout}function e(t,i){var u=i?1:-1,r=t.elements,o=t.$cont[0],s=o.cycleTimeout,e;if(s&&(clearTimeout(s),o.cycleTimeout=0),t.random&&u<0)t.randomIndex--,--t.randomIndex==-2?t.randomIndex=r.length-2:t.randomIndex==-1&&(t.randomIndex=r.length-1),t.nextSlide=t.randomMap[t.randomIndex];else if(t.random)t.nextSlide=t.randomMap[t.randomIndex];else if(t.nextSlide=t.currSlide+u,t.nextSlide<0){if(t.nowrap)return!1;t.nextSlide=r.length-1}else if(t.nextSlide>=r.length){if(t.nowrap)return!1;t.nextSlide=0}return e=t.onPrevNextEvent||t.prevNextClick,n.isFunction(e)&&e(u>0,t.nextSlide,r[t.nextSlide]),f(r,t,1,i),!1}function b(t,i){var r=n(i.pager);n.each(t,function(u,f){n.fn.cycle.createPagerAnchor(u,f,r,t,i)});i.updateActivePagerLink(i.pager,i.startingSlide,i.activePagerClass)}function h(t){function i(n){return n=parseInt(n,10).toString(16),n.length<2?"0"+n:n}function u(t){for(var r,u;t&&t.nodeName.toLowerCase()!="html";t=t.parentNode){if(r=n.css(t,"background-color"),r&&r.indexOf("rgb")>=0)return u=r.match(/\d+/g),"#"+i(u[0])+i(u[1])+i(u[2]);if(r&&r!="transparent")return r}return"#ffffff"}r("applying clearType background-color hack");t.each(function(){n(this).css("background-color",u(this))})}var c="3.0.3";n.expr[":"].paused=function(n){return n.cyclePause};n.fn.cycle=function(t,u){var e={s:this.selector,c:this.context};return this.length===0&&t!="stop"?!n.isReady&&e.s?(i("DOM not ready, queuing slideshow"),n(function(){n(e.s,e.c).cycle(t,u)}),this):(i("terminating; zero elements found by selector"+(n.isReady?"":" (DOM not ready)")),this):this.each(function(){var h=l(this,t,u),o,c;if(h!==!1){h.updateActivePagerLink=h.updateActivePagerLink||n.fn.cycle.updateActivePagerLink;this.cycleTimeout&&clearTimeout(this.cycleTimeout);this.cycleTimeout=this.cyclePause=0;this.cycleStop=0;var y=n(this),p=h.slideExpr?n(h.slideExpr,this):y.children(),a=p.get();if(a.length<2){i("terminating; too few slides: "+a.length);return}(o=v(y,p,a,h,e),o!==!1)&&(c=o.continuous?10:s(a[o.currSlide],a[o.nextSlide],o,!o.backwards),c&&(c+=o.delay||0,c<10&&(c=10),r("first timeout: "+c),this.cycleTimeout=setTimeout(function(){f(a,o,0,!h.backwards)},c)))}})};n.fn.cycle.resetState=function(t,i){i=i||t.fx;t.before=[];t.after=[];t.cssBefore=n.extend({},t.original.cssBefore);t.cssAfter=n.extend({},t.original.cssAfter);t.animIn=n.extend({},t.original.animIn);t.animOut=n.extend({},t.original.animOut);t.fxFn=null;n.each(t.original.before,function(){t.before.push(this)});n.each(t.original.after,function(){t.after.push(this)});var r=n.fn.cycle.transitions[i];n.isFunction(r)&&r(t.$cont,n(t.elements),t)};n.fn.cycle.updateActivePagerLink=function(t,i,r){n(t).each(function(){n(this).children().removeClass(r).eq(i).addClass(r)})};n.fn.cycle.next=function(n){e(n,1)};n.fn.cycle.prev=function(n){e(n,0)};n.fn.cycle.createPagerAnchor=function(t,i,e,o,s){var c,h,a,v,l,y;(n.isFunction(s.pagerAnchorBuilder)?(c=s.pagerAnchorBuilder(t,i),r("pagerAnchorBuilder("+t+", el) returned: "+c)):c='<a href="#">'+(t+1)+"<\/a>",c)&&(h=n(c),h.parents("body").length===0&&(a=[],e.length>1?(e.each(function(){var t=h.clone(!0);n(this).append(t);a.push(t[0])}),h=n(a)):h.appendTo(e)),s.pagerAnchors=s.pagerAnchors||[],s.pagerAnchors.push(h),v=function(i){var r,u,e;i.preventDefault();s.nextSlide=t;r=s.$cont[0];u=r.cycleTimeout;u&&(clearTimeout(u),r.cycleTimeout=0);e=s.onPagerEvent||s.pagerClick;n.isFunction(e)&&e(s.nextSlide,o[s.nextSlide]);f(o,s,1,s.currSlide<t)},/mouseenter|mouseover/i.test(s.pagerEvent)?h.hover(v,function(){}):h.bind(s.pagerEvent,v),/^click/.test(s.pagerEvent)||s.allowPagerClickBubble||h.bind("click.cycle",function(){return!1}),l=s.$cont[0],y=!1,s.pauseOnPagerHover&&h.hover(function(){y=!0;l.cyclePause++;u(l,!0,!0)},function(){y&&l.cyclePause--;u(l,!0,!0)}))};n.fn.cycle.hopsFromLast=function(n,t){var i=n.lastSlide,r=n.currSlide;return t?r>i?r-i:n.slideCount-i:r<i?i-r:i+n.slideCount-r};n.fn.cycle.commonReset=function(t,i,r,u,f,e){n(r.elements).not(t).hide();typeof r.cssBefore.opacity=="undefined"&&(r.cssBefore.opacity=1);r.cssBefore.display="block";r.slideResize&&u!==!1&&i.cycleW>0&&(r.cssBefore.width=i.cycleW);r.slideResize&&f!==!1&&i.cycleH>0&&(r.cssBefore.height=i.cycleH);r.cssAfter=r.cssAfter||{};r.cssAfter.display="none";n(t).css("zIndex",r.slideCount+(e===!0?1:0));n(i).css("zIndex",r.slideCount+(e===!0?0:1))};n.fn.cycle.custom=function(t,i,r,u,f,e){var h=n(t),c=n(i),l=r.speedIn,o=r.speedOut,a=r.easeIn,v=r.easeOut,y=r.animInDelay,p=r.animOutDelay,s;c.css(r.cssBefore);e&&(l=typeof e=="number"?o=e:o=1,a=v=null);s=function(){c.delay(y).animate(r.animIn,l,a,function(){u()})};h.delay(p).animate(r.animOut,o,v,function(){h.css(r.cssAfter);r.sync||s()});r.sync&&s()};n.fn.cycle.transitions={fade:function(t,i,r){i.not(":eq("+r.currSlide+")").css("opacity",0);r.before.push(function(t,i,r){n.fn.cycle.commonReset(t,i,r);r.cssBefore.opacity=0});r.animIn={opacity:1};r.animOut={opacity:0};r.cssBefore={top:0,left:0}}};n.fn.cycle.ver=function(){return c};n.fn.cycle.defaults={activePagerClass:"activeSlide",after:null,allowPagerClickBubble:!1,animIn:null,animInDelay:0,animOut:null,animOutDelay:0,aspect:!1,autostop:0,autostopCount:0,backwards:!1,before:null,center:null,cleartype:!n.support.opacity,cleartypeNoBg:!1,containerResize:1,containerResizeHeight:0,continuous:0,cssAfter:null,cssBefore:null,delay:0,easeIn:null,easeOut:null,easing:null,end:null,fastOnEvent:0,fit:0,fx:"fade",fxFn:null,height:"auto",manualTrump:!0,metaAttr:"cycle",next:null,nowrap:0,onPagerEvent:null,onPrevNextEvent:null,pager:null,pagerAnchorBuilder:null,pagerEvent:"click.cycle",pause:0,pauseOnPagerHover:0,prev:null,prevNextEvent:"click.cycle",random:0,randomizeEffects:1,requeueOnImageNotLoaded:!0,requeueTimeout:250,rev:0,shuffle:null,skipInitializationCallbacks:!1,slideExpr:null,slideResize:1,speed:1e3,speedIn:null,speedOut:null,startingSlide:t,sync:1,timeout:4e3,timeoutFn:null,updateActivePagerLink:null,width:null}}(jQuery),function(n){"use strict";n.fn.cycle.transitions.none=function(t,i,r){r.fxFn=function(t,i,r,u){n(i).show();n(t).hide();u()}};n.fn.cycle.transitions.fadeout=function(t,i,r){i.not(":eq("+r.currSlide+")").css({display:"block",opacity:1});r.before.push(function(t,i,r,u,f,e){n(t).css("zIndex",r.slideCount+(e!==!0?1:0));n(i).css("zIndex",r.slideCount+(e!==!0?0:1))});r.animIn.opacity=1;r.animOut.opacity=0;r.cssBefore.opacity=1;r.cssBefore.display="block";r.cssAfter.zIndex=0};n.fn.cycle.transitions.scrollUp=function(t,i,r){t.css("overflow","hidden");r.before.push(n.fn.cycle.commonReset);var u=t.height();r.cssBefore.top=u;r.cssBefore.left=0;r.cssFirst.top=0;r.animIn.top=0;r.animOut.top=-u};n.fn.cycle.transitions.scrollDown=function(t,i,r){t.css("overflow","hidden");r.before.push(n.fn.cycle.commonReset);var u=t.height();r.cssFirst.top=0;r.cssBefore.top=-u;r.cssBefore.left=0;r.animIn.top=0;r.animOut.top=u};n.fn.cycle.transitions.scrollLeft=function(t,i,r){t.css("overflow","hidden");r.before.push(n.fn.cycle.commonReset);var u=t.width();r.cssFirst.left=0;r.cssBefore.left=u;r.cssBefore.top=0;r.animIn.left=0;r.animOut.left=0-u};n.fn.cycle.transitions.scrollRight=function(t,i,r){t.css("overflow","hidden");r.before.push(n.fn.cycle.commonReset);var u=t.width();r.cssFirst.left=0;r.cssBefore.left=-u;r.cssBefore.top=0;r.animIn.left=0;r.animOut.left=u};n.fn.cycle.transitions.scrollHorz=function(t,i,r){t.css("overflow","hidden").width();r.before.push(function(t,i,r,u){r.rev&&(u=!u);n.fn.cycle.commonReset(t,i,r);r.cssBefore.left=u?i.cycleW-1:1-i.cycleW;r.animOut.left=u?-t.cycleW:t.cycleW});r.cssFirst.left=0;r.cssBefore.top=0;r.animIn.left=0;r.animOut.top=0};n.fn.cycle.transitions.scrollVert=function(t,i,r){t.css("overflow","hidden");r.before.push(function(t,i,r,u){r.rev&&(u=!u);n.fn.cycle.commonReset(t,i,r);r.cssBefore.top=u?1-i.cycleH:i.cycleH-1;r.animOut.top=u?t.cycleH:-t.cycleH});r.cssFirst.top=0;r.cssBefore.left=0;r.animIn.top=0;r.animOut.left=0};n.fn.cycle.transitions.slideX=function(t,i,r){r.before.push(function(t,i,r){n(r.elements).not(t).hide();n.fn.cycle.commonReset(t,i,r,!1,!0);r.animIn.width=i.cycleW});r.cssBefore.left=0;r.cssBefore.top=0;r.cssBefore.width=0;r.animIn.width="show";r.animOut.width=0};n.fn.cycle.transitions.slideY=function(t,i,r){r.before.push(function(t,i,r){n(r.elements).not(t).hide();n.fn.cycle.commonReset(t,i,r,!0,!1);r.animIn.height=i.cycleH});r.cssBefore.left=0;r.cssBefore.top=0;r.cssBefore.height=0;r.animIn.height="show";r.animOut.height=0};n.fn.cycle.transitions.shuffle=function(t,i,r){var u,f=t.css("overflow","visible").width();for(i.css({left:0,top:0}),r.before.push(function(t,i,r){n.fn.cycle.commonReset(t,i,r,!0,!0,!0)}),r.speedAdjusted||(r.speed=r.speed/2,r.speedAdjusted=!0),r.random=0,r.shuffle=r.shuffle||{left:-f,top:15},r.els=[],u=0;u<i.length;u++)r.els.push(i[u]);for(u=0;u<r.currSlide;u++)r.els.push(r.els.shift());r.fxFn=function(t,i,r,u,f){var e,o;r.rev&&(f=!f);e=f?n(t):n(i);n(i).css(r.cssBefore);o=r.slideCount;e.animate(r.shuffle,r.speedIn,r.easeIn,function(){for(var i,s,c,l=n.fn.cycle.hopsFromLast(r,f),h=0;h<l;h++)f?r.els.push(r.els.shift()):r.els.unshift(r.els.pop());if(f)for(i=0,s=r.els.length;i<s;i++)n(r.els[i]).css("z-index",s-i+o);else c=n(t).css("z-index"),e.css("z-index",parseInt(c,10)+1+o);e.animate({left:0,top:0},r.speedOut,r.easeOut,function(){n(f?this:t).hide();u&&u()})})};n.extend(r.cssBefore,{display:"block",opacity:1,top:0,left:0})};n.fn.cycle.transitions.turnUp=function(t,i,r){r.before.push(function(t,i,r){n.fn.cycle.commonReset(t,i,r,!0,!1);r.cssBefore.top=i.cycleH;r.animIn.height=i.cycleH;r.animOut.width=i.cycleW});r.cssFirst.top=0;r.cssBefore.left=0;r.cssBefore.height=0;r.animIn.top=0;r.animOut.height=0};n.fn.cycle.transitions.turnDown=function(t,i,r){r.before.push(function(t,i,r){n.fn.cycle.commonReset(t,i,r,!0,!1);r.animIn.height=i.cycleH;r.animOut.top=t.cycleH});r.cssFirst.top=0;r.cssBefore.left=0;r.cssBefore.top=0;r.cssBefore.height=0;r.animOut.height=0};n.fn.cycle.transitions.turnLeft=function(t,i,r){r.before.push(function(t,i,r){n.fn.cycle.commonReset(t,i,r,!1,!0);r.cssBefore.left=i.cycleW;r.animIn.width=i.cycleW});r.cssBefore.top=0;r.cssBefore.width=0;r.animIn.left=0;r.animOut.width=0};n.fn.cycle.transitions.turnRight=function(t,i,r){r.before.push(function(t,i,r){n.fn.cycle.commonReset(t,i,r,!1,!0);r.animIn.width=i.cycleW;r.animOut.left=t.cycleW});n.extend(r.cssBefore,{top:0,left:0,width:0});r.animIn.left=0;r.animOut.width=0};n.fn.cycle.transitions.zoom=function(t,i,r){r.before.push(function(t,i,r){n.fn.cycle.commonReset(t,i,r,!1,!1,!0);r.cssBefore.top=i.cycleH/2;r.cssBefore.left=i.cycleW/2;n.extend(r.animIn,{top:0,left:0,width:i.cycleW,height:i.cycleH});n.extend(r.animOut,{width:0,height:0,top:t.cycleH/2,left:t.cycleW/2})});r.cssFirst.top=0;r.cssFirst.left=0;r.cssBefore.width=0;r.cssBefore.height=0};n.fn.cycle.transitions.fadeZoom=function(t,i,r){r.before.push(function(t,i,r){n.fn.cycle.commonReset(t,i,r,!1,!1);r.cssBefore.left=i.cycleW/2;r.cssBefore.top=i.cycleH/2;n.extend(r.animIn,{top:0,left:0,width:i.cycleW,height:i.cycleH})});r.cssBefore.width=0;r.cssBefore.height=0;r.animOut.opacity=0};n.fn.cycle.transitions.blindX=function(t,i,r){var u=t.css("overflow","hidden").width();r.before.push(function(t,i,r){n.fn.cycle.commonReset(t,i,r);r.animIn.width=i.cycleW;r.animOut.left=t.cycleW});r.cssBefore.left=u;r.cssBefore.top=0;r.animIn.left=0;r.animOut.left=u};n.fn.cycle.transitions.blindY=function(t,i,r){var u=t.css("overflow","hidden").height();r.before.push(function(t,i,r){n.fn.cycle.commonReset(t,i,r);r.animIn.height=i.cycleH;r.animOut.top=t.cycleH});r.cssBefore.top=u;r.cssBefore.left=0;r.animIn.top=0;r.animOut.top=u};n.fn.cycle.transitions.blindZ=function(t,i,r){var u=t.css("overflow","hidden").height(),f=t.width();r.before.push(function(t,i,r){n.fn.cycle.commonReset(t,i,r);r.animIn.height=i.cycleH;r.animOut.top=t.cycleH});r.cssBefore.top=u;r.cssBefore.left=f;r.animIn.top=0;r.animIn.left=0;r.animOut.top=u;r.animOut.left=f};n.fn.cycle.transitions.growX=function(t,i,r){r.before.push(function(t,i,r){n.fn.cycle.commonReset(t,i,r,!1,!0);r.cssBefore.left=this.cycleW/2;r.animIn.left=0;r.animIn.width=this.cycleW;r.animOut.left=0});r.cssBefore.top=0;r.cssBefore.width=0};n.fn.cycle.transitions.growY=function(t,i,r){r.before.push(function(t,i,r){n.fn.cycle.commonReset(t,i,r,!0,!1);r.cssBefore.top=this.cycleH/2;r.animIn.top=0;r.animIn.height=this.cycleH;r.animOut.top=0});r.cssBefore.height=0;r.cssBefore.left=0};n.fn.cycle.transitions.curtainX=function(t,i,r){r.before.push(function(t,i,r){n.fn.cycle.commonReset(t,i,r,!1,!0,!0);r.cssBefore.left=i.cycleW/2;r.animIn.left=0;r.animIn.width=this.cycleW;r.animOut.left=t.cycleW/2;r.animOut.width=0});r.cssBefore.top=0;r.cssBefore.width=0};n.fn.cycle.transitions.curtainY=function(t,i,r){r.before.push(function(t,i,r){n.fn.cycle.commonReset(t,i,r,!0,!1,!0);r.cssBefore.top=i.cycleH/2;r.animIn.top=0;r.animIn.height=i.cycleH;r.animOut.top=t.cycleH/2;r.animOut.height=0});r.cssBefore.height=0;r.cssBefore.left=0};n.fn.cycle.transitions.cover=function(t,i,r){var u=r.direction||"left",f=t.css("overflow","hidden").width(),e=t.height();r.before.push(function(t,i,r){n.fn.cycle.commonReset(t,i,r);r.cssAfter.display="";u=="right"?r.cssBefore.left=-f:u=="up"?r.cssBefore.top=e:u=="down"?r.cssBefore.top=-e:r.cssBefore.left=f});r.animIn.left=0;r.animIn.top=0;r.cssBefore.top=0;r.cssBefore.left=0};n.fn.cycle.transitions.uncover=function(t,i,r){var u=r.direction||"left",f=t.css("overflow","hidden").width(),e=t.height();r.before.push(function(t,i,r){n.fn.cycle.commonReset(t,i,r,!0,!0,!0);u=="right"?r.animOut.left=f:u=="up"?r.animOut.top=-e:u=="down"?r.animOut.top=e:r.animOut.left=-f});r.animIn.left=0;r.animIn.top=0;r.cssBefore.top=0;r.cssBefore.left=0};n.fn.cycle.transitions.toss=function(t,i,r){var u=t.css("overflow","visible").width(),f=t.height();r.before.push(function(t,i,r){n.fn.cycle.commonReset(t,i,r,!0,!0,!0);r.animOut.left||r.animOut.top?r.animOut.opacity=0:n.extend(r.animOut,{left:u*2,top:-f/2,opacity:0})});r.cssBefore.left=0;r.cssBefore.top=0;r.animIn.left=0};n.fn.cycle.transitions.wipe=function(t,i,r){var u=t.css("overflow","hidden").width(),f=t.height(),e,s,h;r.cssBefore=r.cssBefore||{};r.clip&&(/l2r/.test(r.clip)?e="rect(0px 0px "+f+"px 0px)":/r2l/.test(r.clip)?e="rect(0px "+u+"px "+f+"px "+u+"px)":/t2b/.test(r.clip)?e="rect(0px "+u+"px 0px 0px)":/b2t/.test(r.clip)?e="rect("+f+"px "+u+"px "+f+"px 0px)":/zoom/.test(r.clip)&&(s=parseInt(f/2,10),h=parseInt(u/2,10),e="rect("+s+"px "+h+"px "+s+"px "+h+"px)"));r.cssBefore.clip=r.cssBefore.clip||e||"rect(0px 0px 0px 0px)";var o=r.cssBefore.clip.match(/(\d+)/g),c=parseInt(o[0],10),l=parseInt(o[1],10),a=parseInt(o[2],10),v=parseInt(o[3],10);r.before.push(function(t,i,r){var s,h,e,o;t!=i&&(s=n(t),h=n(i),n.fn.cycle.commonReset(t,i,r,!0,!0,!1),r.cssAfter.display="block",e=1,o=parseInt(r.speedIn/13,10)-1,function y(){var n=c?c-parseInt(e*(c/o),10):0,t=v?v-parseInt(e*(v/o),10):0,i=a<f?a+parseInt(e*((f-a)/o||1),10):f,r=l<u?l+parseInt(e*((u-l)/o||1),10):u;h.css({clip:"rect("+n+"px "+r+"px "+i+"px "+t+"px)"});e++<=o?setTimeout(y,13):s.css("display","none")}())});n.extend(r.cssBefore,{display:"block",opacity:1,top:0,left:0});r.animIn={left:0};r.animOut={left:0}}}(jQuery),function(n,t){"use strict";function i(n){var t=Array.prototype.slice.call(arguments,1);return n.prop?n.prop.apply(n,t):n.attr.apply(n,t)}function r(n,t,i){var r,u;for(r in i)i.hasOwnProperty(r)&&(u=r.replace(/ |$/g,t.eventNamespace),n.bind(u,i[r]))}function u(n,t,i){r(n,i,{focus:function(){t.addClass(i.focusClass)},blur:function(){t.removeClass(i.focusClass);t.removeClass(i.activeClass)},mouseenter:function(){t.addClass(i.hoverClass)},mouseleave:function(){t.removeClass(i.hoverClass);t.removeClass(i.activeClass)},"mousedown touchbegin":function(){n.is(":disabled")||t.addClass(i.activeClass)},"mouseup touchend":function(){t.removeClass(i.activeClass)}})}function e(n,t){n.removeClass(t.hoverClass+" "+t.focusClass+" "+t.activeClass)}function y(n,t,i){i?n.addClass(t):n.removeClass(t)}function o(n,t,i){var r="checked",u=t.is(":"+r);t.prop?t.prop(r,u):u?t.attr(r,r):t.removeAttr(r);y(n,i.checkedClass,u)}function f(n,t,i){y(n,i.disabledClass,t.is(":disabled"))}function h(n,t,i){switch(i){case"after":return n.after(t),n.next();case"before":return n.before(t),n.prev();case"wrap":return n.wrap(t),n.parent()}return null}function s(t,r,u){var e,o,s;return u||(u={}),u=n.extend({bind:{},divClass:null,divWrap:"wrap",spanClass:null,spanHtml:null,spanWrap:"wrap"},u),e=n("<div />"),o=n("<span />"),r.autoHide&&t.is(":hidden")&&"none"===t.css("display")&&e.hide(),u.divClass&&e.addClass(u.divClass),r.wrapperClass&&e.addClass(r.wrapperClass),u.spanClass&&o.addClass(u.spanClass),s=i(t,"id"),r.useID&&s&&i(e,"id",r.idPrefix+"-"+s),u.spanHtml&&o.html(u.spanHtml),e=h(t,e,u.divWrap),o=h(t,o,u.spanWrap),f(e,t,r),{div:e,span:o}}function a(t,i){var r;return i.wrapperClass?(r=n("<span />").addClass(i.wrapperClass),r=h(t,r,"wrap")):null}function it(){var u,t,i,r;return r="rgb(120,2,153)",t=n('<div style="width:0;height:0;color:'+r+'">'),n("body").append(t),i=t.get(0),u=window.getComputedStyle?window.getComputedStyle(i,"").color:(i.currentStyle||i.style||{}).color,t.remove(),u.replace(/ /g,"")!==r}function rt(t){return t?n("<span />").text(t).html():""}function p(){return navigator.cpuClass&&!navigator.product}function ut(){return window.XMLHttpRequest!==void 0?!0:!1}function w(n){var t;return n[0].multiple?!0:(t=i(n,"size"),!t||1>=t?!1:!0)}function c(){return!1}function l(n,t){var i="none";r(n,t,{"selectstart dragstart mousedown":c});n.css({MozUserSelect:i,msUserSelect:i,webkitUserSelect:i,userSelect:i})}function b(n,t,i){var r=n.val();""===r?r=i.fileDefaultHtml:(r=r.split(/[\/\\]+/),r=r[r.length-1]);t.text(r)}function k(n,t,i){var r,u;for(r=[],n.each(function(){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r.push({el:this,name:n,old:this.style[n]}),this.style[n]=t[n])}),i();r.length;)u=r.pop(),u.el.style[u.name]=u.old}function d(n,t){var i;i=n.parents();i.push(n[0]);i=i.not(":visible");k(i,{visibility:"hidden",display:"block",position:"absolute"},t)}function g(n,t){return function(){n.unwrap().unwrap().unbind(t.eventNamespace)}}var v=!0,nt=!1,tt=[{match:function(n){return n.is("a, button, :submit, :reset, input[type='button']")},apply:function(n,t){var o,h,a,v,c;return h=t.submitDefaultHtml,n.is(":reset")&&(h=t.resetDefaultHtml),v=n.is("a, button")?function(){return n.html()||h}:function(){return rt(i(n,"value"))||h},a=s(n,t,{divClass:t.buttonClass,spanHtml:v()}),o=a.div,u(n,o,t),c=!1,r(o,t,{"click touchend":function(){var r,f,t,u;c||n.is(":disabled")||(c=!0,n[0].dispatchEvent?(r=document.createEvent("MouseEvents"),r.initEvent("click",!0,!0),f=n[0].dispatchEvent(r),n.is("a")&&f&&(t=i(n,"target"),u=i(n,"href"),t&&"_self"!==t?window.open(u,t):document.location.href=u)):n.click(),c=!1)}}),l(o,t),{remove:function(){return o.after(n),o.remove(),n.unbind(t.eventNamespace),n},update:function(){e(o,t);f(o,n,t);n.detach();a.span.html(v()).append(n)}}}},{match:function(n){return n.is(":checkbox")},apply:function(n,t){var c,h,i;return c=s(n,t,{divClass:t.checkboxClass}),h=c.div,i=c.span,u(n,h,t),r(n,t,{"click touchend":function(){o(i,n,t)}}),o(i,n,t),{remove:g(n,t),update:function(){e(h,t);i.removeClass(t.checkedClass);o(i,n,t);f(h,n,t)}}}},{match:function(n){return n.is(":file")},apply:function(t,o){function v(){b(t,c,o)}var y,a,c,w;return y=s(t,o,{divClass:o.fileClass,spanClass:o.fileButtonClass,spanHtml:o.fileButtonHtml,spanWrap:"after"}),a=y.div,w=y.span,c=n("<span />").html(o.fileDefaultHtml),c.addClass(o.filenameClass),c=h(t,c,"after"),i(t,"size")||i(t,"size",a.width()/10),u(t,a,o),v(),p()?r(t,o,{click:function(){t.trigger("change");setTimeout(v,0)}}):r(t,o,{change:v}),l(c,o),l(w,o),{remove:function(){return c.remove(),w.remove(),t.unwrap().unbind(o.eventNamespace)},update:function(){e(a,o);b(t,c,o);f(a,t,o)}}}},{match:function(n){if(n.is("input")){var t=(" "+i(n,"type")+" ").toLowerCase();return" color date datetime datetime-local email month number password search tel text time url week ".indexOf(t)>=0}return!1},apply:function(n,t){var r,f;return r=i(n,"type"),n.addClass(t.inputClass),f=a(n,t),u(n,n,t),t.inputAddTypeAsClass&&n.addClass(r),{remove:function(){n.removeClass(t.inputClass);t.inputAddTypeAsClass&&n.removeClass(r);f&&n.unwrap()},update:c}}},{match:function(n){return n.is(":radio")},apply:function(t,h){var l,c,a;return l=s(t,h,{divClass:h.radioClass}),c=l.div,a=l.span,u(t,c,h),r(t,h,{"click touchend":function(){n.uniform.update(n(':radio[name="'+i(t,"name")+'"]'))}}),o(a,t,h),{remove:g(t,h),update:function(){e(c,h);o(a,t,h);f(c,t,h)}}}},{match:function(n){return n.is("select")&&!w(n)?!0:!1},apply:function(t,i){var c,h,o,a;return i.selectAutoWidth&&d(t,function(){a=t.width()}),c=s(t,i,{divClass:i.selectClass,spanHtml:(t.find(":selected:first")||t.find("option:first")).html(),spanWrap:"before"}),h=c.div,o=c.span,i.selectAutoWidth?d(t,function(){k(n([o[0],h[0]]),{display:"block"},function(){var n;n=o.outerWidth()-o.width();h.width(a+n);o.width(a)})}):h.addClass("fixedWidth"),u(t,h,i),r(t,i,{change:function(){o.html(t.find(":selected").html());h.removeClass(i.activeClass)},"click touchend":function(){var n=t.find(":selected").html();o.html()!==n&&t.trigger("change")},keyup:function(){o.html(t.find(":selected").html())}}),l(o,i),{remove:function(){return o.remove(),t.unwrap().unbind(i.eventNamespace),t},update:function(){i.selectAutoWidth?(n.uniform.restore(t),t.uniform(i)):(e(h,i),o.html(t.find(":selected").html()),f(h,t,i))}}}},{match:function(n){return n.is("select")&&w(n)?!0:!1},apply:function(n,t){var i;return n.addClass(t.selectMultiClass),i=a(n,t),u(n,n,t),{remove:function(){n.removeClass(t.selectMultiClass);i&&n.unwrap()},update:c}}},{match:function(n){return n.is("textarea")},apply:function(n,t){var i;return n.addClass(t.textareaClass),i=a(n,t),u(n,n,t),{remove:function(){n.removeClass(t.textareaClass);i&&n.unwrap()},update:c}}}];p()&&!ut()&&(v=!1);n.uniform={defaults:{activeClass:"active",autoHide:!0,buttonClass:"button",checkboxClass:"checker",checkedClass:"checked",disabledClass:"disabled",eventNamespace:".uniform",fileButtonClass:"action",fileButtonHtml:"Choose File",fileClass:"uploader",fileDefaultHtml:"No file selected",filenameClass:"filename",focusClass:"focus",hoverClass:"hover",idPrefix:"uniform",inputAddTypeAsClass:!0,inputClass:"uniform-input",radioClass:"radio",resetDefaultHtml:"Reset",resetSelector:!1,selectAutoWidth:!0,selectClass:"selector",selectMultiClass:"uniform-multiselect",submitDefaultHtml:"Submit",textareaClass:"uniform",useID:!0,wrapperClass:null},elements:[]};n.fn.uniform=function(t){var i=this;return t=n.extend({},n.uniform.defaults,t),nt||(nt=!0,it()&&(v=!1)),v?(t.resetSelector&&n(t.resetSelector).mouseup(function(){window.setTimeout(function(){n.uniform.update(i)},10)}),this.each(function(){var r,u,f,i=n(this);if(i.data("uniformed"))return n.uniform.update(i),void 0;for(r=0;tt.length>r;r+=1)if(u=tt[r],u.match(i,t))return f=u.apply(i,t),i.data("uniformed",f),n.uniform.elements.push(i.get(0)),void 0})):this};n.uniform.restore=n.fn.uniform.restore=function(i){i===t&&(i=n.uniform.elements);n(i).each(function(){var t,i,r=n(this);i=r.data("uniformed");i&&(i.remove(),t=n.inArray(this,n.uniform.elements),t>=0&&n.uniform.elements.splice(t,1),r.removeData("uniformed"))})};n.uniform.update=n.fn.uniform.update=function(i){i===t&&(i=n.uniform.elements);n(i).each(function(){var t,i=n(this);t=i.data("uniformed");t&&t.update(i,t.options)})}}(jQuery),function(n){function t(t,i){this.$element=n(t);this.options=i;this.enabled=!0;this.fixTitle()}t.prototype={show:function(){var t=this.getTitle(),i;if(t&&this.enabled){i=this.tip();i.find(".tipsy-inner")[this.options.html?"html":"text"](t);i[0].className="tipsy";i.remove().css({top:0,left:0,visibility:"hidden",display:"block"}).prependTo(document.body);var t=n.extend({},this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight}),f=i[0].offsetWidth,e=i[0].offsetHeight,u="function"==typeof this.options.gravity?this.options.gravity.call(this.$element[0]):this.options.gravity,r;switch(u.charAt(0)){case"n":r={top:t.top+t.height+this.options.offset,left:t.left+t.width/2-f/2};break;case"s":r={top:t.top-e-this.options.offset,left:t.left+t.width/2-f/2};break;case"e":r={top:t.top+t.height/2-e/2,left:t.left-f-this.options.offset};break;case"w":r={top:t.top+t.height/2-e/2,left:t.left+t.width+this.options.offset}}2==u.length&&(r.left="w"==u.charAt(1)?t.left+t.width/2-15:t.left+t.width/2-f+15);i.css(r).addClass("tipsy-"+u);i.find(".tipsy-arrow")[0].className="tipsy-arrow tipsy-arrow-"+u.charAt(0);this.options.className&&i.addClass("function"==typeof this.options.className?this.options.className.call(this.$element[0]):this.options.className);this.options.fade?i.stop().css({opacity:0,display:"block",visibility:"visible"}).animate({opacity:this.options.opacity}):i.css({visibility:"visible",opacity:this.options.opacity})}},hide:function(){this.options.fade?this.tip().stop().fadeOut(function(){n(this).remove()}):this.tip().remove()},fixTitle:function(){var n=this.$element;(n.attr("title")||"string"!=typeof n.attr("original-title"))&&n.attr("original-title",n.attr("title")||"").removeAttr("title")},getTitle:function(){var t,i=this.$element,n=this.options;return this.fixTitle(),n=this.options,"string"==typeof n.title?t=i.attr("title"==n.title?"original-title":n.title):"function"==typeof n.title&&(t=n.title.call(i[0])),(t=(""+t).replace(/(^\s*|\s*$)/,""))||n.fallback},tip:function(){return this.$tip||(this.$tip=n('<div class="tipsy"><\/div>').html('<div class="tipsy-arrow"><\/div><div class="tipsy-inner"><\/div>')),this.$tip},validate:function(){this.$element[0].parentNode||(this.hide(),this.options=this.$element=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled}};n.fn.tipsy=function(i){function u(r){var u=n.data(r,"tipsy");return u||(u=new t(r,n.fn.tipsy.elementOptions(r,i)),n.data(r,"tipsy",u)),u}function e(){var n=u(this);n.hoverState="in";0==i.delayIn?n.show():(n.fixTitle(),setTimeout(function(){"in"==n.hoverState&&n.show()},i.delayIn))}function o(){var n=u(this);n.hoverState="out";0==i.delayOut?n.hide():setTimeout(function(){"out"==n.hoverState&&n.hide()},i.delayOut)}var r,f;return!0===i?this.data("tipsy"):"string"==typeof i?(r=this.data("tipsy"),r&&r[i](),this):(i=n.extend({},n.fn.tipsy.defaults,i),i.live||this.each(function(){u(this)}),"manual"!=i.trigger&&(r=i.live?"live":"bind",f="hover"==i.trigger?"mouseleave":"blur",this[r]("hover"==i.trigger?"mouseenter":"focus",e)[r](f,o)),this)};n.fn.tipsy.defaults={className:null,delayIn:0,delayOut:0,fade:!1,fallback:"",gravity:"n",html:!1,live:!1,offset:0,opacity:.8,title:"title",trigger:"hover"};n.fn.tipsy.elementOptions=function(t,i){return n.metadata?n.extend({},i,n(t).metadata()):i};n.fn.tipsy.autoNS=function(){return n(this).offset().top>n(document).scrollTop()+n(window).height()/2?"s":"n"};n.fn.tipsy.autoWE=function(){return n(this).offset().left>n(document).scrollLeft()+n(window).width()/2?"e":"w"};n.fn.tipsy.autoBounds=function(t,i){return function(){var f=i[0],r=1<i.length?i[1]:!1,e=n(document).scrollTop()+t,o=n(document).scrollLeft()+t,u=n(this);return u.offset().top<e&&(f="n"),u.offset().left<o&&(r="w"),n(window).width()+n(document).scrollLeft()-u.offset().left<t&&(r="e"),n(window).height()+n(document).scrollTop()-u.offset().top<t&&(f="s"),f+(r?r:"")}}}(jQuery);typeof console=="undefined"&&(console={log:function(){}});$.ajaxSetup({headers:{"cache-control":"no-cache"},cache:!1});Encoder={EncodeType:"entity",isEmpty:function(n){return n?n===null||n.length==0||/^\s+$/.test(n):!0},HTML2Numerical:function(n){return this.swapArrayVals(n,["&nbsp;","&iexcl;","&cent;","&pound;","&curren;","&yen;","&brvbar;","&sect;","&uml;","&copy;","&ordf;","&laquo;","&not;","&shy;","&reg;","&macr;","&deg;","&plusmn;","&sup2;","&sup3;","&acute;","&micro;","&para;","&middot;","&cedil;","&sup1;","&ordm;","&raquo;","&frac14;","&frac12;","&frac34;","&iquest;","&agrave;","&aacute;","&acirc;","&atilde;","&Auml;","&aring;","&aelig;","&ccedil;","&egrave;","&eacute;","&ecirc;","&euml;","&igrave;","&iacute;","&icirc;","&iuml;","&eth;","&ntilde;","&ograve;","&oacute;","&ocirc;","&otilde;","&Ouml;","&times;","&oslash;","&ugrave;","&uacute;","&ucirc;","&Uuml;","&yacute;","&thorn;","&szlig;","&agrave;","&aacute;","&acirc;","&atilde;","&auml;","&aring;","&aelig;","&ccedil;","&egrave;","&eacute;","&ecirc;","&euml;","&igrave;","&iacute;","&icirc;","&iuml;","&eth;","&ntilde;","&ograve;","&oacute;","&ocirc;","&otilde;","&ouml;","&divide;","&Oslash;","&ugrave;","&uacute;","&ucirc;","&uuml;","&yacute;","&thorn;","&yuml;","&quot;","&amp;","&lt;","&gt;","&oelig;","&oelig;","&scaron;","&scaron;","&yuml;","&circ;","&tilde;","&ensp;","&emsp;","&thinsp;","&zwnj;","&zwj;","&lrm;","&rlm;","&ndash;","&mdash;","&lsquo;","&rsquo;","&sbquo;","&ldquo;","&rdquo;","&bdquo;","&dagger;","&dagger;","&permil;","&lsaquo;","&rsaquo;","&euro;","&fnof;","&alpha;","&beta;","&gamma;","&delta;","&epsilon;","&zeta;","&eta;","&theta;","&iota;","&kappa;","&lambda;","&mu;","&nu;","&xi;","&omicron;","&pi;","&rho;","&sigma;","&tau;","&upsilon;","&phi;","&chi;","&psi;","&omega;","&alpha;","&beta;","&gamma;","&delta;","&epsilon;","&zeta;","&eta;","&theta;","&iota;","&kappa;","&lambda;","&mu;","&nu;","&xi;","&omicron;","&pi;","&rho;","&sigmaf;","&sigma;","&tau;","&upsilon;","&phi;","&chi;","&psi;","&omega;","&thetasym;","&upsih;","&piv;","&bull;","&hellip;","&prime;","&prime;","&oline;","&frasl;","&weierp;","&image;","&real;","&trade;","&alefsym;","&larr;","&uarr;","&rarr;","&darr;","&harr;","&crarr;","&larr;","&uarr;","&rarr;","&darr;","&harr;","&forall;","&part;","&exist;","&empty;","&nabla;","&isin;","&notin;","&ni;","&prod;","&sum;","&minus;","&lowast;","&radic;","&prop;","&infin;","&ang;","&and;","&or;","&cap;","&cup;","&int;","&there4;","&sim;","&cong;","&asymp;","&ne;","&equiv;","&le;","&ge;","&sub;","&sup;","&nsub;","&sube;","&supe;","&oplus;","&otimes;","&perp;","&sdot;","&lceil;","&rceil;","&lfloor;","&rfloor;","&lang;","&rang;","&loz;","&spades;","&clubs;","&hearts;","&diams;"],["&#160;","&#161;","&#162;","&#163;","&#164;","&#165;","&#166;","&#167;","&#168;","&#169;","&#170;","&#171;","&#172;","&#173;","&#174;","&#175;","&#176;","&#177;","&#178;","&#179;","&#180;","&#181;","&#182;","&#183;","&#184;","&#185;","&#186;","&#187;","&#188;","&#189;","&#190;","&#191;","&#192;","&#193;","&#194;","&#195;","&#196;","&#197;","&#198;","&#199;","&#200;","&#201;","&#202;","&#203;","&#204;","&#205;","&#206;","&#207;","&#208;","&#209;","&#210;","&#211;","&#212;","&#213;","&#214;","&#215;","&#216;","&#217;","&#218;","&#219;","&#220;","&#221;","&#222;","&#223;","&#224;","&#225;","&#226;","&#227;","&#228;","&#229;","&#230;","&#231;","&#232;","&#233;","&#234;","&#235;","&#236;","&#237;","&#238;","&#239;","&#240;","&#241;","&#242;","&#243;","&#244;","&#245;","&#246;","&#247;","&#248;","&#249;","&#250;","&#251;","&#252;","&#253;","&#254;","&#255;","&#34;","&#38;","&#60;","&#62;","&#338;","&#339;","&#352;","&#353;","&#376;","&#710;","&#732;","&#8194;","&#8195;","&#8201;","&#8204;","&#8205;","&#8206;","&#8207;","&#8211;","&#8212;","&#8216;","&#8217;","&#8218;","&#8220;","&#8221;","&#8222;","&#8224;","&#8225;","&#8240;","&#8249;","&#8250;","&#8364;","&#402;","&#913;","&#914;","&#915;","&#916;","&#917;","&#918;","&#919;","&#920;","&#921;","&#922;","&#923;","&#924;","&#925;","&#926;","&#927;","&#928;","&#929;","&#931;","&#932;","&#933;","&#934;","&#935;","&#936;","&#937;","&#945;","&#946;","&#947;","&#948;","&#949;","&#950;","&#951;","&#952;","&#953;","&#954;","&#955;","&#956;","&#957;","&#958;","&#959;","&#960;","&#961;","&#962;","&#963;","&#964;","&#965;","&#966;","&#967;","&#968;","&#969;","&#977;","&#978;","&#982;","&#8226;","&#8230;","&#8242;","&#8243;","&#8254;","&#8260;","&#8472;","&#8465;","&#8476;","&#8482;","&#8501;","&#8592;","&#8593;","&#8594;","&#8595;","&#8596;","&#8629;","&#8656;","&#8657;","&#8658;","&#8659;","&#8660;","&#8704;","&#8706;","&#8707;","&#8709;","&#8711;","&#8712;","&#8713;","&#8715;","&#8719;","&#8721;","&#8722;","&#8727;","&#8730;","&#8733;","&#8734;","&#8736;","&#8743;","&#8744;","&#8745;","&#8746;","&#8747;","&#8756;","&#8764;","&#8773;","&#8776;","&#8800;","&#8801;","&#8804;","&#8805;","&#8834;","&#8835;","&#8836;","&#8838;","&#8839;","&#8853;","&#8855;","&#8869;","&#8901;","&#8968;","&#8969;","&#8970;","&#8971;","&#9001;","&#9002;","&#9674;","&#9824;","&#9827;","&#9829;","&#9830;"])},NumericalToHTML:function(n){return this.swapArrayVals(n,["&#160;","&#161;","&#162;","&#163;","&#164;","&#165;","&#166;","&#167;","&#168;","&#169;","&#170;","&#171;","&#172;","&#173;","&#174;","&#175;","&#176;","&#177;","&#178;","&#179;","&#180;","&#181;","&#182;","&#183;","&#184;","&#185;","&#186;","&#187;","&#188;","&#189;","&#190;","&#191;","&#192;","&#193;","&#194;","&#195;","&#196;","&#197;","&#198;","&#199;","&#200;","&#201;","&#202;","&#203;","&#204;","&#205;","&#206;","&#207;","&#208;","&#209;","&#210;","&#211;","&#212;","&#213;","&#214;","&#215;","&#216;","&#217;","&#218;","&#219;","&#220;","&#221;","&#222;","&#223;","&#224;","&#225;","&#226;","&#227;","&#228;","&#229;","&#230;","&#231;","&#232;","&#233;","&#234;","&#235;","&#236;","&#237;","&#238;","&#239;","&#240;","&#241;","&#242;","&#243;","&#244;","&#245;","&#246;","&#247;","&#248;","&#249;","&#250;","&#251;","&#252;","&#253;","&#254;","&#255;","&#34;","&#38;","&#60;","&#62;","&#338;","&#339;","&#352;","&#353;","&#376;","&#710;","&#732;","&#8194;","&#8195;","&#8201;","&#8204;","&#8205;","&#8206;","&#8207;","&#8211;","&#8212;","&#8216;","&#8217;","&#8218;","&#8220;","&#8221;","&#8222;","&#8224;","&#8225;","&#8240;","&#8249;","&#8250;","&#8364;","&#402;","&#913;","&#914;","&#915;","&#916;","&#917;","&#918;","&#919;","&#920;","&#921;","&#922;","&#923;","&#924;","&#925;","&#926;","&#927;","&#928;","&#929;","&#931;","&#932;","&#933;","&#934;","&#935;","&#936;","&#937;","&#945;","&#946;","&#947;","&#948;","&#949;","&#950;","&#951;","&#952;","&#953;","&#954;","&#955;","&#956;","&#957;","&#958;","&#959;","&#960;","&#961;","&#962;","&#963;","&#964;","&#965;","&#966;","&#967;","&#968;","&#969;","&#977;","&#978;","&#982;","&#8226;","&#8230;","&#8242;","&#8243;","&#8254;","&#8260;","&#8472;","&#8465;","&#8476;","&#8482;","&#8501;","&#8592;","&#8593;","&#8594;","&#8595;","&#8596;","&#8629;","&#8656;","&#8657;","&#8658;","&#8659;","&#8660;","&#8704;","&#8706;","&#8707;","&#8709;","&#8711;","&#8712;","&#8713;","&#8715;","&#8719;","&#8721;","&#8722;","&#8727;","&#8730;","&#8733;","&#8734;","&#8736;","&#8743;","&#8744;","&#8745;","&#8746;","&#8747;","&#8756;","&#8764;","&#8773;","&#8776;","&#8800;","&#8801;","&#8804;","&#8805;","&#8834;","&#8835;","&#8836;","&#8838;","&#8839;","&#8853;","&#8855;","&#8869;","&#8901;","&#8968;","&#8969;","&#8970;","&#8971;","&#9001;","&#9002;","&#9674;","&#9824;","&#9827;","&#9829;","&#9830;"],["&nbsp;","&iexcl;","&cent;","&pound;","&curren;","&yen;","&brvbar;","&sect;","&uml;","&copy;","&ordf;","&laquo;","&not;","&shy;","&reg;","&macr;","&deg;","&plusmn;","&sup2;","&sup3;","&acute;","&micro;","&para;","&middot;","&cedil;","&sup1;","&ordm;","&raquo;","&frac14;","&frac12;","&frac34;","&iquest;","&agrave;","&aacute;","&acirc;","&atilde;","&Auml;","&aring;","&aelig;","&ccedil;","&egrave;","&eacute;","&ecirc;","&euml;","&igrave;","&iacute;","&icirc;","&iuml;","&eth;","&ntilde;","&ograve;","&oacute;","&ocirc;","&otilde;","&Ouml;","&times;","&oslash;","&ugrave;","&uacute;","&ucirc;","&Uuml;","&yacute;","&thorn;","&szlig;","&agrave;","&aacute;","&acirc;","&atilde;","&auml;","&aring;","&aelig;","&ccedil;","&egrave;","&eacute;","&ecirc;","&euml;","&igrave;","&iacute;","&icirc;","&iuml;","&eth;","&ntilde;","&ograve;","&oacute;","&ocirc;","&otilde;","&ouml;","&divide;","&Oslash;","&ugrave;","&uacute;","&ucirc;","&uuml;","&yacute;","&thorn;","&yuml;","&quot;","&amp;","&lt;","&gt;","&oelig;","&oelig;","&scaron;","&scaron;","&yuml;","&circ;","&tilde;","&ensp;","&emsp;","&thinsp;","&zwnj;","&zwj;","&lrm;","&rlm;","&ndash;","&mdash;","&lsquo;","&rsquo;","&sbquo;","&ldquo;","&rdquo;","&bdquo;","&dagger;","&dagger;","&permil;","&lsaquo;","&rsaquo;","&euro;","&fnof;","&alpha;","&beta;","&gamma;","&delta;","&epsilon;","&zeta;","&eta;","&theta;","&iota;","&kappa;","&lambda;","&mu;","&nu;","&xi;","&omicron;","&pi;","&rho;","&sigma;","&tau;","&upsilon;","&phi;","&chi;","&psi;","&omega;","&alpha;","&beta;","&gamma;","&delta;","&epsilon;","&zeta;","&eta;","&theta;","&iota;","&kappa;","&lambda;","&mu;","&nu;","&xi;","&omicron;","&pi;","&rho;","&sigmaf;","&sigma;","&tau;","&upsilon;","&phi;","&chi;","&psi;","&omega;","&thetasym;","&upsih;","&piv;","&bull;","&hellip;","&prime;","&prime;","&oline;","&frasl;","&weierp;","&image;","&real;","&trade;","&alefsym;","&larr;","&uarr;","&rarr;","&darr;","&harr;","&crarr;","&larr;","&uarr;","&rarr;","&darr;","&harr;","&forall;","&part;","&exist;","&empty;","&nabla;","&isin;","&notin;","&ni;","&prod;","&sum;","&minus;","&lowast;","&radic;","&prop;","&infin;","&ang;","&and;","&or;","&cap;","&cup;","&int;","&there4;","&sim;","&cong;","&asymp;","&ne;","&equiv;","&le;","&ge;","&sub;","&sup;","&nsub;","&sube;","&supe;","&oplus;","&otimes;","&perp;","&sdot;","&lceil;","&rceil;","&lfloor;","&rfloor;","&lang;","&rang;","&loz;","&spades;","&clubs;","&hearts;","&diams;"])},numEncode:function(n){var r,i,t;if(this.isEmpty(n))return"";for(r="",i=0;i<n.length;i++)t=n.charAt(i),(t<" "||t>"~")&&(t="&#"+t.charCodeAt()+";"),r+=t;return r},htmlDecode:function(n){var r,i,t=n,u;if(this.isEmpty(t))return"";if(t=this.HTML2Numerical(t),arr=t.match(/&#[0-9]{1,5};/g),arr!=null)for(u=0;u<arr.length;u++)i=arr[u],r=i.substring(2,i.length-1),t=r>=-32768&&r<=65535?t.replace(i,String.fromCharCode(r)):t.replace(i,"");return t},htmlEncode:function(n,t){return this.isEmpty(n)?"":(t=t|!1,t&&(n=this.EncodeType=="numerical"?n.replace(/&/g,"&#38;"):n.replace(/&/g,"&amp;")),n=this.XSSEncode(n,!1),this.EncodeType!="numerical"&&t||(n=this.HTML2Numerical(n)),n=this.numEncode(n),t||(n=n.replace(/&#/g,"##AMPHASH##"),n=this.EncodeType=="numerical"?n.replace(/&/g,"&#38;"):n.replace(/&/g,"&amp;"),n=n.replace(/##AMPHASH##/g,"&#")),n=n.replace(/&#\d*([^\d;]|$)/g,"$1"),t||(n=this.correctEncoding(n)),this.EncodeType=="entity"&&(n=this.NumericalToHTML(n)),n)},XSSEncode:function(n,t){return this.isEmpty(n)?"":(t=t||!0,t?(n=n.replace(/\'/g,"&#39;"),n=n.replace(/\"/g,"&quot;"),n=n.replace(/</g,"&lt;"),n=n.replace(/>/g,"&gt;")):(n=n.replace(/\'/g,"&#39;"),n=n.replace(/\"/g,"&#34;"),n=n.replace(/</g,"&#60;"),n=n.replace(/>/g,"&#62;")),n)},hasEncoded:function(n){return/&#[0-9]{1,5};/g.test(n)?!0:/&[A-Z]{2,6};/gi.test(n)?!0:!1},stripUnicode:function(n){return n.replace(/[^\x20-\x7E]/g,"")},correctEncoding:function(n){return n.replace(/(&amp;)(amp;)+/,"$1")},swapArrayVals:function(n,t,i){var u,r,f;if(this.isEmpty(n))return"";if(t&&i&&t.length==i.length)for(r=0,f=t.length;r<f;r++)u=new RegExp(t[r],"g"),n=n.replace(u,i[r]);return n},inArray:function(n,t){for(var i=0,r=t.length;i<r;i++)if(t[i]===n)return i;return-1}};Azom={logInConsole:function(n){typeof console!="undefined"&&typeof console.log=="function"&&console.log(n)},capitalize:function(n){return n!=undefined&&n.length>1?n[0].toUpperCase()+n.slice(1):""},htmlEncode:function(n){const t=document.createElement("div");return t.textContent=n,t.innerHTML},htmlDecode:function(n){const t=document.createElement("div");return t.innerHTML=n,t.textContent},isTouchDevice:function(){return"ontouchstart"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0},doesDeviceSupportCssTransitions:function(){var t=document.body||document.documentElement,n=t.style;return n.transition!==undefined||n.WebkitTransition!==undefined||n.MozTransition!==undefined||n.MsTransition!==undefined||n.OTransition!==undefined},doesDeviceSupportLineClamps:function(){var n=document.body||document.documentElement,t=n.style;return typeof t.webkitLineClamp!="undefined"},getQueryVariable:function(n){for(var i,u=window.location.search.substring(1),r=u.split("&"),t=0;t<r.length;t++)if(i=r[t].split("="),i[0]==n)return decodeURIComponent($.trim(i[1]||""))},analyticsQueueData:{queue:[],lastSentOn:null,timeout:null,lastSentCount:0,totalSentCount:0},isGa4Loaded:function(){return typeof gtag=="undefined"||typeof google_tag_manager!="object"?!1:!window.googleAnalyticsConfig||!window.googleAnalyticsConfig.gaCode?!1:window.google_tag_manager[window.googleAnalyticsConfig.gaCode]?!0:!1},setupAnalyticsQueueDataTimeout:function(){var n=Azom.analyticsQueueData,t,i;if(n.timeout=null,!(n.queue.length<1)){if(n.lastSentOn||(n.lastSentOn=new Date((new Date).setDate((new Date).getDate()-5))),typeof gtag=="undefined"){window.googleAnalyticsConfig&&Azom.logInConsole("in setupAnalyticsQueueDataTimeout, gtag is undefined or not yet loaded, this is unexpected, will delay.");n.timeout=window.setTimeout(Azom.setupAnalyticsQueueDataTimeout,2500);return}t=new Date-n.lastSentOn<3500;i=t?3500:100;n.timeout=window.setTimeout(Azom.onSendAnalyticsItemTimeout,i)}},onSendAnalyticsItemTimeout:function(){var n=Azom.analyticsQueueData,t,i;if(n.timeout=null,n.queue.length<1){Azom.logInConsole("in onSendAnalyticsItemTimeout, no items to send, this is unexpected.");return}if(typeof gtag=="undefined"){Azom.logInConsole("in onSendAnalyticsItemTimeout, gtag is undefined or not yet loaded, this is unexpected.");return}for(t=n.queue.splice(0,Math.min(n.queue.length,10)),i=0;i<t.length;i++)t[i].command?gtag(t[i].command,t[i].event_name,t[i].event_parameters||{}):(Azom.logInConsole("missing command parameter on analytics item to send. the item follows..."),Azom.logInConsole(t[i]));n.lastSentOn=new Date;n.lastSentCount=t.length;n.totalSentCount+=n.lastSentCount;n.queue.length>0&&Azom.setupAnalyticsQueueDataTimeout()},pushAnalyticsItem:function(n){if(!n.command){Azom.logInConsole("command is required in analytics item.  that item follows...");Azom.logInConsole(n);return}var t=Azom.analyticsQueueData;(t.queue.push(n),t.timeout)||Azom.setupAnalyticsQueueDataTimeout()},pushAnalyticsEvent:function(n,t,i){if(n.constructor===Array){console.error("array passed into pushAnalyticsEvent.",n);return}var r={command:"event",event_name:n,event_parameters:t};i&&(r.event_parameters||(r.event_parameters={}),r.event_parameters.event_callback=i);Azom.pushAnalyticsItem(r)},onFormControlGotFocus:function(n){n&&$(n).addClass("hasFocus")},onFormControlLostFocus:function(n){n&&$(n).removeClass("hasFocus")},onFormSelectClosed:function(n){Azom.onFormControlLostFocus(n)},onFormSelectOpen:function(n){Azom.onFormControlGotFocus(n)},syncCommonFormAgreeBoxChange:function(n){var t=$(n.delegateTarget),r=t.find("input.form-agree-box"),i=r.is(":checked"),u=t.find(".form-submit-btn, .azoForm-btn");u.toggleClass("is-submittable",i).toggleClass("is-not-submittable",!i)},isEmailAddressValid:function(n){return/(\S+@\S+\.\S+)/.test(n)},isEmailAddressValid2:function(n){return(n=$.trim((n||"").toString()),!n)?!1:/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(n)},isFancyboxOpen:function(){return $("#fancybox-wrap").is(":visible")},isMagnificPopupOpen:function(){return $(".mfp-wrap").is(":visible")},removeCloseDelayOnCurrentMagnificPopupInstance:function(){return Azom.isMagnificPopupOpen()&&$.magnificPopup.instance&&$.magnificPopup.instance.st?($.magnificPopup.instance.st.removalDelay=0,!0):!1},convertValue:function(n,t){var r=$.trim((n||"").toString()),f,u,i;if(!r)return"";for(f=t||43,u="",i=0;i<r.length/2;i++)u+=String.fromCharCode(parseInt(r.substr(i*2,2),16)^f);return u},deobfuscateEmailAddresses:function(n,t){var i=$(n);i.length!==0&&i.each(function(){var n=$(this),i=$.trim((n.attr("data-addr")||"").toString()),r;i&&(r=Azom.convertValue(i,t),n.text(r).removeAttr("data-addr"))})},getRandomIntInclusive:function(n,t){const i=Math.ceil(n),r=Math.floor(t);return Math.floor(Math.random()*(r-i+1)+i)},getTermsPageRelativeUrl:function(){return window.location.hostname.toLowerCase().indexOf("news-medical")!==-1?g_siteSection==="lifesciences"?"/life-sciences/terms":"/medical/terms":"/terms"},getDataOnContentType:function(n){var t={contentType:n,description:"",descriptionPlural:""};if(n)switch(n.toLowerCase()){case"health":t.description="health topic";t.descriptionPlural="health topics";break;case"equipment":t.description="product";t.descriptionPlural="products";break;case"service":t.description="health service";t.descriptionPlural="health services";break;case"news":t.description="news story";t.descriptionPlural="news stories";break;case"drugs":t.description="drug leaflet";t.descriptionPlural="drug leaflets";break;case"appnote":t.description="white paper";t.descriptionPlural="white papers";break;case"supplier":t.description="supplier profile";t.descriptionPlural="supplier profiles";break;case"video":t.description="video";t.descriptionPlural="videos";break;case"lifesciencearticle":t.description="article";t.descriptionPlural="articles";break;case"webinar":t.description="webinar listing";t.descriptionPlural="webinar listings"}return t.description||(t.description="page"),t.descriptionPlural||(t.descriptionPlural="pages"),t},checkIfTermsAndConsentsRequired:function(n,t,i,r,u,f,e){var o={emailAddress:n,selectedCountryId:t,isETechsOptInRequired:i,isNewslettersOptInRequired:r,isAzoWebinar:u};jQuery.ajax({type:"POST",url:BlogEngine.convertToAbsoluteUrl("/site_services.asmx/CheckIfTermsAndConsentsRequired"),data:JSON.stringify(o),contentType:"application/json; charset=utf-8",dataType:"json",success:f,error:e})},onRfqDesktopMobileShown:function(){if(Azom.pushAnalyticsEvent("rfq_form_view",{event_label:Azom.currentRfqDataItem.itemType+": "+Azom.currentRfqDataItem.itemId}),Azom.setFocusOnFormWhenShown()){var n=document.getElementById("rfqFirstName");n&&n.focus&&n.focus()}},rfqShowItemNameField:function(){return Azom.currentRfqDataItem&&(typeof Azom.currentRfqDataItem.itemName=="undefined"||Azom.currentRfqDataItem.itemName.length===0)?!0:!1},currentRfqDataItem:null,isUsingMobileRfqForm:!1,mobileRfqFormContainerOnPageSelector:"#rfqFormMobileContainerOnPage",currentPdfReqDataItem:null,isUsingMobilePdfReqForm:!1,mobilePdfReqFormContainerOnPageSelector:"#pdfReqFormMobileContainerOnPage",isUsingMobileDocReqForm:!1,mobileDocReqFormContainerOnPageSelector:"#docReqFormMobileContainerOnPage",elementsToHideForMobileForms:"main, .main-sidebar-container, footer",rfqFormSubmitted:!1,removeSupplierFromRfqList:function(){var e=$(this),u=e.closest("li"),t=u.attr("data-supplier-id"),o=$("#rfq-supplier-list-container"),s=o.find("ol"),h=s.find("li").not(".is-being-removed").length,i,n,f,r;return h<=1?(alert("You cannot remove the only selected supplier.  If you'd like to change the selected suppliers, close this form, change your selection, then click the Request a Quote button."),!1):(i=!1,isNaN(t)||typeof getSupplierIdFromMaterialCategoryItemOnPage!="function"||(n=null,$("ul.supplier-list > li").each(function(){var i=getSupplierIdFromMaterialCategoryItemOnPage(this);if(i&&i==t)return n=this,!1}),n?(f=$(n),r=f.find(".select-supplier input:checkbox"),r.prop("checked",!1),$.uniform.update(r),u.addClass("is-being-removed").fadeOut(400,function(){$(this).remove()}),i=!0):Azom.logInConsole("liOnPage == null, looking for supplierId: "+t.toString())),i||alert("Unable to remove the supplier from this form - this is unexpected. Instead, please close this form, uncheck the supplier there and click the Request a Quote button again."),!1)},getRfqSelectedSuppliersData:function(){var n={isValid:!1,validationMessage:"",suppliers:[]},t;return typeof getCheckedSuppliersFromPage!="undefined"&&(n.suppliers=getCheckedSuppliersFromPage()),t=n.suppliers.length,t<1?n.validationMessage="Please put a checkmark next to at least 1 supplier that you would like to receive a quote from, then re-click the Request a Quote button.":t>30?n.validationMessage="You've selected "+t.toString()+" suppliers. No more than 30 can be selected. Reduce the number of checked suppliers to 30 or less, then re-click the Request a Quote button.":n.isValid=!0,n},doesCurrentRfqDataItemRequireSelectedSuppliers:function(){if(!Azom.currentRfqDataItem||!Azom.currentRfqDataItem.itemType)return!1;return Azom.currentRfqDataItem.itemType==="MaterialCategory"||Azom.currentRfqDataItem.itemType==="MaterialCategoryFinishedProduct"},getMaterialCategoryFinishedProductId:function(n,t){if(!n||!t)return null;var r={materialCategoryId:n,finishedProductId:t},i=0;return jQuery.ajax({type:"POST",url:"/site_services.asmx/GetMaterialCategoryFinishedProductId","async":!1,data:JSON.stringify(r),cache:!1,contentType:"application/json; charset=utf-8",dataType:"json",success:function(n){if(n=n.d,!n||n.Message){var t=n.Message||"Unexpected data returned";Azom.logInConsole("problem in Azom.getMaterialCategoryFinishedProductId. "+t)}else i=n.MaterialCategoryFinishedProductId},error:function(n,t,i){Azom.logInConsole("error in Azom.getMaterialCategoryFinishedProductId. textStatus: "+(t||"")+", errorThrown: "+(i||""))}}),i},onRfqDesktopMobileBeforeShow:function(){var t,e,f,o,n,i,s,c,h,r,u;Azom.rfqFormSubmitted=!1;$(".rfq-outer").removeClass("azoForm-is-completed");t=$(".rfq-form-container .azoForm-input-form");t.off("change.agreebox").on("change.agreebox","input.form-agree-box",Azom.syncCommonFormAgreeBoxChange);Azom.syncCommonFormAgreeBoxChange({delegateTarget:t[0]});t.find(".azoForm-country").toggleClass("azoForm-validate azoForm-required azoForm-country",!0);t.find("input.azoForm-validate, select.azoForm-validate, textarea.azoForm-validate, .azoForm-input-list input").off("change.azoFormValidate").on("change.azoFormValidate",function(){Azom.validateAzoFormElement($(this))});if(e=typeof g_isIndividualSupplierPage=="boolean"&&g_isIndividualSupplierPage,f="",Azom.currentRfqDataItem.itemType==="MaterialCategoryFinishedProduct"&&!Azom.currentRfqDataItem.itemId)if(o=Azom.getMaterialCategoryFinishedProductId(Azom.currentRfqDataItem.mcid,Azom.currentRfqDataItem.fpid),o)Azom.currentRfqDataItem.itemId=o;else return alert("Sorry, unable to determine the item you clicked on. This is unexpected, please try again soon."),this.close(),!1;if(n=null,i="",Azom.doesCurrentRfqDataItemRequireSelectedSuppliers())if(s=$("#rfq-supplier-list-container"),c=s.length===1,n=Azom.getRfqSelectedSuppliersData(),n.isValid){if(n.suppliers.length&&(i=n.suppliers[0].name),c){for(h=$(document.createElement("ol")),r=0;r<n.suppliers.length;r++)var l=$(document.createElement("a")).attr("href","#").click(Azom.removeSupplierFromRfqList).text("[x]"),a=$(document.createElement("span")).text(n.suppliers[r].name),v=$(document.createElement("li")).attr("data-supplier-id",n.suppliers[r].id).append(l).append(a).appendTo(h);s.empty().append(h)}}else n.validationMessage||(n.validationMessage="Sorry, the suppliers you would like to request a quote from could not be determined. This is unexpected. Please try refreshing the page in your browser and try Request a Quote again."),f=n.validationMessage;if($("#rfq-input-form").show(),$("#rfq-on-completed").hide(),f)return $("#rfq-input-form").hide(),$("#rfq-select-suppliers-message").show(),$("#rfq-select-suppliers-dialog-title").text(Azom.currentRfqDataItem.formTitle),$("#rfq-select-suppliers-message").text(f),window.setTimeout(showRfqSuppliersMessage,10),$.magnificPopup.close(),!1;if(typeof Azom.currentRfqDataItem.formTitle!="undefined"&&(u=Azom.currentRfqDataItem.formTitle,$("#rfq-header").attr("data-info-only-request")==="true"&&(u=u.replace(/Request a Quote or Further Information/gi,"Request Further Information")),e&&i&&(u+=" from "+Encoder.htmlEncode(i)),$("#rfq-header").html(u)),typeof Azom.currentRfqDataItem.itemName!="undefined"&&$("#rfq-input-form .rfq-insert-item-name").html(Azom.currentRfqDataItem.itemName),e&&i&&$("#rfq-input-form .rfq-insert-supplier-name").text(i),Azom.applySavedFormValues($(".rfq-form-container .azoForm-input-form")),t.find("[data-azoform-display-if]").length>0){t.find("input, select, textarea").off("change.azoFormDisplayIf").on("change.azoFormDisplayIf",Azom.onFormElementChangeCheckForElementsToChangeDisplayFor);Azom.syncFormElementsToConditionallyDisplay(t)}return Azom.toggleAzoFormQuestionVisibility($("#rfqInquiryItemNameContainer"),Azom.rfqShowItemNameField()),!0},setupApplicableRfqItem:function(n){var i,t,r;if(!n||n.length<1)return!1;for(i=null,t=0;t<RfqData.Items.length;t++)for(r=0;r<RfqData.Items[t].elementSelectors.length;r++)if(n.is(RfqData.Items[t].elementSelectors[r])){i=RfqData.Items[t];break}return i?(RfqData.rfqFormInitiatedByLargeCta=n.is(".large-rfq-cta a"),RfqData.rfqFormInitiatedByTopRedTab=n.is(".in-content-ctas-top .cta-rfq a"),RfqData.rfqFormInitiatedByBottomRedTab=n.is(".in-content-ctas-bottom .cta-rfq a"),RfqData.rfqFormInitiatedBySocialSquare=n.is(".top-self-ad .wide-promo a"),RfqData.rfqFormInitiatedByLargeCta&&!RfqData.LargeCtaClicked&&(Azom.pushAnalyticsEvent("rfq_large_cta_button_click",null),RfqData.LargeCtaClicked=!0),RfqData.rfqFormInitiatedByTopRedTab&&!RfqData.TopRedTabClicked&&(Azom.pushAnalyticsEvent("rfq_top_red_tab_click",null),RfqData.TopRedTabClicked=!0),RfqData.rfqFormInitiatedByBottomRedTab&&!RfqData.BottomRedTabClicked&&(Azom.pushAnalyticsEvent("rfq_bottom_red_tab_click",null),RfqData.BottomRedTabClicked=!0),RfqData.rfqFormInitiatedBySocialSquare&&!RfqData.SocialSquareClicked&&(Azom.pushAnalyticsEvent("rfq_social_square_click",null),RfqData.SocialSquareClicked=!0),Azom.currentRfqDataItem=i,!0):!1},getRfqFormCacheKey:function(){var n=typeof g_isIndividualSupplierPage=="boolean"&&g_isIndividualSupplierPage;return"rfq-form-"+Azom.currentRfqDataItem.itemType+"-"+Azom.currentRfqDataItem.itemId.toString()+"-"+n.toString()},getRfqInfoContent:function(n,t,i){var r=null,u;t&&(r=n?"#rfqForm .rfq-form-dialog-container-contents":Azom.mobileRfqFormContainerOnPageSelector);u=Azom.getRfqFormCacheKey();BlogEngine.getInfoContent("rfq-form","&item-type="+Azom.currentRfqDataItem.itemType+"&item-id="+Azom.currentRfqDataItem.itemId.toString(),r,u,i)},onRfqDesktopBeforeShow:function(){return Azom.isUsingMobileRfqForm=!1,Azom.getRfqInfoContent(!0,!0,null),Azom.onRfqDesktopMobileBeforeShow()?void 0:!1},isUsSelectedInCountryDropdown:function(n){return(n.val()||"")==="220"},toggleRfqInputVisibility:function(n,t){var r=(n.css("display")||"").toString().toLowerCase()!=="none",i=!1;return t&&!r?i=!0:!t&&r&&(i=!0),i&&Azom.toggleAzoFormQuestionVisibility(n,t),i},styleAzoFormSelect:function(n){n.each(function(){var n=$(this),t=n.attr("title")||"",i=$("option:selected",this);i.length===1&&(t=i.text());var r=15,u=n.width()-r,f=n.height(),e=$(document.createElement("span")).css({width:u.toString()+"px",height:f.toString()+"px",paddingRight:r.toString()+"px"}).addClass("select-display").text(t);n.css({"z-index":10,opacity:0,"-khtml-appearance":"none"}).after(e).change(function(){val=$("option:selected",this).text();$(this).next().text(val)})})},onRfqDesktopMobileClosed:function(){$(Azom.mobileRfqFormContainerOnPageSelector).empty();$("#rfqForm .rfq-form-dialog-container-contents").empty();typeof Azom.currentRfqDataItem!="undefined"&&Azom.pushAnalyticsEvent("rfq_form_"+(Azom.rfqFormSubmitted?"closed_with_submission":"closed_without_submission"),{event_label:Azom.currentRfqDataItem.itemType+": "+Azom.currentRfqDataItem.itemId})},initRfqItems:function(n){var f,t,i,r,e,o,u,s;if(n&&n.Items&&n.Items.length){for(f={},t="",i=0;i<n.Items.length;i++)for(r=0;r<n.Items[i].elementSelectors.length;r++)e=n.Items[i].elementSelectors[r],o="selector-"+e,f[o]||(f[o]=!0,t.length>0&&(t+=", "),t+=e);t.length!==0&&(u=$(t),u.filter(function(){return!$(this).hasClass("rfq-inited")}),u.length!==0)&&(s={type:"inline",items:{src:"#rfqForm"},disableOn:function(n){if(typeof RfqData=="undefined"||typeof BlogEngine=="undefined"||!Azom.setupApplicableRfqItem($(n.mfpEl)))return n.preventDefault(),!1;if(1){if(Azom.displayFormMobileVersion())return Azom.displayMobileRfqForm(n),n.preventDefault(),!1;var t=Azom.getRfqFormCacheKey();if(!BlogEngine.isInfoContentInCache(t))return Azom.getRfqInfoContent(!0,!1,function(){$(n.mfpEl).trigger("click")}),n.preventDefault(),!1}return!0},callbacks:{beforeOpen:Azom.onRfqDesktopBeforeShow,open:Azom.onRfqDesktopMobileShown,afterClose:Azom.onRfqDesktopMobileClosed},mainClass:"mfp-3d-unfold",removalDelay:500,midClick:!0},Azom.setFocusOnFormWhenShown()&&(s.focus="#rfq-input-form .azoForm-first-name"),u.magnificPopup(s).addClass("rfq-inited"))}},setupRfqPage:function(){if(RfqData&&RfqData.Items&&RfqData.Items.length){var n={Items:RfqData.Items};Azom.initRfqItems(n)}},initRfqPage:function(){Azom.setupRfqPage()},closeRfqWindow:function(){return $.magnificPopup.close(),!1},rfqSubmittedOn:null,displayRfqMessage:function(n){$("#rfq-message-contents").html(n);$("#rfq-message").show();$("#rfq-message-contents-page2").html(n);$("#rfq-message-page2").show()},rfqToggleSubmittingIndicator:function(n){var t=$(".rfq-form-container .azoForm-input-form");t.is(":visible")||(t=$(".rfq-form-container .azoForm-input-form2"));Azom.toggleUiUpdateForAzoFormSubmittal(t,n)},rfqGenericErrorMsg:"An unexpected error occurred while submitting your inquiry.  Please try again soon.",onRfqSubmitError:function(){Azom.rfqSubmittedOn=null;var n=Azom.rfqGenericErrorMsg;Azom.rfqToggleSubmittingIndicator(!1);Azom.displayRfqMessage(n)},onRfqSubmitCompleted:function(n){var i,r,u,t;Azom.rfqSubmittedOn=null;n&&n.d&&(n=n.d,n.IsSuccessful?(n.ImpressionId&&Azom.initNewImpression(n),i=$(".rfq-form-container .azoForm-input-form"),Azom.saveFormValuesEntered(i),Azom.clearAzoFormEnteredValues(i),r=Azom.getRfqSuccessText(!1,Azom.isUsingMobileRfqForm,n.IsDOptInReq),u=$(".rfq-completed-content-wrapper"),u.html(r),$("#rfq-input-form, #rfq-input-form2").hide(),$("#rfq-on-completed").show(),$(".rfq-outer").toggleClass("azoForm-is-completed",!0),Azom.isUsingMobileRfqForm&&Azom.scrollToTopOfMobileForm(),typeof Azom.currentRfqDataItem!="undefined"&&(Azom.rfqFormSubmitted=!0,RfqData.AnalyticsSubmitTracked||(Azom.pushAnalyticsEvent("rfq_form_submitted",{event_label:Azom.currentRfqDataItem.itemType+": "+Azom.currentRfqDataItem.itemId}),RfqData.AnalyticsSubmitTracked=!0),RfqData.rfqFormInitiatedByLargeCta&&!RfqData.LargeCtaSubmitted&&(Azom.pushAnalyticsEvent("rfq_large_cta_button_submitted",null),RfqData.LargeCtaSubmitted=!0),RfqData.rfqFormInitiatedByTopRedTab&&!RfqData.TopRedTabSubmitted&&(Azom.pushAnalyticsEvent("rfq_top_red_tab_submitted",null),RfqData.TopRedTabSubmitted=!0),RfqData.rfqFormInitiatedByBottomRedTab&&!RfqData.BottomRedTabSubmitted&&(Azom.pushAnalyticsEvent("rfq_bottom_red_tab_submitted",null),RfqData.BottomRedTabSubmitted=!0),RfqData.rfqFormInitiatedBySocialSquare&&!RfqData.SocialSquareSubmitted&&(Azom.pushAnalyticsEvent("rfq_social_square_submitted",null),RfqData.SocialSquareSubmitted=!0)),n.SalesfusionSendToUrl&&Azom.recordFormSubmissionInSalesfusion(n.SalesfusionSendToUrl)):(t=n.Message,t||(t=Azom.rfqGenericErrorMsg),Azom.displayRfqMessage(t)));Azom.rfqToggleSubmittingIndicator(!1)},submitRfq:function(n,t,i){var e,y,a,u,o,v,ht;if(Azom.rfqSubmittedOn&&(new Date).getTime()-Azom.rfqSubmittedOn.getTime()>12e3&&(Azom.rfqSubmittedOn=null),!Azom.rfqSubmittedOn){if(t){$("#rfq-input-form").show();$("#rfq-input-form2").hide();return}e=$(".rfq-form-container .azoForm-input-form");y=e.find("[data-azoform-field-name]");e.find("li.azoForm-error").removeClass("azoForm-error");var p="",w="",b="",h="",k="",c="",d="",g="",nt="",tt="",it="",rt="",l=[],r="",f=!0;if(y.each(function(){var i=$(this),e=i.attr("data-azoform-field-name"),t=e.toLowerCase(),n=$.trim((i.val()||"").toString()),a=Azom.isElementCheckbox(i),o,s,u;if(a&&(n=i.is(":checked")?"Yes":"No"),o=(i.attr("data-azoform-is-hidden")||"")!=="true",!o)return!0;Azom.validateAzoFormElement(i)||(f=!1);s=i.hasClass("azoForm-input-list");s&&(u=i.data("input-list-checked-values-array"),u&&typeof u.length=="number"&&(n=u.join("; ")));t==="first name"?p=n:t==="last name"?w=n:t==="organization"?b=n:t==="profession"?nt=n:t==="email address"?(h=n,i.data("is-invalid-email")&&(r||(r="Valid email address is required for us to process your request."))):t==="phone"?k=n:t==="country"?c=n:t==="postal code"?(d=n,i.data("is-usa-postal-code-invalid")&&(r||(r="A 5 or 9 digit Postal Code is required."))):t==="city"?g=n:t==="inquiry"?tt=n:t==="inquiry item name"?it=n:t==="buyer journey stage"?rt=n:l.push({name:e,value:n})}),a=[],Azom.doesCurrentRfqDataItemRequireSelectedSuppliers())if(u=Azom.getRfqSelectedSuppliersData(),u.isValid)for(o=0;o<u.suppliers.length;o++)a.push(u.suppliers[o].id);else u.validationMessage||(u.validationMessage="Sorry, the suppliers you would like to request a quote from could not be determined. This is unexpected. Please try refreshing the page in your browser and try Request a Quote again."),f=!1,r||(r=u.validationMessage);var s=$("#rfq-input-form").attr("data-is-using-cpr-version")==="true",ut=$("#rfqETechsConsent"),ft=$("#rfqNewslettersConsent"),et=$("#rfqTermsAgree"),ot=!s||!ut.is(":visible")?null:ut.is(":checked"),ct=!s||!ft.is(":visible")?null:ft.is(":checked"),st=et.is(":visible")?et.is(":checked"):null;return(n||(st===!1&&(f=!1,r||(r="The Terms agreement box above must be checked before this can be submitted.")),s&&ot===!1&&(f=!1,r||(r="The Supplier quotations box above must be checked before this can be submitted."))),!f)?(r||(r="Please fill in the required fields."),Azom.displayRfqMessage(r),!1):n&&!i?(v=function(n,t,i){var r=$("#rfq-input-form").attr("data-is-using-cpr-version")==="true",u;$("#rfq-input-form2 .azoForm-hide-for-conditional-page2-questions").toggle(n);$("#rfq-input-form2").toggleClass("azoForm-page2-partial",!n);u=!r||n;$("#rfqTermsAgreeContainer").toggle(u);$("#rfqNonCprAgreeLb").toggle(!r&&u);$("#rfqCprAgreeLb").toggle(r&&u);$("#rfqETechsConsentLi").toggle(r&&t);$("#rfqNewslettersConsentLi").toggle(r&&i);$("#rfqExtraCprTerms").toggle(r&&n);$("#rfq-input-form").hide();$("#rfq-input-form2").show();$("#rfq-message, #rfq-message-page2").hide();Azom.isUsingMobileRfqForm&&Azom.scrollToTopOfMobileForm()},Azom.rfqSubmittedOn=new Date,Azom.rfqToggleSubmittingIndicator(!0),Azom.checkIfTermsAndConsentsRequired(h,c,!0,!1,!1,function(n){var t,i;if(Azom.rfqSubmittedOn=null,Azom.rfqToggleSubmittingIndicator(!1),n=n.d,!n||n.Message){t=n.Message||"Sorry, an unexpected error occurred. Please try clicking Continue again.";Azom.displayRfqMessage(t);return}if($("#rfq-input-form").attr("data-is-using-cpr-version",n.ApplyCpr?"true":"false"),i=n.DisplayETechsQuestion||n.DisplayNewslettersQuestion,!i){Azom.submitRfq(!0,!1,!0);return}v(n.DisplayFullPage,n.DisplayETechsQuestion,n.DisplayNewslettersQuestion)},function(n,t,i){Azom.rfqSubmittedOn=null;Azom.rfqToggleSubmittingIndicator(!1);Azom.logInConsole("error checking if terms and consents are required. error: "+(i||"---"));v(!0,!0,!0)}),!1):($("#rfq-message, #rfq-message-page2").hide(),ht={itemType:Azom.currentRfqDataItem.itemType,itemId:Azom.currentRfqDataItem.itemId,itemName:Azom.rfqShowItemNameField()?it:Azom.currentRfqDataItem.itemName,pageUrl:window.location.href.toString(),pageTitle:document.title||"",timeOnPage:Azom.pageLoadedOn?((new Date).getTime()-Azom.pageLoadedOn.getTime()).toString():"",firstName:p,lastName:w,company:b,email:h,phone:k,countryId:c,postalCode:d,city:g,profession:nt,inquiry:tt,buyerJourneyStage:rt,isUsingCprVersion:s,isTermsAgreed:st,eTechsOptIn:ot,newslettersOptIn:ct,isMobile:Azom.isUsingMobileRfqForm,impressionId:Azom.impressionId||"",supplierIds:a.join(","),formId:$.trim((e.attr("data-form-id")||"").toString()),customFields:l.length===0?"":JSON.stringify(l),referrer:document.referrer},Azom.rfqToggleSubmittingIndicator(!0),Azom.rfqSubmittedOn=new Date,jQuery.ajax({type:"POST",url:BlogEngine.convertToAbsoluteUrl("/site_services.asmx/SaveNewRfq"),data:JSON.stringify(ht),contentType:"application/json; charset=utf-8",dataType:"json",success:Azom.onRfqSubmitCompleted,error:Azom.onRfqSubmitError}),!1)}},setupApplicablePdfReqItem:function(n){var i,r,t,u,f;return!n||n.length<1?!1:(i=PdfReq,r=$.trim((n.attr("data-cta-item-type")||"").toString()),r&&(t=$.trim((n.attr("data-cta-item-id")||"").toString()),t&&!isNaN(t)&&(t=parseInt(t,10),u=$.trim((n.attr("data-cta-item-name")||"").toString()),f=$.trim((n.attr("data-cta-form-title")||"").toString()),u&&f&&(i={formTitle:f,itemId:t,itemName:u,itemType:r,languageCode:""}))),!i)?!1:(Azom.currentPdfReqDataItem=i,!0)},getPdfReqFormCacheKey:function(){return"pdfReq-form-"+Azom.currentPdfReqDataItem.itemType+"-"+Azom.currentPdfReqDataItem.itemId.toString()},onPdfReqDesktopMobileShown:function(){var t=$(".pdfReq-form-container .azoForm-input-form"),i=t.attr("data-pdfreq-activity-event-category")||"pdfreq_form",n;Azom.currentPdfReqDataItem.activityEventCategory=i;Azom.pushAnalyticsEvent(Azom.currentPdfReqDataItem.activityEventCategory+"_view",{event_label:Azom.currentPdfReqDataItem.itemType+": "+Azom.currentPdfReqDataItem.itemId});Azom.setFocusOnFormWhenShown()&&(n=document.getElementById("pdfReqFirstName"),n&&n.focus&&n.focus())},pdfReqFormContentSetup:!1,pdfReqFormSubmitted:!1,displayMobilePdfReqForm:function(){var t,i,n;if(Azom.isUsingMobilePdfReqForm=!0,t="Sorry, unable to prepare the downloadable PDF at the moment. Please try again later.",!Azom.elementsToHideForMobileForms)return alert(t),!1;if(i=$(Azom.elementsToHideForMobileForms),i.length<1){alert(t);return}if(n=$(Azom.mobilePdfReqFormContainerOnPageSelector),n.length!==1){alert(t);return}n.empty();n.insertAfter($("footer").first());Azom.getPdfReqInfoContent(!1,!0,function(){if(n.children().length<1){alert(t);return}Azom.onPdfReqDesktopMobileBeforeShow();i.fadeOut();n.fadeIn(function(){Azom.scrollToTopOfMobileForm();Azom.onPdfReqDesktopMobileShown()})})},getDocReqFormCacheKey:function(){return"docReq-form-"+DocReq.itemType+"-"+DocReq.itemId.toString()},displayMobileDocReqForm:function(){var t,i,n;if(Azom.isUsingMobileDocReqForm=!0,t="Sorry, unable to prepare the download at the moment. Please try again later.",!Azom.elementsToHideForMobileForms)return alert(t),!1;if(i=$(Azom.elementsToHideForMobileForms),i.length<1){alert(t);return}if(n=$(Azom.mobileDocReqFormContainerOnPageSelector),n.length!==1){alert(t);return}n.empty();n.insertAfter($("footer").first());Azom.getDocReqInfoContent(!1,!0,function(){if(n.children().length<1){alert(t);return}Azom.onDocReqDesktopMobileBeforeShow();i.fadeOut();n.fadeIn(function(){Azom.scrollToTopOfMobileForm();Azom.onDocReqDesktopMobileShown()})})},displayMobileRfqForm:function(){var t,i,n;if((Azom.isUsingMobileRfqForm=!0,t="Sorry, unable to prepare the RFQ form at the moment. Please try again later.",!Azom.elementsToHideForMobileForms)||(i=$(Azom.elementsToHideForMobileForms),i.length<1)||(n=$(Azom.mobileRfqFormContainerOnPageSelector),n.length!==1))return alert(t),!1;n.empty();n.insertAfter($("footer").first());Azom.getRfqInfoContent(!1,!0,function(){if(n.children().length<1)return alert(t),!1;if(!Azom.onRfqDesktopMobileBeforeShow())return!1;i.fadeOut();n.fadeIn(function(){Azom.scrollToTopOfMobileForm();Azom.onRfqDesktopMobileShown()})})},closeMobileRfqForm:function(n){n&&n.preventDefault&&n.preventDefault();var t=$(Azom.mobileRfqFormContainerOnPageSelector),i=$(Azom.elementsToHideForMobileForms);return i.fadeIn(),t.fadeOut(function(){Azom.onRfqDesktopMobileClosed()}),window.scrollTo(0,0),!1},cancelMobileRfqForm:function(n){return n&&!confirm("Close this form without completing the request for quote?")?!1:(Azom.closeMobileRfqForm(null),!1)},closeMobilePdfReqForm:function(n){n&&n.preventDefault&&n.preventDefault();var t=$(Azom.mobilePdfReqFormContainerOnPageSelector),i=$(Azom.elementsToHideForMobileForms);return i.fadeIn(),t.fadeOut(function(){Azom.onPdfReqDesktopMobileClosed()}),window.scrollTo(0,0),!1},cancelMobilePdfReqForm:function(n){return n&&!confirm("Close this form without completing the PDF download?")?!1:(Azom.closeMobilePdfReqForm(null),!1)},closeMobileDocReqForm:function(n){n&&n.preventDefault&&n.preventDefault();var t=$(Azom.mobileDocReqFormContainerOnPageSelector),i=$(Azom.elementsToHideForMobileForms);return i.fadeIn(),t.fadeOut(function(){Azom.onDocReqDesktopMobileClosed()}),window.scrollTo(0,0),!1},cancelMobileDocReqForm:function(n){return n&&!confirm("Close this form without completing the download?")?!1:(Azom.closeMobileDocReqForm(null),!1)},onDocReqDesktopMobileBeforeShow:function(){var t,u,p,h,c,r,l,f,w,b,o,n,y,s,g,nt;Azom.docReqFormSubmitted=!1;$(".docReq-outer").removeClass("azoForm-is-completed");t=$(".docReq-form-container .azoForm-input-form");t.off("change.agreebox").on("change.agreebox","input.form-agree-box",Azom.syncCommonFormAgreeBoxChange);Azom.syncCommonFormAgreeBoxChange({delegateTarget:t[0]});t.find(".azoForm-country").toggleClass("azoForm-validate azoForm-required azoForm-country",!0);t.find("input.azoForm-validate, select.azoForm-validate, textarea.azoForm-validate, .azoForm-input-list input").off("change.azoFormValidate").on("change.azoFormValidate",function(){Azom.validateAzoFormElement($(this))});if($("#docReq-input-form").show(),$("#docReq-on-completed").hide(),!0){if(typeof DocReq.formTitle!="undefined"&&(u="",DocReq.useFormTitleAsIs?u=DocReq.formTitle:(p=DocReq.itemType==="webinar"?"":" Download",u=DocReq.formTitle+" "+Azom.getDocReqTypeDescription(DocReq.reqType,!1,DocReq.isFutureWebinar)+p),$("#docReq-header").html(u)),typeof DocReq.itemName!="undefined"&&$("#docReq-input-form .docReq-insert-item-name").html(DocReq.itemName),DocReq.itemType==="AdCampaign"&&typeof adCampaignBrochures=="object"&&adCampaignBrochures.length&&(h=$("#ad-campaign-brochure-list-container"),h)){for(c=$(document.createElement("ol")),r=0;r<adCampaignBrochures.length;r++)var tt=$(document.createElement("a")).attr("href","#").click(Azom.removeDocumentFromAdCampaignBrochureList).text("[x]"),it=$(document.createElement("span")).text(adCampaignBrochures[r].name),ut=$(document.createElement("li")).attr("data-document-id",adCampaignBrochures[r].id).append(tt).append(it).appendTo(c);h.empty().append(c)}l=Azom.getDataOnContentType(DocReq.itemType);$("#docReq-input-form .docReq-item-type-description").html(l.description);$("#docReq-input-form .docReq-item-type-description-plural").html(l.descriptionPlural);$("#docReq-input-form .docReq-reqType-description").html(DocReq.reqTypeDesc);DocReq.itemType==="webinar"&&(DocReq.isFutureWebinar?$("#docReq-input-form .docReq-intro-sentence").html("Simply fill out the form to register for the upcoming webinar."):$("#docReq-input-form .docReq-intro-sentence").html("Simply fill out the form to view the webinar."))}if(DocReq.itemType==="webinar"&&(f=t.find(".azoForm-webinar-series-selection-container").empty().toggle(window.g_isWebinarSeries),f.length===1&&window.g_isWebinarSeries)){var e=[],a=!1,rt=$(".webinar-dates-block-dates ul.webinar-dates > li");if(rt.each(function(){var n=$(this),r=parseInt(n.attr("data-webinar-id"),10),f=n.find(".webinar-date-title").text(),t={id:r,title:f,timeZone:n.find(".hdnTimeZoneWithNewOffset").val(),preSelect:DocReq.webinarSeriesIdsToPreSelect&&DocReq.webinarSeriesIdsToPreSelect.length&&$.inArray(r,DocReq.webinarSeriesIdsToPreSelect)!==-1?!0:!1},u=n.find(".webinar-date-date"),i=n.find(".webinar-date-time");u.length===1&&i.length===1&&(a=!0,t.date=u.text(),t.time=$.trim(i.find(".webinar-timezone-time").text()),t.description=$.trim(i.find(".webinar-description").text()));e.push(t)}),w=$("#ddlTimezones option:selected").text(),e.length<1)console.log("unexpectedly, webinarSeriesData.length < 1");else{b=$(document.createElement("p")).text("Choose the webinars in this series you'd like to register for:");f.append(b);var v=$(document.createElement("table")),k=$(document.createElement("thead")),d=$(document.createElement("tbody")),i=$(document.createElement("tr"));for(i.append($(document.createElement("td")).addClass("azoForm-webinar-series-selection-checkbox").text("Select")),a&&i.append($(document.createElement("td")).addClass("azoForm-webinar-series-selection-date").text("Date")),DocReq.omitWebinarTitleColumnOnSeriesSelectionGrid||i.append($(document.createElement("td")).addClass("azoForm-webinar-series-selection-title").text("Webinar")),k.append(i),o=0;o<e.length;o++)n=e[o],i=$(document.createElement("tr")),y=$(document.createElement("input")).attr("type","checkbox").val(n.id),n.preSelect&&y.prop("checked",!0),i.append($(document.createElement("td")).addClass("azoForm-webinar-series-selection-checkbox").append(y)),a&&(s=Encoder.htmlEncode(n.date||"")+" "+Encoder.htmlEncode(n.time||""),n.description&&(g=n.description.indexOf("(")!==-1,nt=g?Encoder.htmlEncode(n.description):"("+Encoder.htmlEncode(n.description)+")",s+=' <span class="azoForm-webinar-series-selection-date-description">'+nt+"<\/span>"),w&&(s+='<br /><span class="azoForm-webinar-series-selection-date-timezone">'+Encoder.htmlEncode(n.timeZone)+"<\/span>"),i.append($(document.createElement("td")).addClass("azoForm-webinar-series-selection-date").html(s))),DocReq.omitWebinarTitleColumnOnSeriesSelectionGrid||i.append($(document.createElement("td")).addClass("azoForm-webinar-series-selection-title").text(n.title)),d.append(i);v.append(k);v.append(d);f.append(v)}}if(Azom.applySavedFormValues($(".docReq-form-container .azoForm-input-form")),t.find("[data-azoform-display-if]").length>0){t.find("input, select, textarea").off("change.azoFormDisplayIf").on("change.azoFormDisplayIf",Azom.onFormElementChangeCheckForElementsToChangeDisplayFor);Azom.syncFormElementsToConditionallyDisplay(t)}},onPdfReqDesktopMobileBeforeShow:function(){var n,t;Azom.pdfReqFormSubmitted=!1;$(".pdfReq-outer").removeClass("azoForm-is-completed");n=$(".pdfReq-form-container .azoForm-input-form");n.off("change.agreebox").on("change.agreebox","input.form-agree-box",Azom.syncCommonFormAgreeBoxChange);Azom.syncCommonFormAgreeBoxChange({delegateTarget:n[0]});n.find(".azoForm-country").toggleClass("azoForm-validate azoForm-required azoForm-country",!0);n.find("input.azoForm-validate, select.azoForm-validate, textarea.azoForm-validate, .azoForm-input-list input").off("change.azoFormValidate").on("change.azoFormValidate",function(){Azom.validateAzoFormElement($(this))});if($("#pdfReq-input-form").show(),$("#pdfReq-on-completed").hide(),!0&&(typeof Azom.currentPdfReqDataItem.formTitle!="undefined"&&$("#pdfReq-header").html(Azom.currentPdfReqDataItem.formTitle),typeof Azom.currentPdfReqDataItem.itemName!="undefined"&&$("#pdfReq-input-form .pdfReq-insert-item-name").html(Azom.currentPdfReqDataItem.itemName),t=Azom.getDataOnContentType(Azom.currentPdfReqDataItem.itemType),$("#pdfReq-input-form .pdfReq-item-type-description").html(t.description),$("#pdfReq-input-form .pdfReq-item-type-description-plural").html(t.descriptionPlural)),Azom.applySavedFormValues($(".pdfReq-form-container .azoForm-input-form")),n.find("[data-azoform-display-if]").length>0){n.find("input, select, textarea").off("change.azoFormDisplayIf").on("change.azoFormDisplayIf",Azom.onFormElementChangeCheckForElementsToChangeDisplayFor);Azom.syncFormElementsToConditionallyDisplay(n)}},getPdfReqInfoContent:function(n,t,i){var r=null,u;t&&(r=n?"#pdfReqForm .pdfReq-form-dialog-container-contents":Azom.mobilePdfReqFormContainerOnPageSelector);u=Azom.getPdfReqFormCacheKey();BlogEngine.getInfoContent("pdfReq-form","&item-type="+Azom.currentPdfReqDataItem.itemType+"&item-id="+Azom.currentPdfReqDataItem.itemId.toString(),r,u,i)},onPdfReqDesktopBeforeShow:function(){Azom.isUsingMobilePdfReqForm=!1;Azom.getPdfReqInfoContent(!0,!0,null);var n=$(".pdfReq-form-container .azoForm-input-form"),t=n.attr("data-form-version");$("#pdfReqForm").toggleClass("azoSingleColumnForm",t==="2");Azom.onPdfReqDesktopMobileBeforeShow()},onPdfReqDesktopMobileClosed:function(){$(Azom.mobilePdfReqFormContainerOnPageSelector).empty();$("#pdfReqForm .pdfReq-form-dialog-container-contents").empty();Azom.pushAnalyticsEvent(Azom.currentPdfReqDataItem.activityEventCategory+"_"+(Azom.pdfReqFormSubmitted?"closed_with_submission":"closed_without_submission"),{event_label:Azom.currentPdfReqDataItem.itemType+": "+Azom.currentPdfReqDataItem.itemId})},onDocReqDesktopMobileClosed:function(){$(Azom.mobileDocReqFormContainerOnPageSelector).empty();$("#docReqForm .docReq-form-dialog-container-contents").empty();Azom.pushAnalyticsEvent("docreq_form_"+(Azom.docReqFormSubmitted?"closed_with_submission":"closed_without_submission"),{event_label:DocReq.itemType+": "+DocReq.itemId})},setupPdfReqPage:function(){var n,t;typeof PdfReq!="undefined"&&typeof BlogEngine!="undefined"&&PdfReq.itemType&&(n=$("a.request-pdf-download, a.pdfRequest"),n.length!==0)&&(t={type:"inline",items:{src:"#pdfReqForm"},disableOn:function(n){if(!Azom.setupApplicablePdfReqItem($(n.mfpEl)))return n.preventDefault(),!1;if(1){if(Azom.displayFormMobileVersion())return Azom.displayMobilePdfReqForm(n),n.preventDefault(),!1;var t=Azom.getPdfReqFormCacheKey();if(!BlogEngine.isInfoContentInCache(t))return Azom.getPdfReqInfoContent(!0,!1,function(){$(n.mfpEl).trigger("click")}),n.preventDefault(),!1}return!0},callbacks:{beforeOpen:Azom.onPdfReqDesktopBeforeShow,open:Azom.onPdfReqDesktopMobileShown,afterClose:Azom.onPdfReqDesktopMobileClosed},mainClass:"mfp-3d-unfold",removalDelay:500,midClick:!0},Azom.setFocusOnFormWhenShown()&&(t.focus="#pdfReq-input-form .azoForm-first-name"),n.magnificPopup(t))},initPdfReqPage:function(){Azom.setupPdfReqPage()},closePdfReqWindow:function(){return $.magnificPopup.close(),!1},pdfReqSubmittedOn:null,displayPdfReqMessage:function(n){$("#pdfReq-message-contents").html(n);$("#pdfReq-message").show();$("#pdfReq-message-contents-page2").html(n);$("#pdfReq-message-page2").show()},pdfReqToggleSubmittingIndicator:function(n){var t=$(".pdfReq-form-container .azoForm-input-form");t.is(":visible")||(t=$(".pdfReq-form-container .azoForm-input-form2"));Azom.toggleUiUpdateForAzoFormSubmittal(t,n)},pdfReqGenericErrorMsg:"An unexpected error occurred while submitting your request.  Please try again soon.",onPdfReqSubmitError:function(){Azom.pdfReqSubmittedOn=null;var n=Azom.pdfReqGenericErrorMsg;Azom.pdfReqToggleSubmittingIndicator(!1);Azom.displayPdfReqMessage(n)},onPdfReqSubmitCompleted:function(n){var i,t,u,r;Azom.pdfReqSubmittedOn=null;n&&n.d&&(n=n.d,n.IsSuccessful?(n.ImpressionId&&Azom.initNewImpression(n),Azom.saveFormValuesEntered($(".pdfReq-form-container .azoForm-input-form")),$("#pdfReqFirstName").val(""),$("#pdfReqLastName").val(""),$("#pdfReqCompany").val(""),$("#pdfReqEmail").val(""),$("#pdfReqIndustryUse").val(""),$("#pdfReqProfession").val(""),i="",n.IsDOptInReq?(t="",Azom.isUsingMobilePdfReqForm&&(t='<p style="margin-top:20px;margin-bottom:0;"><a href="#" onclick="return Azom.closeMobilePdfReqForm(null);">Click Here to return to the previous page you were on.<\/a><\/p>'),i='<div class="form-completed-wrap"><div class="form-completed-header"><p>Almost Done!<\/p><\/div><div class="form-completed-body"><p>To complete your download, <u>please click on the link in the email we just sent you<\/u>.<\/p><p>This is the last step, required for us to verify we can reach you, in accordance with our <a href="'+Azom.getTermsPageRelativeUrl()+'" target="_blank" class="terms-link">terms &amp; conditions<\/a>.<\/p>'+t+"<\/div><\/div>"):(t="",Azom.isUsingMobilePdfReqForm&&(t='<p style="margin-top:20px;margin-bottom:0;"><a href="#" onclick="return Azom.closeMobilePdfReqForm(null);">Click Here to return to the previous page you were on.<\/a><\/p>'),i='<div class="form-completed-wrap form-completed-no-more-action-required"><div class="form-completed-body"><p>Thank you.  The PDF will be sent to your email address within the next couple of minutes.<\/p>'+t+"<\/div><\/div>"),u=$(".pdfReq-completed-content-wrapper"),u.html(i),$("#pdfReq-input-form, #pdfReq-input-form2").hide(),$("#pdfReq-on-completed").show(),$(".pdfReq-outer").toggleClass("azoForm-is-completed",!0),Azom.isUsingMobilePdfReqForm&&Azom.scrollToTopOfMobileForm(),Azom.pdfReqFormSubmitted=!0,Azom.currentPdfReqDataItem.AnalyticsSubmitTracked||(Azom.pushAnalyticsEvent(Azom.currentPdfReqDataItem.activityEventCategory+"_submitted",{event_label:Azom.currentPdfReqDataItem.itemType+": "+Azom.currentPdfReqDataItem.itemId}),Azom.currentPdfReqDataItem.AnalyticsSubmitTracked=!0),n.SalesfusionSendToUrl&&Azom.recordFormSubmissionInSalesfusion(n.SalesfusionSendToUrl)):(r=n.Message,r||(r=Azom.pdfReqGenericErrorMsg),Azom.displayPdfReqMessage(r)));Azom.pdfReqToggleSubmittingIndicator(!1)},recordFormSubmissionInSalesfusion:function(n){n&&typeof n=="string"&&n.indexOf("http")===0||Azom.logInConsole("missing or invalid URL passed into recordFormSubmissionInSalesfusion.");var t=n+"&rndval="+Math.random().toString();(new Image).src=t},displayFormMobileVersion:function(){return Modernizr.mq("(max-width: 991px)")||$.trim((Azom.getQueryVariable("mobileform")||"").toString())==="1"},getSavedFormValuesObject:function(n){var t,r,u,i;if(typeof localStorage=="undefined")return null;if(t=window.localStorage.getItem("azoformdata"),t)try{t=$.parseJSON(t)}catch(f){t=null}return r="azofrmvaluessid",!t||(i=Azom.readCookie(r),i&&t.sessionId===i||(!i||Azom.eraseCookie(r),window.localStorage.removeItem("azoformdata"),t=null)),!t&&n&&(u=BlogEngine.getVisitorCookieAndPrivacyPreferences(),u.functional&&(i=Math.random().toString().replace(/\D+/gi,""),Azom.createCookie(r,i,0),t={sessionId:i})),t},applySavedFormValues:function(n){var t=Azom.getSavedFormValuesObject(!1),i;t&&(i=n.find("[data-azoform-field-name]"),i.each(function(){var i=$(this),u=i.attr("data-azoform-field-name"),f,n,e,o,r,s;if(!u||(f=$.trim((i.attr("data-azoform-saved-values")||"").toString()),f==="exclude")||(n=t[u],n===undefined||n===null))return!0;e=i.hasClass("azoForm-input-list");o=Azom.isElementCheckbox(i);o?typeof n=="bool"&&i.prop("checked",n):e?(r=[],n&&n.length&&(s=i.find("input"),s.each(function(){for(var i=$(this),u=i.val(),t=0;t<n.length;t++)if(n[t]===u){i.prop("checked",!0);r.push(u);break}})),i.data("input-list-checked-values-array",r)):i.val(n)}))},saveFormValuesEntered:function(n){var t=Azom.getSavedFormValuesObject(!0),i,r;t&&(i=n.find("[data-azoform-field-name]"),i.each(function(){var n=$(this),u=n.attr("data-azoform-field-name"),f,i,e,o,r;if(!u||(f=$.trim((n.attr("data-azoform-saved-values")||"").toString()),f==="exclude"))return!0;i=$.trim((n.val()||"").toString());e=Azom.isElementCheckbox(n);e&&(i=n.is(":checked"));o=n.hasClass("azoForm-input-list");o&&(r=n.data("input-list-checked-values-array"),r&&typeof r.length=="number"&&(i=r));t[u]=i||t[u]}),r=BlogEngine.getVisitorCookieAndPrivacyPreferences(),r.functional&&window.localStorage.setItem("azoformdata",JSON.stringify(t)))},isElementCheckbox:function(n){if(!n||n.length!==1)return!1;return(n.get(0).tagName||"").toString().toLowerCase()==="input"&&(n.attr("type")||"").toString().toLowerCase()==="checkbox"},clearAzoFormEnteredValues:function(n){var t=n.find("[data-azoform-field-name]");t.each(function(){var n=$(this),t=n.attr("data-azoform-field-name"),i=t.toLowerCase(),r=n.hasClass("azoForm-input-list"),u=Azom.isElementCheckbox(n);r?n.find("input:checked").prop("checked",!1):u?n.prop("checked",!1):i==="country"||n.val("")})},setFocusOnFormWhenShown:function(){return $(window).width()>1030},azoFormSubmittingButtonTimeout:null,azoFormSubmittingButtonInnerElement:null,onAzoFormSubmittingButtonTimeout:function(){var i;Azom.azoFormSubmittingButtonTimeout=null;var t=Azom.azoFormSubmittingButtonInnerElement,r=t.data("bullet-count")||1,u=r>=5?1:r+1,n="";for(i=0;i<u;i++)n.length>0&&(n+="&nbsp;"),n+="&bull;";t.data("bullet-count",u);t.html(n);Azom.azoFormSubmittingButtonTimeout=window.setTimeout(Azom.onAzoFormSubmittingButtonTimeout,200)},toggleUiUpdateForAzoFormSubmittal:function(n,t){var f=n.find("button.ccf-btn-a:not(.azoForm-back-btn)"),i=f.find(".ccf-btn-a-inner"),r,u;n.toggleClass("is-submitting",t);Azom.azoFormSubmittingButtonTimeout&&(window.clearTimeout(Azom.azoFormSubmittingButtonTimeout),Azom.azoFormSubmittingButtonTimeout=null);Azom.azoFormSubmittingButtonInnerElement=null;r=i.attr("data-original-text")||i.text()||"Submit";t?(i.attr("data-original-text",r),u=i.outerWidth(),i.css("width",u.toString()+"px"),i.html("&bull;"),i.data("bullet-count",1),Azom.azoFormSubmittingButtonInnerElement=i,Azom.azoFormSubmittingButtonTimeout=window.setTimeout(Azom.onAzoFormSubmittingButtonTimeout,200)):(i.text(r),i.css("width",""))},toggleAzoFormQuestionVisibility:function(n,t){n.toggle(t);n.find("[data-azoform-field-name]").attr("data-azoform-is-hidden",t?"false":"true")},validateAzoFormElement:function(n){var i=$.trim((n.val()||"").toString().replace(/[\r\n]+/gi,"")),v=Azom.isElementCheckbox(n),f,s,r,h,a,t,e,u,o;v&&(i=n.is(":checked")?"Yes":"");f=n.closest(".azoForm-input-list");s=f.length===1;s&&(n=f,i="",r=[],h=n.find("input:checked"),h.each(function(){var n=$(this).val();n&&r.push(n)}),i=r.join(", "),n.data("input-list-checked-values-array",r));var y=n.closest("li"),c=n.hasClass("azoForm-email"),l=n.hasClass("azoForm-postal-code"),k=n.hasClass("azoForm-city");if(c&&n.removeData("is-invalid-email"),l&&(n.removeData("is-usa-postal-code-invalid"),n.removeData("postal-code-cleaned")),a=n.hasClass("azoForm-required"),t=!0,t&&a&&!i&&(t=!1),t&&c&&(e=Azom.isEmailAddressValid2(i),n.data("is-invalid-email",!e),e||(t=!1)),t&&l&&!!i){var p=n.closest(".azoForm-input-form"),w=p.find(".azoForm-country"),b=Azom.isUsSelectedInCountryDropdown(w);b&&(u=i.replace(/\D+/gi,""),o=(u.length===5||u.length===9)&&i.replace(/[-\s\d]+/gi,"").length===0,n.data("postal-code-cleaned",u),n.data("is-usa-postal-code-invalid",!o),o||(t=!1))}return y.toggleClass("azoForm-error",!t),t},onFormElementChangeCheckForElementsToChangeDisplayFor:function(n){var t=$(n.currentTarget).closest(".azoForm-input-form");Azom.syncFormElementsToConditionallyDisplay(t)},syncFormElementsToConditionallyDisplay:function(n){var u,f,o,t,i,r,c,v,s,y,l;if(!n||!n.length){Azom.logInConsole("$form is missing in Azom.syncFormElementsToConditionallyDisplay");return}if(u=n.find("[data-azoform-display-if]"),u.length)for(f=0;f<u.length;f++){var h=$(u[f]),p=h.attr("data-azoform-display-if"),a=JSON.parse(p),e=!0;for(o=0;o<a.length;o++)if(t=a[o],t.type==="selectormatch"){if(!n.find(t.value).length){e=!1;break}}else if(t.type==="valuein"||t.type==="valuenotin"){if(i=!1,r=n.find(t.elementselector),r.length===1)if(r.hasClass("azoForm-input-list"))c=r.data("input-list-checked-values-array"),c&&t.value.some(function(n){return c.indexOf(n)>=0})&&(i=!0);else for(v=$.trim((r.val()||"").toString()),s=0;s<t.value.length;s++)if(y=t.value[s],v===y){i=!0;break}if(t.type!=="valuein"||i){if(t.type==="valuenotin"&&i){e=!1;break}}else{e=!1;break}}l=e;h.toggle(l);h.find("[data-azoform-field-name]").attr("data-azoform-is-hidden",l?"false":"true")}},scrollToTopOfMobileForm:function(){var n=$(".azoForm-mobile-container .azoForm-outer"),t;n.length<1||(t=n.offset(),window.scrollTo(0,Math.max(0,(t.top||0)-50)))},submitPdfReq:function(n,t,i){var u,f,a,l,it;if(Azom.pdfReqSubmittedOn&&(new Date).getTime()-Azom.pdfReqSubmittedOn.getTime()>12e3&&(Azom.pdfReqSubmittedOn=null),!Azom.pdfReqSubmittedOn){if(t){$("#pdfReq-input-form").show();$("#pdfReq-input-form2").hide();return}u=$(".pdfReq-form-container .azoForm-input-form");f=u.attr("data-form-version");f=isNaN(f)?1:parseInt(f,10);a=u.find("[data-azoform-field-name]");u.find("li.azoForm-error").removeClass("azoForm-error");var v="",y="",p="",e="",o="",w="",b="",k="",r="",s=!0,h=[];a.each(function(){var t=$(this),f=t.attr("data-azoform-field-name"),i=f.toLowerCase(),n=$.trim((t.val()||"").toString()),a=Azom.isElementCheckbox(t),c,l,u;if(a&&(n=t.is(":checked")?"Yes":"No"),c=(t.attr("data-azoform-is-hidden")||"")!=="true",!c)return!0;Azom.validateAzoFormElement(t)||(s=!1);l=t.hasClass("azoForm-input-list");l&&(u=t.data("input-list-checked-values-array"),u&&typeof u.length=="number"&&(n=u.join("; ")));i==="first name"?v=n:i==="last name"?y=n:i==="organization"?p=n:i==="profession"?b=n:i==="email address"?(e=n,t.data("is-invalid-email")&&(r||(r="Valid email address is required for us to process your request."))):i==="country"?o=n:i==="areas of interest"?w=n:i==="buyer journey stage"?k=n:(i==="postal code"&&t.data("is-usa-postal-code-invalid")&&(r||(r="A 5 or 9 digit Postal Code is required.")),h.push({name:f,value:n}))});var c=$("#pdfReq-input-form").attr("data-is-using-cpr-version")==="true",d=$("#pdfReqETechsConsent"),g=$("#pdfReqNewslettersConsent"),nt=$("#pdfReqTermsAgree"),rt=!c||!d.is(":visible")?null:d.is(":checked"),ut=!c||!g.is(":visible")?null:g.is(":checked"),tt=nt.is(":visible")?nt.is(":checked"):null;return(n||tt===!1&&(s=!1,r||(r="The Terms agreement box above must be checked before this can be submitted.")),!s)?(r||(r="Please fill in the required fields."),Azom.displayPdfReqMessage(r),!1):n&&!i?(Azom.currentPdfReqDataItem.AnalyticsPage1ContinueClickTracked||(Azom.pushAnalyticsEvent(Azom.currentPdfReqDataItem.activityEventCategory+"_page1_continue_clicked",{event_label:Azom.currentPdfReqDataItem.itemType+": "+Azom.currentPdfReqDataItem.itemId}),Azom.currentPdfReqDataItem.AnalyticsPage1ContinueClickTracked=!0),l=function(n,t,i){var r=$("#pdfReq-input-form").attr("data-is-using-cpr-version")==="true",u;$("#pdfReq-input-form2 .azoForm-hide-for-conditional-page2-questions").toggle(n);$("#pdfReq-input-form2").toggleClass("azoForm-page2-partial",!n);u=!r||n;$("#pdfReqTermsAgreeContainer").toggle(u);$("#pdfReqNonCprAgreeLb").toggle(!r&&u);$("#pdfReqCprAgreeLb").toggle(r&&u);$("#pdfReqETechsConsentLi").toggle(r&&t);$("#pdfReqNewslettersConsentLi").toggle(r&&i);$("#pdfReqExtraCprTerms").toggle(r&&n);$("#pdfReq-input-form").hide();$("#pdfReq-input-form2").show();$("#pdfReq-message, #pdfReq-message-page2").hide();Azom.isUsingMobilePdfReqForm&&Azom.scrollToTopOfMobileForm()},Azom.pdfReqSubmittedOn=new Date,Azom.pdfReqToggleSubmittingIndicator(!0),Azom.checkIfTermsAndConsentsRequired(e,o||0,!1,!1,!1,function(n){var t,i;if(Azom.pdfReqSubmittedOn=null,Azom.pdfReqToggleSubmittingIndicator(!1),n=n.d,!n||n.Message){t=n.Message||"Sorry, an unexpected error occurred. Please try clicking Continue again.";Azom.displayPdfReqMessage(t);return}if($("#pdfReq-input-form").attr("data-is-using-cpr-version",n.ApplyCpr?"true":"false"),i=n.DisplayETechsQuestion||n.DisplayNewslettersQuestion,!i){Azom.submitPdfReq(!0,!1,!0);return}l(n.DisplayFullPage,n.DisplayETechsQuestion,n.DisplayNewslettersQuestion)},function(n,t,i){Azom.pdfReqSubmittedOn=null;Azom.pdfReqToggleSubmittingIndicator(!1);Azom.logInConsole("error checking if terms and consents are required. error: "+(i||"---"));l(!0,!0,!0)}),!1):($("#pdfReq-message, #pdfReq-message-page2").hide(),it={itemType:Azom.currentPdfReqDataItem.itemType,itemId:Azom.currentPdfReqDataItem.itemId,firstName:v,lastName:y,company:p,email:e,countryId:o,languageCode:Azom.currentPdfReqDataItem.languageCode||"",industryUse:w,profession:b,buyerJourneyStage:k,isUsingCprVersion:c,isTermsAgreed:tt,eTechsOptIn:rt,newslettersOptIn:ut,isMobile:Azom.isUsingMobilePdfReqForm,impressionId:Azom.impressionId||"",formId:$.trim((u.attr("data-form-id")||"").toString()),formVersion:f,customFields:h.length===0?"":JSON.stringify(h),pageUrl:window.location.href.toString(),pageTitle:document.title||"",referrer:document.referrer,previewCode:BlogEngine.getParameterByName("PreviewCode"),timeOnPage:Azom.pageLoadedOn?((new Date).getTime()-Azom.pageLoadedOn.getTime()).toString():""},Azom.pdfReqToggleSubmittingIndicator(!0),Azom.pdfReqSubmittedOn=new Date,jQuery.ajax({type:"POST",url:BlogEngine.convertToAbsoluteUrl("/site_services.asmx/SaveNewPdfRequest"),data:JSON.stringify(it),contentType:"application/json; charset=utf-8",dataType:"json",success:Azom.onPdfReqSubmitCompleted,error:Azom.onPdfReqSubmitError}),!1)}},onDocReqDesktopMobileShown:function(){if(Azom.pushAnalyticsEvent("docreq_form_view",{event_label:DocReq.itemType+": "+DocReq.itemId}),Azom.setFocusOnFormWhenShown()){var n=document.getElementById("docReqFirstName");n&&n.focus&&n.focus()}},docReqFormContentSetup:!1,docReqFormSubmitted:!1,removeDocumentFromAdCampaignBrochureList:function(){var t=$(this),n=t.closest("li"),f=n.attr("data-document-id"),i=$("#ad-campaign-brochure-list-container"),r=i.find("ol"),u=r.find("li").not(".is-being-removed").length;return u<=1?(alert("You cannot remove the only remaining brochure."),!1):confirm("Remove this brochure?")?(n.addClass("is-being-removed").fadeOut(400,function(){$(this).remove()}),!1):!1},getDocReqTypeDescription:function(n,t,i){n||(n="BrochureRequest");var r=null;switch(Azom.tempDocReqTypeOverride||n){case"WhitePaperRequest":r=t?"white paper":"White Paper";break;case"HandbookRequest":r=t?"handbook":"Handbook";break;case"eBookRequest":r=t?"eBook":"eBook";break;case"KeyTechnicalData":r=t?"key technical data":"Key Technical Data";break;case"WebinarSignupRequest":r=i?t?"webinar registration":"Webinar Registration":t?"webinar request":"Webinar Request";break;case"IndustryFocusEBookRequest":r=t?"industry-focused eBook":"Industry-Focused eBook";break;case"MarketReportRequest":r=t?"market report":"Market Report";break;case"PosterRequest":r=t?"poster":"Poster";break;case"PreviewRequest":r=t?"preview":"Preview";break;case"BrochureRequest":default:r=t?"brochure":"Brochure"}return r},ensureDocReqIsConfigured:function(n,t){var r,u,o,f,i,e;if(n.reqType||(n.reqType=n.itemType==="webinar"?"WebinarSignupRequest":"BrochureRequest"),n.reqTypeDesc||(n.reqTypeDesc=Azom.getDocReqTypeDescription(n.reqType,!0,n.isFutureWebinar)),DocReq.webinarSeriesIdsToPreSelect=null,window.g_isWebinarSeries&&t&&t.length===1){if(r=[],u=t.closest("[data-webinar-ids]"),u.length>0)for(o=$.trim((u.attr("data-webinar-ids")||"").toString()),f=o.split(/,/gi),i=0;i<f.length;i++)e=$.trim(f[i]),isNaN(e)||r.push(parseInt(e,10));DocReq.webinarSeriesIdsToPreSelect=r}},getDocReqInfoContent:function(n,t,i){var r=null,u;t&&(r=n?"#docReqForm .docReq-form-dialog-container-contents":Azom.mobileDocReqFormContainerOnPageSelector);u=Azom.getDocReqFormCacheKey();BlogEngine.getInfoContent("docReq-form","&item-type="+DocReq.itemType+"&item-id="+DocReq.itemId.toString()+"&docRequestType="+DocReq.reqType,r,u,i)},onDocReqDesktopBeforeShow:function(){Azom.getDocReqInfoContent(!0,!0,null);Azom.onDocReqDesktopMobileBeforeShow()},tempDocReqTypeOverride:null,setupDocReqPage:function(){var t=$("a.docRequest"),n;t.length!==0&&(n={type:"inline",items:{src:"#docReqForm"},disableOn:function(n){var t,i,r;if(Azom.tempDocReqTypeOverride=null,DocReq.reqTypeDesc=null,t=$(n.currentTarget),t&&t.length&&(i=$.trim(t.first().text()||"").toString(),i&&i.toLowerCase().indexOf("Key Technical Data".toLowerCase())!==-1&&(Azom.tempDocReqTypeOverride="KeyTechnicalData")),Azom.ensureDocReqIsConfigured(DocReq,$(n.mfpEl)),!0){if(Azom.displayFormMobileVersion())return Azom.displayMobileDocReqForm(),n.preventDefault(),!1;if(r=Azom.getDocReqFormCacheKey(),!BlogEngine.isInfoContentInCache(r))return Azom.getDocReqInfoContent(!0,!1,function(){$(n.mfpEl).trigger("click")}),n.preventDefault(),!1}return!0},callbacks:{beforeOpen:Azom.onDocReqDesktopBeforeShow,open:Azom.onDocReqDesktopMobileShown,afterClose:Azom.onDocReqDesktopMobileClosed},mainClass:"mfp-3d-unfold",removalDelay:500,midClick:!0},Azom.setFocusOnFormWhenShown()&&(n.focus="#docReq-input-form .azoForm-first-name"),t.magnificPopup(n))},initDocReqPage:function(){Azom.setupDocReqPage()},closeDocReqWindow:function(){return $.magnificPopup.close(),!1},docReqSubmittedOn:null,displayDocReqMessage:function(n){$("#docReq-message-contents").html(n);$("#docReq-message").show();$("#docReq-message-contents-page2").html(n);$("#docReq-message-page2").show()},docReqToggleSubmittingIndicator:function(n){var t=$(".docReq-form-container .azoForm-input-form");t.is(":visible")||(t=$(".docReq-form-container .azoForm-input-form2"));Azom.toggleUiUpdateForAzoFormSubmittal(t,n)},docReqGenericErrorMsg:"An unexpected error occurred while submitting your request.  Please try again soon.",onDocReqSubmitError:function(){Azom.docReqSubmittedOn=null;var n=Azom.docReqGenericErrorMsg;Azom.docReqToggleSubmittingIndicator(!1);Azom.displayDocReqMessage(n)},onDocReqSubmitCompleted:function(n){var u,i,h,f,t,e,o,s,r;Azom.docReqSubmittedOn=null;n&&n.d&&(n=n.d,n.IsSuccessful?(n.ImpressionId&&Azom.initNewImpression(n),u=$(".docReq-form-container .azoForm-input-form"),Azom.saveFormValuesEntered(u),i="",h="",n.IsDOptInReq?(t="",Azom.isUsingMobileDocReqForm&&(t='<p><a href="#" onclick="return Azom.closeMobileDocReqForm(null);">Click Here to return to the previous page you were on.<\/a><\/p>'),f="To complete your download",DocReq.itemType==="webinar"&&(f=DocReq.isFutureWebinar?"To complete your registration":"To complete your request"),i='<div class="form-completed-wrap"><div class="form-completed-header"><p>Almost Done!<\/p><\/div><div class="form-completed-body"><p>'+f+', <u>please click on the link in the email we just sent you<\/u>.<\/p><p>This is the last step, required for us to verify we can reach you, in accordance with our <a href="'+Azom.getTermsPageRelativeUrl()+'" target="_blank" class="terms-link">terms &amp; conditions<\/a>.<\/p>'+t+"<\/div><\/div>"):(t="",Azom.isUsingMobileDocReqForm&&(t='<p><a href="#" onclick="return Azom.closeMobileDocReqForm(null);">Click Here to return to the previous page you were on.<\/a><\/p>'),e='<p>Thank you. The <span class="docReq-reqType-description">'+DocReq.reqTypeDesc+"<\/span> will be sent to your email address within the next couple of minutes.<\/p>",DocReq.itemType==="webinar"&&(e=n.WebinarCompletedMarkup,t=""),i='<div class="form-completed-wrap form-completed-no-more-action-required"><div class="form-completed-body">'+e+t+"<\/div><\/div>"),o=!!n.RedirectToUrl,o||(s=$(".docReq-completed-content-wrapper"),s.html(i),$("#docReq-input-form, #docReq-input-form2").hide(),$("#docReq-on-completed").show(),$(".docReq-outer").toggleClass("azoForm-is-completed",!0),Azom.isUsingMobileDocReqForm&&Azom.scrollToTopOfMobileForm()),Azom.docReqFormSubmitted=!0,DocReq.AnalyticsSubmitTracked||(Azom.pushAnalyticsEvent("docreq_form_submitted",{event_label:DocReq.itemType+": "+DocReq.itemId}),DocReq.AnalyticsSubmitTracked=!0),n.SalesfusionSendToUrl&&Azom.recordFormSubmissionInSalesfusion(n.SalesfusionSendToUrl),o?window.setTimeout(function(){window.location.href=n.RedirectToUrl},10):Azom.clearAzoFormEnteredValues(u)):(r=n.Message,r||(r=Azom.docReqGenericErrorMsg),Azom.displayDocReqMessage(r)));Azom.docReqToggleSubmittingIndicator(!1)},submitDocReq:function(n,t,i){var f,b,u,c,o,s,at,w,vt;if(Azom.ensureDocReqIsConfigured(DocReq,null),Azom.docReqSubmittedOn&&(new Date).getTime()-Azom.docReqSubmittedOn.getTime()>12e3&&(Azom.docReqSubmittedOn=null),!Azom.docReqSubmittedOn){if(t){$("#docReq-input-form").show();$("#docReq-input-form2").hide();return}if(f=$(".docReq-form-container .azoForm-input-form"),b=f.find("[data-azoform-field-name]"),f.find("li.azoForm-error").removeClass("azoForm-error"),u="",DocReq.itemType==="AdCampaign")for(c=$("#ad-campaign-brochure-list-container li"),o=0;o<c.length;o++)s=$(c[o]).attr("data-document-id"),s&&!isNaN(s)&&(u.length>0&&(u+=","),u+=s.toString());f.find("li.azoForm-error").removeClass("azoForm-error");var k="",d="",g="",l="",a="",nt="",tt="",it="",rt="",ut="",v=[],r="",e=!0;b.each(function(){var t=$(this),f=t.attr("data-azoform-field-name"),i=f.toLowerCase(),n=$.trim((t.val()||"").toString()),h=Azom.isElementCheckbox(t),o,s,u;if(h&&(n=t.is(":checked")?"Yes":"No"),o=(t.attr("data-azoform-is-hidden")||"")!=="true",!o)return!0;Azom.validateAzoFormElement(t)||(e=!1);s=t.hasClass("azoForm-input-list");s&&(u=t.data("input-list-checked-values-array"),u&&typeof u.length=="number"&&(n=u.join("; ")));i==="first name"?k=n:i==="last name"?d=n:i==="organization"?g=n:i==="profession"?it=n:i==="email address"?(l=n,t.data("is-invalid-email")&&(r||(r="Valid email address is required for us to send you the "+DocReq.reqTypeDesc+"."))):i==="phone"?rt=n:i==="country"?a=n:i==="postal code"?(nt=n,t.data("is-usa-postal-code-invalid")&&(r||(r="A 5 or 9 digit Postal Code is required."))):i==="industry use"?tt=n:i==="buyer journey stage"?ut=n:v.push({name:f,value:n})});var h=$("#docReq-input-form").attr("data-is-using-cpr-version")==="true",y=$("#docReq-input-form").attr("data-is-azo-webinar")==="true",ft=$("#docReqETechsConsent"),et=$("#docReqNewslettersConsent"),ot=$("#docReqTermsAgree"),st=$("#docReqAzoWebinarTermsAgree"),ht=!h||!ft.is(":visible")?null:ft.is(":checked"),yt=!h||!et.is(":visible")?null:et.is(":checked"),ct=ot.is(":visible")?ot.is(":checked"):null,lt=!y||!st.is(":visible")?null:st.is(":checked"),p=[];return(window.g_isWebinarSeries&&(at=$(".azoForm-webinar-series-selection-container input:checked"),at.each(function(){p.push($(this).val())}),p.length<1&&(e=!1,r="Please select at least one webinar.")),n||(ct===!1&&(e=!1,r||(r="The Terms agreement box above must be checked before this can be submitted.")),y&&(h&&(ht=lt),lt===!1&&(e=!1,r||(r="The Webinar Sponsor agreement box above must be checked before this can be submitted.")))),!e)?(r||(r="Please fill in the required fields."),Azom.displayDocReqMessage(r),!1):n&&!i?(w=function(n,t,i){var r=$("#docReq-input-form").attr("data-is-using-cpr-version")==="true",u=$("#docReq-input-form").attr("data-is-azo-webinar")==="true",f;$("#docReq-input-form2 .azoForm-hide-for-conditional-page2-questions").toggle(n);$("#docReq-input-form2").toggleClass("azoForm-page2-partial",!n);f=!r||n;$("#docReqTermsAgreeContainer").toggle(f);$("#docReqAzoWebinarTermsAgreeContainer").toggle(u);$("#docReqCprAzoWebinarTermsText").toggle(u&&r);$("#docReqNonCprAzoWebinarTermsText").toggle(u&&!r);$("#docReq-newsletters-consent-my-preferences-header").toggle(u&&i);$("#docReqNonCprAgreeLb").toggle(!r&&f);$("#docReqCprAgreeLb").toggle(r&&f);$("#docReqNewslettersConsentLi").toggle(r&&i);$("#docReqExtraCprTerms").toggle(r&&n);$("#docReqETechsConsentLi").toggle(r&&!u&&t);$("#docReq-input-form").hide();$("#docReq-input-form2").show();$("#docReq-message, #docReq-message-page2").hide();Azom.isUsingMobileDocReqForm&&Azom.scrollToTopOfMobileForm()},Azom.docReqSubmittedOn=new Date,Azom.docReqToggleSubmittingIndicator(!0),Azom.checkIfTermsAndConsentsRequired(l,a,!1,!1,y,function(n){var t,i;if(Azom.docReqSubmittedOn=null,Azom.docReqToggleSubmittingIndicator(!1),n=n.d,!n||n.Message){t=n.Message||"Sorry, an unexpected error occurred. Please try clicking Continue again.";Azom.displayDocReqMessage(t);return}if($("#docReq-input-form").attr("data-is-using-cpr-version",n.ApplyCpr?"true":"false"),i=n.DisplayETechsQuestion||n.DisplayNewslettersQuestion,!i){Azom.submitDocReq(!0,!1,!0);return}w(n.DisplayFullPage,n.DisplayETechsQuestion,n.DisplayNewslettersQuestion)},function(n,t,i){Azom.docReqSubmittedOn=null;Azom.docReqToggleSubmittingIndicator(!1);Azom.logInConsole("error checking if terms and consents are required. error: "+(i||"---"));w(!0,!0,!0)}),!1):DocReq.itemType==="AdCampaign"&&!u?(Azom.displayDocReqMessage("Unable to determine which brochures you would like to download. This is unexpected, please try again soon."),!1):($("#docReq-message, #docReq-message-page2").hide(),vt={itemType:DocReq.itemType,itemId:DocReq.itemId,reqType:DocReq.reqType,firstName:k,lastName:d,company:g,email:l,countryId:a,postalCode:nt,profession:it,phone:rt,industryUse:tt,buyerJourneyStage:ut,isUsingCprVersion:h,isTermsAgreed:ct,eTechsOptIn:ht,newslettersOptIn:yt,isMobile:Azom.isUsingMobileRfqForm?!0:!1,pageUrl:window.location.href.toString(),pageTitle:document.title||"",timeOnPage:Azom.pageLoadedOn?((new Date).getTime()-Azom.pageLoadedOn.getTime()).toString():"",impressionId:Azom.impressionId||"",docIds:u,formId:$.trim((f.attr("data-form-id")||"").toString()),customFields:v.length===0?"":JSON.stringify(v),referrer:document.referrer,selectedWebinarSeriesWebinarIds:p.join(",")},Azom.docReqToggleSubmittingIndicator(!0),Azom.docReqSubmittedOn=new Date,jQuery.ajax({type:"POST",url:BlogEngine.convertToAbsoluteUrl("/site_services.asmx/SaveNewDocumentRequest"),data:JSON.stringify(vt),contentType:"application/json; charset=utf-8",dataType:"json",success:Azom.onDocReqSubmitCompleted,error:Azom.onDocReqSubmitError}),!1)}},onOfferCodeReqShown:function(){if(Azom.pushAnalyticsEvent("offercode_form_view",{event_label:OfferCodeReq.itemName}),Azom.setFocusOnFormWhenShown()){var n=document.getElementById("offerCodeReqName");n&&n.focus&&n.focus()}},offerCodeReqFormContentSetup:!1,offerCodeReqFormSubmitted:!1,onOfferCodeReqShowing:function(){var n,t,i,r,u;if(typeof OfferCodeReq=="undefined"||typeof BlogEngine=="undefined"||!OfferCodeReq.itemId)return $.magnificPopup.cancel(),!1;BlogEngine.getInfoContent("offerCodeReq-form","&oid="+OfferCodeReq.itemId.toString(),"#offerCodeReqForm .offerCodeReq-form-dialog-container-contents");n="#offerCodeReqForm";n.find("input, select, textarea").unbind().focus(function(){Azom.onFormControlGotFocus(Azom.offerCodeReqGetFirstParent(this,"tr"))}).blur(function(){Azom.onFormControlLostFocus(Azom.offerCodeReqGetFirstParent(this,"tr"))});n.off("change.agreebox").on("change.agreebox","input.form-agree-box",Azom.syncCommonFormAgreeBoxChange);Azom.syncCommonFormAgreeBoxChange({delegateTarget:n[0]});$("#offerCodeReq-input-form").show();$("#offerCodeReq-on-completed").hide();Azom.offerCodeReqFormSubmitted=!1;Azom.offerCodeReqFormContentSetup||(t=$("#offerCodeReq-top-note-container"),i=$("#offerCodeReq-top-note-content"),i&&i.length>0&&t&&t.length>0&&i.appendTo(t),r=$("#offerCodeReq-right-col-content-container"),u=$("#offerCodeReq-right-col-content"),u&&u.length>0&&r&&r.length>0&&u.appendTo(r),typeof OfferCodeReq.formTitle!="undefined"&&$("#offerCodeReq-header").html(OfferCodeReq.formTitle),typeof OfferCodeReq.itemName!="undefined"&&$("#offerCodeReqForm .offerCodeReq-insert-item-name").html(OfferCodeReq.itemName),Azom.styleAzoFormSelect($(".offerCodeReq-outer div.azoForm-select-wrapper select")),Azom.offerCodeReqFormContentSetup=!0)},offerCodeReqGetFirstParent:function(n,t){return $(n).closest(t)},onOfferCodeReqClosed:function(){Azom.pushAnalyticsEvent("offercode_form_"+(Azom.offerCodeReqFormSubmitted?"closed_with_submission":"closed_without_submission"),{event_label:OfferCodeReq.itemName})},setupOfferCodeReqPage:function(){var n=$("a.request-offer-code-download");n.length===0},initOfferCodeReqPage:function(){Azom.setupOfferCodeReqPage()},closeOfferCodeReqWindow:function(){return $.magnificPopup.close(),!1},offerOfferCodeReqSubmittedOn:null,displayOfferCodeReqMessage:function(n){isMobileWebsite&&Azom.offerCodeReqToggleSubmittingIndicator(!1);$("#offerCodeReq-message-contents").html(n);$("#offerCodeReq-message").show();isMobileWebsite||$.magnificPopup.resize()},offerCodeReqToggleSubmittingIndicator:function(n){var t=$("#offerCodeReq-saving-indicator");n?t.show():t.hide()},offerCodeReqGenericErrorMsg:"An unexpected error occurred while submitting your request.  Please try again soon.",onOfferCodeReqSubmitError:function(){Azom.offerOfferCodeReqSubmittedOn=null;var n=Azom.offerCodeReqGenericErrorMsg;Azom.offerCodeReqToggleSubmittingIndicator(!1);Azom.displayOfferCodeReqMessage(n)},onOfferCodeReqSubmitCompleted:function(n){if(Azom.offerOfferCodeReqSubmittedOn=null,n&&n.d)if(n=n.d,n.IsSuccessful)$("#offerCodeReqName").val(""),$("#offerCodeReqCompany").val(""),$("#offerCodeReqEmail").val(""),$("#offerCodeReqPhone").val(""),$("#offerCodeReqIndustryUse").val(""),$("#offerCodeReqProfession").val(""),$("#offerCodeReqReceiveFutureOffers").prop("checked",!1),$("#offerCodeReq-input-form").hide(),$("#offerCodeReq-on-completed").show(),isMobileWebsite&&(ScrollToTop(),$("#content").html('<div class="btnCancel"><\/div><h2>Thank you<\/h2><p>The Redemption Code will be sent to your email address within the next couple of minutes.<\/p><p><a href="#" class="btnCancel">Click Here to return to the previous page you were on.<\/a><\/p>')),Azom.offerCodeReqFormSubmitted=!0,OfferCodeReq.AnalyticsSubmitTracked||(Azom.pushAnalyticsEvent("offercode_form_submitted",{event_label:OfferCodeReq.itemName}),OfferCodeReq.AnalyticsSubmitTracked=!0);else{var t=n.Message;t||(t=Azom.rfqGenericErrorMsg);Azom.displayOfferCodeReqMessage(t)}Azom.offerCodeReqToggleSubmittingIndicator(!1)},submitOfferCodeReq:function(n){var t,k;if(n=!!n,t="tr",n==!0&&(t="div"),Azom.offerOfferCodeReqSubmittedOn&&(new Date).getTime()-Azom.offerOfferCodeReqSubmittedOn.getTime()>12e3&&(Azom.offerOfferCodeReqSubmittedOn=null),!Azom.offerOfferCodeReqSubmittedOn){var u=$("#offerCodeReqName"),f=$("#offerCodeReqCompany"),r=$("#offerCodeReqEmail"),e=$("#offerCodeReqPhone"),s=$("#offerCodeReqIndustryUse"),h=$("#offerCodeReqCountry"),l=$("#offerCodeReqReceiveFutureOffers"),o=$("#offerCodeReqProfession");if(u.length==0||f.length==0||r.length==0||e.length==0||s.length==0||l.length==0||o.length==0)return Azom.displayOfferCodeReqMessage("Sorry, unable to locate data you have filled in.  Please refresh the page and fill out the form again.  Thank you."),!1;Azom.offerCodeReqGetFirstParent(u,t).removeClass("azoForm-validation-error");Azom.offerCodeReqGetFirstParent(f,t).removeClass("azoForm-validation-error");Azom.offerCodeReqGetFirstParent(r,t).removeClass("azoForm-validation-error");Azom.offerCodeReqGetFirstParent(e,t).removeClass("azoForm-validation-error");Azom.offerCodeReqGetFirstParent(s,t).removeClass("azoForm-validation-error");Azom.offerCodeReqGetFirstParent(h,t).removeClass("azoForm-validation-error");Azom.offerCodeReqGetFirstParent(o,t).removeClass("azoForm-validation-error");var a=$.trim(u.val()),v=$.trim(f.val()),c=$.trim(r.val()),y=$.trim(e.val()),p=$.trim(h.val()),d=$.trim(s.val()),w=l.is(":checked"),b=$.trim(o.val()),i=!1;if(a.length==0&&(Azom.offerCodeReqGetFirstParent(u,t).addClass("azoForm-validation-error"),i=!0),v.length==0&&(Azom.offerCodeReqGetFirstParent(f,t).addClass("azoForm-validation-error"),i=!0),p.length==0&&(Azom.offerCodeReqGetFirstParent(h,t).addClass("azoForm-validation-error"),i=!0),b.length==0&&(Azom.offerCodeReqGetFirstParent(o,t).addClass("azoForm-validation-error"),i=!0),c.length==0)Azom.offerCodeReqGetFirstParent(r,t).addClass("azoForm-validation-error"),i=!0;else if(!Azom.isEmailAddressValid2(c))return Azom.offerCodeReqGetFirstParent(r,t).addClass("azoForm-validation-error"),Azom.displayOfferCodeReqMessage("Valid email address is required for us to send you the Redemption Code."),!1;return(y.length==0&&(Azom.offerCodeReqGetFirstParent(e,t).addClass("azoForm-validation-error"),i=!0),!w)?(Azom.displayOfferCodeReqMessage("The Terms agreement box above must be checked before this can be submitted."),!1):i?(Azom.displayOfferCodeReqMessage("Please fill in the required fields."),!1):($("#offerCodeReq-message").hide(),k={offerSlug:OfferCodeReq.offerSlug,erid:OfferCodeReq.erid,name:a,company:v,email:c,phone:y,countryId:p,industryUse:d,profession:b,receiveFutureOffers:w,isMobile:n?!0:!1,impressionId:Azom.impressionId||""},Azom.offerCodeReqToggleSubmittingIndicator(!0),Azom.offerOfferCodeReqSubmittedOn=new Date,jQuery.ajax({type:"POST",url:n==!0?"/site_services.asmx/SaveNewOfferCodeRequest":BlogEngine.convertToAbsoluteUrl("/site_services.asmx/SaveNewOfferCodeRequest"),data:JSON.stringify(k),contentType:"application/json; charset=utf-8",dataType:"json",success:Azom.onOfferCodeReqSubmitCompleted,error:Azom.onOfferCodeReqSubmitError}),!1)}},onDirectAdLinkClick:function(n){if(!n||isNaN(n))return!0;var t=BlogEngine.convertToAbsoluteUrl("/ads/abmc.aspx?b="+encodeURIComponent(n)+"&mct=1");return navigator.sendBeacon?(navigator.sendBeacon(t,""),!0):($.ajax({type:"GET",url:t,"async":!1,cache:!1}),!0)},addEventToObject:function(n,t,i){var r=n[t];n[t]=typeof n[t]!="function"?i:function(){r();i()}},cancelEnterKey:function(){document.getElementsByTagName("body")[0].onkeypress=function(n){var t=n||window.event,i=t.keyCode?t.keyCode:t.which?t.which:t.charCode;i==13&&(t.stopPropagation?(t.stopPropagation(),t.preventDefault()):t.cancelBubble&&(t.cancelBubble=!0,t.returnValue=!1))}},loadScript:function(n,t){var i=document.createElement("script");i.type="text/javascript";t&&(i.readyState?i.onreadystatechange=function(){(i.readyState==="loaded"||i.readyState==="complete")&&(i.onreadystatechange=null,t())}:i.onload=function(){t()});i.src=n;document.getElementsByTagName("head")[0].appendChild(i)},wireUpVideoThumbnailLazyLoading:function(){$(".video-lazy-load").not(".is-video-lazy-load-init").on("click.videoLazyLoad",function(n){var u,f;if($(n.target).hasClass("video-lazy-load-title"))return!1;var t=$(this),e=t.hasClass("azo-vimeo-player"),o=t.hasClass("azo-brightcove-player"),s=t.hasClass("azo-yt-player"),h=t.data("video-url"),i=h,r="";s?(r="azo-yt-player autoplayed-on-load",i+=(i.indexOf("?")===-1?"?":"&")+"autoplay=1"):e?(r="azo-vimeo-player",i+=(i.indexOf("?")===-1?"?":"&")+"autoplay=1"):o&&(r="azo-brightcove-player",i+=(i.indexOf("?")===-1?"?":"&")+"autoplay=1");u={"class":r,src:i,frameborder:"0",allow:"autoplay; fullscreen",onload:"Azom.onLazyLoadVideoIframeLoaded(this)"};f=$(document.createElement("iframe")).attr(u);t.find(".video-lazy-load-title, button").remove();t.toggleClass("fluid-width-video-wrapper",!0).append(f);t.off("click.videoLazyLoad")}).toggleClass("is-video-lazy-load-init",!0)},onLazyLoadVideoIframeLoaded:function(n){var t=$(n),i=t.closest(".video-lazy-load");i.length===1&&i.css({background:"none"}).toggleClass("lazy-load-video-loaded",!0);t.hasClass("azo-yt-player")&&Azom.loadYouTubeIframeApiAndWireUpYouTubeVideos()},createCookie:function(n,t,i){var u=window.location.hostname,f=u.split("."),r,e;f.length===3&&(u=f[1]+"."+f[2]);i?(r=new Date,r.setTime(r.getTime()+i*864e5),e="; expires="+r.toGMTString()):e="";document.cookie=n+"="+t+e+"; domain="+u+"; path=/"},readCookie:function(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},eraseCookie:function(n){Azom.createCookie(n,"",-1)},processLinks:function(){Azom.addEventToObject(window,"onload",function(){for(var n,f,l,s,e,a,v,t=[],h=window.location.hostname.toLowerCase().replace("www.",""),y=("http://"+h+"/ads/").toLowerCase(),p=("http://"+h+"/").toLowerCase(),c=document.getElementsByTagName("a"),o=0;o<c.length;o++)if(n=c[o],typeof n.href=="string"){var i=n.href.toLowerCase().replace("http://www.","http://"),r="",u="";if(i.indexOf(y)===0){if(f=i.match(/[\?&]b=(\d+)?/i),f&&f.length>1&&(u=f[1]),l=/[\?&]cb=1/i.test(i),!l&&u){for(s=!1,e=0;e<t.length;e++)if(t[e]==u){s=!0;break}s||t.push(u)}r=n.href.toLowerCase()}else i.indexOf(p)===-1&&(r=n.href.toLowerCase());r&&Azom.addEventToObject(n,"onclick",function(n){return function(){typeof urchinTracker!="undefined"&&urchinTracker(n)}}(r))}t.length>0&&(a=t.join("|"),v=new Image,v.src="/ads/ads_served.ashx?ids="+a+"&r="+Math.random())})},updateInputValidityIndicators:function(n){var r,u,f,t,i;if(typeof n!="undefined"&&n!=null)for(u=[],r=0;r<n.length;r++)f=n[r],t=f.controltovalidate,t&&$.inArray(t,u)==-1&&(i=$("#"+t),i&&i.length>0&&(f.isvalid?i.removeClass("error"):(u.push(t),i.addClass("error"))));return!0},runValidatorByControlIdToValidate:function(n){var r,u,t,i;if(typeof Page_Validators=="undefined"||Page_Validators.length<1)return!1;for(r=[],u=!0,t=0;t<Page_Validators.length;t++)Page_Validators[t].controltovalidate===n&&(i=Page_Validators[t],ValidatorValidate(i,i.validationGroup,null),r.push(i),i.isvalid||(u=!1));return r.length>0&&Azom.updateInputValidityIndicators(r),u},tapIntoValidation:function(){var n,t;typeof ValidationSummaryOnSubmit!="undefined"&&(n=ValidationSummaryOnSubmit,window.ValidationSummaryOnSubmit=function(){typeof Page_ValidationSummaries!="undefined"&&Page_ValidationSummaries.length==1&&(Page_ValidationSummaries[0].innerHTML="");var t=window.scrollTo;window.scrollTo=function(){};n();window.scrollTo=t;typeof updateCustomValidationSummary=="function"&&updateCustomValidationSummary()},t=ValidatorUpdateIsValid,window.ValidatorUpdateIsValid=function(){t();Azom.updateInputValidityIndicators(Page_Validators)})},validateEmailAddress:function(n,t){var i=t.Value;i&&Azom.isEmailAddressValid2(i)||(t.IsValid=!1)},generateRandomString:function(n,t){for(var f=Math.floor(Math.random()*(t-n+1)+n),i="",r="abcdefghijklmnopqrstuvwxyz0123456789",e=r.length,u=0;u<f;u++)i+=r.charAt(Math.floor(Math.random()*e));return i},nmRenderedCampaignIds:[],nmRenderedCampaignCreatives:[],nmPendingRecordRenderedCampaignIds:[],impressionId:null,campaignImpressionId:null,campaignImpressionEnded:!1,pageLoadedOn:new Date,clientEventEndpoint:null,recordClientEvent:function(n,t,i,r,u){var e="type="+encodeURIComponent(t),f,o,s;if(r){if(typeof contentViewData=="undefined")return Azom.logInConsole("contentViewData is undefined."),!1;e+="&content-type="+encodeURIComponent(contentViewData.type)+"&content-id="+encodeURIComponent(contentViewData.id)}if(i&&i.length)for(f=0;f<i.length;f++)e+="&"+encodeURIComponent(i[f].name)+"="+encodeURIComponent(i[f].value);if(Azom.clientEventEndpoint||(Azom.clientEventEndpoint=Azom.generateRandomString(6,12)),o="/"+Azom.clientEventEndpoint,!n&&navigator.sendBeacon){navigator.sendBeacon(o,new Blob([e],{type:"application/x-www-form-urlencoded"}));return}s={type:"POST","async":n,url:o,data:e,contentType:"application/x-www-form-urlencoded",dataType:"json",cache:!1,success:function(n){if(!n){Azom.logInConsole("null data in recordClientEvent.");return}if(n.Message)Azom.logInConsole("unsuccessful ajax response in recordClientEvent.  message: "+n.Message);else if(n.IsSuccess){if(n.ImpressionId)Azom.initNewImpression(n);else if(n.CampaignImpressionId)Azom.initNewCampaignImpression(n);else if(n.NewGvpiCreated)Azom.checkForGlobalImpression();else if(n.IsImpressionDataUpdate)Azom.onGlobalImpressionCheckFinalized(!0);else if(n.IsHcpStatusCheck)Azom.onHcpStatusRetrieved(n)}else Azom.logInConsole("unsuccessful ajax response in recordClientEvent.  no message")},error:function(n,t,i){Azom.logInConsole("recordClientEvent ajax error.  textStatus: "+t+", errorThrown: "+i)}};u&&(s.headers=u);$.ajax(s)},recordViewOnPageTimeout:null,queueRecordViewOnPage:function(){Azom.recordViewOnPageTimeout||(Azom.recordViewOnPageTimeout=window.setTimeout(Azom.recordViewOnPage,6e3))},recordViewOnPage:function(){if(Azom.recordViewOnPageTimeout=null,!Azom.impressionId&&!Azom.campaignImpressionId){if(Azom.campaignImpressionEnded){Azom.campaignImpressionEnded=!1;Azom.logInConsole("In Azom.recordViewOnPage, don't have any impressions and campaignImpressionEnded is true - will not re-queue.");return}Azom.logInConsole("In Azom.recordViewOnPage, do not have an impressionId or campaignImpressionId.  Re-queuing.");Azom.queueRecordViewOnPage();return}var n=[];Azom.impressionId&&n.push({name:"impression-id",value:Azom.impressionId});Azom.campaignImpressionId&&n.push({name:"campaign-impression-id",value:Azom.campaignImpressionId});Azom.recordClientEvent(!0,"onpage",n,!1,null);Azom.queueRecordViewOnPage()},recordClientView:function(){var n=[],t=document.referrer;t&&n.push({name:"referrer",value:t});Azom.recordClientEvent(!0,"impression",n,!0,null)},initImpressionPinging:function(){Azom.queueRecordViewOnPage();window.addEventListener("pagehide",function(){if(Azom.impressionId||Azom.campaignImpressionId){var n=[];Azom.impressionId&&n.push({name:"impression-id",value:Azom.impressionId});Azom.campaignImpressionId&&n.push({name:"campaign-impression-id",value:Azom.campaignImpressionId});Azom.recordClientEvent(!1,"pageexit",n,!1,null)}},!1)},initNewImpression:function(n){n.ImpressionId&&(Azom.impressionId?Azom.logInConsole("received an ImpressionId, however already have an impression. data.ImpressionId: "+n.ImpressionId+", Azom.impressionId: "+Azom.impressionId):(typeof contentViewData!="undefined"&&contentViewData.type||(window.contentViewData={type:"generic",id:0}),Azom.impressionId=n.ImpressionId,Azom.initImpressionPinging(),Azom.checkForGlobalImpression(),Azom.nmPendingRecordRenderedCampaignIds.length&&Azom.recordNmAdCampaignImpression(null)))},initNewCampaignImpression:function(n){n.CampaignImpressionId&&(Azom.campaignImpressionEnded=!1,Azom.campaignImpressionId=n.CampaignImpressionId,Azom.initImpressionPinging(),Azom.checkForGlobalImpression(),AZoCampaignUtils.onCampaignImpressionReceived())},isLocalStorageAvailable:function(){var n="localstoragetest";try{return localStorage.setItem(n,n),localStorage.removeItem(n),!0}catch(t){return!1}},deserializeImpression:function(n){var i,t,r,u,f,e;if(n&&typeof n=="string"&&n.length)return i=null,t=n.split(/\|/),t&&t.length&&t.length===4&&t[3].length===32&&(r=0,u=$.trim(t[0]),isNaN(u)||(r=parseInt(u,10)),f=0,e=$.trim(t[2]),isNaN(e)||(f=parseInt(e,10)),i={ser:n,ver:r,inw:$.trim(t[1])==="1",wid:f,gvpid:$.trim(t[3])}),i},getGlobalImpression:function(){var n=Azom.readCookie("azotgv");return n?Azom.deserializeImpression(n):null},globalImpressionMessageListener:function(n){var u,i,r,t;if(n&&n.origin){u=n.origin.toString().toLowerCase().replace("https:","http:");switch(u){case"http://cdn.azointel.com":case"http://www.azonetwork-local.com":break;default:return}if(n.data){if(i=Azom.deserializeImpression(n.data),!i){Azom.logInConsole("unable to deserialize impression sent in message.");return}if(r=Azom.getGlobalImpression(),!r||!r.ser){Azom.logInConsole("in globalImpressionMessageListener, local global impression not available, this is unexpected, will not check for global impression.");return}if(window.setTimeout(function(){Azom.toggleGlobalImpressionMessageListener(!1);$("#azo-gi-frame").remove()},50),r.ser===i.ser){Azom.onGlobalImpressionCheckFinalized(!1);return}t=[];Azom.impressionId&&t.push({name:"impression-id",value:Azom.impressionId});Azom.campaignImpressionId&&t.push({name:"campaign-impression-id",value:Azom.campaignImpressionId});t.push({name:"ngvpi",value:i.gvpid});t.push({name:"ingvnwv",value:i.inw?"1":"0"});t.push({name:"wid",value:i.wid.toString()});Azom.recordClientEvent(!0,"updateimpressiondata",t,!1,null)}}},onGlobalImpressionCheckFinalized:function(n){Azom.askHcpQuestionIfApplicable(n)},initGlobalImpressionMessageListener:!1,toggleGlobalImpressionMessageListener:function(n){return n&&Azom.initGlobalImpressionMessageListener?!1:!n&&!Azom.initGlobalImpressionMessageListener?!1:n?(window.addEventListener?window.addEventListener("message",Azom.globalImpressionMessageListener,!1):window.attachEvent&&window.attachEvent("onmessage",Azom.globalImpressionMessageListener),Azom.initGlobalImpressionMessageListener=!0,!0):(window.removeEventListener?window.removeEventListener("message",Azom.globalImpressionMessageListener,!1):window.detachEvent&&window.detachEvent("onmessage",Azom.globalImpressionMessageListener),Azom.initGlobalImpressionMessageListener=!1,!0)},checkedForGlobalImpression:!1,checkForGlobalImpression:function(){var r=BlogEngine.getVisitorCookieAndPrivacyPreferences(),n,t,o;if(r.performance){if(Azom.checkedForGlobalImpression){Azom.logInConsole("already checked for a global impression, exiting.");return}if(Azom.checkedForGlobalImpression=!0,!window.addEventListener&&!window.attachEvent){Azom.logInConsole("neither addEventListener or attachEvent is available.");return}if(n=Azom.getGlobalImpression(),!n||!n.ser){Azom.logInConsole("local global impression not available, this is unexpected, will not check for global impression.");return}if((t="azo-gi-frame",!($("#"+t).length>0))&&window.postMessage){Azom.toggleGlobalImpressionMessageListener(!0);var u=window.location.protocol+"//"+window.location.host,f=window.location.hostname.toLowerCase(),e=f.indexOf("-local")!==-1?"cdn.azointel.com":"cdn.azointel.com",i="https://"+e+"/js/globalimps/index.js?azotgv="+encodeURIComponent(n.ser)+"&origin="+encodeURIComponent(u)+"&r="+(new Date).getTime().toString();!1&&(i+="&unmin=1");o=$(document.createElement("iframe")).attr("id",t).css("position","absolute").css("visibility","hidden").css("left","-9000px").css("width","10px").css("height","10px").css("overflow","hidden").attr("src",i).appendTo($("body").first())}}},recordNewsletterReferrer:function(){if(typeof newsletterReferrerData=="undefined"){Azom.logInConsole("newsletterReferrerData is missing.");return}var n=newsletterReferrerData.isDirect?"newsletter_direct_referee":"newsletter_indirect_referee";Azom.pushAnalyticsEvent(n+"_impression",{event_label:newsletterReferrerData.newsletterName})},videoItems:[],getVideoItem:function(n){for(var t=0;t<Azom.videoItems.length;t++)if(Azom.videoItems[t].id===n)return Azom.videoItems[t];return Azom.logInConsole("could not locate video item by id: "+n),null},getVideoItemByVideoId:function(n){for(var t=0;t<Azom.videoItems.length;t++)if(Azom.videoItems[t].videoId===n)return Azom.videoItems[t];return Azom.logInConsole("could not locate video item by videoId: "+n),null},isYouTubeIframeApiLoaded:function(){return window.YT?!0:!1},injectYouTubeIframeApi:function(){if(!Azom.isYouTubeIframeApiLoaded()){var n=document.createElement("script");n.src="//www.youtube.com/iframe_api";$("head").first().append(n)}},loadYouTubeIframeApiAndWireUpYouTubeVideos:function(){Azom.isYouTubeIframeApiLoaded()?Azom.wireUpYouTubeVideos():Azom.injectYouTubeIframeApi()},getYouTubeVideoIdFromUrl:function(n){if(!n)return"";var t=n.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);return t&&t[2].length===11?t[2]:""},addCommonVideoParameters:function(n,t){!n.videoDuration&&n.ytPlayer&&(n.videoDuration=Math.floor(n.ytPlayer.getDuration()));n.videoId&&t.push({name:"video-id",value:n.videoId});n.videoDuration&&t.push({name:"video-duration",value:Math.floor(n.videoDuration).toString()});var i=!!n.campaignImpressionId;i?t.push({name:"campaign-impression-id",value:n.campaignImpressionId}):Azom.impressionId&&t.push({name:"impression-id",value:Azom.impressionId})},recordVideoView:function(n){var i,t,r;!n.recordedThruCompletion&&n.videoTotalDurationWatched&&(i=!!n.campaignImpressionId,t=[],Azom.addCommonVideoParameters(n,t),t.push({name:"view-time",value:Math.floor(n.videoTotalDurationWatched).toString()}),Azom.logInConsole("recording video view data for "+n.id+". view-time: "+n.videoTotalDurationWatched+", video-duration: "+n.videoDuration),r=!i,Azom.recordClientEvent(!1,"videoview",t,r,null),n.videoTotalDurationWatched>=n.videoDuration&&(n.recordedThruCompletion=!0))},recordVideoStart:function(n){var i,t,r;if(!n.isVideoStartRecorded){if(!n.videoViewStartTime){Azom.logInConsole("plyrData.videoViewStartTime is null in Azom.recordVideoStart");return}i=!!n.campaignImpressionId;t=[];Azom.addCommonVideoParameters(n,t);Azom.logInConsole("recording video start data for "+n.id+". video-duration: "+n.videoDuration);r=!i;Azom.recordClientEvent(!0,"videostart",t,r,null);n.isVideoStartRecorded=!0}},updateVideoTotalDurationWatched:function(n,t){var i=Azom.getVideoItem(n.getIframe().id);if(!i){Azom.logInConsole("In Azom.updateVideoTotalDurationWatched(), video item not found. plyr.getIframe().id: "+n.getIframe().id);return}i.videoDuration||(i.videoDuration=Math.floor(n.getDuration()));i.videoViewStartTime&&(i.videoTotalDurationWatched+=Math.ceil((new Date-i.videoViewStartTime)/1e3),i.videoTotalDurationWatched>i.videoDuration&&(Azom.logInConsole("plyrData.videoTotalDurationWatched > plyrData.videoDuration.  This is possible with replays, rewinds, etc. plyrData.videoTotalDurationWatched: "+i.videoTotalDurationWatched+", plyrData.videoDuration: "+i.videoDuration),i.videoTotalDurationWatched=i.videoDuration),Azom.logInConsole("plyrData.videoTotalDurationWatched: "+i.videoTotalDurationWatched));i.videoViewStartTime=null;t&&i.videoTotalDurationWatched+2>=i.videoDuration&&Azom.logInConsole("end of video reached");Azom.recordVideoView(i)},onYTPlayerReady:function(n){var t,u,i,r;if(n.target&&n.target.getIframe&&(t=n.target.getIframe(),t&&(u=$(t),u.hasClass("autoplayed-on-load")&&(i=Azom.getVideoItem(t.id),i&&(r=i.ytPlayer.getPlayerState(),console.log("playerState: "+r),r!==5)))))Azom.onYouTubeVideoPlaying(i)},onYouTubeVideoPlaying:function(n){n.videoViewStartTime=new Date;Azom.recordVideoStart(n)},onYtPlayerStateChange:function(n){var r,t,i;if(Azom.logInConsole("onYtPlayerStateChange, state: "+n.data),r=n.target.getIframe(),t=Azom.getVideoItem(r.id),!t){Azom.logInConsole("In Azom.onYtPlayerStateChange(), video item not found. plyr.getIframe().id: "+i.getIframe().id);return}i=t.ytPlayer;switch(n.data){case 0:case 1:case 2:t.videoDuration||(t.videoDuration=Math.floor(i.getDuration()))}switch(n.data){case 0:case 2:Azom.updateVideoTotalDurationWatched(i,n.data==0,!1);break;case 1:Azom.onYouTubeVideoPlaying(t)}},resetVideoViewStats:function(n){n.videoViewStartTime=null;n.videoTotalDurationWatched=0;n.recordedThruCompletion=!1;n.isVideoStartRecorded=!1},updateVideoWatchedTimesForAnyRunningVideos:function(n){var t,i;if(Azom.videoItems&&Azom.videoItems.length)for(t=0;t<Azom.videoItems.length;t++)i=Azom.videoItems[t],i.videoViewStartTime&&(Azom.logInConsole("in "+n+", updating end time on player "+i.id),Azom.updateVideoTotalDurationWatched(i.ytPlayer,!1,!0))},wireUpYouTubeVideos:function(){var i=$("iframe.azo-yt-player").not(".is-azo-video-init"),n,t;i.length<1||(n=!1,i.each(function(){var i=$(this),t=this.id,u,f,r,e;t||(t="ytp-"+Math.random().toString().replace(/\D+/gi,""),i.attr("id",t));u=i.attr("src")||"";f=Azom.getYouTubeVideoIdFromUrl(u);f?(r={id:t,videoId:f,videoDuration:0,ytPlayer:new YT.Player(t,{events:{onStateChange:Azom.onYtPlayerStateChange,onReady:Azom.onYTPlayerReady}})},e=i.attr("data-campaign-impression-id"),e&&(r.campaignImpressionId=e),Azom.resetVideoViewStats(r),Azom.videoItems.push(r),i.addClass("is-azo-video-init"),n=!0):Azom.logInConsole("could not extract the videoId from the YouTube iframe, src: "+u)}),n&&(t=$(window),t.data("video-beforeunload-init")||(window.addEventListener("pagehide",function(){Azom.updateVideoWatchedTimesForAnyRunningVideos("beforeunload")},!1),!t.data("video-beforeunload-init",!0))))},adjustTablesToFit:function(){function i(n,t,i,r){var f=n.find("th,td"),u=parseInt(f.css("font-size"));if(r||n.wrap("<div style='overflow:overlay;padding-bottom:17px'><\/div>"),n.width()>t)for(n.addClass("shrunk");n.width()>t&&(r||u>i)&&u>1;)f.css("font-size",--u+"px");u<i&&n.wrap("<div class='shrunk-popup' style='position:relative;cursor:pointer;padding-bottom:30px;margin-bottom:10px'><\/div>").after("<div class='shrunk-zoom'>Click Table to Zoom<\/div>")}var n=$(".content-item-body").width(),t=13;$(".content-item-body table").each(function(){var r=$(this),u=$(window).width()>=n+100;i(r,n,t,u)});$("div.shrunk-popup").on("click",function(){var n=$(this).find("table").clone().removeClass("shrunk");n.find("th,td").css({"font-size":"",padding:"0 6px"});$("#table-overlay-container").html(n.outerHTML());$.magnificPopup.open({type:"inline",items:{src:"#table-overlay-container"},mainClass:"mfp-3d-unfold",removalDelay:500,midClick:!0})})},areNewsletterSubscriptionsBeingUpdated:!1,toggleUpdatingNewsletterSubscriptionsIndicator:function(n,t,i){var u,r,e,f;if(typeof toggleUpdatingNewslettersSubscriptionsIndicator!="undefined"&&toggleUpdatingNewslettersSubscriptionsIndicator(n,t),i){toggleUpdatingSubscriptionsIndicatorOnNewslettersPage(n,t);return}u=$(".subscribe-to-newsletter-cta-wrap");r=u.find("a");n?(e=r.outerWidth(),r.html("Processing...")):(f=u.hasClass("is-subscribed-item"),r.css("width",""),r.html(f?"Unsubscribe from this Newsletter":"Subscribe to this Newsletter"),Azom.updateNewsletterSubscribeLinkLabel(t,f))},onNewsletterPreviewIframeContentLoadedMessageListener:function(n){if(n.data&&n.data==="newsletter preview loaded"){$("#newsletter-preview-dialog .newsletter-preview-dialog-loading").remove();Azom.toggleNewsletterPreviewLoadingMessageListener(!1);return}},onNewsletterSubscriptionUpdateComplete:function(n){var i,t;if(Azom.areNewsletterSubscriptionsBeingUpdated=!1,i=$(".subscribe-to-newsletter-cta-wrap"),i.toggleClass("is-subscribed-item",n.IsSubscribed),Azom.toggleUpdatingNewsletterSubscriptionsIndicator(!1,n.NewsletterId,!1),n.IsUnauthenticated&&(Azom.logInConsole("unexpected, the person was logged in but an unauthenticated response came back. will prompt for login."),AZoProfileUtils.logoffAZoProfile(),t=$("#newsletter-preview-dialog .subscribe-to-newsletter-cta-wrap a"),t.length===1)){t.trigger("click");return}if(n.Message){alert(n.Message);return}Azom.updateSubscribedToNewsletterIds(n.NewsletterId,n.IsSubscribed);typeof onNewsletterSubscriptionsUpdateComplete!="undefined"&&onNewsletterSubscriptionsUpdateComplete({NewsletterId:n.NewsletterId,IsSubscribed:n.IsSubscribed})},updateNewsletterSubscriptionsOnServer:function(n,t,i,r){var f,u;return Azom.areNewsletterSubscriptionsBeingUpdated?!1:(f=r?getNewsletterSubscriptionNirid():"",!f&&!AZoProfileUtils.isLoggedIntoAZoProfile())?(AZoProfileUtils.showAZoProfileLoginFullOverlay(null,null),!1):(Azom.toggleUpdatingNewsletterSubscriptionsIndicator(!0,n,r),Azom.areNewsletterSubscriptionsBeingUpdated=!0,u="action=update-newsletter-subscriptions&pagetype="+encodeURIComponent((typeof pageVars=="undefined"?"":pageVars.subscriptionPageType)||"sitepage")+"&newsletterId="+n.toString()+"&isSubscribed="+(t?"true":"false")+"&isFromSidebarWidget="+(r?"false":"true")+"&siteSection="+(window.g_siteSection||""),u=Azom.appendNewsletterServerCallParameters(u),$.ajax({type:"POST",url:"/manage-subscriptions.axd",data:u,contentType:"application/x-www-form-urlencoded",dataType:"json",success:r?onNewsletterSubscriptionUpdateCompleteOnNewslettersPage:Azom.onNewsletterSubscriptionUpdateComplete,error:function(){Azom.areNewsletterSubscriptionsBeingUpdated=!1;Azom.toggleUpdatingNewsletterSubscriptionsIndicator(!1,0,r);alert("An unexpected error occurred while updating your newsletter subscriptions. Please try again soon.")}}),!1)},checkOnNewsletterSubscribeOptionAfterAZoProfileLogin:function(){var n,t;if(Azom.lastClickedNewsletterPreviewData){if(n=$("#"+Azom.lastClickedNewsletterPreviewData.linkId),n.length!==1){Azom.logInConsole("could not find element with ID of "+Azom.lastClickedNewsletterPreviewData.linkId);return}Azom.autoSubscribePersonAfterAZoProfileLoginNewsletterId=Azom.lastClickedNewsletterPreviewData.newsletterId;Azom.subscribedNewsletterIds=null;t=$("#newsletter-preview-dialog");t.is(":visible")?Azom.getSubscribedNewsletters(!1):n.trigger("click")}},onNewsletterSubscribeToggleButtonClicked:function(n){var t=$(n.currentTarget),r=t.closest(".subscribe-to-newsletter-cta-wrap"),i,u,f;return r.hasClass("is-pending-subscription-status")?(Azom.logInConsole("still querying current subscriptions... cancelling newsletter signup CTA click."),!1):(i=t.data("newsletter-id"),!i)?(alert("Sorry, unable to process your request now.  Please try again soon."),!1):(u=r.hasClass("is-subscribed-item"),f=AZoProfileUtils.isLoggedIntoAZoProfile(),AZoProfileUtils.pendingSocialAction=null,f||(AZoProfileUtils.pendingSocialAction={action:"newslettersubscriptionchange",callbackFn:Azom.checkOnNewsletterSubscribeOptionAfterAZoProfileLogin,removeCloseDelayOnCurrentMagnificPopupInstance:!0}),Azom.updateNewsletterSubscriptionsOnServer(i,!u,t,!1),!1)},isNewsletterPreviewLoadingMessageListenerAttached:!1,toggleNewsletterPreviewLoadingMessageListener:function(n){return n&&Azom.isNewsletterPreviewLoadingMessageListenerAttached?!1:!n&&!Azom.isNewsletterPreviewLoadingMessageListenerAttached?!1:n?(window.addEventListener?window.addEventListener("message",Azom.onNewsletterPreviewIframeContentLoadedMessageListener,!1):window.attachEvent&&window.attachEvent("onmessage",Azom.onNewsletterPreviewIframeContentLoadedMessageListener),Azom.isNewsletterPreviewLoadingMessageListenerAttached=!0,!0):(window.removeEventListener?window.removeEventListener("message",Azom.onNewsletterPreviewIframeContentLoadedMessageListener,!1):window.detachEvent&&window.detachEvent("onmessage",Azom.onNewsletterPreviewIframeContentLoadedMessageListener),Azom.isNewsletterPreviewLoadingMessageListenerAttached=!1,!0)},lastClickedNewsletterPreviewData:null,autoSubscribePersonAfterAZoProfileLoginNewsletterId:0,onNewsletterPreviewShowing:function(){var n=$("#newsletter-preview-dialog"),o,t,r,i,u,c;n.length<1&&(n=$(document.createElement("div")).attr("id","newsletter-preview-dialog").addClass("mfp-with-anim").appendTo($("body")));var f=$(this.st.el),s=f.closest(".newsletter-subscribe-item"),e=$.trim((s.attr("data-newsletter-id")||"").toString()),h=!e||isNaN(e)?0:parseInt(e,10);Azom.lastClickedNewsletterPreviewData={linkId:f.attr("id"),newsletterId:h};o=$.trim((s.attr("data-include-subscribe-button")||"").toString()).toLowerCase()==="true";o?(t=n.find(".subscribe-to-newsletter-cta-wrap"),r=t.find("a"),t.length<1&&(t=$(document.createElement("div")).addClass("subscribe-to-newsletter-cta-wrap"),r=$(document.createElement("a")).html("Subscribe to this Newsletter").attr("href","#").on("click",Azom.onNewsletterSubscribeToggleButtonClicked),t.append(r),n.prepend(t)),t.toggleClass("is-pending-subscription-status",!0),r.data("newsletter-id",h)):n.find(".subscribe-to-newsletter-cta-wrap").remove();n.toggleClass("newsletter-preview-dialog-with-subscribe-button",o);i=n.children("iframe");i.length<1&&(i=$(document.createElement("iframe")).attr("frameBorder","0").appendTo(n));u=i.children(".newsletter-preview-dialog-loading");u.length<1&&(u=$(document.createElement("div")).addClass("newsletter-preview-dialog-loading").html("Loading Preview..."),u.insertBefore(i));Azom.toggleNewsletterPreviewLoadingMessageListener(!0);c=f.attr("href");i.attr("src",c);AZoProfileUtils.isLoggedIntoAZoProfile()||AZoProfileUtils.checkAZoProfileLoginStatus()},syncNewsletterPreviewDialogSignupCtaButtonState:function(){var u=$("#newsletter-preview-dialog"),i,t,r,f,n;if(!u.is(":visible")){Azom.logInConsole("newsletter preview dialog not showing, will not sync button state.");return}if(n=$("#newsletter-preview-dialog .subscribe-to-newsletter-cta-wrap a"),i=n.closest(".subscribe-to-newsletter-cta-wrap"),n.length!==1||i.length!==1){Azom.logInConsole("unable to find the newsletter subscribe CTA or wrap.");return}if(t=n.data("newsletter-id"),!t){Azom.logInConsole("could not find the newsletter ID on the CTA button.");return}r=!1;Azom.subscribedNewsletterIds&&Azom.subscribedNewsletterIds&&(r=$.inArray(t,Azom.subscribedNewsletterIds)!==-1);i.removeClass("is-pending-subscription-status");i.toggleClass("is-subscribed-item",r);Azom.toggleUpdatingNewsletterSubscriptionsIndicator(!1,t,!1);Azom.autoSubscribePersonAfterAZoProfileLoginNewsletterId&&(f=Azom.autoSubscribePersonAfterAZoProfileLoginNewsletterId,Azom.autoSubscribePersonAfterAZoProfileLoginNewsletterId=0,f!==t?Azom.logInConsole("the current newsletter does not match the newsletter Id to subscribe the person to.  will not process auto subscribe."):r?Azom.logInConsole("already subscribed to the newsletter.  will not update."):AZoProfileUtils.isLoggedIntoAZoProfile()&&(n=u.find(".subscribe-to-newsletter-cta-wrap a"),n.length===1?n.trigger("click"):Azom.logInConsole("unable to find the newsletter subscribe CTA.")))},subscribedNewsletterIds:null,updateSubscribedToNewsletterIds:function(n,t){var r,i;if(Azom.subscribedNewsletterIds||(Azom.logInConsole("unexpectedly, Azom.subscribedNewsletterIds is null."),Azom.subscribedNewsletterIds=[]),r=!1,Azom.subscribedNewsletterIds.length)for(i=Azom.subscribedNewsletterIds.length-1;i>=0;i--)if(Azom.subscribedNewsletterIds[i]===n){t?r=!0:Azom.subscribedNewsletterIds.splice(i,1);break}t&&(r?Azom.logInConsole("unexpectedly, newsletter is already in the list of subscribed newsletters."):Azom.subscribedNewsletterIds.push(n))},onSubscribedNewslettersRetrieved:function(n){if(n.Message){typeof Azom!="undefined"&&Azom.logInConsole&&Azom.logInConsole(n.Message);return}Azom.subscribedNewsletterIds=[];n.SubscribedNewsletterIds&&(Azom.subscribedNewsletterIds=n.SubscribedNewsletterIds);Azom.syncNewsletterPreviewDialogSignupCtaButtonState()},appendNewsletterServerCallParameters:function(n){var t=function(n,t,i){if(typeof t!="function")return n;var r=t();return r?n+((n.length===0?"":"&")+i+"="+encodeURIComponent(r)):n};return n=t(n,window.getNewsletterResubscribeRequestNrrid,"nrrid"),n=t(n,window.getNewsletterIssueRecipientNirid,"nirid"),n=t(n,window.getOutboundEmailErid,"erid"),n=t(n,window.getContentEmailShareCesid,"cesid"),n=t(n,window.getAZoIntelAlertAnrpid,"anrpid"),n=t(n,window.getDocumentRequestDocReqId,"docreqid"),n=t(n,window.getPdfRequestPdfReqId,"pdfreqid"),t(n,window.getRfqid,"rfqid")},getSubscribedNewsletters:function(n){var i=n?getNewsletterSubscriptionNirid():"",t;if(i||AZoProfileUtils.isLoggedIntoAZoProfile())return t="action=get-newsletter-subscriptions&pagetype="+encodeURIComponent((typeof pageVars=="undefined"?"":pageVars.subscriptionPageType)||"sitepage"),t=Azom.appendNewsletterServerCallParameters(t),$.ajax({type:"POST",url:"/manage-subscriptions.axd",data:t,contentType:"application/x-www-form-urlencoded",dataType:"json",success:n?onSubscribedNewslettersRetrievedOnNewslettersPage:Azom.onSubscribedNewslettersRetrieved,error:function(n,t,i){typeof Azom!="undefined"&&Azom.logInConsole&&(Azom.logInConsole("manage-subscriptions.axd error for get-subscriptions."),Azom.logInConsole(t),Azom.logInConsole(i))}}),!1},onNewsletterPreviewShown:function(){typeof closeSubscriptionsChangeConfirmationMessage!="undefined"&&closeSubscriptionsChangeConfirmationMessage();var n=$("#newsletter-preview-dialog"),t=n.hasClass("newsletter-preview-dialog-with-subscribe-button");t&&(AZoProfileUtils.isLoggedIntoAZoProfile()||(Azom.subscribedNewsletterIds=[]),Azom.subscribedNewsletterIds?Azom.syncNewsletterPreviewDialogSignupCtaButtonState():Azom.getSubscribedNewsletters(!1))},wireNewsletterPreviews:function(){var n=$("#newsletter-subscriptions-wrap .newsletter-item-preview a, li.newsletter-widget-item a.newsletter-preview-link");n.length<1||n.magnificPopup({type:"inline",items:{src:"#newsletter-preview-dialog"},mainClass:"mfp-3d-unfold",removalDelay:500,midClick:!0,callbacks:{beforeOpen:Azom.onNewsletterPreviewShowing,open:Azom.onNewsletterPreviewShown,afterClose:function(){$("#newsletter-preview-dialog").empty()}}})},runStartupScripts:function(){if(typeof _azoStartScripts!="undefined"&&_azoStartScripts.length)while(_azoStartScripts.length){var n=_azoStartScripts.shift();$(n);n=null}},updateNewsletterSubscribeLinkLabel:function(n,t){console.log("updateNewsletterSubscribeLinkLabel(newsletterId, isSubscribed) with",n,t);var i=!1;$.each($(".newsletter-info"),function(r,u){var f;if(!i){var e=$(u),s=e.attr("data-newsletter-id"),o=(s||"676757noIdOnItem").toString().trim()==(n||"24234345noIdSupplied").toString().trim();(!n||o)&&(f=!1,$.each(e.find("a.toggle-newsletter-subscription, a.newsletter-item-preview"),function(n,i){if(!f){var u=$(i),r=u.text();r=="Subscribe"&&t?(console.log("found link with text",r,"changing to 'Unsubscribe'"),u.text("Unsubscribe"),f=!0):r!="Unsubscribe"||t||(console.log("found link with text",r,"changing to 'Subscribe'"),u.text("Subscribe"),f=!0)}}),n&&o&&(i=!0))}})},isSidebarUnderMainContent:function(n){return n&&n.length||(n=$(".sidebar-container")),n.css("padding-left")==="15px"},displayShareViaEmail:function(){if(typeof BlogEngine=="undefined")return this.close(),!1;var n=$("#azo-share-email-dialog");return n.length<1&&(n=$(document.createElement("div")).attr("id","azo-share-email-dialog").addClass("mp-common-dialog mfp-with-anim"),n.appendTo($("body").first())),BlogEngine.getInfoContent("emailShareDialog","","#azo-share-email-dialog","azoEmailShareDialog",function(){$(".azo-email-share").css({height:"285px"});$(".azo-email-share .alert-message").hide();$(".azo-email-share .form-content").show();var n=Azom.getDataOnContentType(contentViewData.type).description,t="Share this "+n.toLowerCase()+" via email";$(".azo-email-share .share-title").html(t);$.magnificPopup.open({type:"inline",items:{src:"#azo-share-email-dialog"},mainClass:"mfp-3d-unfold",removalDelay:500,midClick:!0,callbacks:{close:function(){$(".azo-email-share input").css({border:"1px solid #cccccc"});$(".azo-email-share input").val("");$(".azo-email-share .alert-message").hide();$("#shareEmailButton").removeClass("disabled").removeClass("button-loading").removeAttr("disabled")}}})}),!1},displayRatingsSlider:function(){var n=$(".share-box .ratingcontainer");n.fadeToggle("500")},shareViaEmail:function(){var t=!0,e=$(".azo-email-share"),o=$(".azo-email-share #emailFrom"),s=$(".azo-email-share #emailTo"),u=$("#shareEmailButton"),n=$(".failure-alert"),h=$(".success-alert"),i=$.trim($(".azo-email-share #emailFrom").val()),r=$.trim($(".azo-email-share #emailTo").val()),c=Azom.isEmailAddressValid2(i),l=Azom.isEmailAddressValid2(r),a=Azom.getQueryVariable("lang")||"en",f;return c&&i!==""||(o.css({border:"0 solid red"}).animate({borderWidth:2},250,function(){}),t=!1),l&&r!==""||(s.css({border:"0 solid red"}).animate({borderWidth:2},250,function(){}),t=!1),t?(u.addClass("disabled").prop("disabled",!0),f={fromAddress:i,toAddress:r,impressionId:Azom.impressionId,languageCode:a,contentType:contentViewData.type,contentId:contentViewData.id},jQuery.ajax({type:"POST",url:"/site_services.asmx/ShareViaEmail",data:JSON.stringify(f),cache:!1,contentType:"application/json; charset=utf-8",dataType:"json",success:function(t){var i,r;t=t.d;!t||t.Message?t.IsSuccessful?($(".azo-email-share input").css({border:"1px solid #cccccc"}),i=Azom.getDataOnContentType(contentViewData.type).description,i=i==="news"?Azom.capitalize(i)+" article":Azom.capitalize(i),r=i+" shared!",$(".azo-email-share .form-content").slideUp(250,function(){e.animate({height:"130px"})}),h.html("<strong>"+r+"<\/strong> Thanks for sharing.").removeClass("alert-danger").addClass("alert-success").show()):t.OptedOut?n.html("<strong>"+t.Message+"<\/strong>").removeClass("alert-success").removeClass("alert-danger").removeClass("failure-alert").addClass("info-alert").css("display","inline-block"):n.html("<strong>Error!<\/strong> "+t.Message).removeClass("alert-success").addClass("alert-danger").show():(Azom.logInConsole("problem in Azom.shareViaEmail."),n.html("<strong>Error!<\/strong> Unable to share, please try again later.").removeClass("alert-success").addClass("failure-alert").addClass("alert-danger").show())},error:function(t,i,r){Azom.logInConsole("error in Azom.shareViaEmail. textStatus: "+(i||"")+", errorThrown: "+(r||""));n.html("<strong>Unable to share at this time!<\/strong> Please try again later.").removeClass("alert-success").addClass("alert-danger").show()},complete:function(){$(u).removeClass("disabled").removeProp("disabled")}})):n.html("<strong>Invalid email addresses!<\/strong> Please enter valid email addresses.").removeClass("alert-success").addClass("failure-alert").addClass("alert-danger").css("display","inline-block"),!1},applyCookieSettings:function(){var t=Azom.readCookie("cookiepolicy"),i=!1,r=!1,u=!1,f=functionalLabel=targetLabel="Inactive",n,e,o;t!=null&&t.length===3?(n=t.split(""),i=n[0]==="1",r=n[1]==="1",u=n[2]==="1",i&&(f="Active"),r&&(functionalLabel="Active"),u&&(targetLabel="Active"),$("#isPerformCookiesActive").prop("checked",i),$("#isPerformCookiesActive").next().text(f),$("#isFuncCookiesActive").prop("checked",r),$("#isFuncCookiesActive").next().text(functionalLabel),$("#isTargetCookiesActive").prop("checked",u),$("#isTargetCookiesActive").next().text(targetLabel),e=$(".switch").length,o=$(".switch:checkbox:checked").length,$("#allowAllCookieSettings").css({display:bStrictCookies||o!==e?"inline-block":"none"}),$("#rejectAllCookieSettings").css({display:bStrictCookies?"inline-block":"none"}),Azom.toggleCookieSettingWarning()):Azom.resetCookiePreferences(!bStrictCookies)},toggleCookieSettingWarning:function(){var r=$("#isPerformCookiesActive"),u=r.is(":checked"),f=$("#isFuncCookiesActive"),e=f.is(":checked"),o=$("#isTargetCookiesActive"),s=o.is(":checked"),i="<p>To completely opt out, you will have to manually opt out of the 3rd party services below by following the links provided, if you haven't already done so.  We cannot do this for you.<\/p>",n="",t;u?$("#performCookieWarning").html("").fadeOut("slow"):(t=Azom.getCookieWarningText("#performanceCookieList li"),t!==""&&(n="",n+=i,n+="<ul>",n+=t,n+="<\/ul>",$("#performCookieWarning").html(n).fadeIn("slow")));e?$("#funcCookieWarning").html("").fadeOut("slow"):(t=Azom.getCookieWarningText("#functionalCookieList li"),t!==""&&(n="",n+=i,n+="<ul>",n+=t,n+="<\/ul>",$("#funcCookieWarning").html(n).fadeIn("slow")));s?$("#targetCookieWarning").html("").fadeOut("slow"):(t=Azom.getCookieWarningText("#targetingCookieList li"),t!==""&&(n="",n+=i,n+="<ul>",n+=t,n+="<\/ul>",$("#targetCookieWarning").html(n).fadeIn("slow")))},getCookieWarningText:function(n){var t=[],i=$(n).filter(function(){return $(this).data("user-must-opt-out")!==undefined});return i.length!==0?($(i).each(function(){var n=$(this).data("site-url");t.push('<li><a target="_blank" href="'+n+'">'+$(this).text()+"<\/a><\/li>")}),t=t.join("")):t="",t},getCookieOptOutConfirmText:function(){var n="",t="";return $("#isPerformCookiesActive").is(":checked")||(t+=Azom.getCookieWarningText("#performanceCookieList li")),$("#isFuncCookiesActive").is(":checked")||(t+=Azom.getCookieWarningText("#functionalCookieList li")),$("#isTargetCookiesActive").is(":checked")||(t+=Azom.getCookieWarningText("#targetingCookieList li")),t!==""&&(n='<p class="bold">Please note:<\/p><p>To completely opt out, you will have to manually opt out of the 3rd party services below by following the links provided, if you haven\'t already done so.  We cannot do this for you.<\/p>',n+="<ul>",n+=t,n+="<\/ul>"),n},onToggleCookieSetting:function(n){var t=$(n),e=t.attr("id"),f=t.is(":checked"),i=t.next("label"),r,u;f?i.text("Active"):i.text("Inactive");r=$(".switch").length;u=$(".switch:checkbox:checked").length;$("#allowAllCookieSettings").css({display:bStrictCookies||u!==r?"inline-block":"none"});$("#rejectAllCookieSettings").css({display:bStrictCookies?"inline-block":"none"});Azom.toggleCookieSettingWarning()},onCookieSettingsLinkClicked:function(n){var i=$(n),f=$(".cookie-setting-tabs li.active > a").data("tab-id"),r="#"+f,e=$(".cookie-setting-tabs li.active"),u,t;e.removeClass("active");i.parents("li").addClass("active");$(r).removeClass("active");$(r).addClass("hide");u=i.data("tab-id");t="#"+u;$(t).removeClass("hide");$(t).addClass("active")},onCookieSettingsAllowAllClicked:function(){Azom.resetCookiePreferences(!0);Azom.toggleCookieSettingWarning();Azom.onSaveSettingsClicked("settings_allow_all")},onCookieSettingsRejectAllClicked:function(){Azom.resetCookiePreferences(!1);Azom.toggleCookieSettingWarning();Azom.onSaveSettingsClicked("settings_reject_all")},resetCookiePreferences:function(n){$(".switch").each(function(){var t=$(this).next("label");$(this).prop("checked",n);t.text(n?"Active":"Inactive")})},getCookieSettingsTextForAnalyticsEvent:function(n){if(!n||n.length!==3)return"???";var t=[];return t.push("Performance = "+(n[0]==="1"?"Yes":"No")),t.push("Functional = "+(n[1]==="1"?"Yes":"No")),t.push("Targeting = "+(n[2]==="1"?"Yes":"No")),t.join(", ")},onSaveSettingsClicked:function(n){var i=!1,r=!1,u=!1,f="",t;return r=$("#isPerformCookiesActive").is(":checked")?"1":"0",i=$("#isFuncCookiesActive").is(":checked")?"1":"0",u=$("#isTargetCookiesActive").is(":checked")?"1":"0",f=r+i+u,BlogEngine.saveCookiePreferences(f,n),$(".cookie-settings-dialog-body").hide(),t=Azom.getCookieOptOutConfirmText(),t!==""?$("#cookieSavedWarning").html(t).show():$("#cookieSavedWarning").hide(),$("#azo-cookie-saved-wrapper").show(),!1},onCookieDialogConfirmClicked:function(){$.magnificPopup.close();BlogEngine.closeCookieNotice(!1)},getRfqSuccessText:function(n,t,i){var f="",u="",r="form-completed";return n&&(r="common-site-form-completed-main-block"),i?(t&&(u='<p><a href="#" onclick="return Azom.closeMobileRfqForm(null);">Click Here to return to the previous page you were on.<\/a><\/p>'),f='<div class="'+r+'"><div class="'+r+'-header"><p>Almost Done!<\/p><\/div><div class="'+r+'-body"><p>To complete your inquiry, <u>please click on the link in the email we just sent you<\/u>.<\/p><p>This is the last step, required for us to verify we can reach you, in accordance with our <a href="'+Azom.getTermsPageRelativeUrl()+'" target="_blank" class="terms-link">terms &amp; conditions<\/a>.<\/p>'+u+"<\/div><\/div>"):(u="",t&&(u='<p><a href="#" onclick="return Azom.closeMobileRfqForm(null);">Click Here to return to the previous page you were on.<\/a><\/p>'),f='<div class="'+r+' form-completed-no-more-action-required"><div class="'+r+'-body"><p>Thank you.  Your inquiry has been received, and will be processed by the RFQ Team.<\/p>'+u+"<\/div><\/div>"),f},campaignDisplayTrackingCurrentElementSelector:null,onCampaignDisplayTrackingWindowBlur:function(){var n,r,t,i;if(Azom.campaignDisplayTrackingCurrentElementSelector){for(n=null,t=0;t<campaignDisplayData.items.length;t++)if(campaignDisplayData.items[t].ces===Azom.campaignDisplayTrackingCurrentElementSelector){n=campaignDisplayData.items[t];break}if(!n){Azom.logInConsole("unable to find campaign display item with selector: "+Azom.campaignDisplayTrackingCurrentElementSelector);return}if(!n.isren()){Azom.logInConsole("Not recording campaign click because ad spot is a non-campaign ad: "+n.ces);return}for(campaignDisplayData.clickedItems||(campaignDisplayData.clickedItems=[]),r=!1,t=0;t<campaignDisplayData.clickedItems.length;t++)if(campaignDisplayData.clickedItems[t]===n.ces){r=!0;break}if(r){Azom.logInConsole("Campaign display event already recorded: "+n.ces);return}campaignDisplayData.clickedItems.push(n.ces);Azom.campaignDisplayTrackingCurrentElementSelector="";i=[];i.push({name:"acid",value:campaignDisplayData.acid});i.push({name:"auid",value:n.auid});i.push({name:"top",value:Azom.pageLoadedOn?((new Date).getTime()-Azom.pageLoadedOn.getTime()).toString():""});i.push({name:"purl",value:window.location.href.toString()});i.push({name:"ptitle",value:document.title||""});i.push({name:"rfr",value:document.referrer||""});Azom.impressionId&&i.push({name:"impression-id",value:Azom.impressionId});Azom.logInConsole("recording campaign display event: "+n.auid);Azom.recordClientEvent(!1,"campaigndisplayclick",i,!1,null)}},hcpStatusData:null,recordHcpStatusCheckedThisSession:function(){var n=BlogEngine.getVisitorCookieAndPrivacyPreferences();n.targeting&&Azom.createCookie("hcpscts","1",0)},checkNextActionAfterNoHcpStatusQuestion:function(){typeof BlogEngine!="undefined"&&BlogEngine.initTopicUpdateNotifications&&BlogEngine.initTopicUpdateNotifications()},processHcpStatus:function(n){if(n.AskHcpStatus){var t=typeof g_siteSection!="undefined"&&g_siteSection==="medical";if(!t){Azom.checkNextActionAfterNoHcpStatusQuestion();return}Azom.displayHcpQuestion();return}if(n.ConfirmHcpStatus){Azom.displayHcpReturnQuestion();return}Azom.recordHcpStatusCheckedThisSession();Azom.checkNextActionAfterNoHcpStatusQuestion()},onHcpStatusRetrieved:function(n){if(n.Message){Azom.logInConsole(n.Message);return}if(n.RunGlobalImpressionCheck){Azom.hcpStatusData=n;Azom.checkForGlobalImpression();return}Azom.processHcpStatus(n)},askHcpQuestionIfApplicable:function(){return Azom.checkNextActionAfterNoHcpStatusQuestion(),!1},recordHcpQuestionResponse:function(n){var t=[{name:"is-hcp",value:n?"1":"0"}];Azom.recordClientEvent(!0,"recordhcpquestionresponse",t,!1,null)},onAreYouHcpQuestionResponse:function(n,t){var r,e,u,i,o,f;if(t===null){if(r=$("#hcp-r1").is(":checked"),e=$("#hcp-r2").is(":checked"),!r&&!e)return!1;t=r}if(Azom.recordHcpStatusCheckedThisSession(),u=n?"#hcp-return-modal":"#hcp-question-container",i=$(u),!(i.length<1))return(o="Version: "+(n?"n/a":"HCP Question - Ver "+(i.attr("data-question-version")||""))+". Response: "+(n?"Returning":"Initial")+" Question - HCP? - "+(t?"Yes":"No"),Azom.pushAnalyticsEvent("hcp_question_are_you_hcp",{event_label:o}),Azom.recordHcpQuestionResponse(t),f=!1,!AZoProfileUtils.isLoggedIntoAZoProfile()&&!n)?(f=!0,document.getElementById("hcpQ1").style.display="none",document.getElementById(t?"hcpQ2Hcp":"hcpQ2NotHcp").style.display="block",!1):(f||(i.data("is-closed",!0),BlogEngine.checkForSlideUpMessageBox(u)),!1)},onHcpQuestion2Response:function(n,t){var i=$("#hcp-question-container"),r;if(!(i.length<1))return r=i.attr("data-question-version")||"",Azom.pushAnalyticsEvent("hcp_question_create_azoprofile",{event_label:"Version: "+r+". HCP: "+(n?"Yes":"No")+". 2nd Question - Create AZoProfile? "+(t?"Yes":"No")}),i.data("is-closed",!0),BlogEngine.checkForSlideUpMessageBox("#hcp-question-container"),t&&AZoProfileUtils.showAZoProfileLoginFullOverlay(null,n?"hcp":""),!1},displayHcpQuestion:function(){if($("#hcp-question-container-wrap").length===0){var n=document.createElement("div");n.id="hcp-question-container-wrap";document.body.appendChild(n)}BlogEngine.getInfoContent("hcpQuestionForm",null,"#hcp-question-container-wrap",null,function(){BlogEngine.initSlideUpMessageBox("#hcp-question-container")})},displayHcpReturnQuestion:function(){if($("#hcp-question-container-2").length===0){var n=document.createElement("div");n.id="hcp-question-container-2";document.body.appendChild(n)}BlogEngine.getInfoContent("hcpQuestionReturnForm",null,"#hcp-question-container-2",null,function(){BlogEngine.initSlideUpMessageBox("#hcp-return-modal")})},hcpRevisitRegister:function(){Azom.pushAnalyticsEvent("hcp_question_returning_become_member",{event_label:"Become a Member clicked on return"});var n=$("#hcp-return-modal");n.data("is-closed",!0);BlogEngine.checkForSlideUpMessageBox("#hcp-return-modal");AZoProfileUtils.showAZoProfileLoginFullOverlay(null,null)},initCampaignDisplayTrackingItems:function(){for(var r,t,n=$([]),i=0;i<campaignDisplayData.items.length;i++)r=campaignDisplayData.items[i],t=$(r.ces),t.length>0&&(t.data("ces",r.ces),n=n.add(t));if(n.length<1){Azom.logInConsole("no campaignDisplayData element matches found.");return}n.mouseover(function(n){var i=$(n.currentTarget),t=i.data("ces");if(!t){Azom.logInConsole("campaign display selector not found in mouseover.");return}Azom.campaignDisplayTrackingCurrentElementSelector=t;$(window).focus()}).mouseout(function(){Azom.campaignDisplayTrackingCurrentElementSelector=""});$(window).blur(Azom.onCampaignDisplayTrackingWindowBlur).focus()},initCampaignDisplayTracking:function(){if(typeof campaignDisplayData=="undefined"||!campaignDisplayData.items||!campaignDisplayData.items.length){Azom.logInConsole("campaignDisplayData is undefined or items not available.");return}$(Azom.initCampaignDisplayTrackingItems)},isPageImpressionRecorded:!1,recordPageImpression:function(){if(typeof pageImpressionData!="undefined"&&!Azom.isPageImpressionRecorded){var n=[{name:"pi-pk",value:pageImpressionData.pk},{name:"pi-ct",value:pageImpressionData.ct},{name:"pi-cntid",value:pageImpressionData.cntid},{name:"pi-catid",value:pageImpressionData.catid},{name:"pi-tid",value:pageImpressionData.tid}];typeof campaignDisplayData!="undefined"&&campaignDisplayData.acid&&(n.push({name:"pi-acid",value:campaignDisplayData.acid}),typeof campaignDisplayData.nsacids!="undefined"&&campaignDisplayData.nsacids.length&&n.push({name:"pi-nsacids",value:campaignDisplayData.nsacids.join(",")}));Azom.isPageImpressionRecorded=!0;Azom.recordClientEvent(!0,"pageimpression",n,!1,null)}},onNmAdCampaignCreativeRendered:function(n,t){if((!n||isNaN(n))&&typeof campaignDisplayData!="undefined"&&campaignDisplayData.acid&&(n=campaignDisplayData.acid),!n||isNaN(n))return Azom.logInConsole("campaignId missing or invalid in onNmAdCampaignCreativeRendered."),!1;var i={campaignId:n,creativeType:t};return(Azom.nmRenderedCampaignCreatives.push(i),$.inArray(n,Azom.nmRenderedCampaignIds)!==-1)?!0:(Azom.nmRenderedCampaignIds.push(n),Azom.impressionId?Azom.recordNmAdCampaignImpression([n]):Azom.nmPendingRecordRenderedCampaignIds.push(n),!0)},recordNmAdCampaignImpression:function(n){var u,i,f,r,t;if(n=n||Azom.nmPendingRecordRenderedCampaignIds,!n||!n.length)return Azom.logInConsole("there are no campaignIds to recordNmAdCampaignImpression for."),!1;if(!Azom.impressionId)return Azom.logInConsole("do not have impressionId in recordNmAdCampaignImpression."),!1;for(u=n.slice(0),i=0;i<u.length;i++)if(f=u[i],r=[],Azom.impressionId&&r.push({name:"impression-id",value:Azom.impressionId}),r.push({name:"content-id",value:f}),Azom.recordClientEvent(!0,"nmacv",r,!1,null),Azom.nmPendingRecordRenderedCampaignIds.length)for(t=Azom.nmPendingRecordRenderedCampaignIds.length-1;t>=0;t--)Azom.nmPendingRecordRenderedCampaignIds[t]==f&&Azom.nmPendingRecordRenderedCampaignIds.splice(t,1)},onAdCampaignDialogImageLoaded:function(){var t=this.width,i=this.height,r='<img src="'+this.src+'" alt="" style="border:none;width:'+(t.toString()+"px")+";height:"+(i.toString()+"px")+';" />',n;$("#adCampaignForm .adcampaign-form-dialog-container-contents").html(r);n=$("#adCampaignForm").data("bgColor");n},showAdCampaignDialog:function(n,t,i){if($("#adCampaignForm").length<1)return!1;$("#adCampaignForm").data("bgColor",i);var r=document.createElement("img");return r.onload=Azom.onAdCampaignDialogImageLoaded,r.src=t,!1},recordUbmKeywordsAction:function(n){if(typeof nmubm=="undefined"){Azom.logInConsole("nmubm in recordUbmKeywordsAction is undefined");return}if(nmubm.topcat&&Azom.pushAnalyticsEvent("ubm_keyword_"+n,{event_label:nmubm.topcat}),nmubm.subcats&&nmubm.subcats.length>0)for(var t=0;t<nmubm.subcats.length;t++)Azom.pushAnalyticsEvent("ubm_keyword_"+n,{event_label:nmubm.subcats[t]})},ubmPassbackZonesRecorded:[],recordUbmPassback:function(n){if(typeof nmubm=="undefined"){Azom.logInConsole("nmubm in recordUbmPassback is undefined");return}Azom.ubmPassbackZonesRecorded.push(n);Azom.ubmPassbackZonesRecorded.length===1&&Azom.recordUbmKeywordsAction("passback");Azom.pushAnalyticsEvent("ubm_keyword_passback",{event_label:"Zone: "+n})},passbacksRecorded:[],recordPassback:function(n,t){n||Azom.logInConsole('undefined "source" in Azom.recordPassback');t||Azom.logInConsole('undefined "zone" in Azom.recordPassback');n=n||"(unknown source)";t=t||"(unknown zone)";Azom.passbacksRecorded.push({source:n,zone:t});var i=n.toString()+": "+t.toString();Azom.pushAnalyticsEvent("ad_passback_occurred",{event_label:i})},getDfpCustomTargeting:function(){return{siteSection:g_siteSection}},initUbmPage:function(){Azom.recordUbmKeywordsAction("served")},onNoAdsToServe:function(){Azom.pushAnalyticsEvent("backup_adsense_page_served",null)},expandPostedInHierachy:function(){var n=$("div.posted-in-hierarchy");if(!(n.length<1))return n.removeClass("posted-in-hierarchy-collapsed").addClass("posted-in-hierarchy-expanded"),!1},onLinkClick:function(n){var t,i,u,f;if(!n.delegateTarget)return Azom.logInConsole("e.delegateTarget is not available in Azom.onLinkClick"),!0;if(t=$(n.delegateTarget),i=t.data("event-category"),!i)return Azom.logInConsole("event-category on e.delegateTarget is not available in Azom.onLinkClick"),!0;var e=t.data("event-action"),o=t.data("event-label"),r=$(n.currentTarget);if(typeof gtag=="undefined")return Azom.logInConsole("gtag is not available in Azom.onLinkClick"),!0;if(u=r.attr("href"),!u)return Azom.logInConsole("href is not available in Azom.onLinkClick"),!0;f=r.text();!f;var s=r.attr("data-ga-click-event-label"),h=s||o||f||u,c=e||"link_click",l=i+"_"+c;return gtag("event",l,{event_label:h}),!0},initLinkTracking:function(n,t,i,r,u){var f=$(n);if(!(f.length<1)){f.data("event-category",t);i&&f.data("event-action",i);r&&f.data("event-label",r);u=u||"a";f.on("click",u,Azom.onLinkClick)}},reportAdBlockerRunning:function(n){var t="Test Failed: "+n+". Platform: "+(!window.isMobileWebsite?"Desktop":"Mobile");Azom.pushAnalyticsEvent("ad_blocker_detected",{event_label:t})},checkForAdBlocking2:function(){window.setTimeout(function(){var n=typeof Optanon!="undefined"&&typeof Optanon.testLog=="function";n||(Azom.generateClosedAdSlotRequestsFirstRound("OneTrust Unavailable - Potential Ad Blocker"),Azom.reportAdBlockerRunning("OneTrust Unavailable"))},3500)},checkForAdBlocking:function(){$.ajax({type:"GET",url:"/ads/show_ads.js",dataType:"script"}).always(function(){if(!Azom.g_adsTester){Azom.generateClosedAdSlotRequestsFirstRound("Ads URL Blocked");Azom.reportAdBlockerRunning("Ads URL");return}Azom.checkForAdBlocking2()})},roundToNumOfDecimals:function(n,t){if(typeof n!="number")return n;return Number(n.toFixed(t))},appendAdSlotRenderData:function(n,t,i){var e=function(n){return n===null||n===undefined?"":n},u=function(n,r){i?t.push({name:n,value:r}):t[n]=r},y=$(window),p=y.scrollTop(),w=y.height(),r={viewportTop:p,viewportBottom:p+w,viewportHeight:w,slotOffset:null,slotTop:0,slotBottom:0,slotHeight:0,foundSlot:!1,distanceOutsideViewport:0,isInViewport:!1,visibleTop:0,visibleBottom:0,visibleHeight:0,visiblePixels:0,visiblePercentWithinViewport:0},o=null,a,c,l,f,v;n.slot&&n.slot.getSlotElementId&&(a=n.slot.getSlotElementId(),a&&(o=$("#"+a),o.length!==1?console.log("unable to locate slot"):(r.foundSlot=!0,r.slotOffset=o.offset(),r.slotHeight=o.height(),r.slotTop=r.slotOffset.top,r.slotBottom=r.slotTop+r.slotHeight)));r.foundSlot&&(r.slotTop>r.viewportBottom?r.distanceOutsideViewport=r.slotTop-r.viewportBottom:r.slotBottom<r.viewportTop?r.distanceOutsideViewport=r.slotBottom-r.viewportTop:(r.isInViewport=!0,r.visibleTop=Math.max(r.viewportTop,r.slotTop),r.visibleBottom=Math.min(r.viewportBottom,r.slotBottom),r.visibleHeight=r.visibleBottom-r.visibleTop,r.visiblePixels=Math.max(0,r.visibleHeight),r.visiblePercentWithinViewport=r.slotHeight===0?0:r.visiblePixels/r.slotHeight));var b=n.slot&&n.slot.getAdUnitPath?n.slot.getAdUnitPath():"",s=0,h=0;n.size&&n.size.length>1?(s=n.size[0],h=n.size[1],s<=1&&o&&o.length===1&&(c=o.find("iframe"),c.length===1&&(s=c.width(),h=c.height()))):n.slot&&typeof n.slot.getSizes=="function"&&(l=n.slot.getSizes(),l.length&&(s=l[0].width,h=l[0].height));f=null;n.slot&&typeof n.slot.getResponseInformation=="function"&&(f=n.slot.getResponseInformation());f=f||{};v=!1;v=typeof n.isEmpty=="boolean"?n.isEmpty:f.campaignId||f.creativeId||f.lineItemId||f.advertiserId?!1:!0;u("campaignid",e(f.campaignId));u("creativeid",e(f.creativeId));u("isempty",v);u("lineitemid",e(f.lineItemId));u("servicename",e(n.serviceName));u("advertiserid",e(f.advertiserId));u("sizewidth",e(s));u("sizeheight",e(h));u("slotname",e(b));u("pd-viewport-top",Math.ceil(r.viewportTop||0));u("pd-viewport-bottom",Math.ceil(r.viewportBottom||0));u("pd-viewport-height",Math.ceil(r.viewportHeight||0));u("pd-slot-top",Math.ceil(r.slotTop||0));u("pd-slot-bottom",Math.ceil(r.slotBottom||0));u("pd-slot-height",Math.ceil(r.slotHeight||0));u("pd-found-slot",r.foundSlot);u("pd-distance-outside-viewport",Math.ceil(r.distanceOutsideViewport||0));u("pd-is-in-viewport",r.isInViewport);u("pd-visible-pixels",Math.ceil(r.visiblePixels||0));u("pd-visible-percentage",Azom.roundToNumOfDecimals(r.visiblePercentWithinViewport,4)||0)},stickyTowerAdIfApplicable:function(n){if(!n.isEmpty&&n.size&&n.size.length===2&&n.size[1]===600&&!!n.lineItemId&&n.slot.getSlotElementId){var t=(n.slot.getSlotElementId()||"").toString();t.toLowerCase().indexOf("right-tower")!==-1&&$("body").toggleClass("sticky-tower",!0)}},getElementVisiblePercentage:function(n){var u;if(!n)return 0;var o=$(n),s=$("body"),a=!s.hasClass("hideheader"),v=a?$(".main-menu").height():0,f=s.hasClass("sharebox-top-show"),h=f?$(".share-box").height():0,y=f?BlogEngine.doesShareBoxAnchorToBottom():!1,e=$(window).height(),t=$(document).scrollTop();t+=v;f&&(y?e-=h:t+=h);var i=o.offset().top,r=o.height(),c=t-i,l=i+r-(t+e);return t>i+r||i>t+e?0:(u=100,c>0&&(u-=c*100/r),l>0&&(u-=l*100/r),u)},getTargetingKeysWithValues:function(n){var i=n.getTargetingKeys(),t=[];return i.forEach(function(i){t.push({key:i,values:n.getTargeting(i)})}),t},removePrebidBidsForPrioritization:function(n,t){var f,r,u,i,e,l,h,a,p,c,v;if(t&&n&&n.getAdUnitPath&&n.getTargetingKeys){if(f=Azom.prebidTargetingAdjustmentsForPrioritization[t],!f){console.log("auctionTargetingAdjustments not found for auctionId: "+t);return}if(r=Azom.getPrebidConfig(),!r||!r.bidders||!r.bidders.length){console.log("prebidConfig or bidders unavailable.");return}if(u=r.bidders.find(function(n){return n.isPriorityBidder}),u){if(i={adUnitPath:n.getAdUnitPath(),priorityBidderCode:"",priorityBidderCpm:0,initialTargetingKeys:null,keyCountRemoved:0,keysRemoved:[],remainingTargetingKeys:null},!1&&(i.initialTargetingKeys=Azom.getTargetingKeysWithValues(n)),e=n.getTargeting(("hb_pb_"+u.code).substring(0,20)),l=e&&e.length&&!isNaN(e[0])?parseFloat(e[0]):0,l>=50){i.priorityBidderCode=u.code;i.priorityBidderCpm=l;var o=[],s=[],y=!1;if(i.initialTargetingKeys=i.initialTargetingKeys||Azom.getTargetingKeysWithValues(n),i.initialTargetingKeys.forEach(function(t){var f=t.key,c,e,h,l,a;f.indexOf("hb_")===0&&(c=r.bidders.find(function(n){return!n.isPriorityBidder&&f.indexOf("_"+n.codeShortened)!==-1}),e=f.indexOf("_"+u.codeShortened)===-1?null:u,c?(i.keysRemoved.push(t),n.clearTargeting(f)):e?(h=f.indexOf("_"+e.codeShortened),h===-1?console.log("unexpectedly could not find priorityBidder code in key: "+f):(l=f.substr(0,h),a={...t,genericKey:l},o.push(a))):(s.push(t),t.key==="hb_bidder"&&t.values&&t.values.length&&(y=t.values[0]===i.priorityBidderCode)))}),!y&&s.length)if(o.length){for(h=0;h<s.length;h++)a=s[h],p=o.find(function(n){return n.genericKey===a.key}),p&&n.clearTargeting(a.key);for(c=0;c<o.length;c++)v=o[c],n.setTargeting(v.genericKey,v.values)}else console.log("unexpectedly have genericKeys but no priorityBidderKeys.")}i.keyCountRemoved=i.keysRemoved.length;i.keyCountRemoved>0&&(i.remainingTargetingKeys=Azom.getTargetingKeysWithValues(n));f.slotCount++;f.slots.push(i);f.totalKeyCountRemoved+=i.keyCountRemoved}}},onAdSlotInteractionChange:function(n){for(var r,u,t,i=0;i<n.length;i++)if((r=n[i],r.isIntersecting)&&(u=r.target.id,typeof g_dfpSlots!="undefined"&&g_dfpSlots.length))for(t=0;t<g_dfpSlots.length;t++)if(g_dfpSlots[t].eid===u){g_dfpSlots[t].pendingViewabilityToRefresh&&Azom.refreshAdSlot(g_dfpSlots[t]);break}},adSlotObserver:null,refreshAdSlot:function(n){var r,u,i,t,f;if(n.refreshTimeout=null,r=document.getElementById(n.eid),r){if(u=Azom.getElementVisiblePercentage(r),u<50){Azom.pushAnalyticsEvent("ad_refresh_delay_not_yet_in_viewport",{event_label:n.eid});n.pendingViewabilityToRefresh=!0;return}if(n.renderedCampaignIds&&n.renderedCampaignIds.length){for(i=[],t=0;t<n.renderedCampaignIds.length;t++)$.inArray(n.renderedCampaignIds[t],i)===-1&&i.push(n.renderedCampaignIds[t]);n.slotObj.setTargeting("orderid",i)}n.pendingViewabilityToRefresh=!1;f=typeof pbjs!="undefined"&&pbjs.que&&n.runThruPbjs?!0:!1;f?(Azom.pushAnalyticsEvent("ad_refresh_prebid_start",{event_label:n.eid}),pbjs.que.push(function(){pbjs.requestBids({timeout:Azom.prebidTimeout,adUnitCodes:[n.aduid],bidsBackHandler:function(t,i,r){var f,u;Azom.pushAnalyticsEvent("ad_refresh_prebid_complete",{event_label:n.eid});f=typeof pbjs.getAdserverTargeting!="function"?{}:pbjs.getAdserverTargeting();Azom.prebidTargetingInBidsBackHandler=f;pbjs.setTargetingForGPTAsync([n.aduid]);Azom.initializePrebidTargetingAdjustmentsForPrioritization(r);u=googletag.pubads().getSlots().find(function(t){return t.getAdUnitPath()===n.aduid});u&&Azom.removePrebidBidsForPrioritization(u,r);googletag.pubads().refresh([n.slotObj])}})})):(googletag.pubads().refresh([n.slotObj]),Azom.pushAnalyticsEvent("ad_refresh_no_prebid",{event_label:n.eid}));Azom.pushAnalyticsEvent("ad_refresh_refreshed",{event_label:n.eid})}},adRefreshTimeout:null,setupAdRefresh:function(n){var u,r,t,o,f,s,h,e,i;if(n.campaignId&&typeof g_dfpSlots!="undefined"&&g_dfpSlots.length){if(Azom.isHouseAdsCampaignId(n.campaignId))return;if(Azom.isEndemicCampaignId(n.campaignId))return;for(u=n.slot.getSlotElementId(),r=0;r<g_dfpSlots.length;r++)if(g_dfpSlots[r].eid===u){if(t=g_dfpSlots[r],!t.refresh)return;if(t.renderedCampaignIds||(t.renderedCampaignIds=[]),t.renderedCampaignIds.push(n.campaignId.toString()),"IntersectionObserver"in window&&(Azom.adSlotObserver||(o=$(".main-menu").height(),f=$(".share-box").height(),f>100&&(f=0),s=o+f,h={rootMargin:-s.toString()+"px 0px 0px 0px",threshold:.5},Azom.adSlotObserver=new IntersectionObserver(Azom.onAdSlotInteractionChange,h)),!t.observing)){if(e=document.getElementById(u),!e)return;Azom.adSlotObserver.observe(e);t.observing=!0}t.refreshTimeout&&(window.clearTimeout(t.refreshTimeout),t.refreshTimeout=null);Azom.adRefreshTimeout||(Azom.adRefreshTimeout=45,i=Azom.readCookie("adrefresh"),i&&!isNaN(i)&&(i=parseInt(i,10),i>=10&&(Azom.adRefreshTimeout=i)));t.refreshTimeout=window.setTimeout(function(n){return function(){Azom.refreshAdSlot(n)}}(t),Azom.adRefreshTimeout*1e3);Azom.pushAnalyticsEvent("ad_refresh_set_refresh_timer",{event_label:u});break}}},getFallbackHouseAd:function(n,t){var r=null,i=null,u;return n===728&&t===90?i=[{width:728,height:90,imageUrl:"https://www.azonetwork.com/images/house/sosm_2024_728x90.png",imageAlt:"Download the 2024 State of Scientific Marketing Report",linkDestination:"https://www.azonetwork.com/marketing-science/State-of-Scientific-Marketing-2024"},{width:728,height:90,imageUrl:"https://www.azonetwork.com/images/house/azoai_728x90.png",imageAlt:"AZoAi - Open Access Platform for the AI Industry",linkDestination:"https://www.azoai.com/"}]:n===300&&t===50?i=[{width:300,height:50,imageUrl:"https://www.azonetwork.com/images/house/sosm_2024_300x50.png",imageAlt:"Download the 2024 State of Scientific Marketing Report",linkDestination:"https://www.azonetwork.com/marketing-science/State-of-Scientific-Marketing-2024"},{width:300,height:50,imageUrl:"https://www.azonetwork.com/images/house/azoai_300x50.png",imageAlt:"AZoAi - Open Access Platform for the AI Industry",linkDestination:"https://www.azoai.com/"}]:n===300&&t===250&&(i=[{width:300,height:250,imageUrl:"https://www.azonetwork.com/images/house/sosm_2024_300x250.png",imageAlt:"Download the 2024 State of Scientific Marketing Report",linkDestination:"https://www.azonetwork.com/marketing-science/State-of-Scientific-Marketing-2024"},{width:300,height:250,imageUrl:"https://www.azonetwork.com/images/house/azoai_300x250.png",imageAlt:"AZoAi - Open Access Platform for the AI Industry",linkDestination:"https://www.azoai.com/"}]),i&&i.length&&(i.length===1?r=i[0]:i.length>1&&(u=Azom.getRandomIntInclusive(0,i.length-1),r=i[u])),r},createFallbackHouseAdLink:function(n){var t=$(document.createElement("img")).attr("src",n.imageUrl).attr("alt",n.imageAlt).attr("width",n.width.toString()).attr("height",n.height.toString());return $(document.createElement("a")).attr("href",n.linkDestination).attr("rel","noopener").addClass("fallback-unit").append(t)},isHouseAdsCampaignId:function(n){if(!n)return!1;switch(n){case 196637419:return!0;case 2220936617:return!0}return!1},isEndemicCampaignId:function(n){return n===3649925503?!0:n===3655373910?!0:!1},adSlotRenderingEventCounter:0,adSlotRenderingsQueue:[],adSlotRenderingsTimeout:null,sendAdSlotRenderings:function(){var n,t;if(Azom.adSlotRenderingsTimeout=null,!Azom.adSlotRenderingsQueue.length){console.log("unexpectedly, ad slot renderings queue is empty.");return}n=[];n.push({name:"log-items",value:JSON.stringify(Azom.adSlotRenderingsQueue)});Azom.adSlotRenderingsQueue=[];Azom.impressionId&&n.push({name:"impression-id",value:Azom.impressionId});typeof contentViewData!="undefined"&&(n.push({name:"content-type",value:contentViewData.type}),n.push({name:"content-id",value:contentViewData.id}));typeof campaignDisplayData!="undefined"&&campaignDisplayData.acid&&n.push({name:"acid",value:campaignDisplayData.acid});n.push({name:"pageview-unique-id",value:Azom.getPageviewUniqueId()||""});n.push({name:"page-url",value:window.location.pathname+(window.location.search||"")});t={"X-AZo-Logging":"1"};Azom.recordClientEvent(!0,"nmdcsr",n,!1,t)},recordAdSlotRendering:function(n,t){Azom.adSlotRenderingEventCounter++;var i={"event-name":n,"pageview-event-sequence-id":Azom.adSlotRenderingEventCounter,"time-since-pageload-ms":Math.ceil(window.performance.now())};(Azom.appendAdSlotRenderData(t,i,!1),i.campaignid===3710110249||i.campaignid===3710139727)&&(Azom.adSlotRenderingsQueue.push(i),Azom.adSlotRenderingsTimeout||(Azom.adSlotRenderingsTimeout=window.setTimeout(Azom.sendAdSlotRenderings,100)))},isAdSlotRequestsFirstRoundApplicable:!0,adSlotRequestsFirstRound:null,initializeAdSlotRequestsFirstRound:function(n){if(Azom.adSlotRequestsFirstRound){console.log("adSlotRequestsFirstRound is already initialized");return}Azom.adSlotRequestsFirstRound={startedAt:n,timeToClose:null,isClosed:!1,isTimedOut:!1,haveOrder:undefined,slots:[]}},closeAdSlotRequestsFirstRound:function(n){var u,e;if(Azom.adSlotRequestsFirstRound.closeReason=n,Azom.adSlotRequestsFirstRound.isClosed=!0,u={event_label:"Close reason: "+Azom.adSlotRequestsFirstRound.closeReason},typeof Azom.adSlotRequestsFirstRound.timeToClose=="number"){var t=500,i=Math.min(Azom.adSlotRequestsFirstRound.timeToClose,7e3),f=0,r=0;i%t==0&&i!==0?(f=i-t+1,r=i):(r=Math.ceil(i/t)*t,f=r-t+1);e=f+"-"+r+"ms";u.ads_request_time_taken=e}Azom.pushAnalyticsEvent("ads_first_round_complete",u,null);Azom.toggleContentGate()},generateClosedAdSlotRequestsFirstRound(n){Azom.adSlotRequestsFirstRound||(Azom.initializeAdSlotRequestsFirstRound(window.performance.now()),Azom.closeAdSlotRequestsFirstRound(n))},onNoAdSlotsForPage:function(){Azom.generateClosedAdSlotRequestsFirstRound("No Ad Slots on Page")},onDesktopOnlyAdSlots:function(){Azom.generateClosedAdSlotRequestsFirstRound("Desktop Only Ad Slots")},onAdSlotRequested:function(n){var t=window.performance.now();Azom.adSlotRequestsFirstRound||(Azom.initializeAdSlotRequestsFirstRound(t),window.setTimeout(function(){Azom.evaluateAdResponsesForGatedContent(null)},3e3));Azom.adSlotRequestsFirstRound.isClosed||Azom.adSlotRequestsFirstRound.slots.push({elementId:n.slot.getSlotElementId()});Azom.recordAdSlotRendering("slotRequested",n)},onAdSlotResponseReceived:function(n){var i;if(Azom.adSlotRequestsFirstRound&&!Azom.adSlotRequestsFirstRound.isClosed){var e=window.performance.now(),u=n.slot.getSlotElementId(),t=Azom.adSlotRequestsFirstRound.slots.find(function(n){return n.elementId===u});if(t){if(!t.responseTime){var r=null,f=null,o=null;typeof n.slot.getResponseInformation=="function"&&(i=n.slot.getResponseInformation(),i&&(r=i.campaignId,f=i.lineItemId,o=i.creativeId));t.responseTime=e-Azom.adSlotRequestsFirstRound.startedAt;t.campaignId=r;t.haveOrder=r&&!Azom.isHouseAdsCampaignId(r)&&f?!0:!1;Azom.evaluateAdResponsesForGatedContent(u)}}else console.log("unable to find slot with elementId: "+u)}Azom.recordAdSlotRendering("slotResponseReceived",n)},onAdSlotRendered:function(n){var a,h,c,i,t,e,r,o,l;Azom.recordAdSlotRendering("slotRenderEnded",n);Azom.stickyTowerAdIfApplicable(n);var u=!!n.isEmpty,s=(n.slot&&n.slot.getAdUnitPath?n.slot.getAdUnitPath():"")||"",f=!n.slot||!n.slot.getSlotElementId?"":(n.slot.getSlotElementId()||"").toString();if(f==="div-gpt-mrec"&&(a=n.size&&n.size.length?n.size[0]:0,h=n.size&&n.size.length&&n.size.length>1?n.size[1]:0,h>=250&&$("#div-gpt-mrec").css({"min-height":""})),Azom.isEndemicCampaignId(n.campaignId)&&Azom.logEndemicData(!1,n),Azom.logRenderedAdSlot(n),c=s.indexOf("News-Medical160x600Towers")!==-1||s.indexOf("News-Medical300x600Tower")!==-1,c&&(u||$(function(){var n=$("#wide-screen-container");n.addClass(iScreenWidth===1?"wide-screen-for-right-block":"widest-screen-for-right-block").addClass("right-block-filled");n.find(".tower-promo-spot").css("right","")})),window.g_ear&&Azom.setupAdRefresh(n),u||Azom.recordPageImpression(),u&&f&&(i=$("#"+f),i.length&&i.is(":visible"))){for(t=null,e=n.slot.getSizes(),r=0;r<e.length;r++)if(o=e[r],t=Azom.getFallbackHouseAd(o.width,o.height),t)break;t&&(l=Azom.createFallbackHouseAdLink(t),i.append(l))}},logRenderedAdSlot:function(){return},checkForRenderedAdSlots:function(){var n;if(typeof _requestedAdSlots!="undefined"&&_requestedAdSlots.length)while(_requestedAdSlots.length){n=_requestedAdSlots.shift();Azom.onAdSlotRequested(n);n=null}if(typeof _receivedAdSlots!="undefined"&&_receivedAdSlots.length)while(_receivedAdSlots.length){n=_receivedAdSlots.shift();Azom.onAdSlotResponseReceived(n);n=null}if(typeof _renderedAdSlots!="undefined"&&_renderedAdSlots.length)while(_renderedAdSlots.length){n=_renderedAdSlots.shift();Azom.onAdSlotRendered(n);n=null}},evaluateAdResponsesForGatedContent:function(n){var t,i,r,u;Azom.adSlotRequestsFirstRound.isClosed||(t=n?!1:!0,i=t||Azom.adSlotRequestsFirstRound.slots.every(function(n){return!!n.responseTime}),i&&(r=Azom.adSlotRequestsFirstRound.slots.some(function(n){return n.haveOrder}),Azom.adSlotRequestsFirstRound.isTimedOut=t,Azom.adSlotRequestsFirstRound.haveOrder=r,Azom.adSlotRequestsFirstRound.timeToClose=window.performance.now()-Azom.adSlotRequestsFirstRound.startedAt,t&&Azom.reportAdBlockerRunning("Ads First Round Responses Timeout"),u=t?"Ad Response Timeout":"Ad Responses Received",Azom.closeAdSlotRequestsFirstRound(u)))},logEndemicData:function(n,t){var o,c,s,r,i,l,e,v,h;if(!Azom.endemicAuctionResult||!Azom.endemicAuctionResult.winners||!Azom.endemicAuctionResult.winners.length){console.log("cannot log endemic, auction results unavailable.");return}if(o=n?Azom.endemicAuctionResult.winners:[],!n){var u=null,a=t.slot.getTargeting("impid"),f=a.length?a[0]:"";f?(u=Azom.endemicAuctionResult.winners.find(n=>n.impid===f),u||console.error("unable to find winner from impid: "+f)):console.error("impid unavailable during logging.");u||(u={impid:f?f+" (this impid not found in winners list)":"(impid unavailable)"});o.push(u)}for(c=[],s=0;s<o.length;s++){for(r=o[s],i=[],i.push({name:"log-type",value:n?"bid":"rendered"}),i.push({name:"pageview-unique-id",value:Azom.getPageviewUniqueId()||""}),i.push({name:"impid",value:r.impid||""}),i.push({name:"price",value:r.price||0}),i.push({name:"deal-id",value:r.deal_id||""}),i.push({name:"winner-id",value:r.winner_id||""}),i.push({name:"external-id",value:r.external_id||""}),i.push({name:"bid-width",value:r.w||0}),i.push({name:"bid-height",value:r.h||0}),i.push({name:"total-winners",value:Azom.endemicAuctionResult.winners.length}),i.push({name:"visitor-npi",value:Azom.visitorNpi||""}),i.push({name:"auction-time-taken",value:Azom.endemicAuctionTimeTaken||0}),i.push({name:"total-matched-data",value:Azom.endemicAuctionResult.matched_data?Azom.endemicAuctionResult.matched_data.length||0:0}),n&&i.push({name:"auction-processing-problem",value:r.auctionProcessingProblem||""}),Azom.impressionId&&i.push({name:"azo-impression-id",value:Azom.impressionId}),typeof contentViewData!="undefined"&&(i.push({name:"content-type",value:contentViewData.type}),i.push({name:"content-id",value:contentViewData.id})),i.push({name:"page-url",value:window.location.pathname+(window.location.search||"")}),n||Azom.appendAdSlotRenderData(t,i,!0),l={},e=0;e<i.length;e++)l[i[e].name]=i[e].value;c.push(l)}v=JSON.stringify(c);h=[];h.push({name:"log-data",value:v});n&&h.push({name:"full-auction-response",value:JSON.stringify(Azom.endemicAuctionResult)});Azom.recordClientEvent(!0,"endemiclog",h,!1,null)},loadAdsFirstTime:function(){window.g_loadAdsFirstTime||(window.g_loadAdsFirstTime=!0,googletag.cmd.push(function(){googletag.pubads().refresh()}))},visitorNpi:null,pageviewUniqueId:null,getPageviewUniqueId:function(){return Azom.pageviewUniqueId||(Azom.pageviewUniqueId=crypto.randomUUID()),Azom.pageviewUniqueId},endemicAuctionRequestSentOn:null,endemicAuctionTimeTaken:null,endemicAuctionResult:null,processEndemicResponse:function(n){var r,t,u,i,f;if(Azom.endemicAuctionResult=n,Azom.endemicAuctionTimeTaken=(new Date).getTime()-Azom.endemicAuctionRequestSentOn.getTime(),!n||!n.winners||!n.winners.length){console.log("no endemic winners...");Azom.loadAdsFirstTime();return}if(window.g_loadAdsFirstTime){n.winners.forEach(n=>{n.auctionProcessingProblem="auction results came in after timeout - ads already requested. will not use winners."});Azom.logEndemicData(!0,null);console.log("Endemic data received after timeout - ads already requested.  will not use winners.");return}for(r=0;r<n.winners.length;r++){if(t=n.winners[r],u=g_endemicPlacements.find(function(n){return n.eid===t.external_id}),!u){t.auctionProcessingProblem="unable to find endemic placement item based on external_id. external_id: "+t.external_id;console.error(t.auctionProcessingProblem,t);continue}if(i=g_dfpSlots.find(function(n){return u.units.find(function(t){return n.aduid.endsWith("/"+t)})}),!i){t.auctionProcessingProblem="unable to find slot for endemic placement item. external_id: "+t.external_id;console.error(t.auctionProcessingProblem,t,u);continue}f=window.location.hostname.indexOf("-local")!==-1;f&&i.slotObj.setTargeting("devtest","yes");i.slotObj.setTargeting("impid",t.impid);i.slotObj.setTargeting("endemic_adsize",t.w.toString()+"x"+t.h.toString())}Azom.logEndemicData(!0,null);Azom.loadAdsFirstTime()},initEndemicAds:function(){var i,n,t,e,u,o;if(window.g_isEndemicEligible){if(i=window.navigator.userAgent||"",i&&/Applebot/.test(i)){Azom.loadAdsFirstTime();return}for(n=[],window.g_endemicPlacements=[{eid:"NewsMedical_728x90Top",units:["News-Medical728x90Top","News-Medical728x90Top_NoAS"]},{eid:"NewsMedical_Squares",units:["NewsMedicalSquares","NewsMedicalSquares_NoAS"]},{eid:"NewsMedical_Mobile320x50Top",units:["Mobile320x50Top","Mobile320x50Top_NoAS"]},{eid:"NewsMedical_MobileMREC3MID",units:["MobileMREC3MID","MobileMREC3MID_NoAS"]},{eid:"NewsMedical_MobileMREC2BOT",units:["MobileMREC2BOT","MobileMREC2BOT_NoAS"]},{eid:"NewsMedical_Mobile320x50Bottom",units:["Mobile320x50Bottom","Mobile320x50Bottom_NoAS"]}],t=0;t<g_dfpSlots.length;t++){var r=g_dfpSlots[t],s=r.aduid.substr(9),f=g_endemicPlacements.find(function(n){return n.units.includes(s)});if(!f){console.error("missing endemicPlacement for "+r.aduid);continue}r.runThruEndemic=!0;n.push(f.eid)}if(window.g_haveEndemicAdUnits=n.length>0,!g_haveEndemicAdUnits){Azom.loadAdsFirstTime();return}e=n.join(",");u=window.location.hostname.indexOf("-local")!==-1;Azom.visitorNpi="";o=(u?"https://www.azonetwork-local.com/":"https://serving.mdscpxchg.com/ad")+"?external_ids="+encodeURIComponent(e);Azom.endemicAuctionRequestSentOn=new Date;fetch(o).then(n=>n.json()).then(n=>{Azom.processEndemicResponse(n)}).catch(n=>{console.error("endemic error...",n),Azom.endemicAuctionTimeTaken=(new Date).getTime()-Azom.endemicAuctionRequestSentOn.getTime(),Azom.loadAdsFirstTime(),Azom.endemicAuctionResult={winners:[{impid:"made-up winner to log fetch error",auctionProcessingProblem:"fetch error to run auction. error: "+n}]},Azom.logEndemicData(!0,null)});setTimeout(function(){Azom.loadAdsFirstTime()},u?1500:500)}},prebidTimeout:1500,initAdserver:function(n,t,i){pbjs.initAdserverSet||(pbjs.initAdserverSet=!0,googletag.cmd.push(function(){pbjs.que.push(function(){var t=typeof pbjs.getAdserverTargeting!="function"?{}:pbjs.getAdserverTargeting(),n;Azom.prebidTargetingInBidsBackHandler=t;pbjs.setTargetingForGPTAsync();Azom.initializePrebidTargetingAdjustmentsForPrioritization(i);n=googletag.pubads().getSlots();n&&n.length&&n.forEach(function(n){Azom.removePrebidBidsForPrioritization(n,i)});googletag.pubads().refresh()})}))},prebidEventCounter:0,prebidLastAuctionInitOn:0,curatorIdOnBid:"",aimSignalDetailsOnBid:"",visitorDataOnBid:null,haveVisitorNpiOnBid:!1,lassoBids:"",docereeBidConfig:"",prebidBidStartedAt:0,prebidTargetingAdjustmentsForPrioritization:{},initializePrebidTargetingAdjustmentsForPrioritization:function(n){Azom.prebidTargetingAdjustmentsForPrioritization[n]={totalKeyCountRemoved:0,addedAt:window.performance.now(),slotCount:0,slots:[]}},checkCuratorId:function(){var n="";try{n=typeof getCuratorId+(typeof getCuratorId!="function"?"":". id: "+getCuratorId())}catch(t){n="Exception. "+t}return n},getBidAdUnitIdFromParams:function(n){if(!n||!n.params)return"";var t=n.params;if(Array.isArray(t)){if(!t.length||!t[0])return"";t=t[0]}return t.placementId||t.adUnitId||t.ct||""},initPrebidAdUnits:function(n,t){var a,f,e,s,h,r,c,y,u,v,p,l,w,b,i,k,d;for(Azom.prebidBidStartedAt=window.performance.now(),Azom.visitorDataOnBid=Azom.aimSignalData,Azom.haveVisitorNpiOnBid=Azom.visitorDataOnBid&&Azom.visitorDataOnBid.visitorNpi?!0:!1,a="",a=window.g_aimSignalReceivedAt?"Received "+Math.ceil(Azom.prebidBidStartedAt-window.g_aimSignalReceivedAt).toString()+"ms ago. AIM time taken: "+Math.ceil(window.g_aimTimeTaken).toString()+"ms. Have NPI: "+(Azom.haveVisitorNpiOnBid?"Yes":"No"):window.g_aimAddedAt?"Not Yet Received. AIM added "+Math.ceil(Azom.prebidBidStartedAt-window.g_aimAddedAt).toString()+"ms ago.":"AIM Not Yet Added.",Azom.aimSignalDetailsOnBid=a,f={},e=!1,n.includeLasso&&(e=!0,f.lasso={storageAllowed:!0,bidCpmAdjustment:function(n){return Math.floor(n/2)*2}}),n.includeDoceree&&(e=!0,f.docereeadmanager={bidCpmAdjustment:function(n){return Math.floor(n*2)/2}}),n.includePulsePoint&&(e=!0,f.pulsepoint={bidCpmAdjustment:function(n){return Math.floor(n*2)/2}}),n.includeTheTradeDesk&&(e=!0,f.ttd={bidCpmAdjustment:function(n){return Math.floor(n*2)/2}}),e&&pbjs.que.push(function(){pbjs.bidderSettings=f}),s=[],window.prebidPlacements=[{eid:"NewsMedical_728x90Top",lassoId:"7251",docereeId:"DOC-1352-1",pulsepointId:"781604",units:["News-Medical728x90Top","News-Medical728x90Top_NoAS"]},{eid:"NewsMedical_Squares",lassoId:"7255",docereeId:"DOC-1355-1",pulsepointId:"781607",units:["NewsMedicalSquares","NewsMedicalSquares_NoAS"]},{eid:"NewsMedical_Mobile320x50Top",lassoId:"7260",docereeId:"DOC-1365-1",pulsepointId:"781613",units:["Mobile320x50Top","Mobile320x50Top_NoAS"]},{eid:"NewsMedical_MobileMREC3MID",lassoId:"7250",docereeId:"DOC-1358-1",pulsepointId:"781610",units:["MobileMREC3MID","MobileMREC3MID_NoAS"]},{eid:"NewsMedical_MobileMREC2BOT",lassoId:"7259",docereeId:"DOC-1364-1",pulsepointId:"781611",units:["MobileMREC2BOT","MobileMREC2BOT_NoAS"]},{eid:"NewsMedical_Mobile320x50Bottom",lassoId:"7258",docereeId:"DOC-1360-1",pulsepointId:"781614",units:["Mobile320x50Bottom","Mobile320x50Bottom_NoAS"]}],h=0;h<g_dfpSlots.length;h++)if(r=g_dfpSlots[h],c=r.aduid.split(/\//),c.length===3){var g=c[1],nt=c[2],o=prebidPlacements.find(function(n){return n.units.includes(nt)});if(!o){console.error("missing prebidPlacement for "+r.aduid);continue}(y="/"+g+"/"+o.eid,u=[],n.includeLasso&&(v={adUnitId:o.lassoId,sizes:r.szs},Azom.haveVisitorNpiOnBid&&(v.npi=Azom.visitorDataOnBid.visitorNpi),i={bidder:"lasso",params:v},Azom.haveVisitorNpiOnBid&&(p=JSON.stringify(i),Azom.lassoBids+=(Azom.lassoBids?". ":"")+p),u.push(i)),n.includeDoceree&&(l={placementId:o.docereeId,publisherUrl:window.location.href},t&&(l.gdpr="1",l.gdprConsent=t),i={bidder:"docereeadmanager",params:l},u.push(i)),n.includePulsePoint&&(w={cp:"563676",ct:o.pulsepointId},i={bidder:"pulsepoint",params:w},u.push(i)),n.includeTheTradeDesk&&(b={supplySourceId:"rxnetwork",publisherId:"1"},i={bidder:"ttd",params:b},u.push(i)),u.length<1)||(k={code:r.aduid,mediaTypes:{banner:{sizes:r.szs}},bids:u,ortb2Imp:{ext:{gpid:y}}},r.runThruPbjs=!0,s.push(k))}if(window.g_havePrebidAdUnits=s.length>0,!g_havePrebidAdUnits){Azom.initAdserver();return}d={buckets:[{precision:2,max:2e3,increment:.01}]};pbjs.que.push(function(){var t,i;pbjs.enableAnalytics({provider:"generic",options:{batchSize:15,batchDelay:100,events:{bidRequested:function(n){var f,i,r,e;if(n.bidderCode!=="ttd")return null;var u=[],o=window.performance.now(),t="";for(n.bidderCode==="docereeadmanager"?(Azom.docereeBidConfig&&(t+=(t?". ":"")+"Bid Config: "+Azom.docereeBidConfig),f="OnBid: "+Azom.curatorIdOnBid+", Now: "+Azom.checkCuratorId()+", Doceree Script Load Time: "+Azom.docereeScriptLoadTime+", Doceree Script Fetch Time: "+(window.g_docereeScriptFetchTime||"(none)")+", Doceree Script Load Threshold Exceeded: "+Azom.docereeScriptLoadThresholdExceeded+(window.g_docereeScriptFetchErrorDetails?", Doceree Script Fetch Error: "+window.g_docereeScriptFetchErrorDetails:""),t+=(t?". ":"")+f):n.bidderCode==="lasso"&&Azom.lassoBids&&(t+=(t?". ":"")+"Bids: "+Azom.lassoBids),i=0;i<n.bids.length;i++)r=n.bids[i],e={logType:"bidRequested",timeSinceAuctionStarted:Math.round(o-Azom.prebidLastAuctionInitOn),auctionId:n.auctionId,bidderCode:n.bidderCode,bidderAdUnitId:Azom.getBidAdUnitIdFromParams(r),adUnitCode:r.adUnitCode,message:t},u.push(e);return{logItems:u}},bidResponse:function(n){var t=Azom.haveVisitorNpiOnBid||(n.originalCpm||0)>0,i,r;return(n.bidderCode==="ttd"&&(t=!0),!t)?null:(i=n.statusMessage||"",n.bidderCode==="docereeadmanager",r={logType:"bidResponse",timeSinceAuctionStarted:Math.round(window.performance.now()-Azom.prebidLastAuctionInitOn),auctionId:n.auctionId,bidderCode:n.bidderCode,bidderAdUnitId:Azom.getBidAdUnitIdFromParams(n),adUnitCode:n.adUnitCode,message:i,cpm:n.cpm||0,originalCpm:n.originalCpm||0,timeTaken:n.timeToRespond||0,adWidth:n.width||0,adHeight:n.height||0},{logItems:[r]})},bidAccepted:function(n){if(n.bidderCode==="docereeadmanager"&&n.cpm<=0)return null;var t={aimSignalDetailsOnBid:Azom.aimSignalDetailsOnBid,statusMessage:n.statusMessage,adLength:!n.ad||typeof n.ad!="string"?'(missing or empty "ad")':n.ad.length,adserverTargeting:n.adserverTargeting},i=JSON.stringify(t),r={logType:"bidAccepted",timeSinceAuctionStarted:Math.round(window.performance.now()-Azom.prebidLastAuctionInitOn),auctionId:n.auctionId,bidderCode:n.bidderCode,bidderAdUnitId:Azom.getBidAdUnitIdFromParams(n),adUnitCode:n.adUnitCode,message:i,cpm:n.cpm||0,originalCpm:n.originalCpm||0,timeTaken:n.timeToRespond||0,adWidth:n.width||0,adHeight:n.height||0};return{logItems:[r]}},bidWon:function(n){var t={logType:"bidWon",timeSinceAuctionStarted:Math.round(window.performance.now()-Azom.prebidLastAuctionInitOn),auctionId:n.auctionId,bidderCode:n.bidderCode,bidderAdUnitId:Azom.getBidAdUnitIdFromParams(n),adUnitCode:n.adUnitCode,message:n.statusMessage||"",cpm:n.cpm||0,originalCpm:n.originalCpm||0,timeTaken:n.timeToRespond||0,adWidth:n.width||0,adHeight:n.height||0};return{logItems:[t]}},bidTimeout:function(n){var u,r,f,i,t,e;if(!n||!n.length)return console.error("no timed-out bids found."),null;if(u=n.some(function(n){return n.bidder==="ttd"}),!u&&!Azom.haveVisitorNpiOnBid)return null;for(r=[],f=window.performance.now(),i=0;i<n.length;i++)t=n[i],e={logType:"bidTimeout",timeSinceAuctionStarted:Math.round(f-Azom.prebidLastAuctionInitOn),auctionId:t.auctionId,bidderCode:t.bidder,bidderAdUnitId:Azom.getBidAdUnitIdFromParams(t),adUnitCode:t.adUnitCode,message:""},r.push(e);return{logItems:r}},bidderError:function(n){var t=n.bidderRequest,i=n.error,e,f,o,u,r,s;if(!t||!t.bids||!t.bids.length)return console.error("no bids found in error bidderRequest."),null;if(!i)return console.error("bidderError error is missing."),null;if(e=t.bids.some(function(n){return n.bidder==="ttd"}),!e&&!Azom.haveVisitorNpiOnBid)return null;for(f=[],o=window.performance.now(),u=0;u<t.bids.length;u++)r=t.bids[u],s={logType:"bidderError",timeSinceAuctionStarted:Math.round(o-Azom.prebidLastAuctionInitOn),auctionId:r.auctionId,bidderCode:r.bidder,bidderAdUnitId:Azom.getBidAdUnitIdFromParams(r),adUnitCode:r.adUnitCode,message:"status: "+i.status+", statusText: "+i.statusText+", reason.message: "+(!i.reason||!i.reason.message?"(none)":i.reason.message)},f.push(s);return{logItems:f}},noBid:function(n){var t,i;return!n||!n.bidder?null:(t=n.bidder==="ttd",!t&&!Azom.haveVisitorNpiOnBid)?null:(i={logType:"noBid",timeSinceAuctionStarted:Math.round(window.performance.now()-Azom.prebidLastAuctionInitOn),auctionId:n.auctionId,bidderCode:n.bidder,bidderAdUnitId:Azom.getBidAdUnitIdFromParams(n),adUnitCode:n.adUnitCode,message:""},{logItems:[i]})},adRenderSucceeded:function(n){n=n.bid;var t={logType:"adRenderSucceeded",timeSinceAuctionStarted:Math.round(window.performance.now()-Azom.prebidLastAuctionInitOn),auctionId:n.auctionId,bidderCode:n.bidderCode,bidderAdUnitId:Azom.getBidAdUnitIdFromParams(n),adUnitCode:n.adUnitCode,message:n.statusMessage||"",cpm:n.cpm||0,originalCpm:n.originalCpm||0,timeTaken:n.timeToRespond||0,adWidth:n.width||0,adHeight:n.height||0};return{logItems:[t]}},adRenderFailed:function(n){var t="",i;try{t=JSON.stringify(n)}catch(r){t="Error during JSON serialization: "+r}return i={logType:"adRenderFailed",timeSinceAuctionStarted:Math.round(window.performance.now()-Azom.prebidLastAuctionInitOn),auctionId:n.auctionId,bidderCode:n.bidder,bidderAdUnitId:Azom.getBidAdUnitIdFromParams(n),adUnitCode:n.adUnitCode,message:t},{logItems:[i]}},auctionEnd:function(n){var l=[],d=window.performance.now(),g=Math.round(d-Azom.prebidLastAuctionInitOn),i=Azom.prebidTargetingAdjustmentsForPrioritization[n.auctionId],u,o,t,s,r,a,f,y,e,v,c,b,k;if(i||console.log("auctionTargetingAdjustments not found for auctionId: "+n.auctionId),delete Azom.prebidTargetingAdjustmentsForPrioritization[n.auctionId],i&&i.totalKeyCountRemoved&&i.totalKeyCountRemoved>0&&i.slots&&i.slots.length){if(u=Azom.getPrebidConfig(),!u||!u.bidders||!u.bidders.length){console.log("prebidConfig or bidders unavailable.");return}for(o=0;o<i.slots.length;o++)if(t=i.slots[o],t&&t.priorityBidderCpm&&t.keysRemoved&&t.keysRemoved.length)for(s=0;s<t.keysRemoved.length;s++)if(r=t.keysRemoved[s],r.key.indexOf("hb_pb_")===0){if(a=r.key.substr(6),f=u.bidders.find(function(n){return a.indexOf(n.codeShortened)===0}),!f){console.log("unaccounted for bidderText in auctionEnd: "+a);continue}if(y=("hb_size_"+f.code).substring(0,20),r.values&&r.values.length){if(e=r.values[0],isNaN(e)){console.log("bidAmount is NaN for "+f.code+", key: "+r.key+", values: "+r.values);continue}e=parseFloat(e);var h=t.keysRemoved.find(function(n){return n.key===y}),p=0,w=0;h&&h.values&&h.values.length&&(v=h.values[0],typeof v=="string"&&(c=v.split("x"),c.length===2&&(p=parseInt(c[0],10),w=parseInt(c[1],10))));b={priorityBidderCode:t.priorityBidderCode,priorityBidderCpm:t.priorityBidderCpm};k={logType:"bidDiscarded",timeSinceAuctionStarted:g,auctionId:n.auctionId,bidderCode:f.code,bidderAdUnitId:"",adUnitCode:t.adUnitPath,message:JSON.stringify(b),cpm:e,originalCpm:0,adWidth:p||0,adHeight:w||0};l.push(k)}}}return l.length<1?null:{logItems:l}}},handler:function(n){for(var i,r,e,o,t,s,u=[],f=0;f<n.length;f++){if(i=n[f],!i.logItems||!i.logItems.length){console.error("Prebid dataItem.logItems missing or empty.");continue}for(r=0;r<i.logItems.length;r++)Azom.prebidEventCounter++,e=i.logItems[r],e.eventSequenceId=Azom.prebidEventCounter,u.push(e)}if(u.length<1){console.error("Prebid, have no logItems.");return}o=JSON.stringify(u);t=[];t.push({name:"log-items",value:o});t.push({name:"pageview-unique-id",value:Azom.getPageviewUniqueId()||""});Azom.impressionId&&t.push({name:"azo-impression-id",value:Azom.impressionId});typeof contentViewData!="undefined"&&(t.push({name:"content-type",value:contentViewData.type}),t.push({name:"content-id",value:contentViewData.id}));t.push({name:"page-url",value:window.location.pathname+(window.location.search||"")});Azom.haveVisitorNpiOnBid&&t.push({name:"visitor-npi",value:Azom.visitorDataOnBid.visitorNpi});s={"X-AZo-Logging":"1"};Azom.recordClientEvent(!0,"prebidlog",t,!1,s)}}});pbjs.onEvent("auctionInit",function(){Azom.prebidLastAuctionInitOn=window.performance.now()});pbjs.addAdUnits(s);pbjs.setConfig({priceGranularity:d});n.includeDoceree&&(Azom.curatorIdOnBid=Azom.checkCuratorId(),t={platformUid:typeof getCuratorId!="function"?"":getCuratorId()},Azom.haveVisitorNpiOnBid&&(t.hcpid=Azom.visitorDataOnBid.visitorNpi,Azom.visitorDataOnBid.primarySpecialtyDescription&&(t.specialization=Azom.visitorDataOnBid.primarySpecialtyDescription)),i={bidders:["docereeadmanager"],config:{docereeadmanager:{user:{data:t}}}},Azom.haveVisitorNpiOnBid&&(Azom.docereeBidConfig=JSON.stringify(i)),pbjs.setBidderConfig(i));n.includeTheTradeDesk&&pbjs.setBidderConfig({bidders:["ttd"],config:{schain:{validation:"relaxed",config:{ver:"1.0",complete:1,nodes:[{asi:"rxnetwork.net",sid:"8430344808469242",hp:1}]}}}});pbjs.requestBids({bidsBackHandler:Azom.initAdserver,timeout:Azom.prebidTimeout})});setTimeout(function(){Azom.initAdserver()},Azom.prebidTimeout+1500)},getPrebidConfig:function(){var t,n;return!window.g_dfpSlots||!window.g_dfpSlots.length?null:(t=BlogEngine.getVisitorCookieAndPrivacyPreferences(),!t.targeting)?null:(n={includeLasso:window.g_enableLasso&&window.g_countryCode==="US",includeDoceree:window.g_enableDoceree,includePulsePoint:window.g_enablePulsePoint,includeTheTradeDesk:window.g_enableTheTradeDesk&&window.g_countryCode==="US",bidders:[]},n.includeLasso&&n.bidders.push({code:"lasso",codeShortened:"lasso",isPriorityBidder:!1}),n.includeDoceree&&n.bidders.push({code:"docereeadmanager",codeShortened:"docere",isPriorityBidder:!1}),n.includePulsePoint&&n.bidders.push({code:"pulsepoint",codeShortened:"pulsep",isPriorityBidder:!0}),n.includeTheTradeDesk&&n.bidders.push({code:"ttd",codeShortened:"ttd",isPriorityBidder:!1}),n.bidders.length<1)?null:n},docereeScriptWaitFrom:0,docereeScriptLoadTime:0,pendingDocereeScript:!1,docereeScriptLoadThresholdExceeded:!1,docereeScriptInjectedAt:null,processDocereeScript:function(){var t,n;if(!Azom.docereeScriptInjectedAt&&Azom.pendingDocereeScript&&(window.g_docereeScriptContents&&window.g_docereeScriptContents.indexOf("getCuratorId")===-1&&(window.g_docereeScriptFetchErrorAt||(window.g_docereeScriptFetchErrorAt=window.performance.now()),window.g_docereeScriptFetchErrorDetails=(window.g_docereeScriptFetchErrorDetails?window.g_docereeScriptFetchErrorDetails+". ":"")+"getCuratorId is unexpectedly missing from the script. in case there's an issue with the downloaded script, e.g. temporary issue etc, won't use the script contents. window.g_docereeScriptContents.length: "+window.g_docereeScriptContents.length+", beginning of script: "+window.g_docereeScriptContents.substr(0,500),window.g_docereeScriptContents=""),window.g_docereeScriptContents||window.g_docereeScriptFetchErrorAt||Azom.docereeScriptLoadThresholdExceeded)){if(window.g_docereeScriptContents){try{t=$(document.createElement("script")).attr("data-siteId","280").attr("data-platId","1").attr("data-pubId","23").text(window.g_docereeScriptContents).appendTo($("body"))}catch(i){window.g_docereeScriptFetchErrorAt||(window.g_docereeScriptFetchErrorAt=window.performance.now());window.g_docereeScriptFetchErrorDetails=(window.g_docereeScriptFetchErrorDetails?window.g_docereeScriptFetchErrorDetails+". ":"")+'Error injecting Doceree script onto the page. This is after validating it contains "getCuratorId". error: '+(i||"(no error details)")+". window.g_docereeScriptContents.length: "+window.g_docereeScriptContents.length+", beginning of script: "+window.g_docereeScriptContents.substr(0,500)}n=window.performance.now();Azom.docereeScriptLoadTime=Math.ceil(n-Azom.docereeScriptWaitFrom);window.g_docereeScriptContents="";Azom.docereeScriptInjectedAt=window.performance.now()}window.g_docereeScriptFetchStartAt&&(window.g_docereeScriptFetchCompletedAt||window.g_docereeScriptFetchErrorAt)&&(window.g_docereeScriptFetchTime=Math.ceil((window.g_docereeScriptFetchCompletedAt||window.g_docereeScriptFetchErrorAt)-window.g_docereeScriptFetchStartAt));Azom.pendingDocereeScript=!1;Azom.initPrebid()}},preInitPrebid:function(){var n=Azom.getPrebidConfig();n&&(googletag.cmd.push(function(){googletag.pubads().disableInitialLoad()}),n.includeDoceree&&(Azom.pendingDocereeScript=!0,Azom.docereeScriptWaitFrom=window.performance.now(),window.g_docereeScriptContents||window.g_docereeScriptFetchErrorAt?Azom.processDocereeScript():window.setTimeout(function(){Azom.pendingDocereeScript&&(Azom.docereeScriptLoadThresholdExceeded=!0,Azom.processDocereeScript())},300)))},prebidInitReady:!1,hasPrebitInitRun:!1,initPrebid:function(){var t,n;if(Azom.prebidInitReady&&!Azom.hasPrebitInitRun&&(t=!1,Azom.pendingDocereeScript&&(t=!0),window.g_pendingAimResponse&&(Azom.aimPendingResponseTimeout||(Azom.aimPendingResponseTimeoutAddedAt=window.performance.now(),Azom.aimPendingResponseTimeout=window.setTimeout(function(){Azom.aimPendingResponseTimeout=null;window.g_pendingAimResponse&&(Azom.aimResponseTimeLimitHitStartedPrebid=!0);window.g_pendingAimResponse=!1;Azom.initPrebid()},1e3)),t=!0),!t)&&(Azom.hasPrebitInitRun=!0,n=Azom.getPrebidConfig(),n)){if(window.pbjs=window.pbjs||{},pbjs.que=pbjs.que||[],!window.g_isIabTcfInUse){Azom.initPrebidAdUnits(n,null);return}window.__tcfapi("getTCData",2,function(t,i){i?Azom.initPrebidAdUnits(n,t.tcString):(console.error("Failed to get TCData"),Azom.initPrebidAdUnits(n,null))})}},aimPendingResponseTimeout:null,aimPendingResponseTimeoutAddedAt:0,prebidDelayWaitingForAim:0,aimResponseTimeLimitHitStartedPrebid:!1,aimSignalData:null,processAimSignal:function(n,t){var r,e,o,i,c;window.g_aimSignalReceivedAt=window.performance.now();window.g_aimTimeTaken=window.g_aimSignalReceivedAt-(window.g_aimAddedAt||0);Azom.aimSignalData={success:t,err:n,visitorNpi:!t||!t.npi_number?"":t.npi_number,primarySpecialtyDescription:!t||!t.primary_specialty_description?"":t.primary_specialty_description};Azom.aimPendingResponseTimeoutAddedAt&&(Azom.prebidDelayWaitingForAim=window.g_aimSignalReceivedAt-Azom.aimPendingResponseTimeoutAddedAt);r="";e="";e=Azom.prebidBidStartedAt?"Prebid started "+Math.ceil(window.g_aimSignalReceivedAt-Azom.prebidBidStartedAt).toString()+"ms ago. aimResponseTimeLimitHitStartedPrebid: "+Azom.aimResponseTimeLimitHitStartedPrebid+". Time since Prebid Delay first began: "+Math.ceil(Azom.prebidDelayWaitingForAim).toString()+"ms.":"Prebid not yet started. aimResponseTimeLimitHitStartedPrebid: "+Azom.aimResponseTimeLimitHitStartedPrebid+". Prebid Delay waiting for AIM: "+Math.ceil(Azom.prebidDelayWaitingForAim).toString()+"ms.";r+=(r?". ":"")+e;window.g_pendingAimResponse=!1;Azom.initPrebid();var s={},u={},f="";if(n)if(typeof n=="object")if(n.message&&Object.keys(n).length===1)f=n.message;else try{f=JSON.stringify(n)}catch(h){r+=(r?". ":"")+"Error serializing err. e: "+(h||"").toString()}else f=typeof n=="string"?n:n.toString();if(n||!t?(f=f||"No error, success unavailable.",s.aim_error=f):(t.identity_type==="AUT",t.identity_type&&(u.aim_identity_type=t.identity_type),t.hcp_type&&(u.aim_hcp_type=t.hcp_type),t.professional_designation&&(u.aim_prof_designation=t.professional_designation),t.primary_specialty_description&&(u.aim_primary_specialty=t.primary_specialty_description),t.secondary_specialty_description&&(u.aim_secondary_specialty=t.secondary_specialty_description)),Object.keys(u).length>0&&typeof gtag=="function"&&gtag("set","user_properties",u),Azom.pushAnalyticsEvent("aimxr_signal",s),o="",t)try{o=JSON.stringify(t)}catch(h){r+=(r?". ":"")+"Error serializing success. e: "+(h||"").toString()}i=[];Azom.impressionId&&i.push({name:"azo-impression-id",value:Azom.impressionId});typeof contentViewData!="undefined"&&(i.push({name:"content-type",value:contentViewData.type}),i.push({name:"content-id",value:contentViewData.id}));i.push({name:"aimxr-session-id",value:(window.aim_session_id||"").toString()});i.push({name:"page-url",value:window.location.pathname+(window.location.search||"")});i.push({name:"success-data",value:(o||"").toString()});i.push({name:"error",value:(f||"").toString()});i.push({name:"message",value:(r||"").toString()});i.push({name:"script-added-at",value:(window.g_aimAddedAt||0).toString()});i.push({name:"time-taken",value:window.g_aimTimeTaken.toString()});c={"X-AZo-Logging":"1"};Azom.recordClientEvent(!0,"aimlog",i,!1,c)},getFurtherReadingLinks:function(n){var t=$(n),r=t.data("current-relative-link"),u=t.data("further-reading-tags"),f={currentUrl:r,tags:u},i=jQuery.ajax({type:"POST",url:"/site_services.asmx/GetFurtherReadingLinks","async":!0,data:JSON.stringify(f),cache:!1,contentType:"application/json; charset=utf-8",dataType:"json"});return i.done(function(n){var t=$(".further-reading-list"),r,u,i,f;if(n=n.d,n&&n.Message==="Success"){for(u=t.height(),i=0;i<n.ReadingLinks.length;i++)t.append("<li>"+n.ReadingLinks[i]+"<\/li>");f=t.height();t.css({height:u.toString()+"px",overflow:"hidden"});$("#further-reading-link").remove();t.animate({height:f.toString()+"px"},400,function(){$(this).css({height:"",overflow:""})})}else r=n.Message||"Unexpected data returned",Azom.logInConsole("problem in Azom.getFurtherReadingLinks. "+r)}),i.fail(function(n,t,i){Azom.logInConsole("error in Azom.GetFurtherReadingLinks. textStatus: "+(t||"")+", errorThrown: "+(i||""))}),!1},showMoreContentHubFeatureArticles:function(){return $(".feature-articles-link-container").hide(),$(".more-featured-articles").slideDown(),!1},showContentCitations:function(){var n=$(".content-citations-section");return n.slideToggle(500,function(){var t=$(".content-citations-wrapper h2 a > span"),i=n.is(":visible");t.toggleClass("icon-circle-up",i);t.toggleClass("icon-circle-down",!i)}),!1},checkForProfessionPageView:function(){var u,n,i,t,r;if(typeof g_dfpTargeting!="undefined"&&g_dfpTargeting.length)for(u=typeof g_dfpSlots!="undefined"&&g_dfpSlots.length?!0:!1,n=0;n<g_dfpTargeting.length;n++)if(g_dfpTargeting[n].k==="profession"){if(i=g_dfpTargeting[n].v,Azom.pushAnalyticsEvent("profession_inventory_pageview",{event_label:i}),u)for(t=0;t<g_dfpSlots.length;t++)r=g_dfpSlots[t],Azom.pushAnalyticsEvent("profession_inventory_impression",{event_label:i+" - "+r.ps[0]+"x"+r.ps[1]});break}},lazyLoadImagesObserver:null,lazyLoadImagePendingLoadCount:0,lazyLoadImage:function(n){var t=$(n);t.one("load",function(){var n=$(this);n.removeAttr("data-sizes").removeAttr("data-srcset").removeAttr("data-src").css("height","").removeClass("lazy-load-image").addClass("lazy-image-loaded")});var i=t.attr("data-sizes"),r=t.attr("data-srcset"),u=t.attr("data-src");i&&t.attr("sizes",i);r&&t.attr("srcset",r);u&&t.attr("src",u)},onLazyLoadImageIntersectionChange:function(n){for(var i,t=0;t<n.length;t++)(i=n[t],i.isIntersecting)&&(Azom.lazyLoadImagePendingLoadCount--,Azom.lazyLoadImagesObserver.unobserve(i.target),Azom.lazyLoadImage(i.target));Azom.lazyLoadImagePendingLoadCount>0||(Azom.lazyLoadImagesObserver.disconnect(),Azom.lazyLoadImagesObserver=null)},lazyLoadImages:function(){var n,i,t;if("IntersectionObserver"in window&&(n=$(".lazy-load-image"),!(n.length<1)))for(i={rootMargin:"100px 0px",threshold:0},Azom.lazyLoadImagesObserver=new IntersectionObserver(Azom.onLazyLoadImageIntersectionChange,i),t=0;t<n.length;t++)Azom.lazyLoadImagePendingLoadCount++,Azom.lazyLoadImagesObserver.observe(n[t])},analyticsOnPageIntervalCounter:0,analyticsTimingPingTimeout:null,lastAnalyticsPingSentOn:null,analyticsPingPageLoadOn:null,lastAnalyticsPingInteractionOn:null,onAnalyticsPingInteraction:function(){Azom.lastAnalyticsPingInteractionOn=new Date;Azom.startAnalyticsPingTimer()},onAnalyticsPingPageVisibilityChange:function(){document.visibilityState==="hidden"&&Azom.analyticsTimingPingTimeout&&(window.clearTimeout(Azom.analyticsTimingPingTimeout),Azom.analyticsTimingPingTimeout=null);document.visibilityState==="visible"&&Azom.startAnalyticsPingTimer()},wireUpOrDeactivateAnalyticsPingDomEvents:function(n){if(n){$(document).on("keydown click",Azom.onAnalyticsPingInteraction).on("visibilitychange",Azom.onAnalyticsPingPageVisibilityChange);$(window).on("mousemove scroll",Azom.onAnalyticsPingInteraction)}else $(document).off("keydown click",Azom.onAnalyticsPingInteraction).off("visibilitychange",Azom.onAnalyticsPingPageVisibilityChange),$(window).off("mousemove scroll",Azom.onAnalyticsPingInteraction)},startAnalyticsPingTimer:function(){var i,n,t;if(!Azom.analyticsTimingPingTimeout){if(i=Math.abs(Math.round(((new Date).getTime()-Azom.analyticsPingPageLoadOn.getTime())/1e3)),i>1800){Azom.wireUpOrDeactivateAnalyticsPingDomEvents(!1);return}if(n=0,Azom.lastAnalyticsPingSentOn&&(n=Math.abs(Math.round(((new Date).getTime()-Azom.lastAnalyticsPingSentOn.getTime())/1e3))),n>900){Azom.wireUpOrDeactivateAnalyticsPingDomEvents(!1);return}if(t=0,Azom.lastAnalyticsPingInteractionOn&&(t=Math.abs(Math.round(((new Date).getTime()-Azom.lastAnalyticsPingInteractionOn.getTime())/1e3))),t>900){Azom.wireUpOrDeactivateAnalyticsPingDomEvents(!1);return}Azom.analyticsTimingPingTimeout=window.setTimeout(Azom.sendAnalyticsTimingPing,15e3)}},setupAnalyticsTimingPinging:function(){if(typeof gtag=="undefined"){window.googleAnalyticsConfig&&console.log("skipping analytics timing pinging as gtag is not available.");return}Azom.analyticsPingPageLoadOn=new Date;Azom.startAnalyticsPingTimer();Azom.wireUpOrDeactivateAnalyticsPingDomEvents(!0)},sendAnalyticsTimingPing:function(){Azom.analyticsTimingPingTimeout=null;Azom.lastAnalyticsPingSentOn=new Date;Azom.analyticsOnPageIntervalCounter++;var n=Azom.analyticsOnPageIntervalCounter*15;Azom.pushAnalyticsEvent("onpage_interval",{event_label:n.toString()+" seconds"});Azom.startAnalyticsPingTimer()},azoDebounce:function(n,t,i){var r;return function(){var u=this,f=arguments,e=function(){r=null;i||n.apply(u,f)},o=i&&!r;clearTimeout(r);r=setTimeout(e,t);o&&n.apply(u,f)}},wireUpSkipLinks:function(){$(".skip-link").on("click",function(n){var i=$(n.currentTarget),r=i.attr("data-skip-to-selector")||i.attr("href"),t;if(r&&(t=$(r),t.length===1)){var u=t.offset(),f=$("nav.main-menu").height(),e=u.top-f;$("html,body").animate({scrollTop:e.toString()+"px"});t.focus()}return!1})},submitFeedback:function(){var r=$(".feedback-dialog").data("selected-rating"),t=$(".screen-one").data("feedback-emotion"),u=$(".screen-two").data("feedback-choice"),f=$(".screen-three .feedback-message").val(),i=$(".feedback-submitted p"),e=$("#submit-feedback-button"),n=$(".feedback-dialog").data("page-location"),o={ContentType:contentViewData.type,ContentId:contentViewData.id,Rating:r,EmotionKind:t,ReasonKind:u,PageLocationKind:n,Message:f};e.text("Saving...").attr("disabled",!0).addClass("disabled");jQuery.ajax({type:"POST",url:BlogEngine.convertToAbsoluteUrl("/site_services.asmx/SaveFeedback"),data:"{feedback: "+JSON.stringify(o)+"}",contentType:"application/json; charset=utf-8",dataType:"json",success:function(r){Azom.processFeedbackSuccess(r,t,i,n)},error:function(t){Azom.processFeedbackError(t,i,n)}})},processFeedbackSuccess:function(n,t,i,r){var f=n.d,u="";f.IsSuccessful&&(t.indexOf("Positive")!==-1?u="Thanks for letting us know. We'll continue to provide more content like this.":t.indexOf("Negative")!==-1&&(u="Thanks for letting us know. We'll use this feedback to improve our content."));i.text(u);Azom.showFeedbackCompleteScreen(r)},processFeedbackError:function(n,t,i){var u=n.d,r="";u.IsSuccessful||(r="Uh oh, something went wrong. We'll look into it!");t.text(r);Azom.showFeedbackCompleteScreen(i)},showFeedbackCompleteScreen:function(n){switch(n){case"BottomOfContent":$(".screen-three").fadeOut("fast",function(){$(".feedback-submitted").fadeIn("fast",function(){$(".feedback-dialog").delay(5e3).slideUp(1e3)})});break;case"SocialIconsSidebar":$(".screen-three").fadeOut("fast",function(){$(".feedback-dialog #close-dialog").on("click",Azom.onFeedbackCompleteCloseClick);$(".feedback-dialog #close-dialog").show();$(".feedback-submitted").fadeIn("fast")})}},onFeedbackCompleteCloseClick:function(){$.magnificPopup.close()},loadedAdSense:!1,loadAdSenseAds:function(){var n,t;if(!Azom.loadedAdSense&&(n=$("ins.adsbygoogle:visible"),!(n.length<1))){if(!window.g_canShowAdSense){$(".csi-590-80-wrap, .csi-300-370-wrap").hide();return}Azom.loadedAdSense=!0;t=BlogEngine.getVisitorCookieAndPrivacyPreferences();window.g_isIabTcfInUse||window.g_isIabGppInUse||t.targeting||((adsbygoogle=window.adsbygoogle||[]).requestNonPersonalizedAds=1,n.attr("data-restrict-data-processing","1"));n.each(function(){var n=null,t=$(this),i;t.hasClass("csi-590-80")?n=Azom.getFallbackHouseAd(728,90):t.hasClass("csi-300-370")&&(n=Azom.getFallbackHouseAd(300,250));n&&(i=Azom.createFallbackHouseAdLink(n),t.append(i))}),function(){var n=document.createElement("script"),t;n.src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js";n.async=!0;n.type="text/javascript";t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(n,t)}();n.each(function(){(adsbygoogle=window.adsbygoogle||[]).push({})})}},hideNonDisplayableAdSlots:function(){typeof g_displayableSlots!="undefined"&&(g_displayableSlots.desktopLeaderboard||$("#top-banner-ad").hide(),g_displayableSlots.desktopSquares||$(".sidebar-mrec-wrap").hide(),g_displayableSlots.mobileTopLeaderboard||$("#mobile-top-promo-spot").hide(),g_displayableSlots.mobileBottomLeaderboard||$("#mobile-bottom-promo-spot").hide(),g_displayableSlots.mobileMiddleMrec&&g_displayableSlots.mobileBottomMrec||$(".mobile-promo-mrec").hide(),g_displayableSlots.csi590x80||$(".csi-590-80-wrap").hide(),g_displayableSlots.csi300x370||$(".csi-300-370-wrap").hide())},populateTimeZoneList:function(){var t,n;const i=moment.tz.names();for(n="",t=0;t<i.length;t++){let r=moment(new Date).tz(i[t]).format("Z");n+='<option value="'+i[t]+'">(GMT'+r+") "+i[t].replace(/_/gi," ")+"<\/option>"}$(".ddlTimezones").html(n);n=$(".ddlTimezones option");n.detach().sort(function(n,t){let[i,r]=$(n).text().replace("(GMT","").split(")")[0].split(":"),[u,f]=$(t).text().replace("(GMT","").split(")")[0].split(":");return+i*60+r-(+u*60+f)});n.appendTo(".ddlTimezones");$(".ddlTimezones").val($("#hdnUserTimezone").val()).change()},setDateFromTimeZone:function(){$(".ddlTimezones").on("change",function(){var n=this.value,t=$(this).find("option:selected").text();$(".hdnWebinarDate").each(function(){const i=$(this),u=i.closest("li"),e=(u.attr("data-exclude-dayofweek")||"")==="1",o=(u.attr("data-use-short-months")||"")==="1";let r=moment(new Date(i.text())).tz(n),s=moment(r).format("Z"),f=t.split("(GMT"),h=f[1].split(")")[1],c=f[0].concat("(GMT",s,")",h);i.find(".hdnTimeZoneWithNewOffset").val(c);const l=o?"MMM D, YYYY":"MMMM D, YYYY";let a=moment(r).format(l),v=moment(r).format("dddd").substring(0,3),y=moment(r).format("LT");i.siblings(".webinar-date-date").children(".webinar-timezone-date").text((e?"":v+" ")+a);i.siblings(".webinar-date-time").children(".webinar-timezone-time").text(y)})})},initWebinarDateTimeZones:function(){Azom.setDateFromTimeZone();Azom.populateTimeZoneList();$(".ddlTimezones").chosen({width:"100%"});$(".ddlTimezones").each(function(){let i=$(this),u=i.attr("id"),n=i.next(".chosen-container"),f=n.find("input.chosen-search-input"),t=n.find(".chosen-results"),r="tz-listbox-"+this.id;searchId=u+"_search";r=u+"_listbox";n.attr({"aria-haspopup":"listbox","aria-expanded":"false","aria-labelledby":"lblTimezones","aria-describedby":"timezone-help"});f.attr({id:searchId,name:searchId,placeholder:"Search time zones",title:"Search time zones","aria-label":"Search time zones"});t.attr({id:r,title:"Time zone options list",tabindex:"-1","aria-hidden":"true"});f.attr("aria-controls",r);i.on("chosen:showing_dropdown",function(){t.removeAttr("aria-hidden");n.attr("aria-expanded","true");t.focus()}).on("chosen:hiding_dropdown",function(){t.attr("aria-hidden","true");n.attr("aria-expanded","false")})})},scrollToElement:function(n){var t=$(n);if(t.length<1)return!1;var r=t.offset(),u=$(".main-menu").height(),i=$(".share-box").height(),f=r.top-u-(i<100?i:0)-10;return $("html, body").animate({scrollTop:f},400),!1},checkReferrer:function(){var n=document.referrer,u,t,r,i;if(n&&(u=n.indexOf("//"),!0)&&(t=u+2,r=n.indexOf("/",t),r!==-1)){if(i=n.substr(t,r-t),i){if(i.toLowerCase()===window.location.hostname.toLowerCase())return}else return;Azom.createCookie("rfrlsite",i,null)}},checkInboundSource:function(){for(var t,f,h,c,i,e,l,o,u,r,n=[],a=[],s=1;s<3;s++){if(t=null,s===1?t=window.location.search:(f=document.referrer,f&&(h=f.indexOf("?"),h!==-1&&(t=f.substr(h)))),t){if(t.toLowerCase().indexOf("utm_")===-1&&t.toLowerCase().indexOf("referrer=")===-1)continue}else continue;for(n.length===0&&(n.push({parmName:"utm_source",cookieName:"ibutmsource"}),n.push({parmName:"utm_medium",cookieName:"ibutmmedium"}),n.push({parmName:"utm_campaign",cookieName:"ibutmcampaign"}),n.push({parmName:"referrer",cookieName:"ibreferrer"})),c=t.substr(1).split("&"),i=[],e=0;e<c.length;e++)l=c[e].split("="),i.push({key:l[0],value:l[1]});for(o=0;o<n.length;o++)if(u=n[o],$.inArray(u.parmName,a)===-1)for(r=0;r<i.length;r++)i[r].key.toLowerCase()===u.parmName&&i[r].value&&(a.push(u.parmName),Azom.createCookie(u.cookieName,i[r].value,null))}},checkInboundDetails:function(){BlogEngine.getVisitorCookieAndPrivacyPreferences().performance&&(Azom.checkReferrer(),Azom.checkInboundSource())},isTrendMdUnavailable:!1,trendMdAvailabilityCheckTimeout:null,trendMdAvailabilityCheckCounter:0,loadedTrendMdFallbacks:!1,loadTrendMdFallbacks:function(){if(Azom.loadedTrendMdFallbacks){console.log("TrendMD fallbacks already loaded.");return}Azom.loadedTrendMdFallbacks=!0;$("#trendmd-conditional-suggestions").hide();$("body").removeClass("with-tmdrw");Azom.logPromotedItems()},checkTrendMdAvailability:function(){var t;if(Azom.trendMdAvailabilityCheckCounter++,Azom.trendMdAvailabilityCheckTimeout=null,!Azom.isTrendMdUnavailable){var u=window.g_pageLoadStartOn?(new Date).getTime()-window.g_pageLoadStartOn.getTime():-1,n=$("#trendmd-conditional-suggestions"),f=n.children().length,i=n.outerHeight(!0)||0,r="Length: "+n.length.toString()+", Child Elements: "+f.toString()+", Height: "+i.toString()+", Counter: "+Azom.trendMdAvailabilityCheckCounter.toString()+", Time since load (ms): "+u.toString();i<275?(t=Azom.trendMdAvailabilityCheckCounter<1,Azom.pushAnalyticsEvent(t?"trendmd_waiting":"trendmd_wait_timeout",{event_label:r}),t?Azom.trendMdAvailabilityCheckTimeout=window.setTimeout(Azom.checkTrendMdAvailability,2e3):Azom.loadTrendMdFallbacks()):Azom.pushAnalyticsEvent("trendmd_found",{event_label:r})}},onTrendMdRequested:function(){var n=$("#trendmd-conditional-suggestions").length>0;n&&(Azom.pushAnalyticsEvent("trendmd_requested",null),Azom.trendMdAvailabilityCheckTimeout=window.setTimeout(Azom.checkTrendMdAvailability,5e3))},onTrendMdUnavailable:function(){var i=$("#trendmd-conditional-suggestions").length>0,n,t;if(!i){console.error("TrendMD conditional load widget not found in onTrendMdUnavailable.");return}Azom.isTrendMdUnavailable=!0;Azom.trendMdAvailabilityCheckTimeout&&(window.clearTimeout(Azom.trendMdAvailabilityCheckTimeout),Azom.trendMdAvailabilityCheckTimeout=null);n=Azom.loadedTrendMdFallbacks?"trendmd_unavail_fallbacks_already_loaded":"trendmd_unavailable";t=window.g_pageLoadStartOn?(new Date).getTime()-window.g_pageLoadStartOn.getTime():-1;Azom.pushAnalyticsEvent(n,{event_label:"Time Elapsed (ms): "+t.toString()});Azom.loadTrendMdFallbacks()},loadTrendMd:function(){if(window.g_trendMdJournalId){window.trendmdRejects=function(){$(function(){Azom.onTrendMdUnavailable()})};$(function(){Azom.onTrendMdRequested()});var t=$(document.createElement("script")).attr("src","//js.trendmd.com/trendmd.min.js").attr("data-trendmdconfig",'{"journal_id":"'+window.g_trendMdJournalId+'", "element":"#trendmd-suggestions"}'),n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t[0],n)}},logPromotedItems:function(){var n=$(".promoted-item:visible:not([data-event-logged])");n.length<1||n.each(function(){var n=$(this),t=n.attr("data-event-label");t&&(n.attr("data-event-logged","true"),Azom.pushAnalyticsEvent("ebook_promo_impression",{event_label:t}))})},evaluateRelatedStoriesAndPromotedItem:function(n){if(Azom.promotedItemFetchTimeout&&(window.clearTimeout(Azom.promotedItemFetchTimeout),Azom.promotedItemFetchTimeout=null),n&&(Azom.promotedItemStatus=n),!(Azom.promotedItemStatus<20)){if(window.g_contentEmbedPromotedItemEligible){var i=$(".promoted-item-embed, .promoted-item-embed-2"),r=i.length>0,t=$(".related-stories-embed");(r||t.find("li").length<1)&&t.hide();$("body").removeClass("promo-item-pending")}(Azom.promotedItemStatus===500||Azom.promotedItemStatus===600)&&Azom.logPromotedItems()}},promotedItemStatus:0,promotedItemFetchTimeout:null,fetchPromotedItem:function(){if(!window.g_fetchPromotedItem)return Azom.evaluateRelatedStoriesAndPromotedItem(20);Azom.evaluateRelatedStoriesAndPromotedItem(2);var n=typeof contentViewData!="undefined",t={"content-type":n?contentViewData.type:"None","content-id":n?contentViewData.id:0,"content-embed-available":window.g_contentEmbedPromotedItemEligible?"true":"false"};Azom.promotedItemFetchTimeout=window.setTimeout(function(){Azom.evaluateRelatedStoriesAndPromotedItem(35)},4e3);jQuery.ajax({type:"POST",url:"/DataServices.axd?action=GetEBookEmbed",data:t,cache:!1,contentType:"application/x-www-form-urlencoded; charset=UTF-8",dataType:"json",success:function(n){var t,i;if(n){if(!n.Markup||!n.EmbedLocation)return Azom.evaluateRelatedStoriesAndPromotedItem(50)}else return Azom.evaluateRelatedStoriesAndPromotedItem(40);return n.EmbedLocation==="content"?(t=$(".related-stories-embed"),t.length!==1)?Azom.evaluateRelatedStoriesAndPromotedItem(80):(t.after(n.Markup),Azom.evaluateRelatedStoriesAndPromotedItem(500)):n.EmbedLocation==="sidebar"?(i=$(".sidebar-ebook-placeholder"),i.length!==1)?Azom.evaluateRelatedStoriesAndPromotedItem(110):(i.replaceWith(n.Markup),Azom.evaluateRelatedStoriesAndPromotedItem(600)):Azom.evaluateRelatedStoriesAndPromotedItem(60)},error:function(n,t,i){Azom.evaluateRelatedStoriesAndPromotedItem(30);Azom.logInConsole("error in Azom.fetchPromotedItem. textStatus: "+(t||"")+", errorThrown: "+(i||""))}})},initSidebarTabAnalytics:function(){var t=$(".nav-sidebar-tabs"),i,n;t.length<1||(i=window.matchMedia("(min-width: 992px)").matches,n="Sidebar Location: "+(i?"Side":"Bottom"),t.find("li").each(function(){var n=$(this),i=n.index(),t=n.find("a");t.attr("data-ga-click-event-label","Tab "+(i+1).toString()+": "+t.text())}),Azom.pushAnalyticsEvent("sidebar_tabs_pageview",{event_label:n}),Azom.initLinkTracking(".nav-sidebar-tabs","sidebar_tabs","tab_click",n,null,null))},initArticleStatusIndicators:function(){if(!($(".article-status-details").length<1)){$(".reviewed-indicator").on("click",function(n){var i=$(n.currentTarget),t;return console.log(i[0]),t=$(".reviewers-notes-modal"),t.data("is-init")||t.on("click",".reviewers-notes-close",function(){$.magnificPopup.close()}).data("is-init",!0),$(".reviewers-notes-content").html(i.attr("data-content")),$.magnificPopup.open({type:"inline",items:{src:".reviewers-notes-modal"},midClick:!0,callbacks:{close:function(){}}}),!1});$(".revised-indicator").on("click",function(){return Azom.scrollToElement("#article-revisions")})}},processCurrentPageHashValues:function(){var n=$.trim((window.location.hash||"").toString()),t,i,r;n&&/^#[-_a-z0-9]+$/i.test(n)&&((t=$("#section-"+n.substr(1)),t.length<1)||(i=t.offset(),r=i.top,$("html, body").animate({scrollTop:r},400)))},getPlausibleProperties:function(){var n=[],t;return(window.g_analyticsContentType&&n.push({key:"content_group",value:window.g_analyticsContentType}),n.length)?(t={},n.forEach(n=>{t[n.key]=n.value}),t):null},recordPlausiblePageview:function(){var n={u:window.location.href},t=Azom.getPlausibleProperties();t&&(n.props=t);plausible("pageview",n)},onCognitoFormsSubmission:function(n){var i,r,t;if(!n||!n.data||!n.data.entry||!n.data.entry.Form){console.log("missing expected CognitoForms submission event data.",n);return}i=n.data.entry;r="["+(i.Form.Id||"---")+"] "+(i.Form.Name||"???");Azom.pushAnalyticsEvent("survey_submitted",{event_label:r});t=[];Azom.impressionId&&t.push({name:"impression-id",value:Azom.impressionId});t.push({name:"event-type-id",value:1});t.push({name:"form-id",value:i.Form.Id||0});t.push({name:"form-name",value:i.Form.Name||""});Azom.recordClientEvent(!0,"surveysubmission",t,!0,null)},wireUpCognitoFormsEvents:function(){var n=0,t=function(){var r,i;if(n++,r=typeof Cognito!="undefined",!r){n>300?console.log("did not find Cognito object in allowed amount of time"):window.setTimeout(t,100);return}if(i=$(".cognito-forms-survey-mount"),i.length===0||i.length===1){Cognito.on("afterSubmit",Azom.onCognitoFormsSubmission);return}i.each(function(){var n=$(this),t=n.attr("id"),i=n.attr("data-cognito-key"),r=n.attr("data-cognito-form"),u,f;if(!t||!i||!r){console.log("cognito form DIV ID, data-cognito-form or data-cognito-key not found.");return}u=Cognito(i);f=u.mount(r,"#"+t);f.on("afterSubmit",Azom.onCognitoFormsSubmission)})};t()},appendContentViewDataSourceParameters:function(n){return!n||typeof contentViewData!="object"?n:n+((n.indexOf("?")===-1?"?":"&")+"fromcnttype="+encodeURIComponent(contentViewData.type)+"&fromcntid="+encodeURIComponent(contentViewData.id.toString()))},recordContentGateEvent:function(n,t,i,r){t="content_gate_"+t;var u=null;i&&(u=u||{},u.event_label=i);r&&(u=u||{},u.event_callback=r);n&&Azom.isGa4Loaded()?gtag("event",t,u):(r&&u&&u.event_callback&&delete u.event_callback,Azom.pushAnalyticsEvent(t,u,r))},getTopWindowAzomObject:function(){var t=window.self===window.top,n=Azom;if(!t)try{n=window.top.Azom}catch(i){n=null;console.log("error getting window.top.Azom",i)}return n},onAZoProfileRegistrationPage2View:function(){var t=window.self===window.top,i=!t,r=Azom.readCookie("cgSigninFlowStarted")==="1",n;if(r){if(n=Azom.getTopWindowAzomObject(),n){if(!n.recordContentGateEvent){console.log("top window Azom object - recordContentGateEvent unavailable");return}}else{console.log("top window Azom object unavailable");return}n.recordContentGateEvent(!1,"signup_page2_view","from popup: "+(i?"yes":"no"),null)}},onAZoProfileRegistrationPage2Submit:function(n){var i=window.self===window.top,r=!i,u=Azom.readCookie("cgSigninFlowStarted")==="1",t;if(!u){if(typeof n=="function")try{n()}catch(f){console.log("error calling eventCallback",f)}return}if(t=Azom.getTopWindowAzomObject(),t){if(!t.recordContentGateEvent){console.log("top window Azom object - recordContentGateEvent unavailable");return}}else{console.log("top window Azom object unavailable");return}t.recordContentGateEvent(!0,"signup_page2_submit","from popup: "+(r?"yes":"no"),n)},insertTapNative:function(){var t={inserted:!1,logMessage:""},o=$('div.item-body .content div[itemprop="articleBody"]').first(),f;if(o.length<1)return t.logMessage="article body not found",t;var s=o.children("p:visible"),n={actualElementCounter:0,elementCounter:0,$element:null},r=null,h=s.length,i=0,u=0,c=window.g_displayableSlots&&window.g_displayableSlots.mobileMiddleMrec,e=".related-content-embed, .promoted-item, ins, .content-sidebar-right";return(c&&(e+=", .mobile-promo-wrap"),s.each(function(){var t=$(this),c=t.find("img, iframe, video").length>0,o,f,s;return c?(h--,!0):(o=t.find('a[href^="#"]').length>=3,o)?(h--,!0):(u++,f=t.next(),f.length<1||f.is(".below-content-common-a"))?!1:f.is(e)?!0:(s=t.prev(),s.is(e))?!0:(i++,i<2)?!0:(n.$element||(n.actualElementCounter=u,n.elementCounter=i,n.$element=t),i<3)?!0:i>3?!1:(r=t,!1)}),!r&&n.$element&&(i=n.elementCounter,u=n.actualElementCounter,r=n.$element),!r)?(t.logMessage="eligible spot not found",t):(f='<div class="tap-native-wrap"><div id="adx_native_ad_xxxxxx"><\/div><script type="text/javascript">(function() {var a="",b=["aid=xxxxxx"];for (var c=0;c<b.length;++c){a+=b[c]+"&";}a+="r="+Math.random()*1e16+"&url="+encodeURIComponent(window.location.href);var x="https://content.tapnative.com/tn/?"+a;var y=document.createElement("script");y.type="text/javascript";y.async=true;y.src=x;var z=document.getElementsByTagName("script")[0];z.parentNode.insertBefore(y, z);})();<\/script><\/div>',f=f.replace(/xxxxxx/g,window.g_tapNativeId),r.after(f),t.inserted=!0,t.logMessage="ec: "+i.toString()+", aec: "+u.toString(),t)},isTapNativeProcessed:!1,loadTapNative:function(){var i,n,t;window.g_tapNativeId&&(Azom.isTapNativeProcessed||(i=BlogEngine.getVisitorCookieAndPrivacyPreferences(),i.targeting)&&(Azom.isTapNativeProcessed=!0,n=Azom.insertTapNative(),t=null,n.logMessage&&(t={event_label:n.logMessage}),Azom.pushAnalyticsEvent("tapnative_"+(n.inserted?"inserted":"not_inserted"),t)))},onNoContentGateToShow:function(){window.g_areInitialOneTrustConsentsAvailable&&Azom.loadTapNative()},closeContentGate:function(n,t){var i=$("#content-gate"),r,u,f;i.length===1&&(r=$("body"),u=r.hasClass("content-gate-active"),u)&&(i.fadeOut(n?400:0,function(){var n=$("body");n.removeClass("content-gate-active")}),f="closed_via_"+t,Azom.recordContentGateEvent(!1,f,null,null))},contentGateIntersectionObserver:null,toggleContentGate:function(){var n=$("#content-gate"),e,c,l,t,i,o,u,a,v,f,y,p;if(n.length!==1){Azom.onNoContentGateToShow();return}if(AZoProfileUtils.loggedInAZoProfileData){if(Azom.isAdSlotRequestsFirstRoundApplicable){if(!Azom.adSlotRequestsFirstRound||!Azom.adSlotRequestsFirstRound.isClosed)return;if(Azom.adSlotRequestsFirstRound.haveOrder){Azom.recordContentGateEvent(!1,"skip_have_display_order",null,null);Azom.onNoContentGateToShow();return}}if(e=AZoProfileUtils.loggedInAZoProfileData,!e||!e.Ia){var s=$("body"),h=s.hasClass("content-gate-active"),r=AZoProfileUtils.isLoggedIntoAZoProfile(),b=r&&n.attr("data-logged-in-once")!=="true";if(r&&n.attr("data-logged-in-once","true"),c=n.attr("data-logged-in-once")==="true",l=n.attr("data-dismissed")==="true",b&&Azom.recordContentGateEvent(!1,"signed_in",null,null),r&&h){Azom.closeContentGate(!1,"post_signin");return}if(r||h||c||l)Azom.onNoContentGateToShow();else{if(t=n.find(".content-gate-contents"),i=t.length<1?!0:!1,i){if(t=$(".content-gate-contents"),t.length<1)return;n.append(t)}if(o=n.find(".dismiss-content-gate").length>0,o&&i)n.on("click",".dismiss-content-gate",function(){var n=$("#content-gate");return n.attr("data-dismissed","true"),Azom.closeContentGate(!0,"close_btn"),!1});if(i)n.on("click",".content-gate-btn a",function(n){var u=$(n.currentTarget),i=u.attr("data-provider"),e;if(!i){console.log("unknown social provider");return}var r=u.attr("href"),o=!!r&&r!=="#",s=o&&i!=="email",t=null,f=!1;return s&&(t=function(){f||(f=!0,window.location.href=r)}),e=BlogEngine.getVisitorCookieAndPrivacyPreferences(),e.performance&&Azom.createCookie("cgSigninFlowStarted","1",null),Azom.recordContentGateEvent(!0,"signin_btn_click",i,t),t&&window.setTimeout(t,500),!1});if(u=n.prevAll(":visible").first(),u.length>0&&(a=u.height(),a>=40&&u.toggleClass("content-gate-previous-element",!0)),v=crypto.randomUUID(),f=window.location.protocol+"//"+window.location.host+"/social-login.axd?action=Login&returnUrl="+encodeURIComponent(window.location.pathname+window.location.search),f=Azom.appendContentViewDataSourceParameters(f),y=window.location.hostname.toLowerCase().indexOf("news-medical")!==-1?"news-medical.api.oneall.com":"azonetwork.api.oneall.com",p=n.find(".content-gate-btn a"),p.each(function(){var t=$(this),n=t.attr("data-provider"),i;if(!n)return!0;switch(n){case"google":case"linkedin":case"facebook":case"apple":break;default:return!0}i="https://"+y+"/socialize/connect/mobile/"+n+"/?nonce="+v+"&callback_uri="+encodeURIComponent(f);t.attr("href",i)}),n.css({opacity:"",display:""}),s.toggleClass("content-gate-active",!0),Azom.recordContentGateEvent(!1,"rendered","close button: "+(o?"yes":"no"),null),i&&!Azom.contentGateIntersectionObserver&&"IntersectionObserver"in window){var k=$("header .logo").height()||0,w=30,d=(k+w+10)*-1,g=w*-1,nt=d.toString()+"px 0px "+g.toString()+"px 0px";Azom.contentGateIntersectionObserver=new IntersectionObserver(n=>{n.forEach(function(n){if(n.isIntersecting){var t=$("#content-gate"),i=t.find(".dismiss-content-gate").length>0;Azom.recordContentGateEvent(!1,"viewable","close button: "+(i?"yes":"no"),null);Azom.contentGateIntersectionObserver.unobserve(n.target)}})},{threshold:0,rootMargin:nt});Azom.contentGateIntersectionObserver.observe(n[0])}}}}},contentGateDisplayCheck:function(){Azom.toggleContentGate()}},function(){var n=window.location.hash;n==="#succeeded"&&window.history&&window.history.replaceState&&window.history.replaceState(null,"",window.location.pathname+window.location.search)}();Azom.runStartupScripts();Azom.checkForRenderedAdSlots();Azom.checkForProfessionPageView();Azom.createCookie("js-enabled","1",null);(window.g_siteSection==="medical"||window.g_siteSection==="lifesciences")&&Azom.pushAnalyticsEvent("sitesection_pageview",{event_label:window.g_siteSection});$(function(){document.location.pathname!=="/"&&(document.location.pathname||"").toString().toLowerCase()!=="/default.aspx"&&(Azom.initLinkTracking(".recentposts","latest_news",null,null,null),Azom.initLinkTracking(".below-content-recommends","suggested_reading",null,null,null),Azom.initLinkTracking(".most-popular-content","most_popular_content",null,null,null),Azom.initLinkTracking("#suggested-content-slider","you_might_also_like",null,null,null),Azom.initLinkTracking(".related-content-embed","related_stories",null,null,null));Azom.initSidebarTabAnalytics();typeof isMobileWebsite!="undefined"&&isMobileWebsite&&typeof g_outputtingAnchorAd!="undefined"&&g_outputtingAnchorAd&&$("body").addClass("has-bottom-anchor-unit");Azom.lazyLoadImages();Azom.checkForAdBlocking();Azom.setupAnalyticsTimingPinging();typeof AZoProfileUtils!="undefined"&&AZoProfileUtils.handleResizingOneAllIframe();($("#profile-login-content").length>0||$(".mobile-menu-profile-become-member").length>0||$(".mobile-menu-profile-logged-in").length>0||$("#comment-form").length>0||$("#newsletter-subscriptions-wrap").length>0)&&(AZoProfileUtils.azoProfileLoginStatusUpdateFns.push(AZoProfileUtils.updateAZoProfileLinksUi),AZoProfileUtils.azoProfileLoginStatusUpdateFns.push(Azom.contentGateDisplayCheck),AZoProfileUtils.checkAZoProfileLoginStatus(),AZoProfileUtils.initAZoProfileIdentityBox());Azom.wireUpSkipLinks();Azom.hideNonDisplayableAdSlots();Azom.logPromotedItems();Azom.fetchPromotedItem();Azom.initArticleStatusIndicators();(function(){})()});jQuery.fn.outerHTML=function(){return jQuery("<div/>").append(this.eq(0).clone()).html()},function(n){var u={className:"autosizejs",id:"autosizejs",append:"\n",callback:!1,resizeDelay:10,placeholder:!0},r=["fontFamily","fontSize","fontWeight","fontStyle","letterSpacing","textTransform","wordSpacing","textIndent","whiteSpace"],i,t=n('<textarea tabindex="-1" style="position:absolute; top:-999px; left:0; right:auto; bottom:auto; border:0; padding: 0; -moz-box-sizing:content-box; -webkit-box-sizing:content-box; box-sizing:content-box; word-wrap:break-word; height:0 !important; min-height:0 !important; overflow:hidden; transition:none; -webkit-transition:none; -moz-transition:none;"/>').data("autosize",!0)[0];t.style.lineHeight="99px";n(t).css("lineHeight")==="99px"&&r.push("lineHeight");t.style.lineHeight="";n.fn.autosize=function(f){return this.length?(f=n.extend({},u,f||{}),t.parentNode!==document.body&&n(document.body).append(t),this.each(function(){function y(){var i,r=window.getComputedStyle?window.getComputedStyle(e,null):!1;r?(i=e.getBoundingClientRect().width,(i===0||typeof i!="number")&&(i=parseFloat(r.width)),n.each(["paddingLeft","paddingRight","borderLeftWidth","borderRightWidth"],function(n,t){i-=parseFloat(r[t])})):i=u.width();t.style.width=Math.max(i,0)+"px"}function k(){var o={},h,c;i=e;t.className=f.className;t.id=f.id;s=parseFloat(u.css("maxHeight"));n.each(r,function(n,t){o[t]=u.css(t)});n(t).css(o).attr("wrap",u.attr("wrap"));y();window.chrome&&(h=e.style.width,e.style.width="0px",c=e.offsetWidth,e.style.width=h)}function o(){var n,r;i!==e?k():y();t.value=!e.value&&f.placeholder?u.attr("placeholder")||"":e.value;t.value+=f.append||"";t.style.overflowY=e.style.overflowY;r=parseFloat(e.style.height);t.scrollTop=0;t.scrollTop=9e4;n=t.scrollTop;s&&n>s?(e.style.overflowY="scroll",n=s):(e.style.overflowY="hidden",n<h&&(n=h));n+=c;r!==n&&(e.style.height=n+"px",t.className=t.className,w&&f.callback.call(e,e),u.trigger("autosize.resized"))}function p(){clearTimeout(l);l=setTimeout(function(){var n=u.width();n!==a&&(a=n,o())},parseInt(f.resizeDelay,10))}var e=this,u=n(e),s,h,c=0,w=n.isFunction(f.callback),b={height:e.style.height,overflow:e.style.overflow,overflowY:e.style.overflowY,wordWrap:e.style.wordWrap,resize:e.style.resize},l,a=u.width(),v=u.css("resize");if(!u.data("autosize")){if(u.data("autosize",!0),(u.css("box-sizing")==="border-box"||u.css("-moz-box-sizing")==="border-box"||u.css("-webkit-box-sizing")==="border-box")&&(c=u.outerHeight()-u.height()),h=Math.max(parseFloat(u.css("minHeight"))-c||0,u.height()),u.css({overflow:"hidden",overflowY:"hidden",wordWrap:"break-word"}),v==="vertical"?u.css("resize","none"):v==="both"&&u.css("resize","horizontal"),"onpropertychange"in e)if("oninput"in e)u.on("input.autosize keyup.autosize",o);else u.on("propertychange.autosize",function(){event.propertyName==="value"&&o()});else u.on("input.autosize",o);if(f.resizeDelay!==!1)n(window).on("resize.autosize",p);u.on("autosize.resize",o);u.on("autosize.resizeIncludeStyle",function(){i=null;o()});u.on("autosize.destroy",function(){i=null;clearTimeout(l);n(window).off("resize",p);u.off("autosize").off(".autosize").css(b).removeData("autosize")});o()}})):this}}(jQuery||$);$(function(){function o(n){return n&&n.toLowerCase()==="true"}let i,u,t=[],n=[];const r=$("#hdnApiDomain").val(),e=$("#hdnWebsiteName").val(),f=$("#hdnLoginRequiredForAzthenaChat").val()==="true";if($(".chat-app-container").length!==0){onAZoProfileLoginStatusChangeForChat=function(){const n=AZoProfileUtils.isLoggedIntoAZoProfile();getIsChatWindowOpen()&&prepareInitialChatWindowElements()};AZoProfileUtils.azoProfileLoginStatusUpdateFns.push(onAZoProfileLoginStatusChangeForChat);checkCookie=function(n){let t=document.cookie.split("; ");for(let i=0;i<t.length;i++){let r=t[i].split("=");if(n==r[0])return!0}return!1};recordAnalyticsEvent=function(n){Azom.pushAnalyticsEvent(n,null)};loadJS=function(n,t,i=true){if(!document.getElementById(t)){let r=document.createElement("script");r.setAttribute("src",n);r.setAttribute("type","text/javascript");r.setAttribute("id",t);r.setAttribute("async",i);document.body.appendChild(r);r.addEventListener("load",()=>{});r.addEventListener("error",n=>{console.log("Error on loading file",n)})}};adjustLatex=function(n){const t=/\\\((.*?)\\\)|\\\[(.*?)\\\]/sg;return t.test(n)?n.replace(t,(n,t,i)=>t?`\\\\(${t}\\\\)`:i?`\\\\[${i}\\\\]`:void 0):n};sendToChat=function(){loadJS("https://cdn.jsdelivr.net/npm/marked@13.0.3/marked.min.js","marked-lib",!0);loadJS("https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js","mathjax-lib",!0);setTimeout(()=>{const n=document.getElementById("waitMessage");n&&(n.style.display="block");setTimeout(()=>{const n=document.getElementById("waitMessage");n&&(n.style.display="none");const t=document.getElementById("waitMessage2");t&&(t.style.display="block")},8e3)},6e3);const u=$(".user-textarea"),f=u.val().toString().trim();if(f){const d=document.getElementById("toggle-button"),s=document.getElementById("send-message-button"),a=document.getElementById("clear-chat-button"),l=document.getElementById("response-types"),v=document.getElementById("stop-response-button"),b=l.value;l.disabled=!0;a.disabled=!0;s.disabled=!0;s.classList.add("disabled");s.setAttribute("data-is-active","true");const h=crypto.randomUUID();t.push(h);s.style.display="none";v.style.display="block";addUserMessage(f);const y=$(".chat-message-container"),k=`                

        <div class="loadingrow">
            <div class="bot-message">
            <div class="bot-icon">
                <svg
                    xmlns="http://www.w3.org/2000/svg"
                    viewBox="0 0 144.23 169.55"
                    focusable="false" role="img">
                    <title>Azthena chat logo</title>
                    <defs></defs>
                    <g>
                        <path
                            class="azthena-color-3"
                            d="m23.48,49c-9.76,9.76-15.8,23.24-15.8,38.13,0,29.77,24.14,53.91,53.91,53.91,14.89,0,28.37-6.04,38.13-15.79-39.85-4.79-71.45-36.39-76.24-76.24Z" />
                        <path
                            class="azthena-color-1"
                            d="m141.6,101.53c3.87-14.41,7.12-50.5-18.4-76.02C89.18-8.51,34.02-8.51,0,25.52l23.48,23.48c9.76-9.76,23.23-15.79,38.12-15.79,29.77,0,53.91,24.14,53.91,53.91,0,14.89-6.03,28.37-15.79,38.12l20.52,20.52,23.79,23.79s-14.44-23.33-2.43-68.02Z" />
                    </g>
                </svg>
            </div>

            <div class="bot-message-content loading">
                <div class="loader" id="loader"></div>
            </div>
            <div class="bot-message-content" id="waitMessage">
                <p>Almost there - just collecting my thoughts.</p>
            </div>

            <div class="bot-message-content" id="waitMessage2">
                <p>Just a few seconds more...</p>
            </div>
        </div>
    `;recordAnalyticsEvent("azthena_chat_process_question_start");y.append(k);u.val("");u.trigger("autosize.resize");const p=!!(typeof contentViewData!="undefined"&&contentViewData.type&&contentViewData.id),c=crypto.randomUUID();let w=!0;$.ajax({type:"POST",url:r+"api/chatbot/azthena2",contentType:"application/json;charset=UTF-8",xhrFields:{withCredentials:!0,onprogress:function(t){if(!n.includes(h)){const u=adjustLatex(t.currentTarget.responseText),i=new marked.Renderer;i.table=function(n,t){return`
                                <div class="tableWrapper" tabindex="0">
                                  <table>
                                    <thead>${n}</thead>
                                    <tbody>${t}</tbody>
                                  </table>
                                </div>
                            `};i.paragraph=function(n){const t=/\\\((.*?)\\\)|\\\[(.*?)\\\]/sg;return t.test(n)?`<p>${n.replace(t,(n,t,i)=>t?`<span>\\(${t}\\)</span>`:i?`<span>\\[${i}\\]</span>`:void 0)}</p>`:`<p>${n}</p>`};marked.use({renderer:i,breaks:!0});const r=marked.parse(u);w?(addChatbotMessageForStreaming(r,c),w=!1):updateChatbotMessageStream(r,c);MathJax.typeset()}}},data:JSON.stringify({message:f,responseType:Number(b),sessionid:i,responseMessageId:h,requestSource:e,azoProfileSessionId:AZoProfileUtils.isLoggedIntoAZoProfile()?AZoProfileUtils.loggedInAZoProfileData.Azops:"",pageContentType:p?contentViewData.type:null,pageContentId:p?contentViewData.id:null,pageAbsoluteUrl:window.location.href}),success:function(n,t,i){let r=i.getResponseHeader("Azthena-Chat-Id"),u=o(i.getResponseHeader("Azthena-Is-Over-Limits")),f=o(i.getResponseHeader("Azthena-Is-Authenticated"));finalizeChatbotMessage(r,c,h,u,f)},error:function(n,t){console.log("PROBLEM");recordAnalyticsEvent("azthena_chat_main_process_error");console.error(`Error ${n.status}: ${t}`);const i=$("div.bot-message[data-message-id='"+c+"']");i&&i.remove();const r=`
                        <div class="azthena-errorrow">
                            <div class="bot-message">
                            <div class="bot-icon">
                                <svg
                                    xmlns="http://www.w3.org/2000/svg"
                                    viewBox="0 0 144.23 169.55" focusable="false" role="img">
                                    <title>Azthena chat logo</title>
                                    <defs></defs>
                                    <g>
                                        <path
                                            class="azthena-color-3"
                                            d="m23.48,49c-9.76,9.76-15.8,23.24-15.8,38.13,0,29.77,24.14,53.91,53.91,53.91,14.89,0,28.37-6.04,38.13-15.79-39.85-4.79-71.45-36.39-76.24-76.24Z" />
                                        <path
                                            class="azthena-color-1"
                                            d="m141.6,101.53c3.87-14.41,7.12-50.5-18.4-76.02C89.18-8.51,34.02-8.51,0,25.52l23.48,23.48c9.76-9.76,23.23-15.79,38.12-15.79,29.77,0,53.91,24.14,53.91,53.91,0,14.89-6.03,28.37-15.79,38.12l20.52,20.52,23.79,23.79s-14.44-23.33-2.43-68.02Z" />
                                    </g>
                                </svg>
                            </div>

                            <div class="bot-message-content" id="errorMessage">
                                <p>Something went wrong. Try to clear the chat and try again.</p>
                            </div>
                        </div>
                        `;y.append(r)},complete:function(t){if(n.includes(h)){setMessageAsStopped(h);return}if(t&&t.responseJSON){const i=t.responseJSON.chatId;if(n.includes(i))return}const i=document.querySelector(".loadingrow");i&&i.remove();s.disabled=!1;s.classList.remove("disabled");l.disabled=!1;a.disabled=!1;s.setAttribute("data-is-active","false");s.style.display="block";v.style.display="none"}})}return!1};beginChatSession=function(){i=crypto.randomUUID();u=0;t=[];n=[]};endChatSession=function(){i=null;u=0;t=[];n=[]};addUserMessage=function(n){const i=$(`
                    <div class="user-message visible">
                        <div class="user-icon">
                            <svg>
                                <use href="/images/user.svg#icon"></use>
                            </svg>
                        </div>
                        <div class="user-message-content">
       
                        <p>${Encoder.htmlEncode(n)}</p>
        
                        </div>
                </div>
                `),t=$(".chat-message-container");t.append(i);scrollToBottomOfChatMessageContainer(t,null)};addChatbotMessageForStreaming=function(n,t){const i=$(".chat-message-container");let r=n;r.indexOf("<p")===-1&&(r="<p>"+r+"<\/p>");const f=$(`
                <div class="bot-message visible" data-message-id="${t}">

                    <div class="bot-icon">
                        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 144.23 169.55"
                            focusable="false" role="img">
                            <title>Azthena chat logo</title>
                            <defs></defs>
                            <g>
                                <path class="azthena-color-3" d="m23.48,49c-9.76,9.76-15.8,23.24-15.8,38.13,0,29.77,24.14,53.91,53.91,53.91,14.89,0,28.37-6.04,38.13-15.79-39.85-4.79-71.45-36.39-76.24-76.24Z"></path>
                                <path class="azthena-color-1" d="m141.6,101.53c3.87-14.41,7.12-50.5-18.4-76.02C89.18-8.51,34.02-8.51,0,25.52l23.48,23.48c9.76-9.76,23.23-15.79,38.12-15.79,29.77,0,53.91,24.14,53.91,53.91,0,14.89-6.03,28.37-15.79,38.12l20.52,20.52,23.79,23.79s-14.44-23.33-2.43-68.02Z"></path>
                            </g>
                        </svg>
                    </div>

                    <div class="bot-message-content">
                
                        ${r}
                    
                    </div>
                </div>
        `),u=i.find(".loadingrow");u&&u.remove();i.append(f);var e=i.find(`[data-message-id="${t}"]`);scrollToBottomOfChatMessageContainer(i,e)};updateChatbotMessageStream=function(n,t){const i=$("div.bot-message[data-message-id='"+t+"']");i.find(".bot-message-content").html(n);scrollToBottomOfChatMessageContainer(null,i)};finalizeChatbotMessage=function(n,t,i,r,u){const f=$("div.bot-message[data-message-id='"+t+"']"),e=f.find(".bot-message-content");if(!u){recordAnalyticsEvent("azthena_chat_unauthenticated");e.append('To continue chatting, <a href="#" class="azthena-login-azoprofile">login to your AZoProfile<\/a>.');$(document).off("click.azthena-chat").on("click.azthena-chat",".azthena-login-azoprofile",function(){return openAZoProfileLoginPopup(),!1});disableChatControls()}if(r&&(recordAnalyticsEvent("azthena_chat_over_limits_"+(u?"authenticated":"unauthenticated")),reenableChatControls()),n){f.attr("data-message-id",i);const t=f.find(".bot-message-content");responseMessageActionsMarkup=$(`
                <div class="row-content-actions">
                  <a class="fa-thumbs-up" title="Like" href="">
                    <svg role="img">
                      <title>Like response</title>
                      <use href="/images/thumb-up.svg#icon" />
                    </svg>
                  </a>
                  <a class="fa-thumbs-down" title="Dislike" href="">
                    <svg role="img">
                      <title>Dislike response</title>
                      <use href="/images/thumb-down.svg#icon" />
                    </svg>
                  </a>
                  <a class="fa-comment-dots response-feedback-link" title="Provide Feedback" href="">
                    <svg role="img">
                       <title>Provide Feedback</title>
                      <use href="/images/comment.svg#icon" />
                    </svg>
                  </a>
                </div>
            `);let u=responseMessageActionsMarkup[0]?responseMessageActionsMarkup[0].outerHTML:"";t.append(u);f.find(".fa-thumbs-up").on("click",function(n){return processChatbotMessageRating($(this)),n.preventDefault(),!1});f.find(".fa-thumbs-down").on("click",function(n){return processChatbotMessageRating($(this)),n.preventDefault(),!1});f.find(".fa-comment-dots").on("click",function(n){const i=$(this).closest("div.bot-message").data().messageId,t=$(this).closest("div.bot-message").data().userComment;return $("#chat-response-feedback-dialog").find("textarea").val(""),t&&$("#chat-response-feedback-dialog").find("textarea").val(t),$.magnificPopup.open({type:"inline",items:{src:"#chat-response-feedback-dialog"},mainClass:"mfp-3d-unfold",removalDelay:500,midClick:!0}),initialiseAiResponseFeedbackDialog(i),n.preventDefault(),!1});!r&&n&&recordAnalyticsEvent("azthena_chat_response_displayed")}};setMessageAsStopped=function(t){n.push(t);$.ajax({type:"GET",url:r+"api/chatbot/set-stopped?chatId="+t,contentType:"application/json;charset=UTF-8",xhrFields:{withCredentials:!0},success:function(){},error:function(n,t){recordAnalyticsEvent("azthena_chat_set_stop_error");console.error(`Error ${n.status}: ${t}`)},complete:function(){$("#stop-response-button").hide();$("#send-message-button").show()}})};disableChatControls=function(){$(".user-textarea-container").css("background-color","#eee").find("textarea, input").prop("disabled",!0);$(".user-textarea-container").find("textarea, input").css("background-color","#eee")};reenableChatControls=function(){$(".user-textarea-container").css("background-color","#fff").find("textarea, input").prop("disabled",!1);$(".user-textarea-container").find("textarea, input").css("background-color","")};initialiseAiResponseFeedbackDialog=function(n){$(".response-feedback-cancel-button").off("click").on("click",function(){$.magnificPopup.close({callbacks:{close:function(){$(".chat-response-feedback-textarea").val("")}}})});$(".response-feedback-submit-button").off("click").on("click",function(){const t=$(".chat-response-feedback-textarea").val().trim();if(t!==""){$("#modal-feedback").css("display","none");const i=$("div.bot-message[data-message-id='"+n+"']");i.data("user-comment",t);const r=i.find(".fa-comment-dots");r.toggleClass("clicked",!!t);const u=getRatingNumberForMessage(i);recordAnalyticsEvent("azthena_chat_feedback_added");saveChatbotMessageRating(n,u,t)}})};processChatbotMessageRating=function(n){const t=n.closest(".bot-message"),i=n.hasClass("fa-thumbs-up"),u=n.hasClass("fa-thumbs-down"),o=t.find(".fa-comment-dots").hasClass("clicked");i&&(n.toggleClass("clicked"),t.find(".fa-thumbs-down").removeClass("clicked"));u&&(n.toggleClass("clicked"),t.find(".fa-thumbs-up").removeClass("clicked"));const f=t.data("user-comment")||"",r=getRatingNumberForMessage(t),e=t.attr("data-message-id");recordAnalyticsEvent("azthena_chat_"+(i?"up":"down")+"_rating_"+(r===0?"removed":"added"));saveChatbotMessageRating(e,r,f)};getRatingNumberForMessage=function(n){const t=n.find(".fa-thumbs-up").hasClass("clicked"),i=n.find(".fa-thumbs-down").hasClass("clicked");return t?1:i?-1:0};saveChatbotMessageRating=function(n,t,i){$.ajax({type:"POST",url:r+"api/chatbot/save-message-rating",contentType:"application/json;charset=UTF-8",xhrFields:{withCredentials:!0},data:JSON.stringify({chatId:n,rate:t,comment:i}),success:function(){$("#chat-response-feedback-dialog").find("textarea").val("");$.magnificPopup.close()},error:function(n,t){recordAnalyticsEvent("azthena_chat_save_rating_error");console.error(`Error ${n.status}: ${t}`)},complete:function(){}})};getIsChatWindowOpen=function(){return $("body").hasClass("chat-window-visible")};toggleChatWindow=function(n){const i=$(".chat-launcher-icon button"),u=$(".chat-app-container").css("bottom");i.attr("data-original-tooltip")||i.attr("data-original-tooltip",i.attr("data-tooltip"));const f=$("body").hasClass("sharebox-top-show"),r=getIsChatWindowOpen(),t=$(".chat-app-container");if(!t.data("is-init")){t.on("transitionend",function(){const n=$(".chat-app-container"),t=n.height()<10;t&&($("body").removeClass("chat-window-visible"),n.hide())});t.data("is-init",!0)}if(r)recordAnalyticsEvent("azthena_chat_closed_via_"+n),t[0].style.setProperty("height","0","important"),t[0].style.setProperty("width","0","important"),t[0].style.setProperty("opacity","0","important"),i.find("svg").fadeOut("fast",function(){$(this).replaceWith(`
                        <img src="/images/ai-chat-icon.svg" />
                        `).hide().fadeIn("fast")}),i.attr("data-tooltip",i.attr("data-original-tooltip"));else{recordAnalyticsEvent("azthena_chat_opened_via_"+n);t.css({display:"",height:"",width:"",opacity:""});const u=t.css("display");$("body").addClass("chat-window-visible");let r=t.find(".user-textarea");r.data("is-init")||(r.autosize(),r.data("is-init",!0));i.find("img").fadeOut("fast",function(){$(this).replaceWith(`
                            <svg version="1.1" viewBox="0 0 36 36" xml:space="preserve" 
                                xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
                                focusable="false" role="img">
                                <title>Close Chat Window</title>
                                <g id="icons">
                                    <path class="st0" d="M6.2,3.5L3.5,6.2c-0.7,0.7-0.7,1.9,0,2.7l9.2,9.2l-9.2,9.2c-0.7,0.7-0.7,1.9,0,2.7l2.6,2.6   
                                    c0.7,0.7,1.9,0.7,2.7,0l9.2-9.2l9.2,9.2c0.7,0.7,1.9,0.7,2.7,0l2.6-2.6c0.7-0.7,0.7-1.9,0-2.7L23.3,18l9.2-9.2   
                                    c0.7-0.7,0.7-1.9,0-2.7l-2.6-2.6c-0.7-0.7-1.9-0.7-2.7,0L18,12.7L8.8,3.5C8.1,2.8,6.9,2.8,6.2,3.5z" id="close_1_"/>
                                </g>
                            </svg>
                            `).hide().fadeIn("fast")});i.removeAttr("data-tooltip","")}};prepareInitialChatWindowElements=function(){const n=checkCookie("azthenaTermsAccepted");f&&!AZoProfileUtils.isLoggedIntoAZoProfile()?(recordAnalyticsEvent("azthena_chat_login_requirement_shown"),$(".azthena-login-message").show()):$(".azthena-login-message").hide();setupChatTermsElements();toggleChatFooterVisibility()};hasAcceptedTerms=function(){return checkCookie("azthenaTermsAccepted")};setupChatTermsElements=function(){if(f&&!AZoProfileUtils.isLoggedIntoAZoProfile()){const n=$(".default-message").clone(),t=$(".terms-details").clone(!0),i=$(".terms-accepted").clone();$(".chat-message-container div").not(".default-message, .terms-details, .terms-accepted").remove();$(".default-message").replaceWith(n);$(".terms-details").replaceWith(t);$(".terms-accepted").replaceWith(i);$(".terms-details").hide();$(".terms-accepted").hide();return}if($(".azthena-login-message").hide(),hasAcceptedTerms())$(".terms-details").hide();else{$(".terms-details").is(":visible")||recordAnalyticsEvent("azthena_chat_terms_shown");$(".terms-details").show();const n=$(".default-message").clone(),t=$(".terms-details").clone(!0),i=$(".terms-accepted").clone();$(".chat-message-container div").not(".default-message, .terms-details, .terms-accepted").remove();$(".default-message").replaceWith(n);$(".terms-details").replaceWith(t);$(".terms-accepted").replaceWith(i);$(".terms-accepted").hide()}};toggleChatFooterVisibility=function(){const n=hasAcceptedTerms();f&&!AZoProfileUtils.isLoggedIntoAZoProfile()?($(".chat-inputs").find("textarea, input").prop("disabled",!0),$("#send-message-button").addClass("disabled"),$("#clear-chat-button").prop("disabled",!0),$(".chat-app-footer").toggle(!1)):(n?($(".chat-inputs").find("textarea, input").prop("disabled",!1),$("#send-message-button").removeClass("disabled"),$("#clear-chat-button").prop("disabled",!1)):($(".chat-inputs").find("textarea, input").prop("disabled",!0),$("#send-message-button").addClass("disabled"),$("#clear-chat-button").prop("disabled",!0)),$(".chat-app-footer").toggle(n))};scrollToBottomOfChatMessageContainer=function(n,t){var i,e,o,u;if(n=n||$(".chat-message-container"),i=n.prop("scrollHeight"),e=n.scrollTop(),t){if(o=t.attr("data-is-scrolltop-achieved")==="true",o)return;var s=t.prevAll(".user-message"),h=n.outerHeight(),c=s.outerHeight(),l=s.position().top,a=t.position().top,r=0;if(r=c/h>.7?a-150:l,u=15,Math.abs(u-r)<3){t.attr("data-is-scrolltop-achieved","true");return}i=e+r-u}var f=t?t.attr("data-animate-to-scrolltop"):null,v=!f||isNaN(f)?null:parseFloat(f),y=v===i;y||(t&&t.attr("data-animate-to-scrolltop",i.toString()),n.stop(!0,!1).animate({scrollTop:i},400))};openAZoProfileLoginPopup=function(){recordAnalyticsEvent("azthena_chat_login_button_clicked");AZoProfileUtils.showAZoProfileLoginFullOverlay(null);$(".chat-app-container").css("z-index",1041)};$(".chat-launcher-icon button").on("click",function(){prepareInitialChatWindowElements();toggleChatWindow("bubble")});$("body").on("click",".azthena-login-button",function(){openAZoProfileLoginPopup()});$("#agree-azthena-tips").change(function(){this.checked&&($(".azthena-agree-tips-warning").hide(),$("#agree-azthena-tips, .agree-azthena-text").removeClass("invalid-element"))});$(".accept-terms-button").on("click",function(n){const t=$("#agree-azthena-tips").is(":checked");if(t){document.cookie="azthenaTermsAccepted=true; max-age=604800; path=/";$.ajax({type:"POST",url:r+"api/chatbot/azthenaTermsAcceptance",contentType:"application/json;charset=UTF-8",xhrFields:{withCredentials:!0},data:JSON.stringify({azoProfileSessionId:AZoProfileUtils.isLoggedIntoAZoProfile()?AZoProfileUtils.loggedInAZoProfileData.Azops:"",requestSource:e,azthenaEmailsAcceptance:!0}),success:function(){},error:function(n,t){recordAnalyticsEvent("azthena_chat_save_terms_acceptence_error");console.error(`Error ${n.status}: ${t}`)},complete:function(){}});$(".chat-inputs").find("textarea, input").prop("disabled",!1);$(".terms-details").hide();$(".terms-accepted").removeClass("terms-pending-acceptance");$("#clear-chat-button").prop("disabled",!1);$("#send-message-button").removeClass("disabled");$(".agree-azthena-container").removeClass("is-invalid");let n=$(".chat-app-footer");n.css({display:"grid"});const t=n.outerHeight();n.css({display:"none"});$(".chat-app-footer").css({display:"grid",opacity:0,"max-height":"0px"}).animate({opacity:1,"max-height":t.toString()+"px"},200,function(){$(this).css({"max-height":""})});recordAnalyticsEvent("azthena_chat_terms_accepted")}else $(".azthena-agree-tips-warning").show(),$("#agree-azthena-tips, .agree-azthena-text").addClass("invalid-element");n.preventDefault()});$(".close-chat-button, .chat-screen-button, #hide-chat-window").on("click",function(n){toggleChatWindow("x");n.preventDefault()});$(".menu-top-azthena a.open-azthena").on("click",function(){prepareInitialChatWindowElements();toggleChatWindow("top_header_cta")});$("#maximise-minimise-button").on("click",function(){let n=$(".chat-app-container").attr("data-window-maximised")==="true";n=!n;$(".chat-app-container").attr("data-window-maximised",n);recordAnalyticsEvent("azthena_chat_"+(n?"maximized":"unmaximized"));n?$(this).html(`
                <svg class="icon icon-tabler icon-tabler-arrows-minimize" 
                    fill="none" height="24" stroke="currentColor" stroke-linecap="round" 
                    stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24" 
                    width="24" xmlns="http://www.w3.org/2000/svg"
                    focusable="false" role="img">
                    <title>Minimise Chat Window</title>
                    <path d="M0 0h24v24H0z" fill="none" stroke="none"/>
                    <polyline points="5 9 9 9 9 5"/>
                    <line x1="3" x2="9" y1="3" y2="9"/>
                    <polyline points="5 15 9 15 9 19"/>
                    <line x1="3" x2="9" y1="21" y2="15"/>
                    <polyline points="19 9 15 9 15 5"/>
                    <line x1="15" x2="21" y1="9" y2="3"/>
                    <polyline points="19 15 15 15 15 19"/>
                    <line x1="15" x2="21" y1="15" y2="21"/>
                </svg>
            `):$(this).html(`
                <svg class="icon icon-tabler icon-tabler-arrows-maximize" 
                    fill="none" height="24" stroke="currentColor" stroke-linecap="round" 
                    stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24" width="24" 
                    xmlns="http://www.w3.org/2000/svg"
                    focusable="false" role="img">
                    <title>Maximise Chat Window</title>
                    <path d="M0 0h24v24H0z" fill="none" stroke="none"/>
                    <polyline points="16 4 20 4 20 8"/>
                    <line x1="14" x2="20" y1="10" y2="4"/>
                    <polyline points="8 20 4 20 4 16"/>
                    <line x1="4" x2="10" y1="20" y2="14"/>
                    <polyline points="16 20 20 20 20 16"/>
                    <line x1="14" x2="20" y1="14" y2="20"/>
                    <polyline points="8 4 4 4 4 8"/>
                    <line x1="4" x2="10" y1="4" y2="10"/>
                </svg>
            `)});$(".user-textarea").on("keydown",function(n){if(n.keyCode===13&&!n.shiftKey){n.preventDefault();const t=$(this).val().toString().trim(),i=$("#send-message-button").attr("data-is-active")==="true";t&&!i&&$("#send-message-button").click()}});$("#send-message-button").on("click",function(){if(!AZoProfileUtils.isLoggedIntoAZoProfile()){prepareInitialChatWindowElements();return}let n=$(".user-textarea").val().trim();n!==""&&(i==null&&beginChatSession(),u++,sendToChat())});$("#stop-response-button").on("click",function(){recordAnalyticsEvent("azthena_chat_stop_button_clicked");const r=t[t.length-1];n.push(r);$(this).hide();$("#send-message-button").removeClass("disabled").prop("disabled",!1).attr("data-is-active","false").show();document.getElementById("response-types").disabled=!1;document.getElementById("clear-chat-button").disabled=!1;const i=$(".chat-message-container");return i.find("div.loadingrow").remove(),i.find("div.user-message").last().remove(),!1});$(".full-terms-link").magnificPopup({type:"inline",items:{src:"#full-terms-dialog"},mainClass:"mfp-3d-unfold",removalDelay:500,midClick:!0,callbacks:{open:function(){recordAnalyticsEvent("azthena_chat_terms_opened")}}});$("#clear-chat-button").on("click",function(n){const t=$(".default-message").clone();$(".chat-message-container div").not(".default-message").remove();$(".default-message").replaceWith(t);recordAnalyticsEvent("azthena_chat_clear_chat_clicked");endChatSession();n.preventDefault()})}})