5 Day Forecast
{{#forecast}}
{{~setVar("date", "")}}
{{~setVar("date", helpers.plugins.moment.utc(data.date) || "")}}
{{~var.date.format("MMM")}}
{{~var.date.format("DD")}}
{{avg}}°
{{/forecast}}
';
if($cnt_main_navbar.length) {
var $btn_navbar_toggler = $cnt_main_navbar.find('.btn_navbar_toggler');
var $navbar_contents = $cnt_main_navbar.find('.navbar_contents');
var $hoverable_nav_item = $cnt_main_navbar.find('.navbar_contents .hoverable_nav >li');
var $closeButton = $cnt_main_navbar.find("[data-close-nav-dropdown]");
append_nav_togglers($navbar_contents, 'ul');
if(w_width > 1024) {
setNavHeights();
$hoverable_nav_item.off('mouseenter').on('mouseenter', function(){
if(!$cnt_main_navbar.hasClass('hovering')) {
$cnt_main_navbar.addClass('hovering');
}
showDropdown();
});
$hoverable_nav_item.off('mouseleave').on('mouseleave', function(){
$cnt_main_navbar.removeClass('hovering');
resetDropdown();
});
var $secondaryNav = $navbar_contents.find(".primary-nav-container.secondary-primary-nav .primary-nav>li>a");
$secondaryNav.off("mouseenter").on("mouseenter", function(){
$(this).addClass("hovering");
});
$secondaryNav.off("mouseleave").on("mouseleave", function(){
$(this).removeClass("hovering");
});
$closeButton.off('click').on("click", hideDropdown);
}
function showDropdown() {
$closeButton.show();
$cnt_main_navbar.find(".primary-nav .nav-dropdown").removeClass("close");
$cnt_main_navbar.find(".dropdown-lists").show();
}
function hideDropdown() {
$cnt_main_navbar.removeClass('hovering');
$cnt_main_navbar.find(".primary-nav .nav-dropdown").addClass("close");
$cnt_main_navbar.find(".dropdown-lists").hide();
$closeButton.hide();
}
function resetDropdown() {
$cnt_main_navbar.find(".primary-nav .nav-dropdown").removeClass("close");
}
function setNavHeights() {
/* find each dropdown and set the container to the tallest child dropdown */
$cnt_main_navbar.find(".nav-dropdown").each(function(){
var mainHeight = $(this).height();
var height = getMinHeight($(this));
var item = $(this);
if (height > mainHeight) {
$(this).find(".dropdown-lists").css({ height: height });
$('').appendTo('head');
$('').appendTo('head');
}
});
function getMinHeight($el) {
var height = 0;
$el.css({opacity: 1});
$el.find(".subnav > .inner").each(function(){
var subnav = ".subnav:not(.nav-dropdown)";
$(this).parents(subnav).css({display: 'block'});
var thisHeight = $(this).height();
$(this).parents(subnav).css({display: 'none'});
if (thisHeight > height)
height = thisHeight+50;
});
$el.css({ opacity: 0 });
return height;
}
}
$btn_navbar_toggler.off('click').on('click', function(event) {
event.preventDefault(); // Removed return false and explicitly prevent default to allow other binds on this click.
if(!$navbar_contents.is(':visible')) {
$(this).addClass('open');
$navbar_contents.show('slide', {direction: 'right'}, 300);
$(backdrop).appendTo('body').fadeIn('fast');
}
else {
$(this).removeClass('open');
$navbar_contents.hide('slide', {direction: 'right'}, 300);
$('.nav_backdrop').fadeOut('fast', function()
{
$(this).detach();
});
}
});
$('body').delegate('.nav_backdrop', 'click', function() {
$btn_navbar_toggler.trigger('click');
});
}
}
/*---------- Append Nav Togglers ----------*/
function append_nav_togglers(nav, list) {
var nav_list = list ? list : '.nav_list';
var $nav = nav;
var toggler = '
';
var $nav_list = $nav.find(nav_list);
if($nav_list.length) {
var $nav_item = $nav_list.find('li');
$nav_item.each(function() {
var $nav_item_childs = $(this).children();
if($nav_item_childs.length > 1) {
$(this).append(toggler);
$('.dev_toggler', $(this)).off('click').on('click', function() {
var $link_parent = $(this).closest('li');
var $sub_nav = $link_parent.find('>.subnav');
if($sub_nav.length > 0) {
if(!$sub_nav.is(':visible')) {
$link_parent.addClass('open');
$sub_nav.slideDown('fast');
} else {
$link_parent.removeClass('open');
$sub_nav.slideUp('fast');
}
return false;
}
});
}
});
}
}
gtm.update();
});
';
if($cnt_main_navbar.length) {
var $btn_navbar_toggler = $cnt_main_navbar.find('.btn_navbar_toggler');
var $navbar_contents = $cnt_main_navbar.find('.navbar_contents');
var $hoverable_nav_item = $cnt_main_navbar.find('.navbar_contents .hoverable_nav >li');
var $closeButton = $cnt_main_navbar.find("[data-close-nav-dropdown]");
append_nav_togglers($navbar_contents, 'ul');
if(w_width > 1024) {
setNavHeights();
$hoverable_nav_item.off('mouseenter').on('mouseenter', function(){
if(!$cnt_main_navbar.hasClass('hovering')) {
$cnt_main_navbar.addClass('hovering');
}
showDropdown();
});
$hoverable_nav_item.off('mouseleave').on('mouseleave', function(){
$cnt_main_navbar.removeClass('hovering');
resetDropdown();
});
var $secondaryNav = $navbar_contents.find(".primary-nav-container.secondary-primary-nav .primary-nav>li>a");
$secondaryNav.off("mouseenter").on("mouseenter", function(){
$(this).addClass("hovering");
});
$secondaryNav.off("mouseleave").on("mouseleave", function(){
$(this).removeClass("hovering");
});
$closeButton.off('click').on("click", hideDropdown);
}
function showDropdown() {
$closeButton.show();
$cnt_main_navbar.find(".primary-nav .nav-dropdown").removeClass("close");
$cnt_main_navbar.find(".dropdown-lists").show();
}
function hideDropdown() {
$cnt_main_navbar.removeClass('hovering');
$cnt_main_navbar.find(".primary-nav .nav-dropdown").addClass("close");
$cnt_main_navbar.find(".dropdown-lists").hide();
$closeButton.hide();
}
function resetDropdown() {
$cnt_main_navbar.find(".primary-nav .nav-dropdown").removeClass("close");
}
function setNavHeights() {
/* find each dropdown and set the container to the tallest child dropdown */
$cnt_main_navbar.find(".nav-dropdown").each(function(){
var mainHeight = $(this).height();
var height = getMinHeight($(this));
var item = $(this);
if (height > mainHeight) {
$(this).find(".dropdown-lists").css({ height: height });
$('').appendTo('head');
$('').appendTo('head');
}
});
function getMinHeight($el) {
var height = 0;
$el.css({opacity: 1});
$el.find(".subnav > .inner").each(function(){
var subnav = ".subnav:not(.nav-dropdown)";
$(this).parents(subnav).css({display: 'block'});
var thisHeight = $(this).height();
$(this).parents(subnav).css({display: 'none'});
if (thisHeight > height)
height = thisHeight+50;
});
$el.css({ opacity: 0 });
return height;
}
}
$btn_navbar_toggler.off('click').on('click', function(event) {
event.preventDefault(); // Removed return false and explicitly prevent default to allow other binds on this click.
if(!$navbar_contents.is(':visible')) {
$(this).addClass('open');
$navbar_contents.show('slide', {direction: 'right'}, 300);
$(backdrop).appendTo('body').fadeIn('fast');
}
else {
$(this).removeClass('open');
$navbar_contents.hide('slide', {direction: 'right'}, 300);
$('.nav_backdrop').fadeOut('fast', function()
{
$(this).detach();
});
}
});
$('body').delegate('.nav_backdrop', 'click', function() {
$btn_navbar_toggler.trigger('click');
});
}
}
/*---------- Append Nav Togglers ----------*/
function append_nav_togglers(nav, list) {
var nav_list = list ? list : '.nav_list';
var $nav = nav;
var toggler = '
';
var $nav_list = $nav.find(nav_list);
if($nav_list.length) {
var $nav_item = $nav_list.find('li');
$nav_item.each(function() {
var $nav_item_childs = $(this).children();
if($nav_item_childs.length > 1) {
$(this).append(toggler);
$('.dev_toggler', $(this)).off('click').on('click', function() {
var $link_parent = $(this).closest('li');
var $sub_nav = $link_parent.find('>.subnav');
if($sub_nav.length > 0) {
if(!$sub_nav.is(':visible')) {
$link_parent.addClass('open');
$sub_nav.slideDown('fast');
} else {
$link_parent.removeClass('open');
$sub_nav.slideUp('fast');
}
return false;
}
});
}
});
}
}
gtm.update();
});