jQuery(document).ready(function(){var notificationBars=jQuery('.fsn-notifications.bar');notificationBars.each(function(){var notification=jQuery(this);notification.closest('.col-sm-12').css('min-height','0px');var notificationsClose=notification.find('.notifications-bar-close');notificationsClose.on('click',function(event){event.preventDefault();if(notification.hasClass('putaway')){notification.removeClass('putaway');fsnNotificationReinitSliderAccessibility(notification);}else{notification.addClass('putaway').trigger('fsnNotificationDismissed');fsnNotificationDeinitSliderAccessibility(notification);}
var dismissID=jQuery(this).parent().attr('data-notification-id');var cookieNotice=setCookiePolicyAccept(notification);if(dismissID&&!cookieNotice){var expires=new Date();expires.setTime(expires.getTime()+(30*24*60*60*1000));document.cookie='notification'+dismissID+'=closed; path=/; expires='+expires.toUTCString();}});var notificationsSliders=jQuery(notification).find('.flexslider');notificationsSliders.each(function(){var notificationsSlider=jQuery(this);var notificationsSliderID=jQuery(this).attr('data-slider-id');var dismissID=jQuery(this).parent().attr('data-notification-id');notificationsSlider.flexslider({animation:'fade',slideshow:false,multipleKeyboard:true,pauseOnAction:false,controlsContainer:'.controls-'+notificationsSliderID,controlNav:false,start:function(slider){fsnNotificationInitSliderAccessibility(slider);var post_id=slider.find('.flex-active-slide .fsn-notification').data('notification-id');if(getCookie('notification'+dismissID)!=''){slider.closest('.fsn-notifications').remove();}else{slider.closest('.fsn-notifications').removeClass('dismissed');}},before:function(slider){fsnNotificationUpdateSliderAccessibility(slider);}});});});});jQuery(document).ready(function(){var notificationModalWindows=jQuery('.fsn-notifications.modal_window');notificationModalWindows.each(function(){var dismissID=jQuery(this).attr('data-notification-id');var notification=jQuery(this);notification.on('hidden.bs.modal',function(event){notification.trigger('fsnNotificationDismissed');var cookieNotice=setCookiePolicyAccept(notification);if(dismissID&&!cookieNotice){var expires=new Date();expires.setTime(expires.getTime()+(30*24*60*60*1000));document.cookie='notification'+dismissID+'=closed; path=/; expires='+expires.toUTCString();}});var notificationsSliders=jQuery(notification).find('.flexslider');notificationsSliders.each(function(){var notificationsSlider=jQuery(this);var notificationsSliderID=jQuery(this).attr('data-slider-id');var dismissID=jQuery(this).parent().attr('data-notification-id');notificationsSlider.flexslider({animation:'fade',slideshow:false,multipleKeyboard:true,pauseOnAction:false,controlsContainer:'.controls-'+notificationsSliderID,controlNav:false,start:function(slider){fsnNotificationInitSliderAccessibility(slider);var post_id=slider.find('.flex-active-slide .fsn-notification').data('notification-id');if(getCookie('notification'+dismissID)!=''){slider.closest('.fsn-notifications').remove();}else{slider.closest('.fsn-notifications').removeClass('dismissed');}},before:function(slider){fsnNotificationUpdateSliderAccessibility(slider);}});});var modalDelay=notification.attr('data-modal-delay')*1000;var targetModal=notificationModalWindows.find('.modal');var dismissID=notification.attr('data-notification-id');if(getCookie('notification'+dismissID)==''){setTimeout(function(){jQuery(targetModal).modal('show');},modalDelay);}
jQuery('.fsn-notifications.modal_window .fsn-notification a').on('click',function(event){var cookieNotice=setCookiePolicyAccept(notification);if(dismissID&&!cookieNotice){var expires=new Date();expires.setTime(expires.getTime()+(30*24*60*60*1000));document.cookie='notification'+dismissID+'=closed; path=/; expires='+expires.toUTCString();}});});});jQuery(document).ready(function(){var notificationFloatingFooters=jQuery('.fsn-notifications.floating_footer');notificationFloatingFooters.each(function(){var notification=jQuery(this);notification.closest('.col-sm-12').css('min-height','0px');var notificationsClose=notification.find('.notifications-floating-footer-close');notificationsClose.on('click',function(event){event.preventDefault();if(notification.hasClass('putaway')){notification.removeClass('putaway');fsnNotificationReinitSliderAccessibility(notification);}else{notification.addClass('putaway').trigger('fsnNotificationDismissed');fsnNotificationDeinitSliderAccessibility(notification);}
var dismissID=jQuery(this).parent().attr('data-notification-id');var cookieNotice=setCookiePolicyAccept(notification);if(dismissID&&!cookieNotice){var expires=new Date();expires.setTime(expires.getTime()+(30*24*60*60*1000));document.cookie='notification'+dismissID+'=closed; path=/; expires='+expires.toUTCString();}});var notificationsSliders=jQuery(notification).find('.flexslider');notificationsSliders.each(function(){var notificationsSlider=jQuery(this);var notificationsSliderID=jQuery(this).attr('data-slider-id');var dismissID=jQuery(this).parent().attr('data-notification-id');notificationsSlider.flexslider({animation:'fade',slideshow:false,multipleKeyboard:true,pauseOnAction:false,controlsContainer:'.controls-'+notificationsSliderID,controlNav:false,start:function(slider){fsnNotificationInitSliderAccessibility(slider);var post_id=slider.find('.flex-active-slide .fsn-notification').data('notification-id');if(getCookie('notification'+dismissID)!=''){slider.closest('.fsn-notifications').remove();}else{slider.closest('.fsn-notifications').removeClass('dismissed');}},before:function(slider){fsnNotificationUpdateSliderAccessibility(slider);}});});});});jQuery(document).ready(function(){var notificationInlineBars=jQuery('.fsn-notifications.bar_inline');notificationInlineBars.each(function(){var notification=jQuery(this);notification.closest('.col-sm-12').css('min-height','0px');var notificationsClose=notification.find('.notifications-bar-inline-close');notificationsClose.on('click',function(event){event.preventDefault();if(notification.hasClass('putaway')){notification.removeClass('putaway');fsnNotificationReinitSliderAccessibility(notification);}else{notification.addClass('putaway').trigger('fsnNotificationDismissed');fsnNotificationDeinitSliderAccessibility(notification);}
var dismissID=jQuery(this).parent().attr('data-notification-id');var cookieNotice=setCookiePolicyAccept(notification);if(dismissID&&!cookieNotice){var expires=new Date();expires.setTime(expires.getTime()+(30*24*60*60*1000));document.cookie='notification'+dismissID+'=closed; path=/; expires='+expires.toUTCString();}});var notificationsSliders=jQuery(notification).find('.flexslider');notificationsSliders.each(function(){var notificationsSlider=jQuery(this);var notificationsSliderID=jQuery(this).attr('data-slider-id');var dismissID=jQuery(this).parent().attr('data-notification-id');notificationsSlider.flexslider({animation:'fade',slideshow:false,multipleKeyboard:true,pauseOnAction:false,controlsContainer:'.controls-'+notificationsSliderID,controlNav:false,start:function(slider){fsnNotificationInitSliderAccessibility(slider);var post_id=slider.find('.flex-active-slide .fsn-notification').data('notification-id');if(getCookie('notification'+dismissID)!=''){slider.closest('.fsn-notifications').remove();}else{slider.closest('.fsn-notifications').removeClass('dismissed');}},before:function(slider){fsnNotificationUpdateSliderAccessibility(slider);}});});});});jQuery(document).ready(function(){var cookieAccepted=getCookie('fsn_notification_cookie_accepted');var notificationPopovers=jQuery('.fsn-notifications.notifications-popover');var notificationHasPopoverCookieSlide=false;notificationPopovers.each(function(){var notificationPopoverSlides=jQuery(this).find('.slide');notificationPopoverSlides.each(function(){if(jQuery(this).attr('data-cookie-notice')=="true"){notificationHasPopoverCookieSlide=true;}});if(notificationHasPopoverCookieSlide&&cookieAccepted!=='accepted'){jQuery(this).find('.popover-close').remove();}
notificationPopoverSlides.each(function(){if(cookieAccepted=='accepted'){if(jQuery(this).attr('data-cookie-notice')=="true"){jQuery(this).remove();}}else{if(jQuery(this).attr('data-cookie-notice')!=="true"&&notificationHasPopoverCookieSlide){jQuery(this).remove();}}});var notificationPopoverSlidesUpdated=jQuery(this).find('.slide');if(notificationPopoverSlidesUpdated.length<=0){jQuery(this).remove();}
var notification=jQuery(this);notification.closest('.col-sm-12').css('min-height','0px');if(jQuery(this).find('.slide').attr('data-cookie-notice')=="true"){var notificationsClose=notification.find('.cookie-notice-accept');}else{var notificationsClose=notification.find('.notifications-popover-close');}
notificationsClose.on('click',function(event){event.preventDefault();notification.trigger('fsnNotificationDismissed');jQuery(this).closest('.fsn-notifications.notifications-popover').addClass('dismissed');setTimeout(function(){notification.parents('.fsn-notification-container').remove();},300);var dismissID=jQuery(this).parent().attr('data-notification-id');var cookieNotice=setCookiePolicyAccept(notification);if(dismissID&&!cookieNotice){var expires=new Date();expires.setTime(expires.getTime()+(30*24*60*60*1000));document.cookie='notification'+dismissID+'=closed; path=/; expires='+expires.toUTCString();}});var notificationsSliders=jQuery(notification).find('.flexslider');notificationsSliders.each(function(){var notificationsSlider=jQuery(this);var notificationsSliderID=jQuery(this).attr('data-slider-id');var dismissID=jQuery(this).parent().attr('data-notification-id');notificationsSlider.flexslider({animation:'fade',slideshow:false,multipleKeyboard:true,pauseOnAction:false,directionNav:false,controlNav:true,start:function(slider){fsnNotificationInitSliderAccessibility(slider);var post_id=slider.find('.flex-active-slide .fsn-notification').data('notification-id');if(getCookie('notification'+dismissID)!=''){slider.closest('.fsn-notification-container').remove();}else{var popoverDelay=notification.data('popoverDelay')*1000;var targetSlider=slider;setTimeout(function(){targetSlider.closest('.fsn-notifications').removeClass('dismissed not-ready');},popoverDelay);}},before:function(slider){fsnNotificationUpdateSliderAccessibility(slider);}});});});});function setCookiePolicyAccept(target){var cookiePolicyAcceptSet=false;var targetSlides=jQuery(target).find('.slide');targetSlides.each(function(){if(jQuery(this).attr('data-cookie-notice')=="true"){var expires=new Date();expires.setTime(expires.getTime()+(3600*1000*24*365));document.cookie='fsn_notification_cookie_accepted=accepted; expires='+expires.toUTCString()+"; domain="+window.location.hostname+"; path=/";cookiePolicyAcceptSet=true;}});return cookiePolicyAcceptSet;}
function getCookie(cname){var name=cname+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1);if(c.indexOf(name)!=-1)return c.substring(name.length,c.length);}
return"";}
function fsnNotificationInitSliderAccessibility(slider){if(slider.directionNav!==undefined){slider.directionNav.each(function(){jQuery(this).attr('role','button');});}
if(slider.controlNav!==undefined){slider.controlNav.each(function(){jQuery(this).attr('role','button');});slider.controlNav.eq(0).append('<span class="sr-only">'+fsnExtNotificationL10n.current_slide+'</span>');}
if(slider.slides!==undefined){slider.slides.not(':eq(0)').each(function(){jQuery(this).attr('aria-hidden',true).find('a').attr('tabindex','-1');});}}
function fsnNotificationDeinitSliderAccessibility(slider){var slides=slider.find('li.slide');if(slides!==undefined){slides.each(function(){jQuery(this).attr('aria-hidden',true).find('a').attr('tabindex','-1');});}}
function fsnNotificationReinitSliderAccessibility(slider){var slides=slider.find('li.slide');if(slides!==undefined){jQuery('.flex-active-slide').removeAttr('aria-hidden').find('a').removeAttr('tabindex');}}
function fsnNotificationUpdateSliderAccessibility(slider){var incomingSlide=slider.find('.slides > li').eq(slider.animatingTo);if(slider.controlNav!==undefined){slider.controlNav.not(':eq('+slider.animatingTo+')').find('.sr-only').remove();slider.controlNav.filter(':eq('+slider.animatingTo+')').append('<span class="sr-only">'+fsnExtNotificationL10n.current_slide+'</span>');}
if(slider.slides!==undefined){slider.slides.not(':eq('+slider.animatingTo+')').each(function(){jQuery(this).attr('aria-hidden',true).find('a').attr('tabindex','-1');});incomingSlide.removeAttr('aria-hidden').find('a').removeAttr('tabindex');}}