var aston=aston||{},addthis_config,addthis_share,a2a_config=a2a_config||{};if(typeof console==="undefined")console={log:function(){}};
(function(e){function m(){b.w.trigger("am.preInit");j();b.w.bind("am.resize",j);b.w.bind("am.theme",k);b.w.resize(function(){b.w.trigger("am.resize")});k();b.stickyDashFix()}function j(){var a=e("html"),d=b.w.width();for(g in l){var c=l[g];if(d>c.min&&d<c.max)if(b.theme!==g){b.theme=g;a.removeClass("small medium large xlarge").addClass(b.theme);b.w.trigger("am.theme",[b.theme]);break}}}function k(){var a=e("#subnav");if(a.children("section").length){a.find("ul a").first().css("margin-left",function(){return-parseInt(e(this).css("padding-left"),
10)}).end().last().css("margin-right",function(){return-parseInt(e(this).css("padding-right"),10)});var d=a.width(),c=a.find("ul"),f=a.find("h1"),i,h;a.css("width",4E3).children(":not(.back-link)").css({width:"auto","max-width":"100%"});i=Math.max(c.eq(0).outerWidth(),c.eq(1).outerWidth());h=a.find("h1").outerWidth();if(h+2*i+10<d){c.parent().css("width",(d-h)/2-5);f.css({"max-width":"100%"})}else{h=d-2*i-10;f.css({"max-width":h});d=f.children("a").width()+2;f.width(d);c.parent().css("width",i+(h-
d)/2)}a.css("width","")}}var b=this;b.w=e(window);b.plugins={};b.width=0;b.height=0;b.theme="medium";b.ie=e.browser.msie&&parseInt(e.browser.version,10)||false;b.mobileWebkit=navigator.userAgent.match(/iPad/i)!==null||navigator.userAgent.match(/iPhone/i)!==null;b.isLoggedIn=e("html").hasClass("cmsLoggedIn");var g,l={small:{min:0,max:1099},medium:{min:1100,max:1369},large:{min:1370,max:1699},xlarge:{min:1700,max:999999999}};b.themeFilename=function(a,d){if(debug||d&&d.is(".brochure"))return a;var c=
a.substr(0,a.length-4),f=a.substr(c.length);return c+(b.theme=="xlarge"?"":"-"+b.theme)+f};b.redrawFix=function(a,d){var c=a||document.documentElement;if(d===true||e.browser.msie&&e.browser.version<8&&e.browser.version>6){c.className=(c.className||"")+" ie_redraw";c.className=c.className.replace(/ ie_redraw$/,"")}};b.error=function(a){b.w.trigger("am.error",[a]);console.log("ERROR :: ",a)};b.register=function(a){if(b.plugins[a.__id])b.error("Plugin already registered ",a.__id);else b.plugins[a.__id]=
e.extend(true,a,{__loaded:false})};b.stickyDashFix=function(a){if(e.browser.msie&&e.browser.version<8&&e.browser.version>6){a=e(".racing-imagegrid h2 span, .event-sponsors ul.image-grid h3 span, .video-gallery ul.image-grid h2 span, .grid h2.section-heading span, .heritage .specialists .sponsor-name",a);a.each(function(){var d=e(this),c,f;if(this.children.length&&this.children[0].nodeType==1)d.append('<span class="sticky-dash">&nbsp;</span>');else{c=e.trim(d.text()).split(" ");f=(c.length>1?"&nbsp;":
"")+'<span class="sticky-dash">';d.html(c.slice(0,c.length-1).join(" ")+f+c[c.length-1]+"</span>")}d.addClass("no-dash").css({background:"none","padding-right":0})})}};b.Template=function(a){this.html=a.replace(/\\/g,"\\\\").replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'");this.compiled=this._compile()};b.Template.prototype={_compile:function(){return function(a){return this.html.replace(this.regex,function(d,c){return a[c]||""})}},regex:/\{{([\w-]+)\}}/g,apply:function(a){return this.compiled(a)},
reset:b.Template};b.telerikFixes={removeWidths:function(a){a._originalTextBoxCssText&&(a._originalTextBoxCssText=a._originalTextBoxCssText.replace(/(^|[^-])width\s?:\s?[\w|\.]+\s?;/i,"$1"));a.updateCssClass&&a.updateCssClass();if(a.constructor.__typeName=="Telerik.Web.UI.RadComboBox"){e(a._inputDomElement).closest(".RadComboBox").removeAttr("style");b.telerikFixes.comboBoxArrow(a)}b.telerikFixes.checkPlaceholder(a)},comboBoxArrow:function(a){var d=e(a._inputDomElement),c=e('<div class="comboBoxRuler">').text(d.val());
e("<div>").append(c).insertAfter(d);d.width(c.width()+2);c.parent().remove();b.telerikFixes.checkPlaceholder(a)},checkPlaceholder:function(a){var d=a.constructor.__typeName,c=d=="Telerik.Web.UI.RadComboBox"?e(a._inputDomElement):d=="Telerik.Web.UI.RadTextBox"?e(a._textBoxElement):null;if(c){d=c.val();c=c.closest(".RadInput_AM, .RadComboBox_AM");d&&d==a._emptyMessage?c.removeClass("hasValue"):c.closest(".RadInput_AM, .RadComboBox_AM").addClass("hasValue")}},startOpen:function(a){e(a._inputDomElement).closest(".RadComboBox_AM").addClass("isOpen")},
endClose:function(a){e(a._inputDomElement).closest(".RadComboBox_AM").removeClass("isOpen")}};b.ready=function(){m();for(g in b.plugins)if(typeof b.plugins[g].init==="function"){b.plugins[g].init();b.plugins[g].__loaded=true}b.w.trigger("am.preInit");b.w.trigger("am.resize")};j()}).call(aston,jQuery);

