var renderDealerMap=function(n,t,i,r,u,f,e,o,s,h){var a=document.getElementById("map_canvas");if(a){var v={lat:t,lng:i},y={center:v,zoom:17,scrollwheel:!1,mapTypeId:google.maps.MapTypeId.ROADMAP},c=new google.maps.Map(a,y),p={lat:t,lng:i},l=new google.maps.Marker({position:p,map:c,title:n}),w='<div class="map-infowindow-address"><p>'+r+", "+u+"<\/p><p>"+f+" "+e+", Australia<\/p><\/div>",b=o=="none"?"":"<p><strong>Sales: <\/strong>"+o+"<\/p>",g=s=="none"?"":"<p><strong>Service: <\/strong>"+s+"<\/p>",nt=h=="none"?"":"<p><strong>Parts: <\/strong>"+h+"<\/p>",k='<div class="map-infowindow"><p class="map-infowindow-title">'+n+"<\/p>"+w+b+"<\/div>",d=new google.maps.InfoWindow({content:k});l.addListener("click",function(){d.open(c,l)});google.maps.event.addListenerOnce(c,"idle",function(){google.maps.event.trigger(l,"click")});google.maps.event.addDomListener(window,"resize",function(){var n=c.getCenter();google.maps.event.trigger(c,"resize");c.setCenter(n)})}};$(function(){function n(){$(".promotion-panel").each(function(){var f=$(this).find(".promotion-text"),n=$(this).find(".promotion-view-more"),t=$(this).find(".promotion-text-fade"),i=250,r,u;if($(this).find(".promotion-description-text").removeAttr("style"),!window.matchMedia("(min-width: 1200px)").matches){t.hide();n.hide();return}f.height()>i?(t.show(),n.show(),r=n.outerHeight(!0),u=i-r,$(this).find(".promotion-description-text").height(u)):(t.hide(),n.hide(),$(this).find(".promotion-description-text").removeAttr("style"))})}$(".cta-button-test-drive").click(function(){var n=$(this).attr("data-brand-name");sd("setProp","clickArea","CTA");sd("setProp","clickItem","TestDrive");n&&sd("setProp","clickMake",n);sd("send","event","itemClick")});$(".cta-button-quote").click(function(){var n=$(this).attr("data-brand-name");sd("setProp","clickArea","CTA");sd("setProp","clickItem","RequestAQuote");n&&sd("setProp","clickMake",n);sd("send","event","itemClick")});$(".cta-button-brochure").click(function(){var n=$(this).attr("data-brand-name");sd("setProp","clickArea","CTA");sd("setProp","clickItem","GetBrochure");n&&sd("setProp","clickMake",n);sd("send","event","itemClick")});n();$(window).resize(function(){n()})})