function collapseParentMenu(n){if(n!=undefined&&!$(n).parent().hasClass("parentItem")){var t=$(n).parents("ul")[0],i=$(t).parent(),r=i.find("span.sub-collapser").first();$(t).show();r.toggleClass("expanded");r.find("i").html("&#xf077;");collapseParentMenu(i.find("a").first())}}function isStorageSupported(n){var t=window.sessionStorage;try{return t.setItem("curHref",n),!0}catch(i){return alert('Your web browser does not support storing settings locally. In Safari, the most common cause of this is using "Private Browsing Mode". Some settings may not save or some features may not work properly for you.'),!1}}function collapseMenuFirst(){jQuery("#navMenuSearch").click(function(){jQuery("#nav2").hasClass("in")?(jQuery("#nav2").hide(),jQuery("#nav2 .search-wrapper").hide()):(jQuery("#nav2").show(),jQuery("#nav2 .search-wrapper").show());jQuery("#nav1").hasClass("in")&&(jQuery("#nav1").removeClass("in"),jQuery("#navMenuOrder").addClass("collapsed"))})}function collapseMenuSecond(){jQuery("#navMenuOrder").click(function(){jQuery("#nav2").hasClass("in")&&(jQuery("#nav2").removeClass("in"),jQuery("#nav2").hide(),jQuery("#nav2 .search-wrapper").hide(),jQuery("#navMenuSearch").addClass("collapsed"))})}function collapseAll(){$("ul[id$='action-content']").removeClass("in");$("ul[id$='action-content']").each(function(){var n=$(this).parent().find("a[data-toggle='collapse']").attr("href");n&&$("a[href='"+n+"'] i[class*='icon-chevron']").addClass("icon-chevron-down").removeClass("icon-chevron-up")})}function InitializeLeftNav(){if($("ul[id$='action-content']").length>0){var n="",t="";$("ul[id$='action-content']").on("show.bs.collapse",function(i){n="icon-chevron-up";t="icon-chevron-down";var r=$(this).parent().find("a[data-toggle='collapse']").attr("href");r||(r=$(this).prev(".see-also").attr("href"),n="icon-chevron-down",t="icon-chevron-up");$("a[href='"+r+"'] i[class*='icon-chevron']").addClass(n).removeClass(t);i.stopPropagation()});$("ul[id$='action-content']").on("hide.bs.collapse",function(i){n="icon-chevron-down";t="icon-chevron-up";var r=$(this).parent().find("a[data-toggle='collapse']").attr("href");r||(r=$(this).prev(".see-also").attr("href"),n="icon-chevron-up",t="icon-chevron-down");$("a[href='"+r+"'] i[class*='icon-chevron']").addClass(n).removeClass(t);i.stopPropagation()})}}function InitializeLoadMore(n){var t="#"+n;if($(t).length>0){$("ul"+t+" > li[data-block!='0']").css("display","none");$(t+" a[data-block]").on("click",function(n){n.preventDefault();var i=$(this).data("block");$(this).hide();$("ul"+t+" > li[data-block='"+(i+1)+"']").slideDown()})}}function sharethisFixer(){$("div.stwrapper").length>0?(window.clearTimeout(sharethisTimer),$("div.stwrapper").css({top:"-999px",left:"-999px"})):sharethisTimer=setTimeout(sharethisFixer,100)}function onYouTubeIframeAPIReady(){$(".video-container iframe").each(function(){var n=$(this).attr("id");player=new YT.Player(n,{events:{onStateChange:function(t){t.data==YT.PlayerState.PLAYING&&(playerCurrentlyPlaying!=null&&playerCurrentlyPlaying!=n&&callPlayer(playerCurrentlyPlaying,"stopVideo"),playerCurrentlyPlaying=n)}}})})}function callPlayer(n,t,i){function e(n,t){var i=n?window.addEventListener:window.removeEventListener;i?i("message",t,!1):(n?window.attachEvent:window.detachEvent)("onmessage",t)}var r,u,f;if(window.jQuery&&n instanceof jQuery&&(n=n.get(0).id),r=document.getElementById(n),r&&r.tagName.toUpperCase()!="IFRAME"&&(r=r.getElementsByTagName("iframe")[0]),callPlayer.queue||(callPlayer.queue={}),u=callPlayer.queue[n],f=document.readyState=="complete",f&&!r)u&&clearInterval(u.poller);else if(t==="listening")r&&r.contentWindow&&(t='{"event":"listening","id":'+JSON.stringify(""+n)+"}",r.contentWindow.postMessage(t,"*"));else if(f&&(!r||r.contentWindow&&(!u||u.ready))&&(u&&u.ready||typeof t!="function")){if(r&&r.contentWindow){if(t.call)return t();r.contentWindow.postMessage(JSON.stringify({event:"command",func:t,args:i||[],id:n}),"*")}}else u||(u=callPlayer.queue[n]=[]),u.push([t,i]),"poller"in u||(u.poller=setInterval(function(){callPlayer(n,"listening")},250),e(1,function o(t){if(!r){if(r=document.getElementById(n),!r)return;if(r.tagName.toUpperCase()!="IFRAME"&&(r=r.getElementsByTagName("iframe")[0],!r))return}if(t.source===r.contentWindow)for(clearInterval(u.poller),u.ready=!0,e(0,o);tmp=u.shift();)callPlayer(n,tmp[0],tmp[1])},!1))}function CheckForClassAction(n){$(n).val()=="3116"?$("#classAction").show():($("#classAction>option:eq(0)").attr("selected",!0),$("#classAction").hide())}function scrollToContactForm(n){var t=$("div[id='"+n+"']");return $("html,body").animate({scrollTop:t.offset().top},1e3),!1}function GetStateDetails(n){$.get("/json/state-detail/?stateName="+n,function(n){n!=null&&($(".homepagecontactform").length>0?$(".homepagecontactform .emailsentto input[type=hidden]").val(n):$(".contactus").length>0?$(".contactus .emailsentto input[type=hidden]").val(n):$(".genericsidebarcontactform").length>0?$(".genericsidebarcontactform .emailsentto input[type=hidden]").val(n):$(".peopledetailcontactform").length>0&&$(".peopledetailcontactform .emailsentto input[type=hidden]").val(n))})}function GetEmailByPostCode(n){$.get("/json/email-postcode/?postcode="+n,function(n){n!=null&&($("#contour_form_Canwehelpform").length>0&&$("#contour_form_Canwehelpform .contourField.emailsentto input[type=hidden]").val(n),$("#contour_form_Canwehelpform-mobile").length>0&&$("#contour_form_Canwehelpform-mobile .contourField.emailsentto input[type=hidden]").val(n))})}function GetNUWContactEmail(n){$.get("/json/nuw-contact-email/?stateName="+n,function(n){n!=null&&$(".nuwapp .emailsentto input[type=hidden]").val(n)})}var sharethisTimer,firstScriptTag,playerCurrentlyPlaying;(function(n,t,i,r){function f(t,i){this.element=t;this.$elem=n(this.element);this.options=n.extend({},o,i);this.oldwidth=0;this.init()}var u="slimmenu",o={resizeWidth:"767",collapserTitle:"Main Menu",animSpeed:"medium",easingEffect:null,indentChildren:!1,childrenIndenter:"&nbsp;&nbsp;"},e=0;f.prototype={init:function(){var i=this.options,r=this.$elem,f='<div class="menu-collapser">'+i.collapserTitle+'<div class="collapse-button"><span class="icon-bar"><\/span><span class="icon-bar"><\/span><span class="icon-bar"><\/span><\/div><\/div>',u=r.prev(".menu-collapser");r.on("click",".sub-collapser",function(t){t.preventDefault();t.stopPropagation();var r=n(this).closest("li");n(this).hasClass("expanded")?(n(this).removeClass("expanded"),n(this).find("i").html("&#xf078;"),r.find(">ul").slideUp(i.animSpeed,i.easingEffect)):(n(this).addClass("expanded"),n(this).find("i").html("&#xf077;"),r.find(">ul").slideDown(i.animSpeed,i.easingEffect))});u.on("click",".collapse-button",function(n){n.preventDefault();r.slideToggle(i.animSpeed,i.easingEffect)});this.resizeMenu({data:{el:this.element,options:this.options}});n(t).on("resize",{el:this.element,options:this.options},this.resizeMenu);n(t).trigger("resize")},resizeMenu:function(i){var h=n(t),u=i.data.options,o=n(i.data.el),c=n("body").find(".menu-collapser"),s;if(e!=h.width()&&(e=h.width(),s=h.width(),t.innerWidth!==r&&t.innerWidth>s&&(s=t.innerWidth),s!=this.oldwidth))if(this.oldwidth=s,o.find("li").each(function(){n(this).has("ul").length&&(n(this).has(".sub-collapser").length?n(this).children(".sub-collapser i").html("&#xf078;"):n(this).append('<span class="sub-collapser"><i>&#xf078;<\/i><\/span>'))}),u.resizeWidth>=s)u.indentChildren&&o.find("ul").each(function(){var t=n(this).parents("ul").length;n(this).children("li").children("a").has("i").length||n(this).children("li").children("a").addClass(f.prototype.indent(t,u))}),o.find("li").has("ul").off("mouseenter mouseleave"),o.addClass("collapsed").hide(),c.show();else{o.find("li").has("ul").on("mouseenter",function(){n(this).find(">ul").stop().slideDown(u.animSpeed,u.easingEffect)}).on("mouseleave",function(){n(this).find(">ul").stop().slideUp(u.animSpeed,u.easingEffect)});o.find("li > a > i").remove();o.removeClass("collapsed").show();c.hide()}},indent:function(n){switch(n){case 1:return"indent-margin-8";case 2:return"indent-margin-16";case 3:return"indent-margin-24";case 4:return"indent-margin-32";case 5:return"indent-margin-40";case 6:return"indent-margin-48";case 7:return"indent-margin-56"}}};n.fn[u]=function(t){return this.each(function(){n.data(this,"plugin_"+u)||n.data(this,"plugin_"+u,new f(this,t))})}})(jQuery,window,document);$(document).ready(function(){var i,t,n,r,u,f;$(".carousel.fade-effect").length&&$(".carousel.fade-effect").carousel({interval:4e3});$(".carousel").length&&$(".carousel").carousel({interval:!1});stateSelection.init();i=$("#LanguageDropDownList");$(i).length!=0&&(i.selectpicker(),t="Language: "+$("#LanguageDropDownList :selected").text(),$("#selTextLang").text(t),$("#LanguageSelector .selected").addClass("disabled"),$("#langSelMob #LanguageDropDownList").selectpicker(),$("#langSelMob .selected").addClass("disabled"),$("#langSelMob #selTextLang").text(t),$("#langSelTablet #LanguageDropDownList").selectpicker(),$("#langSelTablet .selected").addClass("disabled"),$("#langSelTablet #selTextLang").text(t));$("#LanguageDropDownList").change(function(){$("#selTextLang").text(t)});$("#langSelMob #LanguageDropDownList").change(function(){$("#langSelMob #selTextLang").text(t)});$("#langSelTablet #LanguageDropDownList").change(function(){$("#langSelTablet #selTextLang").text(t)});$(".langue-selector-module ul.dropdown-menu li").on("click",function(){if(!$(this).hasClass("selected")&&!$(this).hasClass("disabled")){var n=$(this).attr("data-original-index"),t=document.getElementById("LanguageDropDownList"),i=t.options[n].value;location="/language/"+i+"/"}});$("#languageList li").on("click",function(){var n=$(this).attr("data-value");location=n=="en"?"/":"/language/"+n+"/"});$("#languageList")!=undefined&&(n="",n="English",$("#languageList li").each(function(){$(this).removeClass("selected");$("#languageHidden").val()==$(this).attr("data-value")&&($(this).addClass("selected"),n=$(this).text())}),n=="English"&&$($("#languageList li")[0]).addClass("selected"),$(".currentLanguage").each(function(){$(this).text(n)}));$("#mobLanguageList li").on("click",function(){var n=$(this).attr("data-value");location=n=="en"?"/":"/language/"+n+"/"});$("#mobLanguageList")!=undefined&&(n="",n="English",$("#mobLanguageList li").each(function(){$(this).removeClass("selected");$("#mobLanguageHidden").val()==$(this).attr("data-value")&&($(this).addClass("selected"),n=$(this).text())}),n=="English"&&$($("#mobLanguageList li")[0]).addClass("selected"),$(".currentLanguage").each(function(){$(this).text(n)}));($("#map-offices").length>0||$("#map-office-details").length>0)&&($("#map-canvas").length&&google.maps.event.addDomListener(window,"load",officeLocator.init),$("#map-office-details").length&&google.maps.event.addDomListener(window,"load",officeDetails.init));nearestOfficeLocator.init();nearestOfficeLocatorMobile.init();$(".carousel .item .fill").length&&$(".carousel .item .fill").parallax("50%",.3,!0,!0,!0);$("#highlightedCarouselMobile").length&&$("#highlightedCarouselMobile").owlCarousel({items:1,itemsTablet:[768,1],navigation:!0,navigationText:["<i class='icon-chevron-left icon-white'><\/i>","<i class='icon-chevron-right icon-white'><\/i>"],autoPlay:3e3});$(".whattoexpect-carousel").length&&$(".whattoexpect-carousel").owlCarousel({items:4,itemsDesktopSmall:[1024,4],itemsTablet:[768,3]});$(".testimonial-carousel").length&&($(".testimonial-carousel").owlCarousel({items:2,itemsDesktopSmall:[1024,2],itemsTablet:[768,1]}),$(".thumbnail a.video-thumb").click(function(n){n.preventDefault();$(this).fadeOut();$('<iframe class="video-holder" src="'+$(this).attr("href")+'" width="100%" height="234" frameborder="0" allowfullscreen><\/iframe>').appendTo($(this).parent(".thumbnail"));$(this).parent(".thumbnail").toggleClass("play")}));$(".input-group.date").length!=0&&$(".input-group.date").datepicker({format:"dd-mm-yyyy",autoclose:!0});$(document).on("click",".field-validation-error",function(){$(this).siblings("input, select, textarea").focus()});$("#searchbox").submit(function(n){if($("#search",this).val()=="")return n.preventDefault(),$(".form-group",this).addClass("has-error"),$("#search",this).focus(),!1;$(".form-group",this).removeClass("has-error")});$("#searchForm").submit(function(n){if($("#search",this).val()=="")return n.preventDefault(),$(".form-group",this).addClass("has-error"),$("#search",this).focus(),!1;$(".form-group",this).removeClass("has-error")});$("#peopleSearch").submit(function(n){$("#keywords",this).val()==""?(n.preventDefault(),$("#keywords",this).parent(".form-group").addClass("has-error"),$("#keywords",this).focus()):$("#keywords",this).parent(".form-group").removeClass("has-error")});$("#search","#searchbox","#searchForm").keyup(function(){$(this).val()==""?$(this).parent(".form-group").addClass("has-error"):$(this).parent(".form-group").removeClass("has-error")});$(document).on("click","#OfficeList .dropdown-menu a",function(n){n.preventDefault()});var e=$(".homepagecontactform .nearestoffice select").html(),o=$(".nuwapp .nearestoffice select").html(),s=$(".contactus .nearestoffice select").html(),h=$(".genericsidebarcontactform .nearestoffice select").html(),c=$(".peopledetailcontactform .nearestoffice select").html(),l=$(".homepagecontactform .statelocation select option:contains(International)")[0];if($(".homepagecontactform .statelocation select option:contains(International)").remove(),$(".homepagecontactform .statelocation select").append(l),r=$(".contactus .statelocation select option:contains(International)")[0],$(".contactus .statelocation select option:contains(International)").remove(),$(".contactus .statelocation select").append(r),u=$(".genericsidebarcontactform .statelocation select option:contains(International)")[0],$(".genericsidebarcontactform .statelocation select option:contains(International)").remove(),$(".genericsidebarcontactform .statelocation select").append(u),$("#contour_form_Canwehelpform-mobile").length>0)$("#contour_form_Canwehelpform-mobile .contourField.postcode input").on("blur",function(){var n="";n=$(this).val();GetEmailByPostCode(n)});if($("#contour_form_Canwehelpform").length>0)$("#contour_form_Canwehelpform .contourField.postcode input").on("blur",function(){var n="";n=$(this).val();GetEmailByPostCode(n)});$(".contourField select").change(function(){var n="";if($(this).val()==""||$(this).val()==null?$(this).addClass("empty"):$(this).removeClass("empty"),$(this).parents(".contactus").length>0&&$(this).parents(".contact-form-input").hasClass("statelocation")==!0&&$(this).val()!=null&&$(this).val()!=""){if($(".contactus .statelocation select :selected").text()=="International"?($(".contactus .phonenumber").find("input[type=text]").attr({maxlength:20,"data-val-regex":"Phone number is not valid","data-regex":"^(\\D*\\d){8,20}\\D*$"}),$(".contactus .nearestoffice select").hide(),$(".contactus .nearestoffice").hide()):($(".contactus .phonenumber").find("input[type=text]").attr({maxlength:10,"data-val-regex":"Phone number is not valid","data-regex":"^(\\D*\\d){8,10}\\D*$"}),$(".contactus .nearestoffice select").show(),$(".contactus .nearestoffice").show(),$(".contactus .statelocation select :selected").text()=="TAS"&&($(".contactus .nearestoffice select").hide(),$(".contactus .nearestoffice").hide())),n=$(".contactus .statelocation select :selected").text(),$(".contactus .nearestoffice select").html(s),GetStateDetails(n),n=="-Select-")return;$('.contactus .nearestoffice select :not([value^="'+n.substr(0,3)+'"])').remove()}if($(this).parents(".genericsidebarcontactform").length>0&&$(this).parents(".contact-form-input").hasClass("statelocation")==!0&&$(this).val()!=null&&$(this).val()!=""){if($(".genericsidebarcontactform .statelocation select :selected").text()=="International"?($(".genericsidebarcontactform .phonenumber").find("input[type=text]").attr({maxlength:20,"data-val-regex":"Phone number is not valid","data-regex":"^(\\D*\\d){8,20}\\D*$"}),$(".genericsidebarcontactform .nearestoffice select").hide(),$(".genericsidebarcontactform .nearestoffice").hide()):($(".genericsidebarcontactform .phonenumber").find("input[type=text]").attr({maxlength:10,"data-val-regex":"Phone number is not valid","data-regex":"^(\\D*\\d){8,10}\\D*$"}),$(".genericsidebarcontactform .nearestoffice select").show(),$(".genericsidebarcontactform .nearestoffice").show(),$(".genericsidebarcontactform .statelocation select :selected").text()=="TAS"&&($(".genericsidebarcontactform .nearestoffice select").hide(),$(".genericsidebarcontactform .nearestoffice").hide())),n=$(".genericsidebarcontactform .statelocation select :selected").text(),$(".genericsidebarcontactform .nearestoffice select").html(h),GetStateDetails(n),n=="-Select-")return;$('.genericsidebarcontactform .nearestoffice select :not([value^="'+n.substr(0,3)+'"])').remove()}if($(this).parents(".peopledetailcontactform").length>0&&$(this).parents(".contact-form-input").hasClass("statelocation")==!0&&$(this).val()!=null&&$(this).val()!=""){if($(".peopledetailcontactform .statelocation select :selected").text()=="International"?($(".peopledetailcontactform .phonenumber").find("input[type=text]").attr({maxlength:20,"data-val-regex":"Phone number is not valid","data-regex":"^(\\D*\\d){8,20}\\D*$"}),$(".peopledetailcontactform .nearestoffice select").hide(),$(".peopledetailcontactform .nearestoffice").hide()):($(".peopledetailcontactform .phonenumber").find("input[type=text]").attr({maxlength:10,"data-val-regex":"Phone number is not valid","data-regex":"^(\\D*\\d){8,10}\\D*$"}),$(".peopledetailcontactform .nearestoffice select").show(),$(".peopledetailcontactform .nearestoffice").show(),$(".peopledetailcontactform .statelocation select :selected").text()=="TAS"&&($(".peopledetailcontactform .nearestoffice select").hide(),$(".peopledetailcontactform .nearestoffice").hide())),n=$(".peopledetailcontactform .statelocation select :selected").text(),$(".peopledetailcontactform .nearestoffice select").html(c),GetStateDetails(n),n=="-Select-")return;$('.peopledetailcontactform .nearestoffice select :not([value^="'+n.substr(0,3)+'"])').remove()}if($(this).parents(".homepagecontactform").length>0&&$(this).parents(".contact-form-input").hasClass("statelocation")==!0&&$(this).val()!=null&&$(this).val()!=""){if($(".homepagecontactform .statelocation select :selected").text()=="International"?($(".homepagecontactform .phonenumber").find("input[type=text]").attr({maxlength:20,"data-val-regex":"Phone number is not valid","data-regex":"^(\\D*\\d){8,20}\\D*$"}),$(".homepagecontactform .nearestoffice select").hide(),$(".homepagecontactform .nearestoffice").hide()):($(".homepagecontactform .phonenumber").find("input[type=text]").attr({maxlength:10,"data-val-regex":"Phone number is not valid","data-regex":"^(\\D*\\d){8,10}\\D*$"}),$(".homepagecontactform .nearestoffice select").show(),$(".homepagecontactform .nearestoffice").show(),$(".homepagecontactform .statelocation select :selected").text()=="TAS"&&($(".homepagecontactform .nearestoffice select").hide(),$(".homepagecontactform .nearestoffice").hide())),n=$(".homepagecontactform .statelocation select :selected").text(),$(".homepagecontactform .nearestoffice select").html(e),GetStateDetails(n),n=="-Select-")return;$('.homepagecontactform .nearestoffice select :not([value^="'+n.substr(0,3)+'"])').remove()}if($(this).parents(".nuwapp").length>0&&$(this).parents(".contourField").hasClass("statelocation")==!0&&$(this).val()!=null&&$(this).val()!=""){if($(".nuwapp .statelocation select :selected").text()=="International"?($(".nuwapp .nearestoffice select").hide(),$(".nuwapp .nearestoffice").hide()):($(".nuwapp .nearestoffice select").show(),$(".nuwapp .nearestoffice").show(),$(".nuwapp .statelocation select :selected").text()=="TAS"&&($(".nuwapp .nearestoffice select").hide(),$(".nuwapp .nearestoffice").hide())),n=$(".nuwapp .statelocation select :selected").text(),$(".nuwapp .nearestoffice select").html(o),GetNUWContactEmail(n),n=="-Select-")return;$('.nuwapp .nearestoffice select :not([value^="'+n.substr(0,3)+'"])').remove()}});$(".contourField select").change();location.hash&&$(location.hash).length&&$(location.hash).click();$(".mega-menu").css("width",$(".nav.nav-justified.hidden-xs").width());$(window).resize(function(){$(".mega-menu").css("width",$(".nav.nav-justified.hidden-xs").width())});$("#stateselector").length&&$("#stateselector").modal({backdrop:"static",keyboard:!1});InitializeLeftNav();InitializeLoadMore("mob-action-content");InitializeLoadMore("mob-past-action-content");$(".contact-down").click(function(){scrollToContactForm("contact-detail-form")});collapseMenuFirst();collapseMenuSecond();f=$("li.mainParent a.current-link")[0];collapseParentMenu(f);$("#mobile-footer-menu .current-item").parents("ul").addClass("in");$("#mobile-footer-menu .current-item").parents("ul").css("height","auto")});sharethisTimer=null;var stateSelection={init:function(){$("#stateSelectionFormHeader ul li").click(stateSelection.changeSelected);$("#stateselector a").click(stateSelection.changeSelected);$("#mobiStateSelectionFormHeader ul li").click(stateSelection.mobiChangeSelected)},changeSelected:function(n){if(n.preventDefault(),$(this).parent("li").hasClass("disabled"))return!1;$("form#stateSelectionFormHeader").attr("action",$("form#stateSelectionFormHeader").attr("action").replace("mb-blog/",""));$("input#selectedState").val($(this).attr("data-value"));$("form#stateSelectionFormHeader").submit()},footerChangeSelected:function(n){if(n.preventDefault(),$(this).parent("li").hasClass("disabled"))return!1;$("form#stateSelectionFormFooter").attr("action",$("form#stateSelectionFormFooter").attr("action").replace("mb-blog/",""));$("input#footerSelectedState").val($(this).attr("data-value"));$("form#stateSelectionFormFooter").submit()},mobiChangeSelected:function(n){if(n.preventDefault(),$(this).parent("li").hasClass("disabled"))return!1;$("form#mobiStateSelectionFormHeader").attr("action",$("form#mobiStateSelectionFormHeader").attr("action").replace("mb-blog/",""));$("input#mobiSelectedState").val($(this).attr("data-value"));$("form#mobiStateSelectionFormHeader").submit()}},officeDetails={init:function(){if($("#map-office-details").length){google.maps.event.addDomListener(window,"load",null);var n=new google.maps.LatLng(lat,long),t={zoom:12,center:n},i=new google.maps.Map(document.getElementById("map-office-details"),t),r=new google.maps.Marker({position:n,map:i});r.setPosition(n)}}},officeLocator={init:function(){$.support.cors=!0;officeLocator.ShowClosestOffice();$("#btnSearchOffice").on("click",officeLocator.ShowClosestOffice);$("#txtPostcodeSearch").keydown(function(n){n.which==13&&(officeLocator.ShowClosestOffice(),n.preventDefault())})},UpdateOfficeDetails:function(n){var t='<div id="officeSearchDetails" class="state-office"><h5>Your local office<\/h5><p><a href="'+n.Url+'"><strong>'+n.Name+"<\/strong><\/a><br />";n.AddressLine1!=""&&(t+=n.AddressLine1+"<br />");n.AddressLine2!=""&&(t+=n.AddressLine2+"<br />");t+=n.Suburb+", "+n.State+" "+n.Postcode;n.PhoneNumber!=""&&(t+="<br />T: "+n.PhoneNumber);n.Fax!=""&&(t+="<br />F: "+n.Fax);t+="<\/p><\/div>";$("#officeSearchDetails").replaceWith(t)},ShowClosestOffice:function(){var n=$("#txtPostcodeSearch").val(),t;(n=="Enter postcode"||n=="")&&(n=" ");console.log("google geocode call 1");t="//maps.googleapis.com/maps/api/geocode/json?address=postcode:"+n+"|country=Australia&sensor=false&region=au&key=AIzaSyDE55zc9j43yLc_ytdwfkW123IoONrjscs";$.getJSON(t,function(n){var i=0,r=0,t;n.status=="OK"?(t=n.results[0].geometry.location,i=t.lat,r=t.lng,$(".office-locator #map-canvas").show()):$(".office-locator #map-canvas").hide();$.getJSON("/json/office-search/?lat="+i+"&lng="+r,function(n){if(n!=null){$(".office-locator #no-result").hide();$(".office-locator #map-canvas").show();$("#officeSearchDetails").show();var t=new google.maps.LatLng(n.Latitude,n.Longitude),i={zoom:12,center:t},r=new google.maps.Map(document.getElementById("map-canvas"),i),u=new google.maps.Marker({position:t,map:r});u.setPosition(t);officeLocator.UpdateOfficeDetails(n)}})})}},nearestOfficeLocator={init:function(){$.support.cors=!0;$("#btnSearchOffice").on("click",nearestOfficeLocator.ShowClosestOffice);$("#txtPostcodeSearch").keydown(function(n){n.which==13&&(nearestOfficeLocator.ShowClosestOffice(),n.preventDefault())})},UpdateOfficeDetails:function(n){var t='<div id="officeSearchDetails" class="state-office"><h5>Your local office<\/h5><p><a href="'+n.Url+'"><strong>'+n.Name+"<\/strong><\/a><br />";n.AddressLine1!=""&&(t+=n.AddressLine1+"<br />");n.AddressLine2!=""&&(t+=n.AddressLine2+"<br />");t+=n.Suburb+", "+n.State+" "+n.Postcode;n.PhoneNumber!=""&&(t+="<br />T: "+n.PhoneNumber);n.Fax!=""&&(t+="<br />F: "+n.Fax);t+="<\/p><\/div>";$("#officeSearchDetails").replaceWith(t)},ShowClosestOffice:function(){var n=$("#txtPostcodeSearch").val(),t;(n=="Enter postcode"||n=="")&&(n=" ");console.log("google geocode call 2");t="//maps.googleapis.com/maps/api/geocode/json?address=postcode:"+n+"|country=Australia&sensor=false&region=au&key=AIzaSyDE55zc9j43yLc_ytdwfkW123IoONrjscs";$.getJSON(t,function(n){var i=0,r=0,t;n.status=="OK"&&(t=n.results[0].geometry.location,i=t.lat,r=t.lng);$.getJSON("/json/office-search/?lat="+i+"&lng="+r,function(n){n!=null&&($(".office-locator #no-result").hide(),$("#officeSearchDetails").show(),nearestOfficeLocator.UpdateOfficeDetails(n))})})}},nearestOfficeLocatorMobile={init:function(){$.support.cors=!0;$("#btnSearchOfficeMobile").on("click",nearestOfficeLocatorMobile.ShowClosestOffice);$("#txtPostcodeSearchMobile").keydown(function(n){n.which==13&&(nearestOfficeLocatorMobile.ShowClosestOffice(),n.preventDefault())})},UpdateOfficeDetails:function(n){var t='<div id="officeSearchDetailsMobile" class="state-office"><h5>Your local office<\/h5><p><a href="'+n.Url+'"><strong>'+n.Name+"<\/strong><\/a><br />";n.AddressLine1!=""&&(t+=n.AddressLine1+"<br />");n.AddressLine2!=""&&(t+=n.AddressLine2+"<br />");t+=n.Suburb+", "+n.State+" "+n.Postcode;n.PhoneNumber!=""&&(t+="<br />T: "+n.PhoneNumber);n.Fax!=""&&(t+="<br />F: "+n.Fax);t+="<\/p><\/div>";$("#officeSearchDetailsMobile").replaceWith(t)},ShowClosestOffice:function(){var n=$("#txtPostcodeSearchMobile").val(),t;(n=="Enter postcode"||n=="")&&(n=" ");console.log("google geocode call 3");t="//maps.google.com/maps/api/geocode/json?components=country:AU|postal_code:"+n+"&sensor=false";$.getJSON(t,function(n){var i=0,r=0,t;n.status=="OK"&&(t=n.results[0].geometry.location,i=t.lat,r=t.lng);$.getJSON("/json/office-search/?lat="+i+"&lng="+r,function(n){n!=null&&($(".office-locator #no-result").hide(),$("#officeSearchDetailsMobile").show(),nearestOfficeLocatorMobile.UpdateOfficeDetails(n))})})}},tag=document.createElement("script");tag.src="https://www.youtube.com/iframe_api";firstScriptTag=document.getElementsByTagName("script")[0];firstScriptTag.parentNode.insertBefore(tag,firstScriptTag);playerCurrentlyPlaying=null