var _updateBundleTag=4215,MemberSettings,__extends,sb;(function(n){var t=function(){function t(){}return t.log=function(t){n.debug&&console.log(t)},t.error=function(n){console.error(n)},t}();n.App=t})(sb||(sb={})),function(n){var t=function(){function n(){}return n.getDayName=function(n){var t=this.getDayName2(n);return t.charAt(0)=="S"?"<b>"+t+"<\/b>":t},n.getDayName2=function(n){return n instanceof Date||(n=new Date(n)),["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][n.getDay()%7]},n.getMonthName=function(n){return n instanceof Date||(n=new Date(n)),["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][n.getMonth()%12]},n.getLongMonthName=function(n){return n instanceof Date||(n=new Date(n)),["January","February","March","April","May","June","July","August","September","October","November","December"][n.getMonth()%12]},n.formatTime=function(n){var t=n.getHours(),i=n.getMinutes();return(t%12==0?12:t%12)+":"+(i<10?"0":"")+i.toString()+" "+(t<12?"am":"pm")},n.getHourText=function(n){n instanceof Date||(n=new Date(n));var t=n.getHours();return t===0?"12am":t===12?"12pm":t%12+(t<12?"am":"pm")},n.getDateText=function(n){var t=new Date(n).getDate();return t%10==1&&t!=11?t+"st":t%10==2&&t!=12?t+"nd":t%10==3&&t!=13?t+"rd":t+"th"},n.getDateFromYMD=function(n){return new Date(n.substr(0,4)+"-"+n.substr(4,2)+"-"+n.substr(6,2)+"T00:00")},n}();n.Dates=t}(sb||(sb={})),function(n){var t=function(){function n(){}return n.isHires=function(){var n=window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI||1;return n>1},n}();n.Graphics=t}(sb||(sb={})),function(n){var t=function(){function n(){}return n.isSize=function(n){return $("#"+n).is(":visible")},n.getSize=function(){return n.isSize("xs")?"xs":n.isSize("sm")?"sm":n.isSize("md")?"md":"lg"},n}();n.Responsive=t}(sb||(sb={})),function(n){var t=function(){function t(){}return t.sleepFor=function(n){for(var t=(new Date).getTime();(new Date).getTime()<t+n;);},t.startReloadTimer=function(n){var i=this;t.expectedTime=(new Date).getTime()+n;setTimeout(function(){i.reloadOnWakeCallback()},n)},t.reloadOnWakeCallback=function(){var n=(new Date).getTime(),i=n-t.expectedTime;if(i>t.reloadIfDelayedBy){t.showWait();location.reload(!0);return}t.startReloadTimer(t.onceLoadedTimeout)},t.reloadOnWake=function(){n.Responsive.getSize()!="lg"&&t.startReloadTimer(t.firstCheckTimeout)},t.showWait=function(){$(".wait-overlay").show();$("body").addClass("wait")},t.hideWait=function(){$(".wait-overlay").hide();$("body").removeClass("wait")},t.showWaitCursor=function(){$("body").addClass("wait")},t.hideWaitCursor=function(){$("body").removeClass("wait")},t.notify=function(n,t){t===void 0&&(t=0);$().toast("info",{text:n,sticky:t==0})},t.successMsg=function(n,t){t===void 0&&(t=0);$().toast("success",{text:n,sticky:t==5e3})},t.errorMsg=function(n,t){t===void 0&&(t=0);$().toast("error",{text:n,sticky:t==5e3})},t.get=function(n){var f=$(n),e,s,i,r,o;if(f.length===0)return"";var t=f[0],u=t.type,c=t.tagName.toLowerCase();if(u==="reset"||u==="button"||(u==="checkbox"||u==="radio")&&!t.checked||(u==="submit"||u==="image")&&t.form&&t.form.clk!=t||c==="select"&&t.selectedIndex===-1)return null;if(n.indexOf("input[name")>0){for(e=[],i=0;i<f.length;i++)f[i].attr("checked")&&e.push(f[i].val());return e}if(c==="select"){if(s=t.selectedIndex,s<0)return null;var e=[],l=t.options,h=u==="select-one",a=h?s+1:l.length;for(i=h?s:0;i<a;i++)if(r=l[i],r.selected){if(o=r.value,o||(o=r.attributes&&r.attributes.value&&!r.attributes.value.specified?r.text:r.value),h)return o;e.push(o)}return e}return $(t).val()},t.set=function(n,t){var h=$(n),s,r,i,f,u;if(h.length===0)return t;var e=h[0],o=e.type,c=e.tagName.toLowerCase();if(o==="reset"||o==="button"||o==="submit"||o==="image")return t;if(n.indexOf("input[name")>=0)for(s=t.split(","),r=0;r<h.length;r++){var l=$(h[r]),p=l.val().toLowerCase(),a=!1;for(u=0;u<s.length;u++)if(p===s[u].toLowerCase()){a=!0;break}l.prop("checked",a)}if(c==="select"){var v=e.options,y=o==="select-one",s=t;for(y||(s=t.split(",")),r=0;r<v.length;r++)if(i=v[r],f=i.value,f||(f=i.attributes&&i.attributes.value&&!i.attributes.value.specified?i.text:i.value),y){if(f&&f.toLowerCase()===t.toLowerCase())return i.selected=!0,t}else for(u=0;u<s.length;u++)f&&f.toLowerCase()===t[u].toLowerCase()&&(i.selected=!0);return t}return c==="label"||c=="div"||c=="span"?($(e).html(t),t):($(e).val(t),t)},t.removeKids=function(n){$(n).children().remove()},t.hasTouch=function(){return window.screen.width<1025&&"ontouchstart"in window},t.isHandheld=function(){var n=navigator.userAgent,t;return n.indexOf("Firefox")>0&&(n+="|"+navigator.appVersion),t=n,/android.+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|meego.+mobile|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(di|rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4))?!0:!1},t.isLandscape=function(){return window.innerWidth>window.innerHeight},t.isPortrait=function(){return!this.isLandscape()},t}();t.firstCheckTimeout=6e4;t.onceLoadedTimeout=2e3;t.reloadIfDelayedBy=3e4;t.count=0;n.UI=t}(sb||(sb={})),function(n){var t=function(){function n(){}return n.toImperialLength=function(n){return Math.floor(n)+"' "+Math.floor((n-Math.floor(n))*12)+"&quot;"},n}();t.feetPerMetre=3.2808399;t.msPerHour=36e5;n.Units=t}(sb||(sb={})),function(n){var t=function(){function t(){}return t.redirect=function(t){n.UI.showWaitCursor();window.location.href=t},t.htmlEncode=function(n){return $("<div/>").text(n).html()},t.getParam=function(n){return t.getParamByUrl(n,null)},t.getParamByUrl=function(n,t){t||(t=window.location.href);n=n.replace(/[\[\]]/g,"\\$&");var r=new RegExp("[?&]"+n+"(=([^&#]*)|&|#|$)"),i=r.exec(t);return i?i[2]?decodeURIComponent(i[2].replace(/\+/g," ")):"":""},t.haveStorage=function(){var n=null;try{n=window.localStorage;n.setItem("_","_");n.removeItem("_")}catch(t){n=null}return n!=null},t.toPrecision=function(n,t){var i=n.toString(),r=i.indexOf(".");return r>0&&t===0?i.substr(0,r):i.length-t>=r+t?i.substr(0,r+t+1):i},t}();n.Utils=t}(sb||(sb={})),function(n){var t=function(){function n(){}return n}();n.Member=t}(sb||(sb={})),function(n){var r=function(){function n(){}return n}(),t,i;n.Location=r;t=function(){function n(){}return n}();n.State=t;i=function(){function n(){}return n}();n.Region=i}(sb||(sb={})),function(n){var t=function(){function t(){}return t.instance=function(){return n.context=n.context||new n.Context,n.context},t.prototype.getCategory=function(){var t=location.pathname.toLowerCase(),n,i;return t=="/"?"home":(n="weather",i=["news","articles","events","forums","media","photos","videos","classifieds"],$.each(i,function(i,r){t.indexOf("/"+r)==0&&(n=r)}),n)},t.prototype.getSportChannel=function(){var t=location.pathname.toLowerCase(),n="";return $.each(["general","kitesurfing","stand-up-paddle","windsurfing","surfing","sailing","boating","diving","fishing","land-yacht-sailing"],function(i,r){t.indexOf("/"+r)>=0&&(n=r.replace(/-/gi," "))}),n},t}();n.Context=t}(sb||(sb={})),function(){}(sb||(sb={})),function(n){var t=function(){function t(){}return t.bindToTopOfPage=function(){var i=300,t=".toTopOfPage";$(window).scroll(function(){var r=!1;$(window).scrollTop()>i&&(r=n.Zoom.getZoom()<1.7);r?$(t).fadeIn("slow"):$(t).fadeOut("slow")});$(t).click(function(){return $("html, body").animate({scrollTop:0},150),!1})},t.centreRosBanner=function(){if($(".masthead .spono-ros").is(":visible")){var n=10,t=$(".masthead .logo").width()+n,i=$(window).width()-n,r=Math.min(i-t,728),u=(i-t)/2-r/2+t-n;$(".masthead .spono-ros").width(r).css("left",u)}},t.merge=function(n){for(var i="",t=0;t<n.length;t++)i+=n[t];return i},t.deliverTelemetry=function(){var t=this,i=(new Date).getTime();setTimeout(function(){$.post(n.Network.getApi(t.merge(["t","ele","met","ry"])),{createdUtc:n.createdUtc.getTime(),domTicks:i-n.startUtc.getTime(),d1:$(t.adId).length,d2:$(t.adId).filter(":visible").length,d3:$(t.adId2).length,d4:$(t.adId2).filter(":visible").length})},2e3)},t.onReady=function(){this.adId=this.merge([".","ad","sby","go","ogl","e"]);this.adId2=this.merge([".","spono","-","spot"]);$(window).resize(function(){t.centreRosBanner()});this.bindToTopOfPage();t.centreRosBanner();this.deliverTelemetry()},t}();n.Global=t}(sb||(sb={})),function(n){var i,t;(function(n){n[n.Leaderboard=72890]="Leaderboard";n[n.MediumRect=300250]="MediumRect";n[n.Smartphone=32050]="Smartphone"})(i=n.BannerSize||(n.BannerSize={}));t=function(){function t(){}return t.onReady=function(i){n.config.adServer=="s"?(t.serviceUrl=i,t.refreshSlots()):t.initDfp()},t.getNextMainAdUnit=function(){return n.config.adServer=="s"?"sb-runofsite-lb":"sb-main-"+this.nextMainBannerIndex++},t.getNextSideAdUnit=function(){return n.config.adServer=="s"?"sb-runofsite-mr":"sb-side-"+this.nextSideBannerIndex++},t.initDfp=function(){var i=this;googletag.cmd.push(function(){n.App.log("AdBanners: Defining slots & sizes");var e=googletag.sizeMapping().addSize([1200,90],[[970,90],[728,90]]).addSize([992,90],[728,90]).addSize([0,0],[]).build(),r=googletag.sizeMapping().addSize([768,90],[728,90]).addSize([0,0],[[320,100],[320,50]]).build(),f=googletag.sizeMapping().addSize([768,100],[[300,250],[300,600]]).addSize([0,0],[300,250]).build(),u=googletag.sizeMapping().addSize([768,100],[[300,250],[300,600]]).addSize([0,0],[300,250]).build(),o=googletag.sizeMapping().addSize([0,0],[1,1]).build();n.debug&&$(".spono-spot").each(function(t,i){n.App.log("AdBanners: div#"+i.id+" contains adUnit "+$(i).data("slot"))});i.addSlot("sb-main-ros",[[970,90],[728,90],[320,50],[320,100]],e);i.addSlot("sb-main-1",[[728,90],[320,100],[320,50]],r);i.addSlot("sb-main-2",[[728,90],[320,100],[320,50]],r);i.addSlot("sb-main-3",[[728,90],[320,100],[320,50]],r);i.addSlot("sb-main-4",[[728,90],[320,100],[320,50]],r);i.addSlot("sb-main-5",[[728,90],[320,100],[320,50]],r);i.addSlot("sb-main-6",[[728,90],[320,100],[320,50]],r);i.addSlot("sb-main-7",[[728,90],[320,100],[320,50]],r);i.addSlot("sb-side-1",[300,250],f);i.addSlot("sb-side-2",[300,250],f);i.addSlot("sb-side-3",[300,250],u);i.addSlot("sb-side-4",[300,250],u);i.addSlot("sb-side-5",[300,250],u);i.addSlot("sb-footer",[1,1],o);t.prepTargetting(googletag.pubads());googletag.pubads().enableSingleRequest();googletag.pubads().collapseEmptyDivs();googletag.enableServices()});$(".spono-spot").each(function(t,i){n.debug&&n.App.log("AdBanners: Advising Dfp of #"+$(i).attr("id"));googletag.cmd.push(function(){googletag.display(i.id)})})},t.addSlot=function(t,i,r){var f=$(".spono-spot").map(function(n,t){return t.id}).get(),u="div-"+t;if(f.indexOf(u)<0){n.App.log(u+" ignored, as no references in page:  ["+f+"]");return}n.App.log(u+" defined, sizeMap of ["+r+"],  sizes of ["+i+"]");n.adSlots[u]=googletag.defineSlot("/4174145/"+t,i,u).defineSizeMapping(r).addService(googletag.pubads())},t.prepTargetting=function(t){var i=n.Context.instance().location;i&&(t.setTargeting("location",i.name),t.setTargeting("state",i.state.name),t.setTargeting("region",i.region.name),n.debug);t.setTargeting("category",n.Context.instance().getCategory());t.setTargeting("sportchannel",n.Context.instance().getSportChannel());n.member&&t.setTargeting("interests",n.member.interests);n.debug},t.getHtml=function(i,r,u){if(n.config.adServer=="g"){var f="div-"+r;return"<div id='"+f+"' class='"+t.cssClass+" "+u+"' data-size='"+i+"' data-slot='"+r+"'<\/div>"}return"<div class='"+t.cssClass+" "+u+"' data-size='"+i+"' data-slot='"+r+"' data-src='name'><\/div>"},t.refreshSlots=function(i){if((i===void 0&&(i=null),n.config.adServer!="g")&&(n.App.log("AdBanners: refreshing "+i),this.serviceUrl)){i==null&&(i="."+this.cssClass);var r=[];$.each($(i),function(n,i){var u=$(i),f;u.is(":visible")&&(f=t.idName+t.idIndex++,u.attr("id",f),r.push({id:f,size:$(i).data("size"),slot:$(i).data("slot"),ref:document.URL,width:u.width()}))});r.length>0&&$.post(this.serviceUrl,JSON.stringify(r),function(n){$.each(n,function(n,t){$("#"+t.id).html(t.html)})})}},t}();t.serviceUrl=null;t.cssClass="spono-spot";t.idName="_spono_slot_";t.idIndex=1;t.nextMainBannerIndex=3;t.nextSideBannerIndex=3;n.AdBanners=t}(sb||(sb={})),function(n){var t=function(){function t(){}return t.send=function(t){var r=this,i=$(this.selector),u=window.grecaptcha,f,e;$("#pm-from").val(n.Members.getMemberName());$("#pm-to").val(t);$("#pm-to").prop("disabled",t!="");e=n.Members.isAuthenticated();e?($(".visible-auth").show(),$(".visible-unauth").hide()):($(".visible-auth").hide(),$(".visible-unauth").show());i.on("shown.bs.modal",function(){var n=t==""?"#pm-to":"#pm-from";$(n).focus();f=u.render("recaptcha",{sitekey:"6LdsbicTAAAAANklCehBfBTRoa_DvC3QCR-Tyv6U"})});$(this.selector).modal("show");$("#pm-send").click(function(){var t={a:"sendMsg",toName:n.UI.get("#pm-to"),fromEmail:n.UI.get("#pm-from-email"),subject:n.UI.get("#pm-subject"),message:n.UI.get("#pm-message"),recaptcha:u.getResponse(f)};n.UI.showWait();$.post(n.Network.getApi("Members"),t).done(function(t){t.success==0?r.err(t.resultText):(i.modal("hide"),n.UI.notify(t.message))}).fail(function(){r.err("There was an error sending your message - try again?")})});$("#pm-cancel").click(function(){i.modal("hide")})},t.err=function(t){n.UI.set("#pm-err",t);$(this.selector+" .alert").removeClass("hidden")},t}();t.selector="#sendMessageModal";n.Message=t}(sb||(sb={})),function(n){n[n.Undefined=0]="Undefined"}(MemberSettings||(MemberSettings={})),function(n){var t=function(){function t(){}return t.isAuthenticated=function(){var n=this.getMemberName();return n&&n.length>0},t.getMemberName=function(){var n=/Name=(.*?)&/.exec(Cookies.get("Snitz00User"));return n==null?null:n[1]},t.getPasswordToken=function(){var n=/PWord=(.*?)&/.exec(Cookies.get("Snitz00User"));return n==null?null:n[1]},t.saveSetting=function(t,i){this.isAuthenticated()&&n.member!=null&&(n.member.settings[t]=i,$.post(n.Network.getApi("Members"),{a:"saveSetting",id:t,value:i}))},t.getSetting=function(t,i){if(i===void 0&&(i=""),this.isAuthenticated()&&n.member!=null){var r=n.member.settings[t];return r==undefined?i:r}return i},t.loginOnReady=function(){$("#memberName").focus()},t.recoverOnReady=function(){$("#memberName").focus()},t.registerOnReady=function(){$("#memberName").focus()},t}();n.Members=t}(sb||(sb={})),function(n){var t=function(){function t(){}return t.browseOnReady=function(){$("#action-clear").click(function(){$("#action").val("clear");$("form").submit()});$("#createAdvert").click(function(){n.Network.redirect($("#createAdvert").data("url"))})},t.itemOnReady=function(t){$(".photos .item").mouseenter(function(n){$(".primary").attr("src",$(n.currentTarget).data("url"));$(n.currentTarget).addClass("current")});$(".photos .item").mouseleave(function(n){$(n.currentTarget).removeClass("current")});t.readOnly?$("#sendMsg").click(function(){n.Utils.redirect(t.url)}):$("#sendMsg").click(function(t){n.Message.send($(t.currentTarget).data("name"))});$.each(t.images,function(n,t){(new Image).src=t})},t.homeOnReady=function(){$(".featured").slick({dots:!0,infinite:!1,speed:300,slidesToShow:4,slidesToScroll:4,responsive:[{breakpoint:1024,settings:{slidesToShow:3,slidesToScroll:3,infinite:!0,dots:!0}},{breakpoint:600,settings:{slidesToShow:2,slidesToScroll:2}},{breakpoint:480,settings:{slidesToShow:1,slidesToScroll:1}}]})},t.searchOnReady=function(n){var i=this;this.makes=n;$(".selectState").click(function(n){n.preventDefault();$(".selectState-dropdown").slideToggle()});$(".selectState-dropdown li").click(function(n){i.selectedState=$(n.currentTarget).text();$(".selectState-dropdown").slideUp()});$(".searchBtn").click(function(){var n=$(".searchBox").val().trim();if(n=="")return $(".searchBox").attr("placeholder","Enter something to search for..."),!1});$(".searchBox").keypress(function(n){n.keyCode==13&&$(".searchBtn").click()});$(".advert-home .search .advanceSearch a").click(function(n){n.preventDefault();$(".advert-home .advancedSearch").slideToggle();$("html,body").animate({scrollTop:$(".advert-home .advancedSearch").offset().top},"slow")});$(".advert-home .advancedSearch #close button").click(function(){$(".advert-home .advancedSearch").slideToggle();$("html,body").animate({scrollTop:$(".advert-home .search .advanceSearch a").offset().top-100},"slow")});$(".advancedSearch #categoryId").change(function(){return t.fillMakes(),!1});this.fillMakes()},t.fillMakes=function(){var n,t,i=$("#categoryId").val(),r,u,f;for(i=i>=320&&i<=399?320:Math.floor(i/100)*100,r=$("#make"),r.empty(),r.append("<option value='-1'>All Makes<\/option>"),u=-1,f="",n=0;n<this.makes.length;n++)if(this.makes[n][0]==i){for(u=n,t=this.makes[u],n=1;n<t.length;n++)r.append("<option value='"+t[n]+"' "+(t[n]==f?"selected":"")+">"+t[n]+"<\/option>");break}},t.toggleWatch=function(t){var i="/images/icons/fave2.gif",r="/images/icons/fave1.gif";n.UI.showWaitCursor();$.ajax({url:"/Members/Classifieds/Service.ashx?a=watch&id="+t,dataType:"xml",type:"post",success:function(n){var u=$(n).find("watched").text();u=="-1"?alert("You'll need to login to watch adverts...visit the Members menu to login/join...  :-)"):$("#watch"+t).attr("src",u=="1"?i:r)}}).always(function(){n.UI.hideWaitCursor()})},t.openFrame=function(n){$(".msgHolder").show();$(".msgFrame").hide();$(".loading").show();$(".msgFrame").attr({src:n})},t.advertControlOnReady=function(){$(".clsWatchItem").click(function(t){n.Classifieds.toggleWatch($(t.target).data("id"))});$(".clsImageSlides").slick({infinite:!0,slidesToShow:1,slidesToScroll:1,speed:1,touchThreshold:10});$(".clsItemThumbs img").click(function(){$(".clsImageSlides").slick("slickGoTo",$(this).data("index"))});$(".clsItemThumbs img").mouseenter(function(){$(".clsImageSlides").slick("slickGoTo",$(this).data("index"))});$(".msgHolder").prependTo($("body"));$(".showPopup").click(function(n){var i=$(n.currentTarget).attr("href");return t.openFrame(i),n.stopPropagation(),!1});$(".msgFrame").on("load",function(){var n=$(".msgFrame").attr("src");n==""?($(".msgFrame").hide(),$(".msgHolder").hide(),$(".showPopup").focus(),document.activeElement.blur()):($(".loading").hide(),$(".msgFrame").show(),$(window).scrollTop(3))})},t}();t.makes=null;t.selectedCategory="";t.selectedState="";n.Classifieds=t}(sb||(sb={})),function(n){var t=function(){function t(){}return t.onReady=function(){this.bindEvents();this.getAdvert(n.Network.getLastPathSegment())},t.getAdvert=function(t){var i=this,r={xdomain:n.xDomain,id:t,a:"getAdvert",lookups:1};n.UI.showWait();$.post(n.Network.getApi("Classifieds"),r).always(function(){n.UI.hideWait()}).done(function(n){i.data=n;i.advert=n.adverts[0];i.bindData()}).fail(function(){n.UI.notify("Failed to save.  Retry?")})},t.bindEvents=function(){var n=this;$("#save").click(function(){return n.saveForm()});$("input[name=lengthType]").change(function(i){n.advert.lengthType=$(i.target).val();t.bindMeasurements()});$("#toTop").click(function(){return n.saveForm()});$("#resurrect").click(function(){return n.saveForm()})},t.bindData=function(){var t=this.advert;n.UI.set("#categoryName",t.categoryName);n.UI.set("#model",t.model);n.UI.set("#year",t.year);n.UI.set("#size",t.size);n.UI.set("#sizeUnits",t.sizeUnit);n.UI.set("#description",t.description);n.UI.set("#stockId",t.stockId);n.UI.set("#price",t.price);n.UI.set("#contactName",t.contactName);n.UI.set("#phone1",t.phone1);n.UI.set("#email",t.email);n.UI.set("#stateId",t.stateId);n.UI.set("#suburb",t.suburb);n.UI.set("#deliveryOption",t.deliveryOption);n.UI.set("input[name='paymentOptions']",t.paymentOptions);$(".stockRow").toggle(this.data.options.memberLevel>=100);$("#makeId").hide();$("#make").hide();this.data.lookups.makeType=="List"?($.each(this.data.lookups.makes,function(n,t){$("#makeId").append($("<option><\/option>").attr("value",t.id).text(t.text))}),$("#makeId").show(),n.UI.set("#makeId",t.makeId)):this.data.lookups.makeType=="Text"&&(n.UI.set("#make",t.make),$("#make").show());$("#make").prop("disabled",this.data.options.canEditMake==0);$("#makeId").prop("disabled",this.data.options.canEditMake==0);$("#model").prop("disabled",this.data.options.canEditModel==0);n.UI.set("#paidLabel","Premium Listing - $"+this.data.lookups.category.price);this.bindMeasurements()},t.bindMeasurements=function(){var t=this.advert,u=this.data.lookups.category,i,r;$(".lengthRow").toggle(u.showLength!=0);u.showLength!=0&&(i=t.lengthType=="metric",$("#metricInput").toggle(i),$("#imperialInput").toggle(!i),$("#lengthMetric").prop("checked",i),$("#lengthImperial").prop("checked",!i),i?(n.UI.set("#metric",t.lengthValue),n.UI.set("#metricUnits",u.metricLengthUnit)):(n.UI.set("#feet",Math.floor(t.lengthValue)),r=t.lengthValue,r=r.indexOf(".")>0?r.substr(r.indexOf(".")+1).substr(0,2):"0",n.UI.set("#inches",r)));$(".sizeRow").toggle(u.showSize!=0);u.showSize!=0&&(n.UI.set("#sizeTitle",t.sizeTitle),n.UI.set("#sizeUnits",t.sizeUnits),n.UI.set("#size",Math.abs(t.size)<.001?"":t.size.ToString()))},t.saveForm=function(){var t={a:"postAdvert",apiKey:"2FC32786-3166-404E-89F5-1815879C3BF3",advertId:this.advert.advertId,categoryId:this.advert.categoryId,makeId:n.UI.get("#makeId"),make:n.UI.get("#make"),model:n.UI.get("#model"),year:n.UI.get("#year"),lengthType:n.UI.get("input[name='lengthType']:checked"),description:n.UI.get("#description"),stockID:n.UI.get("#stockId"),price:n.UI.get("#price"),contactName:n.UI.get("#contactName"),phone1:n.UI.get("#phone1"),stateId:n.UI.get("#stateId"),suburb:n.UI.get("#suburb"),paymentOptions:n.UI.get("input[name='paymentOptions']:checked"),deliveryOption:n.UI.get("#deliveryOption"),levelId:n.UI.get("input[name='levelId']:checked")},r=this.data.lookups.category,f,i,u;r.showLength!=0&&(t.lengthType=="metric"?(t.length=n.UI.get("#metric"),t.lengthUnits=r.metricLengthUnit):(f=parseFloat(n.UI.get("#feet")),i=parseFloat(n.UI.get("#inches")),(i<0||i>11)&&(i=0),u=f+"."+i,i==10&&(u+="1"),t.length=u,t.lengthUnits=r.imperialLengthUnit));n.UI.showWait();$.post(n.Network.getApi("Classifieds"),t).always(function(){n.UI.hideWait()}).done(function(t){console.log(t);n.UI.notify("Success!")}).fail(function(t,i,r){n.UI.notify("Retry? Error returned "+i+", "+r)})},t.imageHandler=function(){},t}();n.ClassifiedsItemEdit=t}(sb||(sb={})),function(n){var t=function(){function n(){}return n.headlinesOnReady=function(){},n}();n.Content=t}(sb||(sb={})),function(n){var t=function(){function n(){}return n.applyFilters=function(){if(this.sportFilter=="All"&&this.stateFilter=="All")$(".eventRow").show();else{$(".eventRow").hide();var n=this.sportFilter=="All"?$(".eventRow"):$(".sportCol:contains('"+this.sportFilter+"')").parent(),t=this.stateFilter=="All"?$(".eventRow"):$(".stateCol:contains('"+this.stateFilter+"')").parent();$(n).filter(t).show()}$(".sportFilter").removeClass("active");$(".sportFilter:contains('"+this.sportFilter+"')").addClass("active");$(".stateFilter").removeClass("active");$(".stateFilter:contains('"+this.stateFilter+"')").addClass("active");this.setFilters(this.sportFilter,this.stateFilter)},n.setFilters=function(n,t){var i,r;t=="Australia"&&(t="All");Cookies.set(".sportFilter",n,{path:"/Events"});Cookies.set(".stateFilter",t,{path:"/Events"});i="/Events";t!=""&&n!=""&&(t!=""&&(i+="/"+t),n!=""&&(i+="/"+n));i!=location.href&&(r=n+" events in "+(t=="All"?"Australia":t),window.history.pushState({},r,i),document.title=r)},n.headlinesOnReady=function(){this.sportFilter=Cookies.get(".sportFilter");this.stateFilter=Cookies.get(".stateFilter");this.sportFilter||(this.sportFilter="All");this.stateFilter||(this.stateFilter="All");$(".sportFilter").click(function(t){return n.sportFilter=$(t.target).html(),n.applyFilters(),!1});$(".stateFilter").click(function(t){return n.stateFilter=$(t.target).html(),n.applyFilters(),!1});this.applyFilters()},n}();n.Events=t}(sb||(sb={})),function(n){var t=function(){function t(){this.confirmDelete=!0;this.editor=null;this.postbackUrl=null}return t.subscribeToTopic=function(t,i){if(!n.Members.isAuthenticated()){n.UI.errorMsg("<a rel='nofollow' href='/Login?ReturnUrl="+encodeURIComponent(location.pathname)+"'>Please login first...<\/a>",500);return}var r=$(t.target).data("id");n.UI.showWaitCursor();$.post("/forums/Subscribe/"+r,{},function(t){var r=t=="1";r?n.UI.successMsg("You are now subscribed to this topic.",500):n.UI.successMsg("You are no longer subscribed to this topic.",500);i&&i(r)}).always(function(){n.UI.hideWaitCursor()})},t.categoryForumsOnReady=function(){var n=this;$(".forum-action-expand").click(function(t){n.showExtras(t.target,n.toggleShowExtras())});this.showExtras($(".forum-action-expand")[0],this.getShowExtras())},t.topicPostsOnReady=function(t){var o=this,f=new n.Forums,u,r,e,i;f.confirmDelete=t.confirmDelete;$(".ratePanel").click(function(n){$(n.target).next().children().first().click()});$(".action-subscribe").click(function(n){o.subscribeToTopic(n,function(t){$(n.target).html(t?"Unsubscribe":"Subscribe")})});$(".action-quote").click(function(t){var i=$(t.target).parent(),r=i.data("id"),u=i.data("type");n.ForumPost.quotePost(r,u)});$(".action-reply").click(function(){if(!n.Members.isAuthenticated()){n.Network.go("/Login?ReturnUrl="+encodeURIComponent(location.href));return}n.ForumPost.doShowEditor()});$(".action-login").attr("href","/Login?ReturnUrl="+encodeURIComponent(location.href));$(".action-like").click(function(t){function u(n,t){$(i).html(t);$(i).fadeIn(353);setTimeout(function(){$(i).fadeOut(1e3)},2353)}var r=$(t.target).parent().data("id"),f=$(t.target).parent().data("type")==="t"?1:2,e="/Members/Profile/Rate.aspx?s="+f+"&id="+r+"&r=1",i="#thumbAnswer"+r;n.UI.showWaitCursor();u(i,"Voting...");$.getJSON(e,{}).done(function(n){u(i,n.msg);$("#rateGraph"+r).animate({width:n.percent+"%"},1e3)}).fail(function(n,t,r){u(i,"Oops - our error.");console.error(t+":"+r)}).always(function(){n.UI.hideWaitCursor()})});$(".action-edit").click(function(t){var i=$(t.target).parent().data("id"),r;r=$(t.target).parent().data("type")==="t"?"/forums/EditTopic/"+i:"/forums/EditReply/"+i;n.Network.redirect(r)});$(".action-delete").click(function(n){var i=!0,t,r;return f.confirmDelete&&(i=confirm("Delete - are you sure?")),i&&(t=$(n.target).parent().data("id"),r=$(n.target).parent().data("type")==="t"?"/forums/DeleteTopic/"+t:"/forums/DeleteReply/"+t,$("[data-id=p-"+t+"]").load(r)),!1});$(".action-cancel").click(function(){n.ForumPost.doHideEditor()});$(".action-email").click(function(t){var i=$(t.currentTarget),r=i.data("url")+"?member="+i.data("memberto");return n.Forums.openFrame(r),t.stopPropagation(),!1});$(".action-postLink").click(function(t){var r=$(t.currentTarget),u,i;return(t.stopPropagation(),u=$(".actioned-postLink").length>0,$(".actioned-postLink").remove(),u)?!1:(i=n.Utils.htmlEncode(location.protocol+"//"+location.host+("/Forums/Link/"+r.data("id"))),$(r).parent().append($("<div class='actioned-postLink'>Use this address to link directly to this post.<br /><input type='text' value='"+i+"'/><br/>"+("Or, <a id='share_facebook' href='http://www.facebook.com/sharer.php?u="+i+"' target='_blank' rel='noopener nofollow'><u>share on facebook<\/u><\/a><\/div>"))),$(".actioned-postLink input").focus(),$(".actioned-postLink input").select(),!1)});$(".offsite-link").mousedown(function(n){if(n.button===2){var t=n.target.href.indexOf("url=");t>0&&(n.target.href=decodeURIComponent(n.target.href.substr(t+4)))}});$(".QuoteBoxExpand").click(function(n){$(n.currentTarget).hide();$(n.currentTarget).parent().css({"max-height":"none"})});$(".msgHolder").prependTo($("body"));$(".msgFrame").on("load",function(){var n=$(".msgFrame").attr("src");n==""?($(".msgFrame").hide(),$(".msgHolder").hide(),$(".btn-success").focus(),document.activeElement.blur()):($(".loading").hide(),$(".msgFrame").show(),$(window).scrollTop(3))});$(".msgModal").on("click",function(){window.closeFrame()});try{if(u=window.location.hash,u.length>1)if(u=="#lastpost")i=$("#lastpost"),$(".forum-row-read").text("Last post in this topic"),$("html, body").animate({scrollTop:i.offset().top}),$(".forum-row-read").appendTo(i),$(".forum-row-read").removeClass("hidden");else for(r=parseInt(u.substr(1)),e=r>5e3;r>0;){if(i=$("#"+r),i.length>0){$("html, body").animate({scrollTop:i.offset().top});$(".forum-row-read").appendTo(i);e&&$(".forum-row-read").text("[ Direct Link Post ]");$(".forum-row-read").removeClass("hidden");$(".forum-row-read").parent().css("text-decoration","none");break}r--}}catch(s){console.error("HashFail:"+s)}n.ForumBookmarks.save(t.topicID,t.nextPage,t.nextIndex,t.Url);n.ForumPost.doPrepareEditor("");Cookies.set("topic",t.topicID,{path:"/forums"});this.insertSponos()},t.insertSponos=function(){n.debug&&console.log("Forums: insert sponos");var r=screen.height,f=r*3,e=8,u=0,t=r*2,i=0;$(".forum-row").each(function(r,o){var s=$(o).offset().top;t+=s-u;i++;u=s;(t>f||i>=e)&&($('<div class="row forum-row-sponoouter"><div class="col-xs-12 col-md-8 col-md-push-2">'+n.AdBanners.getHtml(n.BannerSize.Leaderboard,n.AdBanners.getNextMainAdUnit(),"forum-row-spono")+"<\/div><\/div>").insertAfter(o),t=0,i=0)})},t.openFrame=function(n){$(".msgHolder").show();$(".msgFrame").hide();$(".loading").show();$(".msgFrame").attr({src:n})},t.postOnReady=function(){$(".action-cancel").click(function(){n.Network.goBack()});n.ForumPost.doPrepareEditor($("#initialRichText").attr("value"));$("#subject").length>0?$("#subject").focus():n.ForumPost.focusEditor()},t.forumTopicsOnReady=function(){this.onTopicListReady()},t.activeTopicsOnReady=function(){this.onTopicListReady();$("#minutes").change(function(){location.href="/forums/ActiveTopics?minutes="+$("#minutes").val()});var t=n.Network.getParam("minutes");t!==""&&$("#minutes").val(t);$(".filters").change(function(){var t="";$(".filterBox input:checked").each(function(n,i){t+=i.value+","});Cookies.set("ActiveCats",t,{path:"/forums",expires:1e4});n.Network.go("/forums/ActiveTopics?minutes="+n.Network.getParam("minutes"))})},t.searchOnReady=function(){this.onTopicListReady()},t.onTopicListReady=function(){var n=this;$(".forum-action-expand").click(function(t){n.showExtras(t.target,n.toggleShowExtras())});this.buildPaging();this.showExtras($(".forum-action-expand")[0],this.getShowExtras());$(".action-login").attr("href","/Login?ReturnUrl="+encodeURIComponent(location.href));$(".action-subscribe").click(function(t){n.subscribeToTopic(t,function(){$(t.target).fadeOut(300)})});$("#topic"+Cookies.get("topic")).parent().parent().addClass("just-read")},t.toggleShowExtras=function(){return this.setShowExtras(!this.getShowExtras())},t.getShowExtras=function(){var n=Cookies.get("showExtras");return n==="1"||n===undefined},t.setShowExtras=function(n){return Cookies.set("showExtras",n?"1":0,{path:"/forums",expires:5e3}),n},t.showExtras=function(n,t){t=="1"?$(".extras").removeClass("hidden"):$(".extras").addClass("hidden");$(n).html(t=="1"?"Detailed":"Compact");this.setShowExtras(t)},t.buildPaging=function(){var n=$(".extras-paging");n.each(function(n,t){var r=$(t).data("pages");if(r>1){for(var e=$(t).data("url"),o=(e.indexOf("?")>0?"&":"?")+"page=",f="<img src='/Assets/icons/pageHollow.png' /> ",i=void 0,s=3,u=3,i=1;i<=Math.min(s,r);i++)f+='<a href="'+e+o+i+'">'+(i==r?"last":i)+"<\/a>";if(r>=s)for(r-u>u&&(f+=" ... "),i=r-u>u?r-u+1:u+1;i<=r;i++)f+='<a href="'+e+o+i+'">'+(i==r?"last":i)+"<\/a>";$(t).html(f)}})},t}();n.Forums=t}(sb||(sb={})),function(n){var t=function(){function t(){}return t.saveBookmarksToCloud=function(){var i=this,t;n.Utils.haveStorage()&&(t=[],$.each(localStorage,function(n,r){r.indexOf(i.bookmarkKey)>=0&&t.push({topicID:r,bookmark:JSON.parse(localStorage.getItem(r))})}),$.post(n.Network.getApi("Members"),{a:"saveForumBookmarks",m:n.Members.getMemberName(),p:n.Members.getPasswordToken(),bookmarks:t}))},t.loadBookmarksFromCloud=function(){n.Utils.haveStorage()&&$.getJSON(n.Network.getApi("Members"),{a:"getBookmarks",m:n.Members.getMemberName(),p:n.Members.getPasswordToken()}).done(function(n){$.each(n.bookmarks,function(n,t){var i=JSON.parse(t);localStorage.setItem(i.topicID,JSON.stringify(t.bookmark))})})},t.expire=function(){var r,t,i,u,f;if(n.Utils.haveStorage())for(r=new Date,t=localStorage.length-1;t>=0;t--)i=localStorage.key(t),i.indexOf(this.bookmarkKey)>=0&&(u=JSON.parse(localStorage.getItem(i)),f=(r.getTime()-u.lastUse)/864e5,f>this.retainBookmarksInDays&&localStorage.removeItem(i))},t.save=function(t,i,r){var f;if(n.Utils.haveStorage()){var e=this.bookmarkKey+t,o=(new Date).getTime(),u=localStorage.getItem(e);u==undefined?u=JSON.stringify({page:i,index:r,lastUse:o}):(f=JSON.parse(u),f.page=i,f.index=r,f.lastUse=o,u=JSON.stringify(f));localStorage.setItem(e,u)}},t.load=function(t){var r,u,f;if(n.Utils.haveStorage()){for(r=0;r<t.length;r++)if(u=t[r],f=localStorage.getItem(this.bookmarkKey+u),f!=undefined){n.debug;var e=JSON.parse(f),o=$("#topic"+u),i=""+o.attr("href");i+=i.lastIndexOf("?")>0?"&":"?";i+="page="+e.page;e.index>3&&(i+="#"+e.index);o.attr("href",i)}this.expire()}},t}();t.bookmarkKey="forumTopicBookmark:";t.retainBookmarksInDays=14;n.ForumBookmarks=t}(sb||(sb={})),function(n){var t=function(){function t(){}return t.ltrim=function(n){return n.replace(/^\s*/,"")},t.rtrim=function(n){return n.replace(/\s*$/,"")},t.trim=function(n){return t.rtrim(t.ltrim(n))},t.putCursorAtEnd=function(n){return n.each(function(n){if($(n).focus(),n.setSelectionRange){var t=$(n).val().length*2;n.setSelectionRange(t,t)}else $(n).val($(n).val());n.scrollTop=999999})},t.clearTextEditor=function(){t.isPlainTextEditor()?t.getPostTopicControl().value="":t.tinymce.activeEditor.setContent("")},t.addTextToEditor=function(n){var i,r,f,u;if(!t.isPlainTextEditor()){t.tinymce.activeEditor.execCommand("mceInsertContent",!1,n);t.doResize();return}i=t.getPostTopicControl();typeof i.selectionStart!="undefined"?(r=i.selectionStart,f=i.selectionEnd,i.value=i.value.substr(0,i.selectionStart)+n+i.value.substr(i.selectionEnd),i.focus(),i.selectionStart=r-f==0?r+n.length:r,i.selectionEnd=r+n.length):i.createTextRange&&i.caretPos?(u=i.caretPos,u.text=u.text.charAt(u.text.length-1)==" "?n+" ":n,i.focus(u)):i.value+=n},t.getEditorText=function(){return t.isPlainTextEditor()?t.trim(t.getPostTopicControl().value):t.trim(t.tinymce.activeEditor.getContent()).replace(/&nbsp;/g," ")},t.setEditorFromRichText=function(i){t.isPlainTextEditor()?(n.UI.showWaitCursor(),$.post("/forums/ConvertToPlain",{message:n.Network.encodeHtml(i)},function(n){t.selectEditor(!0);t.clearTextEditor();t.addTextToEditor(n+"\n\n\n");t.doCursorToEnd()},"text").always(function(){n.UI.hideWaitCursor()}),t.clearTextEditor(),t.addTextToEditor(i)):(t.clearTextEditor(),t.addTextToEditor(i))},t.setEditorFromPlainText=function(i){n.UI.showWaitCursor();$.post("/forums/ConvertToHtml",{message:n.Network.encodeHtml(i)},function(n){t.selectEditor(!1);t.clearTextEditor();t.addTextToEditor(n+"<br/>\n\n");t.doCursorToEnd()},"text").always(function(){n.UI.hideWaitCursor()})},t.isPlainTextEditor=function(){return Cookies.get("qr")=="N"},t.isRichTextEditor=function(){return!t.isPlainTextEditor()},t.selectEditor=function(n){n?(Cookies.set("qr","N"),t.updateEditorVisibility()):(Cookies.set("qr","Y"),t.updateEditorVisibility())},t.getPostTopicControl=function(){return $("#plainTextEditor")[0]},t.isOkToDiscardReply=function(){return t.getEditorText()==""?!0:confirm("Discard your reply?")},t.validateQuickReply=function(){return!0},t.wrapMceText=function(n){t.tinymce.activeEditor.formatter.toggle(n)},t.focusEditor=function(){t.isPlainTextEditor()?$("#postTextEditor").focus():t.tinymce.activeEditor&&t.tinymce.activeEditor.focus()},t.doScrollToEditor=function(){if($(".forum-post-editor").length>0){var n=$(".forum-post-editor").offset();$("html, body").animate({scrollTop:n.top,scrollLeft:n.left})}},t.doResizeCallback=function(){t.isPlainTextEditor()||t.tinymce.activeEditor==null||t.tinymce.activeEditor.execCommand("mceAutoResize");t.doScrollToEditor()},t.doResize=function(){setTimeout(function(){t.doResizeCallback()},100)},t.doCursorToEnd=function(){if(t.isPlainTextEditor())t.putCursorAtEnd($("#postTextEditor"));else{var n=t.tinymce.activeEditor;n.selection.select(n.getBody(),!0);n.selection.collapse(!1)}t.doScrollToEditor();t.focusEditor()},t.doShowEditor=function(){$(".forum-post-editor").show("slow");$(".proceedPanel").hide("slow");t.doScrollToEditor();t.doResize();t.doCursorToEnd();t.focusEditor()},t.doHideEditor=function(){t.clearTextEditor();$(".forum-post-editor").hide("slow");$(".proceedPanel").show("slow")},t.quotePost=function(i,r){var u=t.isPlainTextEditor()?"/forums/QuotePostPlain":"/forums/QuotePostHtml";return n.UI.showWaitCursor(),$.post(u,{id:i,type:r},function(n){t.doShowEditor();t.addTextToEditor(n);t.doScrollToEditor();t.doCursorToEnd()},"text").always(function(){return n.UI.hideWaitCursor()}),!1},t.closeImgModal=function(){return $(".imgFrame").attr({src:""}),this.doCursorToEnd(),!1},t.insertImages=function(n){var u,r,i;if(n==null||n.length==0)return alert("Nothing selected?"),!1;for(t.closeImgModal(),u=t.isRichTextEditor(),r=0;r<n.length;r++)i=n[r],i.indexOf("youtube")>0?t.addTextToEditor(i.replace(/http:\/\/www.youtube.com\/embed\//g,"http://youtu.be/")):u?this.addTextToEditor("<br/>\r\n<img src='"+i+"' /><br/>\r\n"):t.addTextToEditor("\r\n"+i+"\r\n");return u?t.addTextToEditor("<br/>\r\n<br/>\r\n"):t.addTextToEditor("\r\n\r\n"),t.doCursorToEnd(),!0},t.updateEditorVisibility=function(){t.isPlainTextEditor()?($(".mce-container").hide(),$("#richTextEditor").hide(),$(".richEditSelect").removeClass("tabSelected"),$("#plainTextEditor").show(),$(".plainEditSelect").addClass("tabSelected")):($(".mce-container").show(),$(".richEditSelect").addClass("tabSelected"),$("#plainTextEditor").hide(),$(".plainEditSelect").removeClass("tabSelected"))},t.doBeforeSubmit=function(){$("#PostTopic #Message").attr("value",n.Network.encodeHtml(t.getEditorText()));$("#richTextEditor").prop("disabled",!0);$("#plainTextEditor").prop("disabled",!0)},t.doPrepareEditor=function(n){var i=this;$(".forumEmoticonButton").click(function(n){t.isPlainTextEditor()?t.addTextToEditor($(n.target).children().attr("alt")):t.tinymce.activeEditor.execCommand("mceInsertContent",!1,t.tinymce.activeEditor.dom.createHTML("img",{src:$(n.target).children().attr("src"),"class":"forumEmoticon"}))});$(".forum-emoji .forum-emoticon-input").click(function(n){t.isPlainTextEditor()?t.addTextToEditor($(n.target).attr("alt")):t.tinymce.activeEditor.execCommand("mceInsertContent",!1,"<img src='"+$(n.target).attr("src")+"'/>")});$(".plainEditSelect").click(function(){var n=t.getEditorText();return t.selectEditor(!0),t.setEditorFromRichText(n),!1});$(".richEditSelect").click(function(){var n=t.getEditorText();return t.selectEditor(!1),t.setEditorFromPlainText(n),!1});$("#PostTopic").submit(function(){i.doBeforeSubmit()});this.initEditor(n)},t.initEditor=function(n){if(t.tinymce=window.tinymce,typeof t.tinymce=="undefined"){console.error("Didn't find editor?!");return}t.tinymce.init({baseURL:"/js/tinymce/4.5.3/",selector:"#richTextEditor",body_class:"topic-post",language:"en",plugins:"autoresize,paste",relative_urls:!1,convert_urls:!1,inline_styles:!1,forced_root_block:!1,gecko_spellcheck:!0,valid_elements:"img[!src|align|border|class],-b/strong,-i/em,-u,-strike/del,-div[class],br,section",menubar:"",toolbar:"undo redo | bold italic underline strikethrough",statusbar:!1,autoresize_min_height:0,paste_auto_cleanup_on_paste:!0,plugin_preview_width:"700",plugin_preview_height:"500",formats:{bold:{inline:"b"},italic:{inline:"i"},underline:{inline:"u"},strikethrough:{inline:"del"}},setup:function(i){i.on("init",function(){$("#richTextEditor_ifr").contents().find("head").append($("link[rel=stylesheet]").clone());n!=undefined&&n!=""&&t.setEditorFromRichText(n);$("#richTextEditor").prop("disabled",!1);$("#plaintTextEditor").prop("disabled",!1);t.updateEditorVisibility()})}})},t.onReady=function(){$(".imgModal").prependTo($("body"));$(".showImageModal").click(function(n){var t=$(n.target).data("href");return $(".imgFrame").attr("src",t),$("#imgModal").modal("show"),n.stopPropagation(),!1});$(".imgFrame").on("load",function(){var n=$(".imgFrame").attr("src");n==""?($(".imgFrame").hide(),$("#imgModal").modal("hide"),$(".btn-success").focus(),document.activeElement.blur()):($(".imgLoading").hide(),$(".imgFrame").show(),$(window).scrollTop(3))})},t}();n.ForumPost=t}(sb||(sb={})),function(n){var t=function(){function t(){}return t.menuOnReady=function(){},t.camerasOnReady=function(){var i,t,r;n.UI.reloadOnWake();i="page";t="active btn-primary";$(".sel-cams").click(function(){$("#swell").hide();$("#cameras").show();$(".sel-swell").removeClass(t);$(".sel-cams").addClass(t);Cookies.set(i,"cams",{expires:1,path:"/weather/surf-camera"})});$(".sel-swell").click(function(){$("#cameras").hide();$("#swell").show();$(".sel-cams").removeClass(t);$(".sel-swell").addClass(t);Cookies.set(i,"swell",{expires:9999,path:"/weather/surf-camera"})});r=Cookies.get(i);r=="swell"?$(".sel-swell").click():$(".sel-cams").click()},t.graphsOnReady=function(){n.UI.reloadOnWake()},t.renderGraphs=function(t){var i=t.global.renderMode===0?new n.DrawBitmap:new n.DrawJavascript;i.createGraphs(t,$("#graphs").first());$(".loading").hide();n.AdBanners.refreshSlots("."+i.getBannerClassName())},t.tidesOnReady=function(t){var i=new n.DrawJavascript;i.createGraphs(t,$("#graphs").first());$(".loading").hide();n.AdBanners.refreshSlots("."+i.getBannerClassName())},t.loadGraphData=function(i,r){var u={apiKey:n.apiKey,xDomain:n.xDomain,t:r,u:i,screenDimensions:screen.width+"x"+screen.height},f=n.Utils.getParam("renderMode");f!=null&&(u.renderMode=f);$.post(n.Network.getApi("Graphs"),u).done(function(n){t.renderGraphs(n)}).fail(function(t,i,r){n.UI.notify(i+", "+r)})},t.locationOnReady=function(n,t){this.loadGraphData(n,t);$(window).keypress(function(n){n.which===114&&(location.reload(),n.preventDefault())})},t}();n.WeatherPage=t}(sb||(sb={}));!function(n){var t=function(){function t(){this.json=null;this.container=null;this.showSocial=!1;this.hasMultipleForecasts=!1;this.hasTouch=window.screen.width<1025&&"ontouchstart"in window;this.faves=new n.DrawFavourites(this);this.noDataText="No data arrived from the server!?<br/><br/>Please try refreshing the page..."}return t.prototype.getBannerClassName=function(){return"weather-banner"},t.prototype.getGraphType=function(n){var t=n[0];return"W"==t?"Live Wind":"F"==t?"7 Day Wind &amp; Wave Forecast":"E"==t?"7 Day Wave Direction &amp; Period Forecast":"S"==t?"7 Day Tide Forecast":"P"==t?"Temperature &amp; Pressure":"T"==t?"Live Tide":""},t.prototype.addForecaseSubtext=function(n){$(document.createElement("div")).addClass("GraphsForecastSubtext").html("  <div class='GraphsForecastHelp'><a href='#' id='uxReverse'><span class='Quiet'>Reverse Graph Colours<\/span><\/a><\/div>  <div class='GraphsForecastSun'>Sunrise: "+this.json.global.sunriseText+"&nbsp;&nbsp;Sunset: "+this.json.global.sunsetText+"<\/div>").appendTo(n);$(document.createElement("div")).attr({"class":"clearfix"}).appendTo(n);$(document.createElement("div")).attr({"class":"GraphsForecastTimes"}).html(this.json.global.forecastInfoText).appendTo(n);$(document.createElement("div")).attr({"class":"clearfix"}).appendTo(n)},t.prototype.checkForMultiForecasts=function(){for(var t,i=0,r=!1,n=0;n<this.json.layout.length;n++)t="F"===this.json.layout[n].type,t&&!r&&i++,r=t;return this.hasMultipleForecasts=i>1,this.hasMultipleForecasts||$("#regionLinks").hide(),this.hasMultipleForecasts},t.prototype.processMultiForecasts=function(n){if("F"==n.type&&this.hasMultipleForecasts){this.container.append($(document.createElement("a")).attr({name:n.id}));var t=$("#regionLinks");t.children().length>0&&(t.append(" | "),t.show());t.append($(document.createElement("a")).attr({href:"#"+n.id}).text(n.title))}},t.prototype.validateLayout=function(){this.json.layout.length>0&&("A"!=this.json.layout[0].type&&this.json.layout.splice(0,0,{type:"A",id:this.json.global.bannerId}),this.json.layout.length>3&&"A"!=this.json.layout[this.json.layout.length-1].type&&this.json.layout.push({type:"A",id:this.json.global.bannerId}))},t.prototype.addMessage=function(n,t){null!==t&&void 0!==t&&t.length>0&&n.append($(t))},t.prototype.prefs=function(n,t){var i,u=n+"=",e=u.length,s=Cookies.get("prefs")||"",r=s.split("&"),f,o;if(void 0===t){for(i=0;i<r.length;i++)if(r[i].substr(0,e)==u)return r[i].substr(e)}else{if(f=[],r.length>0)for(i=0;i<r.length;i++)o=r[i].substr(0,e),o!=u&&f.push(r[i]);f.push(u+t);Cookies.set("prefs",f.join("&"),{path:"/",expires:9999})}return""},t.prototype.getJson=function(){return this.json},t.prototype.getQueryStringByName=function(n){n=n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp("[\\?&]"+n+"=([^&#]*)"),t=i.exec(location.search);return null==t?"":decodeURIComponent(t[1].replace(/\+/g," "))},t.prototype.loadFailure=function(t){n.UI.notify(t)},t.prototype.doShare=function(n,t,i,r){var u,e,o,f,s;return i=i.toLowerCase(),u=location.href.replace("localhost","www.seabreeze.com.au"),e=u.indexOf("#"),e>0&&(u=u.substr(0,e)),u+="#"+i,o=t,r=r+" "+this.getGraphType(i)+" Graph",f=2,("fx"==n&&(n="f",u=o,f=0),"f"==n)?(_gaq&&_gaq.push(["_trackEvent","Social","Share","Facebook"]),s="7 Day Wind, Wave, Tide Forecasts & Live Wind reports",0==f?window.open("https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(t)+"&t="+r,"facebook-share-dialog","width=626,height=436"):1==f||2==f&&window.open("https://www.facebook.com/sharer/sharer.php?s=100&p[url]="+encodeURIComponent(u)+"&p[images][0]="+encodeURIComponent(o)+"&p[title]="+encodeURIComponent(r)+"&p[summary]="+encodeURIComponent(s),"facebook-share-dialog","width=626,height=436")):"t"==n&&(_gaq&&_gaq.push(["_trackEvent","Social","Share","Twitter"]),window.open("https://www.twitter.com/home?status="+encodeURIComponent("@seabreeze.com.au "+r+" ... "+u),"twitter-share-dialog","width=626,height=436")),!1},t.prototype.addGraphEvents=function(){var n=this;this.faves.addEvents();$("#uxReverse").click(function(){var t=Cookies.get("rev");return Cookies.set("rev","1"===t?"0":"1",{path:"/",expires:5e3}),Cookies.get("rev")===t&&alert("It appears your browser might have cookies disabled - if the arrows don't reverse, try turning Cookies on via your browser Settings"),n.recreateGraphs(),!1});$("#regionLinks>a").click(function(t){var i=location.href,r=i.indexOf("#");r>0&&(i=i.substr(0,r));i+=$(t.target).attr("href");n.prefs("w",i)})},t.prototype.onComplete=function(){this.container.append("<div id='complete'><\/div>")},t}();n.DrawBase=t}(sb||(sb={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();!function(n){var t=function(t){function i(){var n=null!==t&&t.apply(this,arguments)||this;return n.retryCountdown=0,n.retries=0,n}return __extends(i,t),i.prototype.recreateGraphs=function(){$("#uxGraphs").empty();this.createGraphs(this.json,this.container)},i.prototype.createGraphs=function(t,i){var tt=this,e,l,p,w;if(this.json=t,this.container=i,this.container.empty(),!t||void 0===t||void 0===t.layout||void 0===t.data)return t.isCustomLayout||this.loadFailure(this.noDataText),void 0;if(0===t.layout.length||0===t.data.length)return t.global.isCustomLayout?$(".no-faves").removeClass("hidden"):this.loadFailure(this.noDataText),void 0;if(this.json.global.error)return this.loadFailure(t.global.error),void 0;if(0==this.json.layout.length){if(this.json.global.isCustomLayout)return i.append($(".GraphsOptions")),$(".no-faves").removeClass("hidden"),void 0;throw"No layout - please try re-choosing a location from the menu...";}this.showSocial=!this.hasTouch;var s,b=0,h=!1,k=!1,d=!1,a=!1,it=this.hasTouch?"GraphImage GraphImageNoTouch":"GraphImage",rt=this.json.global.forecastInfoUid,ut=this.json.global.liveInfoUid;this.validateLayout();var o=location.href.toLowerCase().indexOf("yesterday")>0,c=!o,ft="1"===Cookies.get("rev")||"1"===this.getQueryStringByName("rev"),et=c,g=c,ot=this.json.global.isCustomLayout;for(this.checkForMultiForecasts(),o&&$(".graphs-container").addClass("graphs-yesterday-container").removeClass("graphs-container"),s=0;s<this.json.layout.length;s++){var r=this.json.layout[s],f=r.type,v="FES".indexOf(f)>=0,y="WPT".indexOf(f)>=0,st="A"==f;if(this.processMultiForecasts(r),o){if(!y)continue;r.imageUrl=r.imageUrl.replace("/live/","/history/").replace(".a.png",".h.png");r.imageUrlRev=r.imageUrlRev.replace("/live/","/history/").replace(".a.png",".h.png")}if(("F"!=f||a||(i.append($(document.createElement("div")).attr({"class":"GraphsForecastTitle"}).html(r.title+" Weather Forecast").append($(document.createElement("div")).attr({"class":"GraphsBar"}))),k=!0,h=!1),!h&&y)&&(!o&&$(document).width()<767&&(e=parseInt(Cookies.get("mba")),isNaN(e)&&(e=0),e++<0&&(i.append($(document.createElement("div")).html('<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"><\/script> <ins class="adsbygoogle" style="display:inline-block;width:320px;height:100px" data-ad-client="ca-pub-3813700160659174" data-ad-slot="8947518649"><\/ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); <\/script>')),e=0),Cookies.set("mba",e,{path:"/weather",expires:9999})),i.append($(document.createElement("div")).attr({"class":"GraphsLiveTitle"}).html(o?"Yesterdays Weather":r.title+" Weather Now").append($(document.createElement("div")).attr({"class":"GraphsBar"}))),et&&i.append($(document.createElement("div")).attr({"class":"GraphsLiveTimes"}).html(this.json.global.liveInfoText)),h=!0),!h&&!k||d||(i.append($(".GraphsOptions")),this.addMessage(i,this.json.global.stateMessage),d=!0),v||y){var ht=ft?r.imageUrl:r.imageUrlRev,u=$(document.createElement("div")).attr({"class":"GraphsHolder","data-id":r.id}),nt=ht;if(this.showSocial&&this.addSocialShare(u,nt,r.id,r.title),g&&(this.faves.getFavesIcons(b,g,ot,r.id).appendTo(u),b++),"undefined"!=typeof r.preMessage&&u.append($(document.createElement("div")).html(r.preMessage)),"undefined"!=typeof r.messages)for(l=0;l<r.messages.length;l++)p=r.messages[l],p.flags.indexOf("B")>=0&&this.container.append($(document.createElement("div")).html(p.html));w=$(document.createElement("img")).attr({id:r.id,"class":it,alt:r.title+" "+this.getGraphType(r.id)+" Graph",src:nt+"?uid="+(v?rt:ut)}).data("id",r.id);this.hasTouch&&w.on("contextmenu",function(){return!1});u.append(w);"undefined"!=typeof r.postMessage&&u.append($(document.createElement("div")).html(r.postMessage));"W"==f&&u.prepend($(document.createElement("a")).attr({id:"wind-"+r.title.toLowerCase().replace(/ /g,"-"),title:r.title}));"S"==f&&n.DrawExtras.toggleTodaysTide(u,r.title,r.tides.split(","),new Date);i.append(u)}else st&&this.container.append(n.AdBanners.getHtml(n.BannerSize.Leaderboard,"g"==n.config.adServer?r.adUnit:r.id,this.getBannerClassName()));"F"!=f||a||this.addForecaseSubtext(i);a=v}c||$("#uxGraphs").addClass("GraphsHistoryBox");c&&$(".GraphImage").click(function(n){tt.showGraphExtras(n)});this.setInfoWindow(this.json,this.hasTouch);this.addGraphEvents();this.onComplete()},i.prototype.setInfoWindow=function(t,r){var u=new n.InfoWindowBitmap;u.init(t,r);i.infoWindow=u},i.prototype.addSocialShare=function(){},i.prototype.showGraphExtras=function(n){var t=$(n.target).parent(),r=$(n.target).data("id");i.showExtras({id:r,div:t,json:this.json,hasTouch:this.hasTouch})},i.showExtras=function(t){var i=t.id[0];"F"==i?n.DrawExtras.showForecastExtras(t):"S"==i?n.DrawExtras.showTideExtras(t):"W"==i&&n.DrawExtras.showLiveWindExtras(t)},i}(n.DrawBase);n.DrawBitmap=t}(sb||(sb={}));!function(n){var t=function(){function t(){}return t.showForecastExtras=function(n){var t=$(".forecast-extras"),i=n.json.global;t.appendTo($(n.div));$(".prognosis").attr("src",i.prognosisImageUrl).load(function(){$(".extras-loading").hide()});$(".synopsis").attr("src",i.synopticImageUrl).load(function(){return $(".extras-loading").hide()});t.slideToggle();$(".prognosis").click(function(){$(".synopsis").fadeIn(100);$(".prognosis").fadeOut(100)});$(".synopsis").click(function(){$(".prognosis").fadeIn(100);$(".synopsis").fadeOut(100)})},t.showTideExtras=function(n){var t=this.getLayout(n),i;null!=t.tides&&(i=t.tides.split(","),this.toggleTideTable(n.div,t.title,i))},t.toggleTodaysTide=function(t,i,r,u){var h,f,o;if(!$(".tide-table",t).is(":visible")){u=u||new Date;for(var c=n.Dates.getDayName2(u),e="<div class='tide-title'>"+i+" Tide Times for "+c+", "+n.Dates.getDateText(u)+" "+n.Dates.getLongMonthName(u)+"<\/div>",s=!1,l=0,f=1;f<r.length;f+=parseInt(r[0]))if(r[f]===c)l++,s=!0;else if(s)break;s=!1;h="col-xs-12";switch(l){case 2:h="col-xs-6";break;case 3:h="col-xs-4 col-sm-4";break;case 4:h="col-xs-6 col-sm-3"}for(e+="<div>",f=1;f<r.length;f+=parseInt(r[0]))if(r[f]===c)e+="<div class='"+h+" tide-col'>",e+="<span class='tide-today tide-extreme-"+("H"===r[f+3]?"high":"low")+"'>"+r[f+1]+" : "+r[f+2]+" "+r[f+3]+"<\/span>",e+="<\/div>",s=!0;else if(s)break;e+="<\/div><div class='tide-table-hint'><div class='col-xs-12'>Tap graph to toggle 7 day tide times table<\/div><\/div>";o=$(".tide-forecast-hint",t);0==o.length&&(o=$("<div class='tide-forecast-hint'><\/div>").appendTo(t));o.is(":visible")?o.html(e):o.hide().html(e).clearQueue().delay(250).slideDown(200)}},t.toggleTideTable=function(n,t,i){if(!$(".tide-table",n).length){for(var f="",o=0,u="<div class='tide-table' style='display:none'>"+("<div class='tide-header'>7 Day "+t+" Tide Times<\/div>"),r=1;r<i.length;r+=parseInt(i[0])){if(i[r]!==f){if(7==o++)break;""!==f&&(u+="<\/div>");u+="<div class='tide-item tide-day-"+i[r]+"'><div class='tide-day'>"+i[r]+"<\/div>";f=i[r]}var s=i[r+1],h=i[r+2],e=i[r+3];u+="<div class='tide-extreme-"+("H"===e?"high":"low")+"'>"+s+" : "+h+" "+e+"<\/div>"}u+="<\/div><\/div><div class='clearfix'><\/div>";$(n).append(u)}$(".tide-forecast-hint",n).slideUp(200);$(".tide-table",n).slideToggle(300)},t.showLiveWindExtras=function(){},t.showHtml=function(n,t,i){var r=$("#"+n);r=0==r.length?$("<div id='"+n+"' style='display:none;margin-top:15px' class='clearfix'><\/div>"):r;$(r).html(t);r.appendTo(i.div);r.slideToggle()},t.getLayout=function(n){for(var i=n.json.layout,t=0;t<i.length;t++)if(i[t].id==n.id)return i[t];return null},t.getData=function(n,t){for(var u,r=n.json.data,i=0;i<r.length;i++)if(u=r[i].length>8?r[i].substr(4,4):"_",r[i][0]==t&&n.id.substr(2,4)==u)return r[i].split(",");return null},t}();n.DrawExtras=t}(sb||(sb={}));!function(n){var t=function(){function t(n){this.settings=null;this.graphDraw=n}return t.prototype.getFavesIcons=function(n,t,i,r){var u=$(document.createElement("div")).attr({"class":"GraphsFaveBox"}),f,e;return i&&(n>0&&u.append($(document.createElement("img")).attr({"class":"GraphsFaveMoveUp",src:"/images/icons/faveup.gif",alt:"Moves this weather graph UP one position"}).data("id",r)),u.append($(document.createElement("img")).attr({"class":"GraphsFaveMoveDown",src:"/images/icons/favedown.gif",alt:"Moves this weather graph DOWN one position"}).data("id",r))),f="4",e=this.loadFavesSettings(),null!=e&&(f=$.inArray(r,e)<0?"4":"5"),u.append($(document.createElement("img")).attr({"class":"GraphsFaveIcon",src:"/images/icons/fave"+f+".gif",alt:"Adds/Removes this graph to your custom layout"}).data("id",r))},t.prototype.moveFave=function(n,t){var e=$(n).data("id"),r=this.loadFavesSettings(),i,u,f;if(null==r||(i=$.inArray(e,r),0>i))return!0;for(0>t&&i>1&&(u=r[i-1],r[i-1]=r[i],r[i]=u),t>0&&i<r.length&&(u=r[i+1],r[i+1]=r[i],r[i]=u),f="b;",i=0;i<r.length;i++)null!==r[i]&&6==r[i].length&&(f+=r[i]+";");return this.saveFavesSettings(f),this.graphDraw.recreateGraphs(),!1},t.prototype.updateFaves=function(t){var f=$(t).data("id"),i=this.loadFavesSettings(),e=i?$.inArray(f,i):-1,o=e>=0,u="b;",r;if(i)for(r=0;r<i.length;r++)null!==i[r]&&6==i[r].length&&r!=e&&(u+=i[r]+";");return o?($(t).attr("src","/images/icons/fave4.gif"),n.UI.successMsg("Removed from Favourites.",500)):(u+=f+";",$(t).attr("src","/images/icons/fave5.gif"),n.UI.successMsg("Favourite Added!<br/><br/>Use the <a href='/weather/my-weather'>Weather/<em>My Favourites<\/em><\/a> menu to view your faves.",500)),this.saveFavesSettings(u),!1},t.prototype.addEvents=function(){var n=this;$(".GraphsFaveIcon").click(function(t){return n.updateFaves(t.target)});$(".GraphsFaveMoveUp").click(function(t){return n.moveFave(t.target,-1)});$(".GraphsFaveMoveDown").click(function(t){return n.moveFave(t.target,1)})},t.prototype.loadFavesSettings=function(){return null==this.settings&&Cookies.get("MW")&&(this.settings=(Cookies.get("MW")+"").split(";")),this.settings},t.prototype.saveFavesSettings=function(n){var u,t;if(this.settings=null,u=Cookies.get("MW"),Cookies.set("MW",n,{path:"/graphs"}),Cookies.set("MW",n,{path:"/",expires:9999}),n!=u&&Cookies.get("MW")!=n)return alert("Sorry; you'll need to enable cookies to use the Favourites feature."),!1;for(var f=this.loadFavesSettings(),e=[],i=this.graphDraw.getJson(),r=0;r<f.length;r++)for(t=0;t<i.layout.length;t++)if(f[r]===i.layout[t].id){e.push(i.layout[t]);break}return this.graphDraw.getJson().layout=e,!0},t}();n.DrawFavourites=t}(sb||(sb={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();!function(n){var t=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return __extends(i,t),i.prototype.recreateGraphs=function(){this.container&&this.json&&this.createGraphs(this.json,this.container)},i.prototype.createGraphs=function(t,i){var h,g,l,e,u,a,v,y,p,o,s,nt;if(this.json=t,this.container=i,this.container.empty(),!t||void 0===t||void 0===t.layout||void 0===t.data)return t.isCustomLayout||this.loadFailure(this.noDataText),void 0;if(0===t.layout.length||0===t.data.length)return t.global.isCustomLayout?$(".no-faves").removeClass("hidden"):this.loadFailure(this.noDataText),void 0;if(t.global.error)return this.loadFailure(t.global.error),void 0;var it=0,w=location.href.toLowerCase().indexOf("yesterday")>0,ot=!w,b=this.json.global.isCustomLayout,st="1"===Cookies.get("rev")||"1"===n.Utils.getParam("rev"),c=!1,rt=!1,ut=!1,k=!1,ft=ot,ht=b;for(this.checkForMultiForecasts(),this.validateLayout(),h=0;h<t.layout.length;h++){var r=t.layout[h],f=r.type.toString(),et="FES".indexOf(f)>=0,d="WPT".indexOf(f)>=0,ct="A"===f;if(!w||d){if((this.processMultiForecasts(r),"F"!==f||k||(this.container.append(this.titlePanel((b?"":r.title)+" Weather Forecast")),rt=!0,c=!1),!c&&!rt||ut||(i.append($(".GraphsOptions")),this.addMessage(i,this.json.global.stateMessage),ut=!0),!c&&d)&&(g=void 0,g=b?"Live Weather Now":r.title+" Weather "+(w?"Yesterday":"Now"),this.container.append(this.titlePanel(g)),!0&&this.container.append($(document.createElement("div")).attr({"class":"GraphsLiveTimes"}).html(t.global.liveInfoText)),c=!0),et||d){if("undefined"!=typeof r.preMessage&&this.container.append($(document.createElement("div")).html(r.preMessage)),"undefined"!=typeof r.messages)for(l=0;l<r.messages.length;l++)e=r.messages[l],e.flags.indexOf("J")>=0&&(u=!1,a=window.navigator.userAgent.toLowerCase(),u=u||e.flags.indexOf("E")>=0&&(a.indexOf("trident")>0||a.indexOf("msie")>0),u=u||e.flags.indexOf("F")>=0&&a.indexOf("firefox")>0,u=u||e.flags.indexOf("*")>=0,u&&this.container.append($(document.createElement("div")).html(e.html)));for(v=null,y=0;y<t.data.length;y++)if(p=t.data[y],p.substr(0,1)===r.type&&p.substr(4,4)===r.id.substr(2,4)){v=p;break}if(null!=v)try{o=n.GraphData.parseRawData(v);o.global=t.global;o.prognosisImageUrl=t.global.prognosisImageUrl;o.synopticImageUrl=t.global.synopticImageUrl;void 0!==r.tides&&(o.global.tides=r.tides);s=$(document.createElement("div")).attr({"class":"GraphsHolder",id:"g"+h,"data-id":r.id});this.container.append(s);nt=n.GraphBase.createGraph(s,o,st);nt&&(nt.renderGraph(s),ft&&(s.append(this.faves.getFavesIcons(it,ft,ht,r.id)),it++),"W"==f&&s.prepend($(document.createElement("a")).attr({id:"wind-"+r.title.toLowerCase().replace(/ /g,"-"),title:r.title})))}catch(tt){console.error(tt);tt.stack&&console.log(tt.stack)}}else ct&&this.container.append(n.AdBanners.getHtml(n.BannerSize.Leaderboard,"g"==n.config.adServer?r.adUnit:r.id,this.getBannerClassName()));"F"!==f||k||this.addForecaseSubtext(i);k=et}}this.addGraphEvents();this.onComplete()},i.prototype.titlePanel=function(n){return $("<div class='titleContainer' style='margin-top:25px;margin-bottom:25px'><h1 class='titleLink' style='text-align:center !important'>"+n+"<\/h1><div class='titleEffect1'><\/div><div class='titleEffect2'><\/div><\/div>")},i}(n.DrawBase);n.DrawJavascript=t}(sb||(sb={}));!function(n){function i(){return n.Dates.getHourText(this.value)}function r(){return n.Dates.getDayName(this.value)+"<br/>"+n.Dates.getDateText(this.value)}n.arrowTypeGust="g";n.arrowTypeAverage="a";n.arrowTypePeriod="p";n.arrowTypeShadow="s";var t=function(){function t(){this.data=null;this.arrowRatio=61;this.msPerHour=36e5;this.maxWindSpeedKnots=30;this.maxWaveHeightMetres=6;this.highestWindSpeedKnots=70;this.highestWaveHeightMetres=10;this.infoWindowCss="";this.fontFamily="Open Sans";this.sizingSmall={isSmall:!0,widthPlus:0,heightPlus:53,font:{title:"12px",headerIcons:"10px",xAxisLabel:"8px",xAxisTitle:"10px",yAxisLabel:"8px",yAxisTitle:"10px",credits:"11px"},margin:{top:45,left:25,right:25,bottom:25},yAxis:{title:{x:8},labels:{x:15}},xAxis:{labels:{xPlus:24}}};this.sizingLarge={isSmall:!1,widthPlus:0,heightPlus:0,font:{title:"18px",headerIcons:"13px",xAxisLabel:"11.4px",xAxisTitle:"12px",yAxisLabel:"11.4px",yAxisTitle:"12px",credits:"11px"},margin:{top:45,left:40,right:40,bottom:25},yAxis:{title:{x:20},labels:{x:20}}};this.width=0;this.height=0;this.domain="seabreeze.com.au";this.textColor="#000";this.tickColor="#444";this.gridLineColor="#AAAAAA";this.waterId="w";this.waterFill="#00ffff";this.waterFillAlpha=.5;this.waterStoke="#A4D5FD";this.arrowStroke=Modernizr.rgba?"rgba(0,0,0,0.49)":"#555";this.arrowLowFill="#ff0000";this.arrowLowThreshold=12;this.arrowMedFill="#ffff00";this.arrowMedThreshold=18;this.arrowHighFill="#00ff00";this.arrowHighThreshold=35;this.arrowNutsFill="#b16d1d";this.arrowGustFill="#f3f3f3";this.arrowGustStroke="#ccc";this.arrowPeriodFill="#2a8efe";this.arrowPeriodStroke="#555";this.reverseColors=!1;Highcharts.setOptions({global:{useUTC:!1},credits:{enabled:!1}});t.createSymbols()}return t.createGraphFromData=function(t,i){try{var u=n.GraphData.parseRawData(i),r=$(document.createElement("div")).attr({"class":"GraphsHolder"});t.append(r);n.GraphBase.createGraph(r,u,!1).renderGraph(r)}catch(f){console.error(f+"(cgfd)"+i)}},t.createGraph=function(t,i,r){var u,f=.383;switch(i.header.type){case"F":u=new n.WindWaveForecastGraph;f=.44;break;case"E":u=new n.PeakPeriodForecastGraph;f=.383;break;case"S":u=new n.TideForecastGraph;f=.438;break;case"P":u=new n.PressureTempLiveGraph;f=.307;break;case"R":u=new n.RainGraph;f=.307;break;case"W":u=new n.LiveWindGraph;f=.383;break;case"T":u=new n.LiveTideGraph;f=.383;break;case"U":u=new n.UvGraph;f=.383;break;default:return null}return u.data=i,u.width=$(t).width(),u.height=Math.floor(u.width*f),u.reverseColors=r,u},t.prototype.renderGraph=function(n){this.container=n;this.sizing=this.width<t.smallBreakpointWidth?this.sizingSmall:this.sizingLarge;var i=30;return this.headerIconWidth=this.container.width()/724*(37-i)+i,this.headerIconHeight=this.headerIconWidth,this.fontHeight=Math.floor(100*(this.headerIconHeight/3))/100,this.render(n),this.chart=$(n).highcharts(),n},t.prototype.render=function(){},t.prototype.format=function(){},t.prototype.newChart=function(){var n={chart:{width:this.width+this.sizing.widthPlus,height:this.height+this.sizing.heightPlus,marginTop:this.sizing.margin.top,marginLeft:this.sizing.margin.left,marginRight:this.sizing.margin.right,marginBottom:this.sizing.margin.bottom,alignTicks:!1,backgroundColor:"white"},series:[],tooltip:{enabled:!1},legend:{enabled:!1},plotOptions:{area:{animation:!1,color:"#a4ffff",fillOpacity:.4,lineColor:"#bbcaff",marker:{enabled:!1,states:{hover:{enabled:!1}}}},line:{animation:!1,lineWidth:1,dashStyle:"Solid",marker:{enabled:!0,states:{hover:{enabled:!0,lineColor:"#0cc",lineWidth:1}}}},series:{}}};return n.title=this.buildTitle(this.data.header.longTitle),n.credits=this.buildCredits(n.chart),n.xAxis=this.buildXAxis(n),n},t.prototype.addNow=function(n){var i="nowLine",t=new Date,r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())),u=r.getTime()+r.getTimezoneOffset()*6e4;n.xAxis[0].removePlotLine(i);n.xAxis[0].addPlotLine({value:u,color:"#ccf",dashStyle:"ShortDash",width:1,id:i,gridZIndex:999})},t.prototype.addNight=function(n,t){var i=24*this.msPerHour;this.addOneNight(n,t.header.sunset.getTime()-i,t.header.sunrise.getTime());this.addOneNight(n,t.header.sunset.getTime(),t.header.sunrise.getTime()+i)},t.prototype.addOneNight=function(n,t,i){var r=n.yAxis[0].max,u=.5*this.msPerHour,f=[[0,Modernizr.rgba?"rgba(255,255,255,0.05)":"#eee"],[1,Modernizr.rgba?"rgba(0,0,0,0.06)":"#ddd"]];n.series.push({animation:!1,lineWidth:0,type:"area",data:[[t-u,r],[t+u,r]],fillColor:{linearGradient:{x1:0,y1:0,x2:1,y2:0},stops:f}});n.series.push({animation:!1,lineWidth:0,type:"area",data:[[t+u,r],[i-u,r]],fillColor:f[1][1]});n.series.push({animation:!1,lineWidth:0,type:"area",data:[[i-u,r],[i+u,r]],fillColor:{linearGradient:{x1:1,y1:0,x2:0,y2:0},stops:f}})},t.prototype.addWaterSeries=function(n,t){var i={id:this.waterId,type:"area",data:t,dashStyle:"Solid",lineWidth:1,lineColor:this.waterStoke,color:this.waterFill,fillOpacity:this.waterFillAlpha,shadow:!1};return n.series.push(i),i},t.prototype.addArrowSeries=function(n,i,r){var u={id:i,type:"line",data:r,lineColor:"#ccc",marker:{symbol:"arrow",enabled:!0,lineWidth:1,lineColor:"#555",radius:this.width/this.arrowRatio,states:{hover:{lineWidth:1}}}};return n.series.push(u),t.doAdvancedRender()&&n.series.push(u),u},t.prototype.getArrowMarker=function(n,t){return this.getArrowStyle(n,t,{symbol:"arrow",enabled:!0,radius:this.width/this.arrowRatio,states:{hover:{enabled:!0,fillColor:"#fff",lineWidthPlus:2,radius:this.width/this.arrowRatio}}})},t.prototype.updateArrowDirs=function(n){$.each(n.data,function(n,t){var i=this.graphic,r,u;i&&(r=i.attr("x")+i.attr("width")/2,u=i.attr("y")+i.attr("height")/2,i.attr({transform:"rotate("+t.dir+" "+r+" "+u+") "}))})},t.prototype.updateArrowShadows=function(t){var i=n.Responsive.isSize("xs")?"url(#shadow-xs)":"url(#shadow)";$.each(t.data,function(){var n=this.graphic;n&&n.attr({filter:i})})},t.prototype.updateArrowDirs2=function(n,i){for(var r=-1,u=0;u<n.series.length;u++)if(n.series[u].options.id===i){r=u;break}r>=0&&(t.doAdvancedRender()?(this.updateArrowDirs(n.series[r+1]),this.updateArrowShadows(n.series[r])):this.updateArrowDirs(n.series[r]))},t.prototype.getArrowStyle=function(t,i,r){var u,f;return t===n.arrowTypeAverage?(u=this.arrowStroke,f=i<this.arrowLowThreshold?this.reverseColors?this.arrowHighFill:this.arrowLowFill:i<this.arrowMedThreshold?this.arrowMedFill:i<this.arrowHighThreshold?this.reverseColors?this.arrowLowFill:this.arrowHighFill:this.arrowNutsFill):t===n.arrowTypeGust?(f=this.arrowGustFill,u=this.arrowGustStroke):(f=this.arrowPeriodFill,u=this.arrowPeriodStroke),r.lineColor=r.states.hover.lineColor=u,r.fillColor=r.states.hover.fillColor=f,r},t.prototype.buildLabelSet=function(n){var t={align:"center",style:{color:this.textColor,fontSize:this.sizing.font.xAxisLabel,fontFamily:this.fontFamily},formatter:"",useHTML:!1};return"function"==typeof n&&(t.formatter=n,t.useHTML=!0),t},t.prototype.buildXAxis=function(n){if(this.data.header.isDaily)if(n.xAxis=this.buildXAxisInternal(24*this.msPerHour,6*this.msPerHour,r),n.xAxis.startOnTick=!0,n.xAxis.gridLineWidth=1,n.xAxis.labels.x=47,n.chart.marginBottom+=this.fontHeight,"F"===this.data.header.type)n.chart.marginTop+=this.fontHeight+0+this.headerIconHeight+5;else"S"===this.data.header.type&&(n.chart.marginTop+=this.headerIconHeight);else n.xAxis=this.buildXAxisInternal(this.msPerHour,this.msPerHour/6,i);return n.xAxis.min=this.data.header.startDateTime.getTime(),n.xAxis.max=this.data.header.endDateTime.getTime(),n.xAxis},t.prototype.buildXAxisInternal=function(n,t,i){return{gridLineDashStyle:"ShortDot",gridLineColor:this.gridLineColor,gridLineWidth:0,type:"datetime",lineColor:"#000",lineWidth:1,tickInterval:n,tickColor:this.tickColor,tickWidth:1,tickLength:6,maxPadding:0,minPadding:0,minorGridLineWidth:0,minorTickInterval:t,minorTickColor:this.tickColor,minorTickWidth:1,minorTickLength:3,startOnTick:!1,endOnTick:!1,showFirstLabel:!0,showLastLabel:!0,crosshair:{color:"#333",dashStyle:"ShortDot",width:1},labels:{formatter:i,rotation:0,style:{fontSize:this.sizing.font.xAxisLabel,fontFamily:this.fontFamily,color:this.textColor,rotation:0,textOverflow:"none"}},style:{fontFamily:this.fontFamily},options:{labels:{style:{textOverflow:!1}}}}},t.prototype.buildYAxis=function(n,t,i,r){var u="R"==i;return{min:0,max:r,offset:0,opposite:u,gridLineDashStyle:"ShortDot",gridLineColor:this.gridLineColor,gridLineWidth:1,lineColor:this.textColor,lineWidth:1,tickColor:this.tickColor,tickWidth:1,tickLength:5,tickInterval:n,minorGridLineWidth:0,minorTickInterval:1,minorTickColor:this.tickColor,minorTickWidth:1,minorTickLength:3,ordinal:!1,title:{text:t,style:{color:this.textColor,fontFamily:this.fontFamily,fontSize:this.sizing.font.yAxisTitle,fontWeight:"bold",margin:0,padding:0},x:(u?1:-1)*this.sizing.yAxis.title.x},labels:{align:u?"right":"left",x:(u?1:-1)*this.sizing.yAxis.labels.x,y:4,style:{color:this.textColor,fontSize:this.sizing.font.yAxisLabel,fontFamily:this.fontFamily}}}},t.prototype.buildCredits=function(n){return{enabled:!0,position:{align:"right",x:-n.marginRight-6,y:-n.marginBottom-(this.data.header.isDaily?22:7),verticalAlign:"bottom"},href:null,text:this.domain,style:{cursor:"pointer",color:"#808080",fontSize:this.sizing.font.credits,fontFamily:this.fontFamily}}},t.prototype.buildTitle=function(n){return{text:n,margin:10,y:10,align:"center",style:{color:this.textColor,fontFamily:this.fontFamily,fontSize:this.sizing.font.title,fontWeight:"600"}}},t.prototype.adjustWindAxis=function(n,t){if(t>this.maxWindSpeedKnots){var i=n.chart.height-n.chart.marginTop-n.chart.marginBottom,r=i/t,u=(t-this.maxWindSpeedKnots)*r,f=2*u;return n.chart.height+=f,!0}return!1},t.prototype.trimDecimalPoint=function(n,t){var i=n.toString(),r=i.indexOf(".");return r>0&&0===t?i.substr(0,r):i.length-t>=r+t?i.substr(0,r+t+1):i},t.prototype.getByTime=function(n){var f,r;if(this.data.points.length<=1)return null;for(var u=1e20,i=null,t=0;t<this.data.points.length;t++)f=this.data.points[t].time.getTime(),r=Math.abs(f-n),u>r&&(u=r,i=this.data.points[t],i.index=t);return i},t.doAdvancedRender=function(){return/iPhone|iPad/i.test(navigator.userAgent)?window.devicePixelRatio>1:!/Android|webOS|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},t.getAngle=function(n){return(this.directions[n]+t.dirTweak)%360},t.createSymbols=function(){Highcharts.SVGRenderer.prototype.symbols.arrow=function(n,t,i,r){var u=n+.5*i,f=t+.5*r,s=.6,h=.5*s*i,e=.25*s*i,o=.5*r;return["M",u,f-h,"L",u+o,f,u,f+h,u,f+e,u-o,f+e,u-o,f-e,u,f-e,"Z"]}},t}();t.arrowShadows=0;t.infoBoxShadow=1;t.defaultGraphWidth=320;t.smallBreakpointWidth=467;t.dirTweak=-90;t.directions={S:0,SSW:22.5,SW:45,WSW:67.5,W:90,WNW:112.5,NW:135,NNW:157.5,N:180,NNE:202.5,NE:225,ENE:247.5,E:270,ESE:292.5,SE:315,SSE:337.5,"-":0,"":0};n.GraphBase=t;n.hourFormatter=i;n.dayFormatter=r}(sb||(sb={}));!function(n){var u=function(){function n(){}return n.prototype.hasMinTemp=function(){return t.isValid(this.minTemp)},n.prototype.hasMaxTemp=function(){return t.isValid(this.maxTemp)},n.prototype.hasRainChance=function(){return t.isValid(this.rainChance)&&this.rainChance>0},n}(),i,r,t;n.GraphForecast=u;i=function(){function n(){this.text=null}return n}();n.GraphMoon=i;r=function(){function n(){}return n}();n.GraphDataHeader=r;t=function(){function t(){this.weather=[];this.moons=[]}return t.parseRawData=function(n){var r=n.split(","),i=new t;return i.parseGraphHeader(r),i.parseGraphData(r),i.parseGraphSubData(r),i},t.prototype.parseGraphHeader=function(n){var i=0,t=new r;t.type=n[i++];t.version=this.toInt(n[i++]);t.id=n[i++];t.startpx=this.toInt(n[i++]);t.endpx=this.toInt(n[i++]);t.dayOfWeek=this.toInt(n[i++]);t.xRangeMins=this.toInt(n[i++]);t.xStartMin=this.toInt(n[i++]);t.xEndMin=this.toInt(n[i++]);t.title=n[i++];this.fn=this.toInt(n[i++]);this.fi=this.toInt(n[i++]);t.startDateTime=this.parseDate(n[i]);t.midnight=this.parseDate(n[i++].slice(0,8)+"0000");t.endDateTime=this.parseDate(n[i++]);t.sunrise=this.parseDecimalTime(n[i++],t.midnight);t.sunset=this.parseDecimalTime(n[i++],t.midnight);t.version>=2&&(i=this.fi-1,t.longTitle=n[i--],t.obsId=n[i--],t.obsDistKm=parseInt(n[i--]));t.isDaily=t.xRangeMins>4800;this.header=t},t.prototype.parseGraphData2=function(t){var f=[],e=this.header.startDateTime,r,i,u;for(e.setHours(0,0,0,0),r=this.fi;r<t.length;r+=this.fn)i=new n.GraphDataItem,i.time=this.parseDecimalTime(t[r],e),i.x=i.time.getTime(),u=r,i.v2=this.getNative(t[u++]),i.v3=this.getNative(t[u++]),i.v4=this.getNative(t[u++]),f.push(i);return f},t.prototype.parseGraphSubData=function(t){var l=t[0],o,a,s,e,f,h,r;if("S"!=l){if("F"==l)for(o=parseInt(t[16]),a=parseInt(t[17])-1,this.weather=[],s=18+o,r=0;a>r;r++,s+=o)e=s,f=new u,f.minTemp=parseFloat(t[e++]),f.maxTemp=parseFloat(t[e++]),f.time=this.addMinutes(this.header.startDateTime,1440*parseInt(t[e++])),f.text=t[e++],f.iconUrl=""+n.Network.getCdn(3)+n.GraphStyle.weatherIconsPath+"fc_"+t[e++]+".png",f.rainChance=parseFloat(t[e++]),f.rainAmount=t[e++],this.weather.push(f)}else for(this.moons=[],h=this.toInt(t[16]),r=17;17+h>r;r++){var v=isNaN(parseFloat(t[r]))?0:parseFloat(t[r]),y=n.TideForecastGraph.getMoonImageIndexFromPhase(v),c=new i;c.dayNumber=this.toInt(t[r+h]);c.imageUrl=""+n.Network.getCdn(2)+n.GraphStyle.moonIconsPath+y+".jpg";this.moons.push(c)}},t.prototype.getNative=function(n){var i=parseInt(n),t;return isNaN(i)?(t=parseFloat(n),isNaN(t)?n:t):i},t.prototype.parseGraphData=function(n){var t=null;try{switch(this.header.type){case"F":t=this.parseWindWaveForecastData(n);break;case"E":t=this.parsePeakPeriodForecastData(n);break;case"S":t=this.parseTideForecastData(n);break;case"P":t=this.parsePressureTempLiveData(n);break;case"R":t=this.parseRainData(n);break;case"U":t=this.parseUvData(n);break;case"W":t=this.parseWindLiveData(n);break;case"T":t=this.parseTideLiveData(n);break;default:console.error(this.header);console.error(" unknown")}}catch(i){console.log("parseError: "+i)}this.points=t},t.prototype.parseWindWaveForecastData=function(n){for(var i,r=[],t=this.fi;t<n.length;t+=this.fn)i={},i.time=this.parseDecimalTime(n[t],this.header.startDateTime),i.windSpeed=this.toInt(n[t+1]),i.windDirection=n[t+2],i.waveHeight=isNaN(parseFloat(n[t+3]))?0:parseFloat(n[t+3]),r.push(i);return r},t.prototype.parsePeakPeriodForecastData=function(t){for(var r,f,u=[],i=this.fi;i<t.length;i+=this.fn)r={},r.time=this.parseDecimalTime(t[i],this.header.startDateTime),r.wavePeriod=isNaN(parseFloat(t[i+1]))?0:parseFloat(t[i+1]),r.waveDirection=t[i+2],f=isNaN(parseFloat(t[i+3]))?0:parseFloat(t[i+3]),r.waveHeight=f,r.waveHeightFeet=Math.round(10*f*n.Units.feetPerMetre)/10,u.push(r);return u},t.prototype.parseTideForecastData=function(t){var r=[],e,i;r.moonPhases=[];for(var u=this.toInt(t[16]),f=17,i=f;f+u>i;i++)e=isNaN(parseFloat(t[i]))?0:parseFloat(t[i]),r.moonPhases.push({dayNumber:this.toInt(t[i+u]),filename:n.TideForecastGraph.getMoonImageIndexFromPhase(e),text:null});for(i=this.fi;i<t.length;i+=this.fn)r.push({time:this.parseDecimalTime(t[i],this.header.startDateTime),tide:isNaN(parseFloat(t[i+1]))?0:parseFloat(t[i+1])});return r},t.prototype.parsePressureTempLiveData=function(n){for(var i=[],t=this.fi;t<n.length;t+=this.fn)i.push({time:this.parseDecimalTime(n[t],this.header.midnight),temperature:parseFloat(n[t+1]),pressure:parseFloat(n[t+2])});return i},t.prototype.parseWindLiveData=function(n){for(var i=[],t=this.fi;t<n.length;t+=this.fn)i.push({time:this.parseDecimalTime(n[t],this.header.midnight),windSpeed:this.toInt(n[t+1]),windGust:this.toInt(n[t+2]),windDirection:n[t+3]});return i},t.prototype.parseTideLiveData=function(n){for(var i,r,u=[],f=this.header.startDateTime.getTime()-18e5,e=this.header.endDateTime.getTime()+18e5,t=this.fi;t<n.length;t+=this.fn)i={time:this.parseDecimalTime(n[t],this.header.midnight),tide:NaN!==parseFloat(n[t+1])?parseFloat(n[t+1]):0},r=i.time.getTime(),r>f&&e>r&&u.push(i);return u},t.prototype.parseRainData=function(n){for(var i=[],t=this.fi;t<n.length;t+=this.fn)i.push({time:this.parseDecimalTime(n[t],this.header.midnight),prob:parseFloat(n[t+1]),lowerMm:parseFloat(n[t+2]),upperMm:parseFloat(n[t+3])});return i},t.prototype.parseUvData=function(n){for(var i=[],t=this.fi;t<n.length;t+=this.fn)i.push({time:this.parseDecimalTime(n[t],this.header.midnight),uv:parseFloat(n[t+1])});return i},t.prototype.parseDecimalTime=function(n,t){var i=parseInt(n),r,u;return isNaN(i)?t:(r=Math.round(60*(i/100)),u=this.addMinutes(t,r),u)},t.prototype.parseDate=function(n){var t=this.toInt(n.slice(0,4)),i=this.toInt0(n.slice(4,6)),r=this.toInt0(n.slice(6,8)),u=this.toInt0(n.slice(8,10)),f=this.toInt0(n.slice(10,12));return new Date(t,i-1,r,u,f)},t.prototype.addMinutes=function(n,t){try{return n instanceof Date?new Date(n.getTime()+6e4*t):new Date(n+6e4*t)}catch(i){return console.error(i),n}},t.prototype.toInt=function(n){var t=parseInt(n);return isNaN(t)?0:t},t.prototype.toInt0=function(n){for(;n.length>1&&"0"===n.substr(0,1);)n=n.substr(1,n.length-1);var t=parseInt(n);return isNaN(t)?0:t},t.isValid=function(n){return n-t.unassigned>1},t}();t.unassigned=-9999;n.GraphData=t}(sb||(sb={}));!function(n){var t=function(){function n(){}return n}();n.GraphDataItem=t}(sb||(sb={}));!function(n){var t=function(){function n(){}return n}();t.moonIconsPath="/images/static/a/moons/";t.weatherIconsPath="/images/static/a/weather/";n.GraphStyle=t}(sb||(sb={}));!function(n){var t=function(){function t(){this.strundefined="undefined";this.data=null;this.firstPress=-1;this.magicMsToShowInfoBox=50;this.hasTouch=!1;this.haveRemovedMouse=!1;this.lastmid=null;this.infoBox=null;this.infoLine=null;this.lastX=this.firstPress;this.lastY=this.firstPress;this.displayMode=1;this.tempImage=null;this.abandonShowInfo=!1;this.inTouchScroll=!1;this.touchDownStartTime=0}return t.prototype.init=function(n,t){var i=this;this.hasTouch=t;this.data=n;this.pageInfo=n.data;$(".GraphImage").on("touchstart",function(n){i.inTouchScroll=!1;i.touchDownStartTime=(new Date).getTime();i.onTouch();i.mDown(n.originalEvent)});$(".GraphImage").on("touchmove",function(n){i.onTouch();i.mMove(n.originalEvent)});$(".GraphImage").on("touchend",function(n){i.inTouchScroll=!1;i.onTouch();i.mOut(n.originalEvent)});$(document).scroll(function(){i.abandonShowInfo=!0});this.hasTouch?$(".GraphImage").addClass("GraphsImageNoTouch"):($(document).on("mousemove",function(n){return i.mMove(n)}),$(document).on("mouseleave",function(n){return i.mOut(n)}),$(document).on("mouseenter",function(n){return i.mDown(n)}),$(document).on("mousedown",function(n){return i.mDown(n)}));$("body").append($(document.createElement("div")).attr({id:"uxInfoBox","class":"GraphsInfoBox",style:"display:none"}));$("body").append($(document.createElement("img")).attr({id:"uxInfoIndicator",src:"/images/indicator.gif",style:"display:none"}));$("body").append($(document.createElement("div")).attr({id:"uxInfoLine","class":"GraphsInfoLine",style:"display:none;pointer-events:none"}))},t.prototype.mMove=function(t){var v=this,r,c,i,nt,tt,it,k,h,a,u,rt,ut;if(this.inTouchScroll||this.hasTouch&&(null==t.touches||typeof t.touches===this.strundefined||t.touches.length>1)||(r=t.target.id,c=$(t.target),"ctl00"==r.substr(0,5)&&(r=r.substr(16)),i=r.substring(0,1),"W"!=i&&"P"!=i&&"S"!=i&&"T"!=i&&"F"!=i&&"E"!=i))return!0;"W"!=i&&"P"!=i&&(this.displayMode=1);r!=this.lastmid&&(this.lastmid=r);var f=this.getX(t),y=this.getY(t),l=c.offset(),d=f-l.left,g=t.target.offsetLeft+d,p=this.getData(r),w=this.getMouseDecimalTime(t,r,d,p);this.infoBox=$("#uxInfoBox");this.infoLine=$("#uxInfoLine");var o=this.infoBox.width(),b=this.infoBox.height(),e=25,s=27;if("F"===i&&(e=53,s=24),"E"===i&&(e=27,s=22),"P"===i&&(s=15),"S"===i&&(e=42,s=23),this.hasTouch){if(this.lastX==this.firstPress)return this.lastX=f,this.lastY=y,setTimeout(function(){v.abandonShowInfo||(v.lastX=f+5,v.mMove(t))},this.magicMsToShowInfoBox),!0;if(nt=Math.abs(f-this.lastX),tt=Math.abs(y-this.lastY),this.lastX=f,this.lastY=y,it=(new Date).getTime()-this.touchDownStartTime,it<this.magicMsToShowInfoBox)return this.inTouchScroll=!0,!0;if(tt>nt)return!0;t.preventDefault();k=15;u=g;u=Math.max(o/2-k,u);u=Math.min(u,$(window).width()-o/2-k);u-=o/2;h=1/n.Zoom.getZoom();a=0;n.UI.isLandscape()&&(a-=23,h*=.83);a+=b*h-e;this.infoBox.css({top:-a+"px",left:u+"px","transform-origin":"50% 0%",transform:"scale("+h+", "+h+")"});this.infoBox.appendTo($(t.target).parent()[0])}else u=l.left-(o+10),0>u?(this.infoBox.css("top",l.top-b+30+"px"),this.infoBox.css("left",f-o/2+"px")):(this.infoBox.css("top",l.top+$(t.target).height()/2-b/2+"px"),this.infoBox.css("left",u+"px"));return rt=c.parent(),(this.infoLine.appendTo(rt).css({left:g-1+"px",top:e+"px",height:c.height()-e-s}),0>w)?(this.infoBox.fadeOut(),this.infoLine.fadeOut(50)):(ut=this.getDataHtml(r,w,p),this.infoBox.html(ut),this.infoBox.fadeIn(100),this.infoLine.fadeIn(100)),"S"==i&&this.updateTideForecast(t,p,r,w),!1},t.prototype.getDateFromData=function(t,i){var r=Math.floor(i/100),u=Math.round(60*(i%100/100)),f=60*r+u,e=6e4*f,o=n.Dates.getDateFromYMD(t[12]);return new Date(o.getTime()+e)},t.prototype.updateTideForecast=function(t,i,r,u){var e=this.getDateFromData(i,u),f=n.DrawExtras.getLayout({id:r,json:this.data});n.DrawExtras.toggleTodaysTide($(t.target).parent(),f.title,f.tides.split(","),e)},t.prototype.mDown=function(n){if(this.hasTouch&&n.touches.length>1)return!0;this.abandonShowInfo=!1;this.lastX=this.firstPress;var t=n.target.id.substring(0,1);return this.hasTouch||"W"!=t&&"P"!=t||(this.displayMode=1==this.displayMode?0:1),this.mMove(n),!0},t.prototype.mOut=function(){return $("#uxInfoBox").fadeOut(),$("#uxInfoLine").fadeOut(),this.abandonShowInfo=!0,this.lastmid=null,this.infoBox=null,!0},t.prototype.getForecastItem=function(n,t){var i=null,r=t.getUTCDate();return $.each(this.data.forecasts,function(t,u){u.id===n&&$.each(u.forecast,function(n,t){r===new Date(t.localDate).getDate()&&(i=t)})}),i},t.prototype.getForecastHtml=function(n,t){var i=this.getForecastItem(n,t),r;return null==i?"":(r=i.shortDesc,i.probabilityPrecip>0&&(r+="<div class='rain'>"+i.probabilityPrecip+"% chance of rain",r+="<\/div>"),r)},t.prototype.getData=function(n){for(var r=n.substr(0,1),u=n.substr(2,4),i=-1,t=0;t<this.pageInfo.length;t++)if(this.pageInfo[t].substr(0,1)==r&&this.pageInfo[t].substr(4,4)==u){i=t;break}return-1==i?[]:this.pageInfo[i].split(",")},t.prototype.getImageScaling=function(n){if(null==this.tempImage&&(this.tempImage=document.createElement("img"),this.tempImage.src=n.src),null==this.tempImage)return n.width/screen.width;return n.width/this.tempImage.width},t.prototype.getMouseDecimalTime=function(n,t,i,r){var u=this.getImageScaling(n.target),f=parseInt(r[3],10)*u,o=parseInt(r[4],10)*u,s=parseInt(r[6],10),h=parseInt(r[7],10),e=o-f;return(i-=f,0>i||i>e)?-1:Math.floor(h+i/e*s)},t.prototype.getDataHtml=function(t,i,r){var f,e,c,o=t.substr(0,1),gt=parseInt(r[5],10),ni=parseInt(r[6],10),l=r[9],vt=parseInt(r[10],10),yt=parseInt(r[11],10),a="",v="",y="",w="",ut="",ft="",et="",pt="",ot=1,st=3,ht=2,d=3,s="",b,it,wt,ct,bt,k,rt,lt,at,kt,dt;"W"==o?(y="Average",v="Gust",ft="Ave",et="Gust",pt="Dir",s="(knots)"+(this.hasTouch?"":"<br/>Click graph for mode")):"P"==o?(y="<br/>&#186;C",v="<br/>hPa",ft="&#186;C",et="hPa",w="&#186;",s=this.hasTouch?"":"<br/>Click graph for mode"):"T"==o||"S"==o?(y="<div style='margin-top:5px;margin-bottom:5px'>Tide<\/div>",v="",w=" m","S"==o&&(s=this.hasTouch?"Tap graph for tide table":"Click graph for tide table")):"F"==o?(y="Wind",v="Waves",w=" kn",ut="",s="",ot=1,st=2,ht=3,d=-1,s=this.hasTouch?"Tap graph for synoptics":"Click graph for synoptics"):"E"==o&&(y="Period",w="s",v="Height",ut="",s="",ot=1,st=2,ht=3,d=-1);var h,p,g=0,u=-1,nt=9999,tt=[];if(1===this.displayMode)for(f=yt;f<r.length;f+=vt)h=parseInt(r[f],10),p=Math.abs(h-i),nt>p&&(nt=p,u=f);else for(f=yt;f<r.length;f+=vt)h=parseInt(r[f],10),p=Math.abs(h-i),nt>p&&(nt=p,u=g),e=Math.round(60*(h%100/100)),c=Math.floor(h/100%24),tt.push("<tr><td class='ibList'>&nbsp;&nbsp;"+(0==c%12?"12":c%12)+":"+(10>e?"0"+e:e)+" "+(c>11?"pm":"am")+"<\/td><td class='ibList'>"+r[f+1]+"<\/td><td class='ibList'>"+r[f+2]+"<\/td><td class='ibList'>"+r[f+3]+"<\/td><\/tr>"),g++;if(0>u||0>i)a="<div class='text-center' style='margin:50px 12px 0px 12px'>Apologies.<br/><br/>Data currently unavailable<\/div>";else if(l.length>10&&(l=l.substring(0,11)+"..."),1==this.displayMode)if(h=parseInt(r[u],10),c=Math.floor(h/100),b=c%12,it="",ni>2400&&(wt=["Sun","Mon","Tues","Wednes","Thurs","Fri","Satur"],it=wt[(Math.floor(h/2400)+gt)%7]+"day<br/>"),e=Math.round(60*(h%100/100)),ct=l.indexOf(" ("),ct>0&&(l=l.substr(0,ct)),""!==v){if(bt=r[u+ot],k=r[u+ht],("E"==o||"F"==o)&&(rt=3.2808399*parseFloat(k),k=this.trimDecimalPoint(k,1)+" m<br/>"+Math.floor(rt)+"' "+Math.floor(12*(rt-Math.floor(rt)))+'"'),lt="","F"==o){var ti=60*c+e,ii=6e4*ti,ri=n.Dates.getDateFromYMD(r[12]),ui=new Date(ri.getTime()+ii);lt="<tr><td colspan='2' class='ibDesc'>"+this.getForecastHtml(t,ui)+"<\/td>"}a="<table class='ibTable'><tr><td class='ibTitle' colspan='2'>"+l+"<\/td><\/tr><tr><td class='ibTime' colspan='2'>"+it+(0===b?12:b)+":"+(10>e?"0"+e:e)+" "+(c%24>11?"pm":"am")+"<\/td><\/tr>"+lt+"<tr><td class='ibTitle' width='50%'>"+y+"<\/td><td class='ibTitle' width='50%'>"+v+"<\/td><tr><td class='ibBigText'>"+bt+w+"<br/>"+r[u+st]+"<\/td><td class='ibBigText'>"+k+ut+"<br/>"+(d>0?r[u+d]:"")+"<\/td><\/tr>"+(""===s?"":"<tr><td class='ibFooter' colspan=2>"+s+"<\/td><\/tr>")+"<\/table>"}else at=parseFloat(r[u+1]),kt="<tr><td class='ibBigText''>"+n.Utils.toPrecision(at,2)+" m<br/>"+n.Units.toImperialLength(at*n.Units.feetPerMetre)+"<\/td><\/tr>",a="<table class='ibTable'><tr><td class='ibTitle'>"+l+"<\/td><\/tr><tr><td class='ibTime'>"+it+(0===b?12:b)+":"+(10>e?"0"+e:e)+" "+(c%24>11?"pm":"am")+"<\/td><\/tr><tr><td class='ibTideTitle'>"+y+"<\/td><\/tr>"+kt+(""===s?"":"<tr><td class='ibFooter'>"+s+"<\/td><\/tr>")+"<\/table>";else{for(g>u&&(tt[u]=tt[u].replace("<tr>","<tr nowrap style='background-color:#E4EDF8;'>")),a="<table border='0' cellpadding='0' cellspacing='0' class='ibTable'><tr><td class='ibTitle' colspan='4'>"+l+"<\/td><\/tr><tr><td class='ibListTitle' width='25%'>Time<\/td><td class='ibListTitle' width='25%'>"+ft+"<\/td><td class='ibListTitle' width='25%'>"+et+"<\/td><td class='ibListTitle' width='25%'>"+pt+"<\/td><\/tr>",dt=Math.min(u+15,g),u>4?u-=4:u=0,f=u;dt>f;f++)a+=tt[f];a+="<\/table>"}return a},t.prototype.trimDecimalPoint=function(n,t){var i=n.indexOf(".");return i>0&&0===t?n.substr(0,i):n.length-t>=i+t?n.substr(0,i+t+1):n},t.prototype.getX=function(n){return(null!=n.touches&&void 0!=n.touches?n.touches[0].pageX:n.pageX)+(t.isChrome()?window.scrollX:0)},t.prototype.getY=function(n){return(null!=n.touches&&void 0!=n.touches?n.touches[0].pageY:n.pageY)+(t.isChrome()?window.scrollY:0)},t.prototype.onTouch=function(){this.haveRemovedMouse||(this.haveRemovedMouse=!0,$(document).off("mousemove mouseenter mouseleave mousedown"))},t.isChrome=function(){if(null==this._isChrome)try{var t=window.chrome,n=window.navigator,i=n.vendor,r=n.userAgent.indexOf("OPR")>-1,u=n.userAgent.indexOf("Edge")>-1;this._isChrome=null!==t&&void 0!==t&&"Google Inc."===i&&0==r&&0==u?n.userAgent.indexOf("SAMSUNG")<0:!1}catch(f){console.error(f)}return this._isChrome},t}();t._isChrome=null;n.InfoWindowBitmap=t}(sb||(sb={}));!function(n){var t=function(){function n(){this.container=null;this.infoDiv=null;this.chart=null;this.graph=null;this.yAxis=0;this.yAxisField=null;this.plotLineId="X";this.displayMode=1;this.haveRemovedMouse=!1;this.isVisible=!1;this.positionMode=n.staticPosition;this.touchStartTimeStamp=0;this.touchTimeout=null;this.isTouchScrolling=!1;this.touchShowBoxInMs=200;this.infoBoxPercentOfWholeScreen=.56}return n.prototype.update=function(t){var a=document.documentElement.clientWidth,g=null!=t.originalEvent.touches?t.originalEvent.touches[0].pageX:t.pageX,e=g-$(t.target).offset().left,u=this.chart.xAxis[0].toValue(e,!1),c=this.chart.xAxis[0].getExtremes(),i,h,k,d,l;if(!(u<c.min||u>c.max)&&(i=this.graph.getByTime(u),i)){this.eventTime=u;this.chartExtremes=c;var f=this.infoDiv.width(),o=this.infoDiv.height(),s=Math.floor(this.chart.yAxis[this.yAxis].toPixels(i[this.yAxisField],!1)),r=Math.floor(this.chart.xAxis[0].toPixels(u,!1));if(i.index>1&&i.index<this.graph.data.points.length-1){var v=this.graph.data.points[i.index],y=this.graph.data.points[i.index+1],p=v.time.getTime(),nt=y.time.getTime(),tt=(u-p)/(nt-p),w=this.chart.yAxis[this.yAxis].toPixels(v[this.yAxisField],!1),b=this.chart.yAxis[this.yAxis].toPixels(y[this.yAxisField],!1),it=Math.abs(b-w),rt=Math.floor(it*tt)*(w>b?-1:1);s+=rt}h=Math.min(1,Math.floor(100*(a/this.getZoom()*this.infoBoxPercentOfWholeScreen/f))/100);.95>h&&450>a?(this.infoDiv.css({transform:"translate(-"+this.getTagTipOffset(f,e)+"px, -"+o+"px) scale("+h+","+h+")"}),this.infoDiv.css({"transform-origin":this.getTagTipOffset(f,e)+"px "+o+"px"})):(this.infoDiv.css({transform:"initial"}),this.infoDiv.css({"transform-origin":"initial"}),this.positionMode==n.dynamicPosition)?(s-=o,r-=this.getTagTipOffset(f,e)):(s=$(t.target).height()-o-30,r=-f/2-69,k=$(t.target),d=k.offset().left+r,5>d&&(r=Math.max(0,e-f/2),s=-o/2,l=$(document.body).width()-f-15,r>l&&(r=Math.min(r,l))));var ut=this.positionMode==n.staticPosition?" info-box-static":"",ft=this.positionMode==n.staticPosition?"":this.createCallout(e),et="<div class='info-box-content"+ut+"'>"+(null==i.time?"":this.graph.format(i))+"<\/div>";this.infoDiv.html(ft+et).css({top:Math.floor(s),left:Math.floor(r)});this.show(t);this.chart.xAxis[0].removePlotLine(this.plotLineId);this.chart.xAxis[0].addPlotLine({value:u,color:"#038",dashStyle:"ShortDot",width:1,id:this.plotLineId,gridZIndex:999})}},n.prototype.show=function(){this.isVisible||(this.infoDiv.fadeIn(100),this.isVisible=!0)},n.prototype.hide=function(){this.isVisible&&(this.infoDiv.fadeOut(),this.isVisible=!1,this.chart.xAxis[0].removePlotLine(this.plotLineId),this.graph.onHideInfoBox&&this.graph.onHideInfoBox())},n.prototype.mOut=function(n){this.hide(n)},n.prototype.mDown=function(n){this.update(n)},n.prototype.mMove=function(n){this.update(n)},n.prototype.getZoom=function(){return 1},n.prototype.isZoomed=function(){return this.getZoom()>1.1},n.prototype.resetTouchState=function(n){this.touchStartTimeStamp=n.timeStamp;this.isTouchScrolling=!1;this.hide(n);clearTimeout(this.touchTimeout)},n.prototype.tStart=function(n){var t=this;this.resetTouchState(n);this.haveRemovedMouse||(this.haveRemovedMouse=!0,$(n.target).unbind("mousemove"),$(n.target).unbind("mouseenter"),$(n.target).unbind("mouseleave"),$(n.target).unbind("mousedown"));n.viaTimer=!0;this.touchTimeout=setTimeout(function(){t.tMove(n)},this.touchShowBoxInMs+1)},n.prototype.tMove=function(n){if(!(n.originalEvent.touches.length>1||this.isTouchScrolling))if(this.isZoomed()){var t=n.timeStamp-this.touchStartTimeStamp;t>=this.touchShowBoxInMs||n.viaTimer===!0?(this.update(n),this.show(n),n.viaTimer||n.preventDefault()):this.isTouchScrolling=!0}else this.update(n),this.show(n)},n.prototype.tEnd=function(n){this.resetTouchState(n)},n.prototype.attachOverlay=function(){var t=this,r,i,n;this.chart=$(this.container).highcharts();r=$("<div style='position: relative'><\/div>");i=$("<div class='touchCapture' style='position:absolute;top:0;left:0;height:100%;width:100%;z-index:1;-webkit-user-select: none;-webkit-touch-callout: none'>");$(this.container).children().first().wrapAll(r);$(this.container).children().prepend(i);this.infoDiv=$(document.createElement("div")).attr({"class":"info-box "+this.graph.infoWindowCss,style:"display:none"});$(this.container).children().append(this.infoDiv);n=i;$(n).mouseenter(function(n){t.mDown(n)});$(n).mousedown(function(n){t.mDown(n)});$(n).mousemove(function(n){t.mMove(n)});$(n).mouseleave(function(n){t.mOut(n)});$(n).bind("touchstart",function(n){t.tStart(n)});$(n).bind("touchmove",function(n){t.tMove(n)});$(n).bind("touchend",function(n){t.tEnd(n)});$(n).bind("touchcancel",function(n){t.tEnd(n)})},n.prototype.getTagBaseLeft=function(n){var t=30,i=t,r=n-t-this.getTagBaseWidth(),u=r-i,f=(this.eventTime-this.chartExtremes.min)/(this.chartExtremes.max-this.chartExtremes.min);return u*f+i},n.prototype.getTagBaseRight=function(n,t){return this.getTagBaseLeft(n,t)+this.getTagBaseWidth()},n.prototype.getTagTipOffset=function(n,t){var i=this.getTagBaseLeft(n,t)-7,r=this.getTagBaseRight(n,t)-2,u=r-i,f=(this.eventTime-this.chartExtremes.min)/(this.chartExtremes.max-this.chartExtremes.min);return u*f+i},n.prototype.getTagBaseWidth=function(){return 20},n.prototype.getTagHeight=function(){return 30},n.prototype.createCallout=function(t){var o=this.infoDiv.width(),c=this.infoDiv.height(),s=1,h=1,a=this.getTagTipOffset(o,t),l=c-h,v=this.getTagHeight(),y=this.getTagBaseLeft(o,t),p=this.getTagBaseRight(o,t),w=l-v-h,r=0,e=o-s-s-10,u=0,f=w,i=5;return this.positionMode==n.staticPosition?"<svg width='"+o+"px' height='"+c+"px' style='position:absolute;top:0;left:0px'>                            <g stroke='#888' fill='#fcfcfc' transform='translate("+s+","+h+")'>                                <path d='M "+(r+i)+" "+u+"                                            L "+(e-i)+" "+u+"                                            A 5 5 135 0 1 "+e+" "+(u+i)+"                                            L "+e+" "+(f-i)+"                                            A 5 5 225 0 1 "+(e-i)+" "+f+"                                            L "+p+" "+f+"                                            L "+a+" "+l+"                                            L "+y+" "+f+"                                            L "+(r+i)+" "+f+"                                            A 5 5 315 0 1 "+r+" "+(f-i)+"                                            L "+r+" "+(u+i)+"                                            A 5 5 45 0 1 "+(r+i)+" "+u+"                                            z                                    '>                            <\/g>                        <\/svg>":"<svg width='"+o+"px' height='"+c+"px' style='position:absolute;top:0;left:0px' filter='url(#ib)' >                            <g stroke='#888' fill='#fcfcfc' transform='translate("+s+","+h+")'>                                <path d='M "+(r+i)+" "+u+"                                            L "+(e-i)+" "+u+"                                            A 5 5 135 0 1 "+e+" "+(u+i)+"                                            L "+e+" "+(f-i)+"                                            A 5 5 225 0 1 "+(e-i)+" "+f+"                                            L "+(r+i)+" "+f+"                                            A 5 5 315 0 1 "+r+" "+(f-i)+"                                            L "+r+" "+(u+i)+"                                            A 5 5 45 0 1 "+(r+i)+" "+u+"                                            z                                    '>                            <\/g>                        <\/svg>"},n.attach=function(t,i,r,u){var f=new n;return f.graph=t,f.container=i,f.yAxis=r,f.yAxisField=u,f.attachOverlay(),i.infoWindow=f,f},n}();t.dynamicPosition=0;t.staticPosition=1;t.defId=1;n.InfoWindow=t}(sb||(sb={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();!function(n){var t=function(t){function i(){var n=null!==t&&t.apply(this,arguments)||this;return n.infoWindowCss="info-box-livet",n}return __extends(i,t),i.prototype.render=function(i){var o;t.prototype.render.call(this,i);var u=.2,f=$.map(this.data.points,function(n){return{x:n.time.getTime(),y:n.tide}}),e=Math.floor(10*(f.reduce(function(n,t){return Math.max(t.y,n)},0)+u))/10,r=this.newChart(this.data);return r.yAxis=[this.buildYAxis(1,"Tide Height - Feet","",e*n.Units.feetPerMetre),this.buildYAxis(u,"Tide Height - Metres","R",e)],r.yAxis[0].gridLineWidth=0,r.yAxis[0].endOnTick=!1,r.yAxis[0].minorTickInterval=.5,r.yAxis[1].minorTickInterval=.1,this.addNight(r,this.data),this.addWaterSeries(r,f).yAxis=1,o=$(i).highcharts(r).highcharts(),n.InfoWindow.attach(this,i,0,"tide"),this.addNow(o),$(i).append("<div class='tide-live-hint'>&nbsp;<\/div>"),this.showTideHint(n.Dates.getDayName2(this.data.header.startDateTime.getTime())),!0},i.prototype.format=function(t){return"<table class='info-tide-live'><tr><td class='title'>"+this.data.header.title+"<\/td><\/tr><tr><td class='time'>"+n.Dates.getDayName(t.time)+"<br/>"+n.Dates.formatTime(t.time)+"<\/td><\/tr><tr><td class='data-title'>Tide Height<\/td><\/tr>"+("<tr><td class='data'>"+n.Utils.toPrecision(t.tide,2)+" m<br/>"+n.Units.toImperialLength(t.tide*n.Units.feetPerMetre)+"<td><\/tr>")+"<\/table>"},i.prototype.showTideHint=function(n){if(this.data.global.tides){for(var t=this.data.global.tides.split(","),r="<div class='row'>",u=!1,i=1;i<t.length;i+=parseInt(t[0]))if(t[i]===n){var e=t[i+1],o=t[i+2],f=t[i+3];r+="<span class='tide-today tide-extreme-"+("H"===f?"high":"low")+"'>"+e+" : "+o+" "+f+"<\/span>";u=!0}else if(u)break;r+="<\/div>";$(".tide-live-hint").html(r)}},i}(n.GraphBase);n.LiveTideGraph=t}(sb||(sb={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();!function(n){var t=function(t){function i(){var n=null!==t&&t.apply(this,arguments)||this;return n.infoWindowCss="info-box-livew",n}return __extends(i,t),i.prototype.render=function(r){var u,s;t.prototype.render.call(this,r);for(var h=[],c=[],l=this.data.points,e=this.maxWindSpeedKnots,o=l.length-1;o>=0;o--)u=l[o],h.push({x:u.time.getTime(),y:u.windSpeed,dir:n.GraphBase.getAngle(u.windDirection),marker:this.getArrowMarker(n.arrowTypeAverage,u.windSpeed)}),c.push({x:u.time.getTime(),y:u.windGust,dir:n.GraphBase.getAngle(u.windDirection),marker:this.getArrowMarker(n.arrowTypeGust,u.windGust)}),e=Math.max(e,u.windGust);e>this.maxWindSpeedKnots&&(e=5*Math.floor((e+5)/5));var f=this.newChart(this.data);return f.yAxis=[this.buildYAxis(5,"Knots","R",e),this.buildYAxis(10,"km/h","",e*1.852)],f.yAxis[1].minorTickInterval=2.5,f.yAxis[1].endOnTick=!1,f.yAxis[1].gridLineWidth=0,this.adjustWindAxis(f,e),f.series=[],this.addNight(f,this.data),this.addArrowSeries(f,n.arrowTypeGust,c),this.addArrowSeries(f,n.arrowTypeAverage,h),$(r).highcharts(f),s=$(r).highcharts(),this.updateArrowDirs2(s,n.arrowTypeGust),this.updateArrowDirs2(s,n.arrowTypeAverage),n.InfoWindow.attach(this,r,0,"windSpeed"),$(r).click(function(n){i.listMode=!i.listMode;r.infoWindow.update(n)}),!0},i.prototype.format=function(t){return i.listMode?this.formatList(t):"<table class='info-wind-live'><tr><td class='title' colspan='2'>"+this.data.header.title+"<\/td><\/tr><tr><td class='time' colspan='2'>"+n.Dates.getDayName(t.time)+"<br/>"+n.Dates.formatTime(t.time)+"<\/td><\/tr><tr><td class='data-title' width='50%'>Average<\/td><td class='data-title' width='50%'>Gust<\/td><tr><td class='data'>"+t.windSpeed+" kn<br/>"+t.windDirection+"<\/td><td class='data'>"+t.windGust+" kn<br/>"+t.windDirection+"<\/td><\/tr><tr><td class='footer' colspan='2'>Click to toggle list/latest<\/td><\/tr><\/table>"},i.prototype.formatList=function(t){for(var s=t.time.getTime(),o,f,e,r,u,i=0;i<this.data.points.length&&!(this.data.points[i].time.getTime()>s);i++);if(0===i)return"No data";for(o=i,i=Math.min(i+3,this.data.points.length-1),f="<table>\n"+("  <tr><td class='title' colspan='4'>"+this.data.header.title+"<\/td><\/tr>\n")+"  <tr><td class='list-title' width='30%'>Time<\/td><td class='list-title' width='22%'>Ave<\/td><td class='list-title' width='22%'>Gust<\/td><td class='list-title' width='26%'>Dir<\/td><\/tr>\n",e=0;i>=Math.max(i-15,0)&&8>e;i--,e++)r=this.data.points[i],u=i===o?"list highlight":"list",f+="  <tr><td class='"+u+"'>"+n.Dates.formatTime(r.time)+"<\/td><td class='"+u+"'>"+r.windSpeed+"<\/td><td class='"+u+"'>"+r.windGust+"<\/td><td class='"+u+"'>"+r.windDirection+"<\/td><\/tr>\n";return f+"<\/table>\n"},i}(n.GraphBase);t.listMode=!1;n.LiveWindGraph=t}(sb||(sb={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();!function(n){var t=function(t){function i(){var n=null!==t&&t.apply(this,arguments)||this;return n.infoWindowCss="info-box-peakf",n}return __extends(i,t),i.prototype.render=function(i){var u,s;t.prototype.render.call(this,i);for(var f=this.data.points,h=$.map(f,function(n){return{x:n.time.getTime(),y:n.waveHeightFeet,dir:n.waveDirection}}),e=[],o=f.length-1;o>=0;o--)u=f[o],e.push({x:u.time.getTime(),y:u.wavePeriod,dir:n.GraphBase.getAngle(u.waveDirection),marker:this.getArrowMarker(n.arrowTypePeriod,u.waveHeightFeet)});var c=h.reduce(function(n,t){return Math.max(t.y,n)},0),v=e.reduce(function(n,t){return Math.max(t.y,n)},0),l=2,a=2,r=this.newChart(this.data);return r.yAxis=[this.buildYAxis(l,"Wave Height - Feet","",c>this.maxWaveHeightMetres*n.Units.feetPerMetre?c*n.Units.feetPerMetre+l:this.maxWaveHeightMetres*n.Units.feetPerMetre),this.buildYAxis(a,"Wave Period - Second","R",v+a)],r.yAxis[0].gridLineWidth=0,r.yAxis[0].minorTickInterval=r.yAxis[1].minorTickInterval=.5,this.addWaterSeries(r,h).yAxis=0,this.addArrowSeries(r,n.arrowTypePeriod,e).yAxis=1,$(i).highcharts(r),s=$(i).highcharts(),this.updateArrowDirs2(s,n.arrowTypePeriod),this.addNow(s),n.InfoWindow.attach(this,i,0,"waveHeightFeet"),!0},i.prototype.format=function(t){return"<table class='info-peak-fc'><tr><td class='title' colspan='2'>"+this.data.header.title+"<\/td><\/tr>"+("<tr><td class='time' colspan='2'>"+n.Dates.getDayName(t.time)+"<br/>"+n.Dates.formatTime(t.time)+"<\/td><\/tr>")+"<tr><td class='data-title' width='50%'>Period<\/td><td class='data-title' width='50%'>Height<\/td><\/tr>"+("<tr><td class='data'>"+t.wavePeriod+" secs<br/>"+t.waveDirection+"<\/td><td class='data'>"+this.trimDecimalPoint(t.waveHeight,1)+" m<br/>"+n.Units.toImperialLength(t.waveHeightFeet)+"<\/td><\/tr>")+"<\/table>"},i}(n.GraphBase);n.PeakPeriodForecastGraph=t}(sb||(sb={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();!function(n){var t=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return __extends(i,t),i.prototype.render=function(i){t.prototype.render.call(this,i);var u=$.map(this.data.points,function(n){return{x:n.time.getTime(),y:n.temperature}}),f=$.map(this.data.points,function(n){return{x:n.time.getTime(),y:n.pressure}}),h=u.reduce(function(n,t){return Math.max(t.y,n)},0),e=f.reduce(function(n,t){return Math.max(t.y,n)},0),c=u.reduce(function(n,t){return Math.min(t.y,n)},100),o=f.reduce(function(n,t){return Math.min(t.y,n)},1e5),s=2,r=this.newChart(this.data);return r.yAxis=[this.buildYAxis(5,"hPa","",e),this.buildYAxis(s,"'C","R",h)],r.yAxis[0].endOnTick=!1,r.yAxis[0].gridLineWidth=0,r.yAxis[0].max=Math.max(e,e+10),r.yAxis[0].min=Math.min(o,o-10),r.yAxis[0].labels.x=-33,r.yAxis[0].title.x=-20,r.yAxis[0].title.style.color="#00c",r.yAxis[1].min=c-s,r.yAxis[1].title.style.color="#008000",this.addNight(r,this.data),r.series.push({name:"Air Pressure",lineWidth:2,type:"spline",color:"#0000ff",data:f,yAxis:0,marker:{enabled:!1}}),r.series.push({name:"Temperature",lineWidth:2,type:"spline",color:"#008000",data:u,yAxis:1,marker:{enabled:!1}}),$(i).highcharts(r),n.InfoWindow.attach(this,i,1,"temperature"),!0},i.prototype.format=function(t){return"<table class='info-pt-live'><tr><td class='title' colspan='2'>"+this.data.header.title+"<\/td><\/tr><tr><td class='time' colspan='2'>"+n.Dates.getDayName(t.time)+"<br/>"+n.Dates.formatTime(t.time)+"<\/td><\/tr><tr><td class='data-title' width='50%'>&#186;C<\/td><td class='data-title' width='50%'>hPa<\/td><\/tr><tr><td class='data'>"+t.temperature+"&#186;<\/td><td class='data'>"+t.pressure+"<\/td><\/tr><\/table>"},i}(n.GraphBase);n.PressureTempLiveGraph=t}(sb||(sb={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();!function(n){var t=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return __extends(i,t),i.prototype.render=function(i){var r;t.prototype.render.call(this,i);var f=$.map(this.data.points,function(n){return{x:n.time.getTime(),y:n.prob}}),u=$.map(this.data.points,function(n){return{x:n.time.getTime(),y:n.upperMm}}),e=Math.max(5,Math.floor(u.reduce(function(n,t){return Math.max(t.y,n)},0)+.5));return this.data.header.isDaily=!0,this.data.header.xRangeMins=7200,r=this.newChart(this.data),r.yAxis=[this.buildYAxis(5,"Probability","",100),this.buildYAxis(2,"Amount","R",e)],r.yAxis[0].gridLineWidth=0,this.data.header.xRangeMins>0&&this.data.header.xRangeMins<1440&&this.addNight(r,this.data),r.series.push({name:"Probability - %",lineWidth:2,type:"spline",color:"#FF7900",data:f,yAxis:0,marker:{enabled:!1}}),r.series.push({name:"Amount - mm",lineWidth:2,type:"column",color:"#4997E9",data:u,pointWidth:17,yAxis:1,marker:{enabled:!1}}),$(i).highcharts(r),n.InfoWindow.attach(this,i,1,"prob"),!0},i.prototype.format=function(t){return"<table class='info-pt-live'><tr><td class='title' colspan='2'>"+this.data.header.title+"<\/td><\/tr><tr><td class='time' colspan='2'>"+n.Dates.getDayName(t.time)+"<br/>"+n.Dates.formatTime(t.time)+"<\/td><\/tr><tr><td class='data-title' width='50%'>Amount<\/td><td class='data-title' width='50%'>Probability<\/td><\/tr><tr><td class='data'>"+t.upperMm+"mm<\/td><td class='data'>"+t.prob+"%<\/td><\/tr><\/table>"},i}(n.GraphBase);n.RainGraph=t}(sb||(sb={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();!function(n){var i=function(){function n(){}return n}(),t;n.HighPoints=i;t=function(t){function i(){var n=null!==t&&t.apply(this,arguments)||this;return n.infoWindowCss="info-box-tidef",n}return __extends(i,t),i.prototype.render=function(i){var u=this,s;t.prototype.render.call(this,i);var f=.5,e=$.map(this.data.points,function(n){return{x:n.time.getTime(),y:n.tide}}),o=Math.floor(10*(e.reduce(function(n,t){return Math.max(t.y,n)},0)+f))/10,r=this.newChart(this.data);return r.yAxis=[this.buildYAxis(1,"Tide Height - Feet","",o*n.Units.feetPerMetre),this.buildYAxis(f,"Tide Height - Metres","R",o)],r.yAxis[0].gridLineWidth=0,r.yAxis[0].endOnTick=!1,r.yAxis[0].minorTickInterval=.5,r.yAxis[1].minorTickInterval=.1,this.addWaterSeries(r,e).yAxis=1,$(i).highcharts(r),s=$(i).highcharts(),this.addHeaderIcons(s),n.InfoWindow.attach(this,i,1,"tide"),this.tideTable=this.data.global.tides.split(","),n.DrawExtras.toggleTodaysTide(this.container,this.data.header.title,this.tideTable,new Date),$(i).click(function(){n.DrawExtras.toggleTideTable(i,u.data.header.title,u.tideTable)}),!0},i.prototype.addHeaderIcons=function(n){var t=this.data.moons;if(!(t.length<1)){var i=this.headerIconHeight,e=i,r=36,u=4,o=r+u,f=n.plotWidth/t.length,s=r,h=this.headerIconHeight+u+4;n.renderer.rect(n.plotLeft,s,n.plotWidth,h,0).attr({"stroke-width":1,stroke:"#000",fill:"#000",zIndex:0}).add();$.each(t,function(t,r){var u=n.plotLeft+f*t+(f/2-i/2);n.renderer.image(r.imageUrl,u,o,e,i).attr({zIndex:2}).add()})}},i.prototype.format=function(t){var i=n.Dates.getDayName2(t.time);return $(".tide-table .tide-item").removeClass("tide-day-highlight"),$(".tide-table .tide-day-"+i).addClass("tide-day-highlight"),n.DrawExtras.toggleTodaysTide(this.container,this.data.header.title,this.tideTable,new Date(t.time)),"<table class='info-tide-fc'>"+("<tr><td class='title'>"+this.data.header.title+"<\/td><\/tr>")+("<tr><td class='time'>"+i+"<br/>"+n.Dates.formatTime(t.time)+"<\/td><\/tr>")+"<tr><td class='data-title'>Tide Height<\/td><\/tr>"+("<tr><td class='data'>"+n.Utils.toPrecision(t.tide,2)+" m<br/>"+n.Units.toImperialLength(t.tide*n.Units.feetPerMetre)+"<td><\/tr>")+"<tr><td class='footer'>Tap to view table<\/td><\/tr><\/table>"},i.prototype.onHideInfoBox=function(){},i.getMoonImageIndexFromPhase=function(n){var i=24,r=2*Math.PI,u=r/i,t=Math.round((n-u/2)/r*i);return t=(t+i)%i,10>t?"0"+t:t.toString()},i}(n.GraphBase);n.TideForecastGraph=t}(sb||(sb={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();!function(n){var t=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return __extends(i,t),i.prototype.render=function(i){t.prototype.render.call(this,i);var r=this.newChart(this.data);return r.yAxis=[this.buildYAxis(2,"Uv","",10)],this.addNight(r,this.data),r.series.push({name:"Uv",lineWidth:2,type:"area",color:"#0000ff",data:this.data.points,yAxis:0,marker:{enabled:!1}}),$(i).highcharts(r),n.InfoWindow.attach(this,i,1,"Uv"),!0},i.prototype.format=function(t){return"<table class='info-pt-live'><tr><td class='title' colspan='2'>"+this.data.header.title+"<\/td><\/tr><tr><td class='time' colspan='2'>"+n.Dates.getDayName(t.time)+"<br/>"+n.Dates.formatTime(t.time)+"<\/td><\/tr><tr><td class='data-title' width='50%'>Uv<\/td><\/tr><tr><td class='data' colspan='2'>"+t.Uv+"<\/td><\/tr><\/table>"},i}(n.GraphBase);n.UvGraph=t}(sb||(sb={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();!function(n){var t=function(t){function i(){var n=null!==t&&t.apply(this,arguments)||this;return n.infoWindowCss="info-box-wwf",n.dayCount=7,n}return __extends(i,t),i.prototype.render=function(i){var y=this,u,o;t.prototype.render.call(this,i);for(var h=[],c=[],l=this.data.points,r=this.maxWindSpeedKnots,f=this.maxWaveHeightMetres,s=l.length-1;s>=0;s--)u=l[s],h.push({x:u.time.getTime(),y:u.windSpeed,dir:n.GraphBase.getAngle(u.windDirection),marker:this.getArrowMarker(n.arrowTypeAverage,u.windSpeed)}),c.push({x:u.time.getTime(),y:u.waveHeight}),r=Math.max(r,u.windSpeed),f=Math.max(f,u.waveHeight);r>this.maxWindSpeedKnots&&(r=Math.min(5*Math.floor((r+5)/5),this.highestWindSpeedKnots));f>this.maxWaveHeightMetres&&(f=Math.min(Math.floor(f+1),this.highestWaveHeightMetres));var a=5,v=1,e=this.newChart(this.data);return e.yAxis=[this.buildYAxis(v,"Wave Height - Metres","",f>this.maxWaveHeightMetres?f+v:this.maxWaveHeightMetres),this.buildYAxis(a,"Wind Speed - Knots","R",r>this.maxWindSpeedKnots?r+a:this.maxWindSpeedKnots)],e.yAxis[0].gridLineWidth=0,e.yAxis[0].minorTickInterval=.25,this.adjustWindAxis(e,r)&&f<this.maxWaveHeightMetres&&(e.yAxis[0].max=this.maxWaveHeightMetres*(r/this.maxWindSpeedKnots)),this.addWaterSeries(e,c).yAxis=0,this.addArrowSeries(e,n.arrowTypeAverage,h).yAxis=1,$(i).highcharts(e),o=$(i).highcharts(),this.updateArrowDirs2(o,n.arrowTypeAverage),this.addHeaderIcons(o),this.addNow(o),n.InfoWindow.attach(this,i,1,"windSpeed"),$(i).click(function(){y.toggleMaps(i)}),!0},i.prototype.addHeaderIcons=function(n){var i=this,r=this.data.weather;if(!(r.length<1)){var t=this.headerIconHeight,e=t,u=45,o=u+5,f=n.plotWidth/this.dayCount;$.each(r,function(r,s){var h=n.plotLeft+f*r+(f/2-e/2),c=(s.hasMinTemp()?Math.round(s.minTemp)+" - ":"")+(s.hasMaxTemp()?Math.round(s.maxTemp):"");s.hasMinTemp()&&s.hasMaxTemp()&&(c+="°");n.renderer.text('<span style="z-index:1;font-size: '+i.sizing.font.headerIcons+"; font-family: "+i.fontFamily+'">'+c+"<\/span>",h-2,u).add();n.renderer.image(s.iconUrl,h,o,t,t).attr({zIndex:2}).add()})}},i.prototype.format=function(t){var i=null,u=t.time.getDate(),r;return($.each(this.data.weather,function(n,t){u===t.time.getDate()&&(i=t)}),null==i)?"<br/><br/>No data<br/>for this point?!<br/><br/>&nbsp;":(r=i.text,i.hasRainChance()&&(r+="<div class='rain'>"+i.rainChance+"% chance of rain",r+="<\/div>"),"<table class='info-windwave-fc'><tr>"+("<td class='title' colspan='2'>"+this.data.header.title+"<\/td><\/tr>")+("<tr><td class='time' colspan='2'>"+n.Dates.getDayName(t.time)+"<br/>"+n.Dates.formatTime(t.time)+"<\/td><\/tr>")+("<tr><td class='shortDesc' colspan='2'>"+r+"<\/td><\/tr>")+"<tr><td class='data-title' width='50%'>Wind<\/td><td class='data-title' width='50%'>Waves<\/td><\/tr>"+("<tr><td class='data'>"+t.windSpeed+" kn<br/>"+t.windDirection+"<\/td><td class='data'>"+this.trimDecimalPoint(t.waveHeight,1)+" m<br/>"+n.Units.toImperialLength(t.waveHeight*n.Units.feetPerMetre)+"<\/td><\/tr>")+"<\/table>")},i.prototype.toggleMaps=function(n){var t=$(".forecast-extras");$(n).find(".forecast-extras").length||(n.append(t),$(".prognosis").attr("src",this.data.prognosisImageUrl).load(function(){$(".extras-loading").hide()}),$(".synopsis").attr("src",this.data.synopticImageUrl).load(function(){$(".extras-loading").hide()}),$(".prognosis").click(function(){return $(".synopsis").fadeIn(100),$(".prognosis").fadeOut(100),!1}),$(".synopsis").click(function(){return $(".prognosis").fadeIn(100),$(".synopsis").fadeOut(100),!1}));t.slideToggle()},i}(n.GraphBase);n.WindWaveForecastGraph=t}(sb||(sb={}));!function(n){var t=function(){function n(){}return n.getZoom=function(){return n.detectFunction().zoom},n.device=function(){return n.detectFunction().devicePxPerCssPx},n.devicePixelRatio=function(){return window.devicePixelRatio||1},n.fallback=function(){return{zoom:1,devicePxPerCssPx:1}},n.ie8=function(){var t=Math.round(100*(screen.deviceXDPI/screen.logicalXDPI))/100;return{zoom:t,devicePxPerCssPx:t*n.devicePixelRatio()}},n.ie10=function(){var t=Math.round(100*(document.documentElement.offsetHeight/window.innerHeight))/100;return{zoom:t,devicePxPerCssPx:t*n.devicePixelRatio()}},n.chrome=function(){var i=window.innerWidth,t;try{"undefined"!=typeof visualViewport&&(i=window.visualViewport.width)}catch(r){}return t=Math.round(100*(window.outerWidth/i))/100,{zoom:t,devicePxPerCssPx:t*n.devicePixelRatio()}},n.safari=function(){var t=Math.round(100*(document.documentElement.clientWidth/window.innerWidth))/100;return{zoom:t,devicePxPerCssPx:t*n.devicePixelRatio()}},n.webkitMobile=function(){var i=90==Math.abs(window.orientation)?screen.height:screen.width,t=i/window.innerWidth;return{zoom:t,devicePxPerCssPx:t*n.devicePixelRatio()}},n.important=function(n){return n.replace(/;/g," !important;")},n.webkit=function(){var r=document.createElement("div"),t,i;return r.innerHTML="1<br>2<br>3<br>4<br>5<br>6<br>7<br>8<br>9<br>0",r.setAttribute("style",this.important("font: 100px/1em sans-serif; -webkit-text-size-adjust: none; text-size-adjust: none; height: auto; width: 1em; padding: 0; overflow: visible;")),t=document.createElement("div"),t.setAttribute("style",n.important("width:0; height:0; overflow:hidden; visibility:hidden; position: absolute;")),t.appendChild(r),document.body.appendChild(t),i=1e3/r.clientHeight,i=Math.round(100*i)/100,document.body.removeChild(t),{zoom:i,devicePxPerCssPx:i*n.devicePixelRatio()}},n.firefox4=function(){var t=n.mediaQueryBinarySearch("min--moz-device-pixel-ratio","",0,10,20,.0001);return t=Math.round(100*t)/100,{zoom:t,devicePxPerCssPx:t}},n.firefox18=function(){return{zoom:n.firefox4().zoom,devicePxPerCssPx:n.devicePixelRatio()}},n.opera11=function(){var t=window.top.outerWidth/window.top.innerWidth;return t=Math.round(100*t)/100,{zoom:t,devicePxPerCssPx:t*n.devicePixelRatio()}},n.mediaQueryBinarySearch=function(n,t,i,r,u,f){function s(i,r,u){var e=(i+r)/2,o;return 0>=u||f>r-i?e:(o="("+n+":"+e+t+")",h(o).matches?s(e,r,u-1):s(i,e,u-1))}var h,c,o,e,l;return window.matchMedia?h=window.matchMedia:(c=document.getElementsByTagName("head")[0],o=document.createElement("style"),c.appendChild(o),e=document.createElement("div"),e.className="mediaQueryBinarySearch",e.style.display="none",document.body.appendChild(e),h=function(n){o.sheet.insertRule("@media "+n+"{.mediaQueryBinarySearch {text-decoration: underline} }",0);var t="underline"==getComputedStyle(e,null).textDecoration;return o.sheet.deleteRule(0),{matches:t}}),l=s(i,r,u),e&&(c.removeChild(o),document.body.removeChild(e)),l},n.detectFunction=function(){var t=n.fallback;return isNaN(screen.logicalXDPI)||isNaN(screen.systemXDPI)?window.navigator.msMaxTouchPoints?t=n.ie10:!window.chrome||window.opera||navigator.userAgent.indexOf(" Opera")>=0?Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0?t=n.safari:"orientation"in window&&"webkitRequestAnimationFrame"in window?t=n.webkitMobile:"webkitRequestAnimationFrame"in window?t=n.webkit:navigator.userAgent.indexOf("Opera")>=0?t=n.opera11:window.devicePixelRatio?t=n.firefox18:n.firefox4().zoom>.001&&(t=n.firefox4):t=n.chrome:t=n.ie8,t()},n}();n.Zoom=t}(sb||(sb={}))