function isEmailAddr(n){var t=!1,i;return n==null||n.length==0?t=!1:(i=/([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/,t=i.test(n)),t?t:!1}function validation(n){return n.name.value==""?(alert("Please enter your full name."),n.name.focus(),!1):isEmailAddr(n.email_from.value)?($(".submit_button").val("Sending..."),!0):(alert("Please enter a complete email address in the form: yourname@yourdomain.com"),n.email_from.focus(),!1)}$(document).ready(function(){$(".toyotaness").click(function(){window.open("https://toyotaness.toyota.co.nz/")});$(".page-id-24188 #Title").click(function(){window.open("https://toyota.qjumpers.co.nz/jobs/ad/toyota-dealer-graduate/32464/")});$(".accordion .content").accordion({collapsible:!0,active:!1});$(".menudropdown").before('<span class="arrow">+<\/span>');$(".menu > ul > li .arrow").click(function(){var n=$(this).text();$(".menudropdown").slideUp("slow");$(".arrow").text("+");n=="+"&&($(this).text("-"),$(this).parent().find("> .menudropdown").slideToggle("slow"))});$("a[href*=\\#]:not([href=\\#])").click(function(){if(location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")&&location.hostname==this.hostname){var n=$(this.hash);if(n=n.length?n:$("[name="+this.hash.slice(1)+"]"),n.length)return $("html,body").animate({scrollTop:n.offset().top-122},1e3),!1}});$(".open-dealership-popup").click(function(n){n.preventDefault();$("#DealershipOverlay").show();$("#DealershipPopup").show();$("#DealershipPopup").css("top",$(document).scrollTop()+30)});$("#DealershipPopup #ClosingLink").click(function(n){n.preventDefault();$("#DealershipOverlay").hide();$("#DealershipPopup").hide()});$("#DealershipOverlay").click(function(){$("#DealershipOverlay").hide();$("#DealershipPopup").hide()});$("#DealershipPopup .regions li").click(function(){var n=$(this).attr("data-link");$("#DealershipPopup .regions li").removeClass("active");$(this).addClass("active");$("#DealershipPopup .dealers .region").hide();$("#DealershipPopup .dealers ."+n).show()});$(window).scroll(function(){var n=$("#Header"),t=$(window).scrollTop(),i=n.height();body=$("body");t>=100?(n.addClass("fixed"),body.addClass("margin"),$("body.margin").css("margin-top",i)):(n.removeClass("fixed"),$("body.margin").css("margin-top",0),body.removeClass("margin"))});$(".scroll-to-top").click(function(){$("html, body").stop().animate({scrollTop:0},900,"swing")});$("#Content .module-rssfeed .article").length||($("#Content .side .no-jobs").length>0?$("#Content .side .no-jobs").show():$(".no-job-template-part").length>0&&$(".module-rssfeed .content").html($(".no-job-template-part").html()))});window.onload=function(){Shadowbox.init()}