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)})}};$(".vehicle-tabs-nav li").click(function(){$("li").each(function(){$(this).removeClass("active")});$(this).addClass("active");$(".vehicles-content").hide();$(".vehicle-select").html($(this).children("a").html());$(".vehicle-tabs-nav").removeClass("vehicle-tabs-nav-show");$(".vehicle-tabs-nav").addClass("vehicle-tabs-nav-hide");var n="#"+$(this).data("val");return $(n.toString()).show(),!1});$(".vehicle-select").click(function(){$(".vehicle-tabs-nav").hasClass("vehicle-tabs-nav-show")?($(".vehicle-tabs-nav").removeClass("vehicle-tabs-nav-show"),$(".vehicle-tabs-nav").addClass("vehicle-tabs-nav-hide")):$(".vehicle-tabs-nav").addClass("vehicle-tabs-nav-show")});$(function(){$(".cta-test-drive-link").click(function(){sd("setProp","clickArea","CTA");sd("setProp","clickItem","TestDrive");sd("send","event","itemClick")});$(".cta-call-today-link").click(function(){sd("setProp","clickArea","CTA");sd("setProp","clickItem","CallToday");sd("send","event","itemClick")});$(".cta-promotions-link").click(function(){sd("setProp","clickArea","CTA");sd("setProp","clickItem","Offers");sd("send","event","itemClick")});$("#homeCarousel").bcSwipe({threshold:50})});!function(n){n.fn.bcSwipe=function(t){var i={threshold:50};return t&&n.extend(i,t),this.each(function(){function f(n){1==n.touches.length&&(t=n.touches[0].pageX,r=!0,this.addEventListener("touchmove",u,!1))}function u(u){if(r){var o=u.touches[0].pageX,f=t-o;Math.abs(f)>=i.threshold&&(e(),n(this).carousel(f>0?"next":"prev"))}}function e(){this.removeEventListener("touchmove",u);t=null;r=!1}var t,r=!1;"ontouchstart"in document.documentElement&&this.addEventListener("touchstart",f,!1)}),this}}(jQuery)