function loadHotelData(){$.ajax({type:"GET",url:"/en-us/build/hotel_bing_map_data",data:"{}",dataType:"json",contentType:"application/json; charset=utf-8",success:function(n){HotelDataLoaded($.parseJSON(n));venueuniqueIDtags()},failure:function(){console.log("map data error")}})}function HotelDataLoaded(n){$.each(n,function(n,t){venueHotels.push({name:t.name,address:t.address,directionAddress:t.directionAddress,latitude:t.latitude,longitude:t.longitude,distance:t.distance,price:t.rate,zipcode:t.zipcode,soldout:t.soldout,website:t.href})});loadHotelListdata()}function nameCompare(n,t){return n.name<t.name?-1:n.name>t.name?1:0}function loadHotelListdata(){for(var f=[],o,l,i,a,v,u,y,f=venueHotels,t=0;t<f.length;t++){var n=f[t],h="",c="Available";t>=10&&(h="g-15 dn");var e=$("<tr/>",{"class":h}),r=$("<td/>",{"class":"name"}),b="";b=n.soldout.toLowerCase()==="yes"?"Sold out ":n.price+"/night";t>0?(o=n.name+","+n.directionAddress,n.name=="Hotel Theodore"&&(o=n.directionAddress+","+n.name),l="https://www.bing.com/maps?q="+o+"+to+Washington%20State%20Convention%20Center+directions&FORM=HDRSC4",r.html("<a class='c-hyperlink' href='"+l+"'' aria-label='view this hotel in bing' target='_blank'>"+n.name+"<\/a>")):t==0&&r.html("<a class='c-hyperlink' href='http://bing.com/maps/default.aspx?sp=point."+n.latitude+"_"+n.longitude+"_"+n.name+"_' aria-label='view this hotel in bing' target='_blank'>"+n.name+"<\/a>");i=$("<td/>",{"class":"addressdiv"});i.html(n.address);a=$("<td/>",{"class":"f-sub-categorical mob-hide"});v=n.distance.split(" ").slice(0,2).join(" ");a.html(v);u=$("<td/>",{"class":"f-sub-categorical tab-hide"});u.text("");y=$("<td/>",{"class":"soldout listviewstatuscol"});n.soldout.toLowerCase()=="yes"&&(c="Sold out");y.text(c);var s=$("<td/>",{"class":"f-numerical"}),g=$("<td/>",{"class":"f-numerical tab-hide"}),nt=$("<div/>",{"class":" dib",itemscope:"",itemprop:"offers",itemtype:"http://schema.org/Offer"}),tt=$("<meta/>",{itemprop:"f-priceCurrency",content:"USD"}),k=$("<span/>",{itemprop:"price"});k.text(n.price);var it=$("<span/>",{itemprop:"price","class":"desk-hide"}),p=$("<span/>",{"class":"db desk-hide"}),d=$("<span/>",{"class":"db mob-show"}),w=$("<span/>",{"class":"db"});w.text(t);p.text(n.zipcode);i.append(p);i.append(d);s.append(w);u.text()!=""?e.append(r).append(s).append(i).append(u):e.append(r).append(s).append(i);$(".pricingtab-view tbody").append(e)}}function venueuniqueIDtags(){var n=$("[data-pagename]").attr("data-pagename");$("[data-tag]").each(function(){var i=$(this).attr("id"),t;$(this).addClass("top-parent-element");t=0;$(this).find("a").each(function(){if(!$(this).attr("data-no-tag")){var r=$(this).text().trim();r=r.replace(",","");r=r.replace(/\s+/g,"_");r!=""&&$(this).parents().hasClass("pricingtab-view")&&$(this).attr("id",n+"_"+i+"_"+t+"_"+r);t++}})})}var Events=Events||{},currentPinInfobox=null,venueHotels;(function(n){"use strict";Events.bingMap=Events.bingMap||{};Events.bingMap.init=function(){function o(n){var t="";return n.soldout!=="no"?(t=" soldout",'<div class="infobox'+t+'"><div class="infobox_soldout"><strong>SOLD OUT<\/strong> <a class="infobox_close" href="javascript:Events.bingMap.hideInfobox()"><img src="https://img-prod-cms-rt-microsoft-com.akamaized.net/cms/api/am/imageFileData/RE1T1vq"/><\/a><\/div><div class="infobox_content"><a class="c-heading-5 pt-1 pb-0 " href="'+n.href+'">'+n.name+'<\/a><h4 class="c-paragraph-3 pt-1 pb-0">'+n.address+'<\/h4><h6 class="c-paragraph-3 pt-1 pb-1">'+n.zipcode+'<\/h6><\/div><img class="infobox_pointer" src="https://img-prod-cms-rt-microsoft-com.akamaized.net/cms/api/am/imageFileData/RE1T1vr"/><\/div>'):(t="",'<div class="infobox'+t+'"><div class="infobox_soldout"><a class="infobox_close" href="javascript:Events.bingMap.hideInfobox()"><img src="https://img-prod-cms-rt-microsoft-com.akamaized.net/cms/api/am/imageFileData/RE1T1vq"/><\/a><\/div><div class="infobox_content"><a target="_blank" class="c-heading-5  pt-1 pb-0 " href="'+n.href+'">'+n.name+'<\/a><h4 class="c-paragraph-3 pt-1 pb-0">'+n.address+'<\/h4><h6 class="c-paragraph-3 pt-1 pb-1">'+n.zipcode+'<\/h6><\/div><img class="infobox_pointer" src="https://img-prod-cms-rt-microsoft-com.akamaized.net/cms/api/am/imageFileData/RE1T1vr"/><\/div>')}function u(){n(".MicrosoftMap").css({cursor:"pointer"})}function f(){n(".MicrosoftMap").css({cursor:"move"})}function s(){var c=t.getCenter(),n,e,o,s,i;for(currentPinInfobox=new Microsoft.Maps.Infobox(c,{visible:!1}),t.entities.push(currentPinInfobox),n=0;n<r.length;n++)e=r[n],o="https://img-prod-cms-rt-microsoft-com.akamaized.net/cms/api/am/imageFileData/RWtpJU",n==0&&(o="https://img-prod-cms-rt-microsoft-com.akamaized.net/cms/api/am/imageFileData/RWt7PZ"),e.soldout&&(o="https://img-prod-cms-rt-microsoft-com.akamaized.net/cms/api/am/imageFileData/RWtpJU"),s=new Microsoft.Maps.Location(e.latitude,e.longitude),i=new Microsoft.Maps.Pushpin(s,{text:n.toString(),icon:o,textOffset:new Microsoft.Maps.Point(0,10)}),Microsoft.Maps.Events.addHandler(i,"mouseover",u),Microsoft.Maps.Events.addHandler(i,"mouseout",f),Microsoft.Maps.Events.addHandler(i,"click",h),t.entities.push(i)}function h(n){var i=parseInt(n.target.getText(),10),t=n.target.getLocation();currentPinInfobox.setOptions({visible:!0,offset:new Microsoft.Maps.Point(-100,70),htmlContent:o(r[i])});currentPinInfobox.setLocation(t);e(t)}function c(){l();n.ajax({type:"GET",url:"/en-us/build/hotel_bing_map_data",data:"{}",dataType:"json",contentType:"application/json; charset=utf-8",success:function(t){v(n.parseJSON(t))},failure:function(){console.log("map data error")}})}function l(){var i=new Microsoft.Maps.Location(47.61135,-122.332634),n=new Microsoft.Maps.Pushpin(i,{text:"",icon:"https://img-prod-cms-rt-microsoft-com.akamaized.net/cms/api/am/imageFileData/RWt7PZ",textOffset:new Microsoft.Maps.Point(0,4)});Microsoft.Maps.Events.addHandler(n,"mouseover",u);Microsoft.Maps.Events.addHandler(n,"mouseout",f);Microsoft.Maps.Events.addHandler(n,"click",a);t.entities.push(n)}function a(n){var i=parseInt(n.target.getText(),10)-1,t=n.target.getLocation();currentPinInfobox.setOptions({visible:!0,offset:new Microsoft.Maps.Point(-100,70),htmlContent:'<div class="infobox center-pin"><div class="infobox_soldout"><\/div><a class="infobox_close" href="javascript:Events.bingMap.hideInfobox()"><img src="https://img-prod-cms-rt-microsoft-com.akamaized.net/cms/api/am/imageFileData/RE1T1vq"/><\/a><div class="infobox_content"><h2 class="c-heading-5 pt-0 pb-0">Washington State Convention Center<\/h1><h2 class="c-heading-5 pt-0 pb-1">May 6-8<\/h2><h4 class="c-heading-5 pt-0 pb-0">705 Pike St<\/h4><h5 class="c-heading-5 pt-0 pb-0">Seattle, WA 98101<\/h5><\/div><img class="infobox_pointer" src="https://img-prod-cms-rt-microsoft-com.akamaized.net/cms/api/am/imageFileData/RE1T1vr"/><\/div>'});currentPinInfobox.setLocation(t);e(t)}function e(n){var i=0,u=0,r=t.getWidth(),h=t.getHeight(),f=r/2-137,e=r/2-193,o,s;t.tryLocationToPixel(n).y<-25&&(u=t.tryLocationToPixel(n).y-75);t.tryLocationToPixel(n).x>e?i=t.tryLocationToPixel(n).x-e+10:t.tryLocationToPixel(n).x<-f&&(i=t.tryLocationToPixel(n).x+f,r<720&&(i+=20));r<720&&t.tryLocationToPixel(n).y<-25&&(u=t.tryLocationToPixel(n).y-150);o=new Microsoft.Maps.Point(i,u);s=t.tryPixelToLocation(o);t.setView({center:s})}function v(t){n.each(t,function(n,t){r.push({name:t.name,clarifier:t.clarifier,area:t.area,address:t.address,latitude:t.latitude,longitude:t.longitude,phoneNumber:t.phoneNumber,distance:t.distance,soldout:t.soldout,rate:t.rate,zipcode:t.zipcode,href:t.href})});s()}var t=null,r=[],i;try{i=new Microsoft.Maps.Location(47.61135,-122.332634);n(".main-content").hasClass("Production")||n(".main-content").hasClass("Staging")?window.matchMedia("(max-width: 720px)").matches?(i=new Microsoft.Maps.Location(47.61135,-122.332634),t=new Microsoft.Maps.Map(document.getElementById("bingMap"),{credentials:"Amyei2G3UULX03Y2fPkhJuvo9tptr8uJem5--KVIQnc4B5NtjETt6XVzWmTHLz1T",center:i,mapTypeId:Microsoft.Maps.MapTypeId.road,zoom:15,showScalebar:!1,showMapTypeSelector:!1,enableSearchLogo:!1,enableClickableLogo:!1,showCopyright:!0,disableScrollWheelZoom:!0,showLocateMeButton:!0})):t=new Microsoft.Maps.Map(document.getElementById("bingMap"),{credentials:"Amyei2G3UULX03Y2fPkhJuvo9tptr8uJem5--KVIQnc4B5NtjETt6XVzWmTHLz1T",center:i,mapTypeId:Microsoft.Maps.MapTypeId.road,zoom:15,showScalebar:!1,showMapTypeSelector:!1,enableSearchLogo:!1,enableClickableLogo:!1,showCopyright:!0,disableScrollWheelZoom:!0,showLocateMeButton:!0}):window.matchMedia("(max-width: 720px)").matches?(i=new Microsoft.Maps.Location(47.61135,-122.332634),t=new Microsoft.Maps.Map(document.getElementById("bingMap"),{credentials:"AkHq516ogGLiMASaMrnIB2gtHW2Hkj02vb1D77HvtbpK3tJ-n6YSapeTlELjP3qJ",center:i,mapTypeId:Microsoft.Maps.MapTypeId.road,zoom:15,showScalebar:!1,showMapTypeSelector:!1,enableSearchLogo:!1,enableClickableLogo:!1,showCopyright:!0,disableScrollWheelZoom:!0,showLocateMeButton:!0})):t=new Microsoft.Maps.Map(document.getElementById("bingMap"),{credentials:"AkHq516ogGLiMASaMrnIB2gtHW2Hkj02vb1D77HvtbpK3tJ-n6YSapeTlELjP3qJ",center:i,mapTypeId:Microsoft.Maps.MapTypeId.road,zoom:15,showScalebar:!1,showMapTypeSelector:!1,enableSearchLogo:!1,enableClickableLogo:!1,showCopyright:!0,disableScrollWheelZoom:!0,showLocateMeButton:!0});Microsoft.Maps.Events.addHandler(t,"mousewheel",function(n){return n.handled=!0,!0});c()}catch(y){}};Events.bingMap.hideInfobox=function(){currentPinInfobox.setOptions({visible:!1})};n(window).load(function(){Events.bingMap.init();setTimeout(function(){n(".events-venue-information .events-venue-subtab-container .c-table th.f-numerical:nth-child(2)").attr("aria-sort","ascending")},300)})})(window.jQuery);$(document).on("click",".events-venue-tab a",function(n){n.preventDefault();$(this).parent().siblings().removeClass("active");$(this).parent().addClass("active");var t=$(this).parent().index();$(this).parents().closest(".top-parent-element").addClass("view-clicked");$(".view-clicked .events-venue-subtab-container").children().removeClass("active");$(".view-clicked .events-venue-subtab-container").children().eq(t).addClass("active");$(".view-clicked").removeClass("view-clicked");$(".events-venue-tab a").each(function(){$(this).attr("aria-selected","false")});$(this).attr("aria-selected","true")});$(document).ready(function(){$(".events-venue-tab a").each(function(n){var t=$(" .events-venue-subtab ul").find("li.events-venue-tab").length;$(this).attr("aria-setsize",t);$(this).attr("aria-posinset",n+1)})});$(document).on("click",".viewmoremap",function(n){var r;n.preventDefault();$(this).focus();$(this).parents().closest(".top-parent-element").addClass("view-more-clicked");var u=$(this).attr("aria-expanded"),t="",i="";u=="false"?(i=$(this).attr("data-view-less-text"),t=$(this).attr("data-view-less-arialabel"),$(this).attr("aria-expanded","true"),$(this).text(i),$(this).attr("aria-label",t),$(".view-more-clicked tbody tr.g-15").removeClass("dn")):(i=$(this).attr("data-view-more-text"),t=$(this).attr("data-view-more-arialabel"),$(this).attr("aria-expanded","false"),$(this).text(i),$(this).attr("aria-label",t),$(".view-more-clicked tbody tr.g-15").addClass("dn"),r=$(".view-more-clicked").offset().top,$("html, body").animate({scrollTop:r}));$(".view-more-clicked").removeClass("view-more-clicked")});venueHotels=[];$(document).on("click",".events-venue-information .events-venue-subtab-container .c-table .pricingtab-view button",function(){try{$(".events-venue-information .events-venue-subtab-container .c-table .pricingtab-view .ascending-on-start button").hasClass("f-ascending")!=!0&&$(".events-venue-information .events-venue-subtab-container .c-table .pricingtab-view .ascending-on-start").removeClass("ascending-on-start")}catch(e){}});$(document).ready(function(){try{loadHotelData()}catch(n){}});$(window).resize(function(){setTimeout(function(){try{$(".container-map-margin").css("margin-left",$(".container-margin").offset().left)}catch(n){}},150)});$(document).ready(function(){setTimeout(function(){try{$(".container-map-margin").css("margin-left",$(".container-margin").offset().left)}catch(n){}},150)});$(document).ready(function(){navigator.userAgent.match(/Trident\/7\./)&&$("#myTable").attr("role","table")})