var templateSettings={blocks:{'aop-block-html':{redactorSettings:{plugins:['video','image'],formattingAdd:[]}}}};$(document).ready(function(){$('a[data-ajax-reload]').click(function(event){event.preventDefault();jQuery.ajax({type:'GET',url:$(this).attr('href'),success:function(data){if(data.success===true){document.location.reload(true);}else{}}});});});var alertSettings={error:{boxClass:'alert',messageClass:'alert-danger'},warn:{boxClass:'warning',messageClass:'alert-danger'},info:{boxClass:'info',messageClass:'alert'}};var createAlertBox=function(form,alertElement,alertType,message){if(!alertType||!alertSettings[alertType]){alertType='error';}
if(message){var alertBox=$('<div data-alert class="alert-box '+ alertSettings[alertType].boxClass+'"><div class="alert '+ alertSettings[alertType].messageClass+'">'+ message+'</div><a href="#" class="close" tabindex="1">&times;</a></div>');alertElement.append(alertBox).foundation();var scrollOffset=$(alertBox).offset().top- 100;$('html, body').animate({scrollTop:scrollOffset},'fast');}};var submitAjaxForm=function(form,alertElement,callback){$('.alert-box').remove();var action=$(form).attr('action');var data=$(form).serialize();$.ajax({url:action,type:'POST',dataType:'JSON',data:data,success:function(resp){if(resp.redirect){document.location.href=resp.redirect;}
if(!alertElement){alertElement=form;}
var isError=resp.success!==true;var alertBoxStatus=isError?'error':'info';var message=resp.message||'';if(isError&&resp.error&&resp.error.message){message=resp.error.message;}
if(!message&&resp.data&&resp.data.message){message=resp.data.message;}
createAlertBox(form,alertElement,alertBoxStatus,message);callback(resp);},error:function(resp){createAlertBox(form,$('#ajaxMessages'),'error','There was a problem with this service.');callback();},complete:function(resp){}});};var encodeEmail=function(email){if(typeof email==='string'){return email.replace('@','\\@').replace(/\./g,'\\.');}
return'';};var $corePageTabs=$('.core-page-tabs');$corePageTabs.find('.current-mobile').on('click','a',function(e){e.preventDefault();$corePageTabs.find('.tabs').toggleClass('open-drawer');if(!$(this).hasClass('icon')){$('.current-mobile > a').text($(this).text());}});$(document).ready(function(){if($corePageTabs.length){var currentTab=$corePageTabs.find('.tabs .tab-title.active > a');var currentTabText='Select page';if(currentTab.length){currentTabText=currentTab.text();}
$corePageTabs.find('.current-mobile > a').text(currentTabText);}});$('.search input[name=accessible]').on('change',function(){var checkboxes=$('.search input[name=accessible]');checkboxes.prop('checked',$(this).is(':checked'));});$(document.body).on('open.fndtn.clearing',function(event){$('footer').hide();});$(document.body).on('closed.fndtn.clearing',function(event){$('footer').show();});