(function($,window,document,undefined){'use strict';var header_helpers=function(class_array){var i=class_array.length;var head=$('head');while(i--){if(head.has('.'+class_array[i]).length===0){head.append('<meta class="'+class_array[i]+'" />');}}};header_helpers(['foundation-mq-small','foundation-mq-small-only','foundation-mq-medium','foundation-mq-medium-only','foundation-mq-large','foundation-mq-large-only','foundation-mq-xlarge','foundation-mq-xlarge-only','foundation-mq-xxlarge','foundation-data-attribute-namespace']);$(function(){if(typeof FastClick!=='undefined'){if(typeof document.body!=='undefined'){FastClick.attach(document.body);}}});var S=function(selector,context){if(typeof selector==='string'){if(context){var cont;if(context.jquery){cont=context[0];if(!cont){return context;}}else{cont=context;}
return $(cont.querySelectorAll(selector));}
return $(document.querySelectorAll(selector));}
return $(selector,context);};var attr_name=function(init){var arr=[];if(!init){arr.push('data');}
if(this.namespace.length>0){arr.push(this.namespace);}
arr.push(this.name);return arr.join('-');};var add_namespace=function(str){var parts=str.split('-'),i=parts.length,arr=[];while(i--){if(i!==0){arr.push(parts[i]);}else{if(this.namespace.length>0){arr.push(this.namespace,parts[i]);}else{arr.push(parts[i]);}}}
return arr.reverse().join('-');};var bindings=function(method,options){var self=this,bind=function(){var $this=S(this),should_bind_events=!$this.data(self.attr_name(true)+'-init');$this.data(self.attr_name(true)+'-init',$.extend({},self.settings,(options||method),self.data_options($this)));if(should_bind_events){self.events(this);}};if(S(this.scope).is('['+this.attr_name()+']')){bind.call(this.scope);}else{S('['+this.attr_name()+']',this.scope).each(bind);}
if(typeof method==='string'){return this[method].call(this,options);}};var single_image_loaded=function(image,callback){function loaded(){callback(image[0]);}
function bindLoad(){this.one('load',loaded);if(/MSIE (\d+\.\d+);/.test(navigator.userAgent)){var src=this.attr('src'),param=src.match(/\?/)?'&':'?';param+='random='+(new Date()).getTime();this.attr('src',src+param);}}
if(!image.attr('src')){loaded();return;}
if(image[0].complete||image[0].readyState===4){loaded();}else{bindLoad.call(image);}};/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual MIT/BSD license */
window.matchMedia||(window.matchMedia=function(){"use strict";var styleMedia=(window.styleMedia||window.media);if(!styleMedia){var style=document.createElement('style'),script=document.getElementsByTagName('script')[0],info=null;style.type='text/css';style.id='matchmediajs-test';script.parentNode.insertBefore(style,script);info=('getComputedStyle'in window)&&window.getComputedStyle(style,null)||style.currentStyle;styleMedia={matchMedium:function(media){var text='@media '+media+'{ #matchmediajs-test { width: 1px; } }';if(style.styleSheet){style.styleSheet.cssText=text;}else{style.textContent=text;}
return info.width==='1px';}};}
return function(media){return{matches:styleMedia.matchMedium(media||'all'),media:media||'all'};};}());(function(jQuery){var animating,lastTime=0,vendors=['webkit','moz'],requestAnimationFrame=window.requestAnimationFrame,cancelAnimationFrame=window.cancelAnimationFrame,jqueryFxAvailable='undefined'!==typeof jQuery.fx;for(;lastTime<vendors.length&&!requestAnimationFrame;lastTime++){requestAnimationFrame=window[vendors[lastTime]+'RequestAnimationFrame'];cancelAnimationFrame=cancelAnimationFrame||window[vendors[lastTime]+'CancelAnimationFrame']||window[vendors[lastTime]+'CancelRequestAnimationFrame'];}
function raf(){if(animating){requestAnimationFrame(raf);if(jqueryFxAvailable){jQuery.fx.tick();}}}
if(requestAnimationFrame){window.requestAnimationFrame=requestAnimationFrame;window.cancelAnimationFrame=cancelAnimationFrame;if(jqueryFxAvailable){jQuery.fx.timer=function(timer){if(timer()&&jQuery.timers.push(timer)&&!animating){animating=true;raf();}};jQuery.fx.stop=function(){animating=false;};}}else{window.requestAnimationFrame=function(callback){var currTime=new Date().getTime(),timeToCall=Math.max(0,16-(currTime-lastTime)),id=window.setTimeout(function(){callback(currTime+timeToCall);},timeToCall);lastTime=currTime+timeToCall;return id;};window.cancelAnimationFrame=function(id){clearTimeout(id);};}}($));function removeQuotes(string){if(typeof string==='string'||string instanceof String){string=string.replace(/^['\\/"]+|(;\s?})+|['\\/"]+$/g,'');}
return string;}
window.Foundation={name:'Foundation',version:'5.5.2',media_queries:{'small':S('.foundation-mq-small').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,''),'small-only':S('.foundation-mq-small-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,''),'medium':S('.foundation-mq-medium').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,''),'medium-only':S('.foundation-mq-medium-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,''),'large':S('.foundation-mq-large').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,''),'large-only':S('.foundation-mq-large-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,''),'xlarge':S('.foundation-mq-xlarge').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,''),'xlarge-only':S('.foundation-mq-xlarge-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,''),'xxlarge':S('.foundation-mq-xxlarge').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g,'')},stylesheet:$('<style></style>').appendTo('head')[0].sheet,global:{namespace:undefined},init:function(scope,libraries,method,options,response){var args=[scope,method,options,response],responses=[];this.rtl=/rtl/i.test(S('html').attr('dir'));this.scope=scope||this.scope;this.set_namespace();if(libraries&&typeof libraries==='string'&&!/reflow/i.test(libraries)){if(this.libs.hasOwnProperty(libraries)){responses.push(this.init_lib(libraries,args));}}else{for(var lib in this.libs){responses.push(this.init_lib(lib,libraries));}}
S(window).load(function(){S(window).trigger('resize.fndtn.clearing').trigger('resize.fndtn.dropdown').trigger('resize.fndtn.equalizer').trigger('resize.fndtn.interchange').trigger('resize.fndtn.joyride').trigger('resize.fndtn.magellan').trigger('resize.fndtn.topbar').trigger('resize.fndtn.slider');});return scope;},init_lib:function(lib,args){if(this.libs.hasOwnProperty(lib)){this.patch(this.libs[lib]);if(args&&args.hasOwnProperty(lib)){if(typeof this.libs[lib].settings!=='undefined'){$.extend(true,this.libs[lib].settings,args[lib]);}else if(typeof this.libs[lib].defaults!=='undefined'){$.extend(true,this.libs[lib].defaults,args[lib]);}
return this.libs[lib].init.apply(this.libs[lib],[this.scope,args[lib]]);}
args=args instanceof Array?args:new Array(args);return this.libs[lib].init.apply(this.libs[lib],args);}
return function(){};},patch:function(lib){lib.scope=this.scope;lib.namespace=this.global.namespace;lib.rtl=this.rtl;lib['data_options']=this.utils.data_options;lib['attr_name']=attr_name;lib['add_namespace']=add_namespace;lib['bindings']=bindings;lib['S']=this.utils.S;},inherit:function(scope,methods){var methods_arr=methods.split(' '),i=methods_arr.length;while(i--){if(this.utils.hasOwnProperty(methods_arr[i])){scope[methods_arr[i]]=this.utils[methods_arr[i]];}}},set_namespace:function(){var namespace=(this.global.namespace===undefined)?$('.foundation-data-attribute-namespace').css('font-family'):this.global.namespace;this.global.namespace=(namespace===undefined||/false/i.test(namespace))?'':namespace;},libs:{},utils:{S:S,throttle:function(func,delay){var timer=null;return function(){var context=this,args=arguments;if(timer==null){timer=setTimeout(function(){func.apply(context,args);timer=null;},delay);}};},debounce:function(func,delay,immediate){var timeout,result;return function(){var context=this,args=arguments;var later=function(){timeout=null;if(!immediate){result=func.apply(context,args);}};var callNow=immediate&&!timeout;clearTimeout(timeout);timeout=setTimeout(later,delay);if(callNow){result=func.apply(context,args);}
return result;};},data_options:function(el,data_attr_name){data_attr_name=data_attr_name||'options';var opts={},ii,p,opts_arr,data_options=function(el){var namespace=Foundation.global.namespace;if(namespace.length>0){return el.data(namespace+'-'+data_attr_name);}
return el.data(data_attr_name);};var cached_options=data_options(el);if(typeof cached_options==='object'){return cached_options;}
opts_arr=(cached_options||':').split(';');ii=opts_arr.length;function isNumber(o){return!isNaN(o-0)&&o!==null&&o!==''&&o!==false&&o!==true;}
function trim(str){if(typeof str==='string'){return $.trim(str);}
return str;}
while(ii--){p=opts_arr[ii].split(':');p=[p[0],p.slice(1).join(':')];if(/true/i.test(p[1])){p[1]=true;}
if(/false/i.test(p[1])){p[1]=false;}
if(isNumber(p[1])){if(p[1].indexOf('.')===-1){p[1]=parseInt(p[1],10);}else{p[1]=parseFloat(p[1]);}}
if(p.length===2&&p[0].length>0){opts[trim(p[0])]=trim(p[1]);}}
return opts;},register_media:function(media,media_class){if(Foundation.media_queries[media]===undefined){$('head').append('<meta class="'+media_class+'"/>');Foundation.media_queries[media]=removeQuotes($('.'+media_class).css('font-family'));}},add_custom_rule:function(rule,media){if(media===undefined&&Foundation.stylesheet){Foundation.stylesheet.insertRule(rule,Foundation.stylesheet.cssRules.length);}else{var query=Foundation.media_queries[media];if(query!==undefined){Foundation.stylesheet.insertRule('@media '+
Foundation.media_queries[media]+'{ '+rule+' }',Foundation.stylesheet.cssRules.length);}}},image_loaded:function(images,callback){var self=this,unloaded=images.length;function pictures_has_height(images){var pictures_number=images.length;for(var i=pictures_number-1;i>=0;i--){if(images.attr('height')===undefined){return false;};};return true;}
if(unloaded===0||pictures_has_height(images)){callback(images);}
images.each(function(){single_image_loaded(self.S(this),function(){unloaded-=1;if(unloaded===0){callback(images);}});});},random_str:function(){if(!this.fidx){this.fidx=0;}
this.prefix=this.prefix||[(this.name||'F'),(+new Date).toString(36)].join('-');return this.prefix+(this.fidx++).toString(36);},match:function(mq){return window.matchMedia(mq).matches;},is_small_up:function(){return this.match(Foundation.media_queries.small);},is_medium_up:function(){return this.match(Foundation.media_queries.medium);},is_large_up:function(){return this.match(Foundation.media_queries.large);},is_xlarge_up:function(){return this.match(Foundation.media_queries.xlarge);},is_xxlarge_up:function(){return this.match(Foundation.media_queries.xxlarge);},is_small_only:function(){return!this.is_medium_up()&&!this.is_large_up()&&!this.is_xlarge_up()&&!this.is_xxlarge_up();},is_medium_only:function(){return this.is_medium_up()&&!this.is_large_up()&&!this.is_xlarge_up()&&!this.is_xxlarge_up();},is_large_only:function(){return this.is_medium_up()&&this.is_large_up()&&!this.is_xlarge_up()&&!this.is_xxlarge_up();},is_xlarge_only:function(){return this.is_medium_up()&&this.is_large_up()&&this.is_xlarge_up()&&!this.is_xxlarge_up();},is_xxlarge_only:function(){return this.is_medium_up()&&this.is_large_up()&&this.is_xlarge_up()&&this.is_xxlarge_up();}}};$.fn.foundation=function(){var args=Array.prototype.slice.call(arguments,0);return this.each(function(){Foundation.init.apply(Foundation,[this].concat(args));return this;});};}(jQuery,window,window.document));;(function($,window,document,undefined){'use strict';Foundation.libs.topbar={name:'topbar',version:'5.5.2',settings:{index:0,start_offset:0,sticky_class:'sticky',custom_back_text:true,back_text:'Back',mobile_show_parent_link:true,is_hover:true,scrolltop:true,sticky_on:'all',dropdown_autoclose:true},init:function(section,method,options){Foundation.inherit(this,'add_custom_rule register_media throttle');var self=this;self.register_media('topbar','foundation-mq-topbar');this.bindings(method,options);self.S('['+this.attr_name()+']',this.scope).each(function(){var topbar=$(this),settings=topbar.data(self.attr_name(true)+'-init'),section=self.S('section, .top-bar-section',this);topbar.data('index',0);var topbarContainer=topbar.parent();if(topbarContainer.hasClass('fixed')||self.is_sticky(topbar,topbarContainer,settings)){self.settings.sticky_class=settings.sticky_class;self.settings.sticky_topbar=topbar;topbar.data('height',topbarContainer.outerHeight());topbar.data('stickyoffset',topbarContainer.offset().top);}else{topbar.data('height',topbar.outerHeight());}
if(!settings.assembled){self.assemble(topbar);}
if(settings.is_hover){self.S('.has-dropdown',topbar).addClass('not-click');}else{self.S('.has-dropdown',topbar).removeClass('not-click');}
self.add_custom_rule('.f-topbar-fixed { padding-top: '+topbar.data('height')+'px }');if(topbarContainer.hasClass('fixed')){self.S('body').addClass('f-topbar-fixed');}});},is_sticky:function(topbar,topbarContainer,settings){var sticky=topbarContainer.hasClass(settings.sticky_class);var smallMatch=matchMedia(Foundation.media_queries.small).matches;var medMatch=matchMedia(Foundation.media_queries.medium).matches;var lrgMatch=matchMedia(Foundation.media_queries.large).matches;if(sticky&&settings.sticky_on==='all'){return true;}
if(sticky&&this.small()&&settings.sticky_on.indexOf('small')!==-1){if(smallMatch&&!medMatch&&!lrgMatch){return true;}}
if(sticky&&this.medium()&&settings.sticky_on.indexOf('medium')!==-1){if(smallMatch&&medMatch&&!lrgMatch){return true;}}
if(sticky&&this.large()&&settings.sticky_on.indexOf('large')!==-1){if(smallMatch&&medMatch&&lrgMatch){return true;}}
return false;},toggle:function(toggleEl){var self=this,topbar;if(toggleEl){topbar=self.S(toggleEl).closest('['+this.attr_name()+']');}else{topbar=self.S('['+this.attr_name()+']');}
var settings=topbar.data(this.attr_name(true)+'-init');var section=self.S('section, .top-bar-section',topbar);if(self.breakpoint()){if(!self.rtl){section.css({left:'0%'});$('>.name',section).css({left:'100%'});}else{section.css({right:'0%'});$('>.name',section).css({right:'100%'});}
self.S('li.moved',section).removeClass('moved');topbar.data('index',0);topbar.toggleClass('expanded').css('height','');}
if(settings.scrolltop){if(!topbar.hasClass('expanded')){if(topbar.hasClass('fixed')){topbar.parent().addClass('fixed');topbar.removeClass('fixed');self.S('body').addClass('f-topbar-fixed');}}else if(topbar.parent().hasClass('fixed')){if(settings.scrolltop){topbar.parent().removeClass('fixed');topbar.addClass('fixed');self.S('body').removeClass('f-topbar-fixed');window.scrollTo(0,0);}else{topbar.parent().removeClass('expanded');}}}else{if(self.is_sticky(topbar,topbar.parent(),settings)){topbar.parent().addClass('fixed');}
if(topbar.parent().hasClass('fixed')){if(!topbar.hasClass('expanded')){topbar.removeClass('fixed');topbar.parent().removeClass('expanded');self.update_sticky_positioning();}else{topbar.addClass('fixed');topbar.parent().addClass('expanded');self.S('body').addClass('f-topbar-fixed');}}}},timer:null,events:function(bar){var self=this,S=this.S;S(this.scope).off('.topbar').on('click.fndtn.topbar','['+this.attr_name()+'] .toggle-topbar',function(e){e.preventDefault();self.toggle(this);}).on('click.fndtn.topbar contextmenu.fndtn.topbar','.top-bar .top-bar-section li a[href^="#"],['+this.attr_name()+'] .top-bar-section li a[href^="#"]',function(e){var li=$(this).closest('li'),topbar=li.closest('['+self.attr_name()+']'),settings=topbar.data(self.attr_name(true)+'-init');if(settings.dropdown_autoclose&&settings.is_hover){var hoverLi=$(this).closest('.hover');hoverLi.removeClass('hover');}
if(self.breakpoint()&&!li.hasClass('back')&&!li.hasClass('has-dropdown')){self.toggle();}}).on('click.fndtn.topbar','['+this.attr_name()+'] li.has-dropdown',function(e){var li=S(this),target=S(e.target),topbar=li.closest('['+self.attr_name()+']'),settings=topbar.data(self.attr_name(true)+'-init');if(target.data('revealId')){self.toggle();return;}
if(self.breakpoint()){return;}
if(settings.is_hover&&!Modernizr.touch){return;}
e.stopImmediatePropagation();if(li.hasClass('hover')){li.removeClass('hover').find('li').removeClass('hover');li.parents('li.hover').removeClass('hover');}else{li.addClass('hover');$(li).siblings().removeClass('hover');if(target[0].nodeName==='A'&&target.parent().hasClass('has-dropdown')){e.preventDefault();}}}).on('click.fndtn.topbar','['+this.attr_name()+'] .has-dropdown>a',function(e){if(self.breakpoint()){e.preventDefault();var $this=S(this),topbar=$this.closest('['+self.attr_name()+']'),section=topbar.find('section, .top-bar-section'),dropdownHeight=$this.next('.dropdown').outerHeight(),$selectedLi=$this.closest('li');topbar.data('index',topbar.data('index')+1);$selectedLi.addClass('moved');if(!self.rtl){section.css({left:-(100*topbar.data('index'))+'%'});section.find('>.name').css({left:100*topbar.data('index')+'%'});}else{section.css({right:-(100*topbar.data('index'))+'%'});section.find('>.name').css({right:100*topbar.data('index')+'%'});}
topbar.css('height',$this.siblings('ul').outerHeight(true)+topbar.data('height'));}});S(window).off('.topbar').on('resize.fndtn.topbar',self.throttle(function(){self.resize.call(self);},50)).trigger('resize.fndtn.topbar').load(function(){S(this).trigger('resize.fndtn.topbar');});S('body').off('.topbar').on('click.fndtn.topbar',function(e){var parent=S(e.target).closest('li').closest('li.hover');if(parent.length>0){return;}
S('['+self.attr_name()+'] li.hover').removeClass('hover');});S(this.scope).on('click.fndtn.topbar','['+this.attr_name()+'] .has-dropdown .back',function(e){e.preventDefault();var $this=S(this),topbar=$this.closest('['+self.attr_name()+']'),section=topbar.find('section, .top-bar-section'),settings=topbar.data(self.attr_name(true)+'-init'),$movedLi=$this.closest('li.moved'),$previousLevelUl=$movedLi.parent();topbar.data('index',topbar.data('index')-1);if(!self.rtl){section.css({left:-(100*topbar.data('index'))+'%'});section.find('>.name').css({left:100*topbar.data('index')+'%'});}else{section.css({right:-(100*topbar.data('index'))+'%'});section.find('>.name').css({right:100*topbar.data('index')+'%'});}
if(topbar.data('index')===0){topbar.css('height','');}else{topbar.css('height',$previousLevelUl.outerHeight(true)+topbar.data('height'));}
setTimeout(function(){$movedLi.removeClass('moved');},300);});S(this.scope).find('.dropdown a').focus(function(){$(this).parents('.has-dropdown').addClass('hover');}).blur(function(){$(this).parents('.has-dropdown').removeClass('hover');});},resize:function(){var self=this;self.S('['+this.attr_name()+']').each(function(){var topbar=self.S(this),settings=topbar.data(self.attr_name(true)+'-init');var stickyContainer=topbar.parent('.'+self.settings.sticky_class);var stickyOffset;if(!self.breakpoint()){var doToggle=topbar.hasClass('expanded');topbar.css('height','').removeClass('expanded').find('li').removeClass('hover');if(doToggle){self.toggle(topbar);}}
if(self.is_sticky(topbar,stickyContainer,settings)){if(stickyContainer.hasClass('fixed')){stickyContainer.removeClass('fixed');stickyOffset=stickyContainer.offset().top;if(self.S(document.body).hasClass('f-topbar-fixed')){stickyOffset-=topbar.data('height');}
topbar.data('stickyoffset',stickyOffset);stickyContainer.addClass('fixed');}else{stickyOffset=stickyContainer.offset().top;topbar.data('stickyoffset',stickyOffset);}}});},breakpoint:function(){return!matchMedia(Foundation.media_queries['topbar']).matches;},small:function(){return matchMedia(Foundation.media_queries['small']).matches;},medium:function(){return matchMedia(Foundation.media_queries['medium']).matches;},large:function(){return matchMedia(Foundation.media_queries['large']).matches;},assemble:function(topbar){var self=this,settings=topbar.data(this.attr_name(true)+'-init'),section=self.S('section, .top-bar-section',topbar);section.detach();self.S('.has-dropdown>a',section).each(function(){var $link=self.S(this),$dropdown=$link.siblings('.dropdown'),url=$link.attr('href'),$titleLi;if(!$dropdown.find('.title.back').length){if(settings.mobile_show_parent_link==true&&url){$titleLi=$('<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5></li><li class="parent-link hide-for-medium-up"><a class="parent-link js-generated" href="'+url+'">'+$link.html()+'</a></li>');}else{$titleLi=$('<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5>');}
if(settings.custom_back_text==true){$('h5>a',$titleLi).html(settings.back_text);}else{$('h5>a',$titleLi).html('&laquo; '+$link.html());}
$dropdown.prepend($titleLi);}});section.appendTo(topbar);this.sticky();this.assembled(topbar);},assembled:function(topbar){topbar.data(this.attr_name(true),$.extend({},topbar.data(this.attr_name(true)),{assembled:true}));},height:function(ul){var total=0,self=this;$('> li',ul).each(function(){total+=self.S(this).outerHeight(true);});return total;},sticky:function(){var self=this;this.S(window).on('scroll',function(){self.update_sticky_positioning();});},update_sticky_positioning:function(){var klass='.'+this.settings.sticky_class,$window=this.S(window),self=this;if(self.settings.sticky_topbar&&self.is_sticky(this.settings.sticky_topbar,this.settings.sticky_topbar.parent(),this.settings)){var distance=this.settings.sticky_topbar.data('stickyoffset')+this.settings.start_offset;if(!self.S(klass).hasClass('expanded')){if($window.scrollTop()>(distance)){if(!self.S(klass).hasClass('fixed')){self.S(klass).addClass('fixed');self.S('body').addClass('f-topbar-fixed');}}else if($window.scrollTop()<=distance){if(self.S(klass).hasClass('fixed')){self.S(klass).removeClass('fixed');self.S('body').removeClass('f-topbar-fixed');}}}}},off:function(){this.S(this.scope).off('.fndtn.topbar');this.S(window).off('.fndtn.topbar');},reflow:function(){}};}(jQuery,window,window.document));;(function($,window,document,undefined){'use strict';Foundation.libs.dropdown={name:'dropdown',version:'5.5.2',settings:{active_class:'open',disabled_class:'disabled',mega_class:'mega',align:'bottom',is_hover:false,hover_timeout:150,opened:function(){},closed:function(){}},init:function(scope,method,options){Foundation.inherit(this,'throttle');$.extend(true,this.settings,method,options);this.bindings(method,options);},events:function(scope){var self=this,S=self.S;S(this.scope).off('.dropdown').on('click.fndtn.dropdown','['+this.attr_name()+']',function(e){var settings=S(this).data(self.attr_name(true)+'-init')||self.settings;if(!settings.is_hover||Modernizr.touch){e.preventDefault();if(S(this).parent('[data-reveal-id]').length){e.stopPropagation();}
self.toggle($(this));}}).on('mouseenter.fndtn.dropdown','['+this.attr_name()+'], ['+this.attr_name()+'-content]',function(e){var $this=S(this),dropdown,target;clearTimeout(self.timeout);if($this.data(self.data_attr())){dropdown=S('#'+$this.data(self.data_attr()));target=$this;}else{dropdown=$this;target=S('['+self.attr_name()+'="'+dropdown.attr('id')+'"]');}
var settings=target.data(self.attr_name(true)+'-init')||self.settings;if(S(e.currentTarget).data(self.data_attr())&&settings.is_hover){self.closeall.call(self);}
if(settings.is_hover){self.open.apply(self,[dropdown,target]);}}).on('mouseleave.fndtn.dropdown','['+this.attr_name()+'], ['+this.attr_name()+'-content]',function(e){var $this=S(this);var settings;if($this.data(self.data_attr())){settings=$this.data(self.data_attr(true)+'-init')||self.settings;}else{var target=S('['+self.attr_name()+'="'+S(this).attr('id')+'"]'),settings=target.data(self.attr_name(true)+'-init')||self.settings;}
self.timeout=setTimeout(function(){if($this.data(self.data_attr())){if(settings.is_hover){self.close.call(self,S('#'+$this.data(self.data_attr())));}}else{if(settings.is_hover){self.close.call(self,$this);}}}.bind(this),settings.hover_timeout);}).on('click.fndtn.dropdown',function(e){var parent=S(e.target).closest('['+self.attr_name()+'-content]');var links=parent.find('a');if(links.length>0&&parent.attr('aria-autoclose')!=='false'){self.close.call(self,S('['+self.attr_name()+'-content]'));}
if(e.target!==document&&!$.contains(document.documentElement,e.target)){return;}
if(S(e.target).closest('['+self.attr_name()+']').length>0){return;}
if(!(S(e.target).data('revealId'))&&(parent.length>0&&(S(e.target).is('['+self.attr_name()+'-content]')||$.contains(parent.first()[0],e.target)))){e.stopPropagation();return;}
self.close.call(self,S('['+self.attr_name()+'-content]'));}).on('opened.fndtn.dropdown','['+self.attr_name()+'-content]',function(){self.settings.opened.call(this);}).on('closed.fndtn.dropdown','['+self.attr_name()+'-content]',function(){self.settings.closed.call(this);});S(window).off('.dropdown').on('resize.fndtn.dropdown',self.throttle(function(){self.resize.call(self);},50));this.resize();},close:function(dropdown){var self=this;dropdown.each(function(idx){var original_target=$('['+self.attr_name()+'='+dropdown[idx].id+']')||$('aria-controls='+dropdown[idx].id+']');original_target.attr('aria-expanded','false');if(self.S(this).hasClass(self.settings.active_class)){self.S(this).css(Foundation.rtl?'right':'left','-99999px').attr('aria-hidden','true').removeClass(self.settings.active_class).prev('['+self.attr_name()+']').removeClass(self.settings.active_class).removeData('target');self.S(this).trigger('closed.fndtn.dropdown',[dropdown]);}});dropdown.removeClass('f-open-'+this.attr_name(true));},closeall:function(){var self=this;$.each(self.S('.f-open-'+this.attr_name(true)),function(){self.close.call(self,self.S(this));});},open:function(dropdown,target){this.css(dropdown.addClass(this.settings.active_class),target);dropdown.prev('['+this.attr_name()+']').addClass(this.settings.active_class);dropdown.data('target',target.get(0)).trigger('opened.fndtn.dropdown',[dropdown,target]);dropdown.attr('aria-hidden','false');target.attr('aria-expanded','true');dropdown.focus();dropdown.addClass('f-open-'+this.attr_name(true));},data_attr:function(){if(this.namespace.length>0){return this.namespace+'-'+this.name;}
return this.name;},toggle:function(target){if(target.hasClass(this.settings.disabled_class)){return;}
var dropdown=this.S('#'+target.data(this.data_attr()));if(dropdown.length===0){return;}
this.close.call(this,this.S('['+this.attr_name()+'-content]').not(dropdown));if(dropdown.hasClass(this.settings.active_class)){this.close.call(this,dropdown);if(dropdown.data('target')!==target.get(0)){this.open.call(this,dropdown,target);}}else{this.open.call(this,dropdown,target);}},resize:function(){var dropdown=this.S('['+this.attr_name()+'-content].open');var target=$(dropdown.data("target"));if(dropdown.length&&target.length){this.css(dropdown,target);}},css:function(dropdown,target){var left_offset=Math.max((target.width()-dropdown.width())/2,8),settings=target.data(this.attr_name(true)+'-init')||this.settings,parentOverflow=dropdown.parent().css('overflow-y')||dropdown.parent().css('overflow');this.clear_idx();if(this.small()){var p=this.dirs.bottom.call(dropdown,target,settings);dropdown.attr('style','').removeClass('drop-left drop-right drop-top').css({position:'absolute',width:'95%','max-width':'none',top:p.top});dropdown.css(Foundation.rtl?'right':'left',left_offset);}
else if(parentOverflow!=='visible'){var offset=target[0].offsetTop+target[0].offsetHeight;dropdown.attr('style','').css({position:'absolute',top:offset});dropdown.css(Foundation.rtl?'right':'left',left_offset);}
else{this.style(dropdown,target,settings);}
return dropdown;},style:function(dropdown,target,settings){var css=$.extend({position:'absolute'},this.dirs[settings.align].call(dropdown,target,settings));dropdown.attr('style','').css(css);},dirs:{_base:function(t){var o_p=this.offsetParent(),o=o_p.offset(),p=t.offset();p.top-=o.top;p.left-=o.left;p.missRight=false;p.missTop=false;p.missLeft=false;p.leftRightFlag=false;var actualBodyWidth;if(document.getElementsByClassName('row')[0]){actualBodyWidth=document.getElementsByClassName('row')[0].clientWidth;}else{actualBodyWidth=window.innerWidth;}
var actualMarginWidth=(window.innerWidth-actualBodyWidth)/2;var actualBoundary=actualBodyWidth;if(!this.hasClass('mega')){if(t.offset().top<=this.outerHeight()){p.missTop=true;actualBoundary=window.innerWidth-actualMarginWidth;p.leftRightFlag=true;}
if(t.offset().left+this.outerWidth()>t.offset().left+actualMarginWidth&&t.offset().left-actualMarginWidth>this.outerWidth()){p.missRight=true;p.missLeft=false;}
if(t.offset().left-this.outerWidth()<=0){p.missLeft=true;p.missRight=false;}}
return p;},top:function(t,s){var self=Foundation.libs.dropdown,p=self.dirs._base.call(this,t);this.addClass('drop-top');if(p.missTop==true){p.top=p.top+t.outerHeight()+this.outerHeight();this.removeClass('drop-top');}
if(p.missRight==true){p.left=p.left-this.outerWidth()+t.outerWidth();}
if(t.outerWidth()<this.outerWidth()||self.small()||this.hasClass(s.mega_menu)){self.adjust_pip(this,t,s,p);}
if(Foundation.rtl){return{left:p.left-this.outerWidth()+t.outerWidth(),top:p.top-this.outerHeight()};}
return{left:p.left,top:p.top-this.outerHeight()};},bottom:function(t,s){var self=Foundation.libs.dropdown,p=self.dirs._base.call(this,t);if(p.missRight==true){p.left=p.left-this.outerWidth()+t.outerWidth();}
if(t.outerWidth()<this.outerWidth()||self.small()||this.hasClass(s.mega_menu)){self.adjust_pip(this,t,s,p);}
if(self.rtl){return{left:p.left-this.outerWidth()+t.outerWidth(),top:p.top+t.outerHeight()};}
return{left:p.left,top:p.top+t.outerHeight()};},left:function(t,s){var p=Foundation.libs.dropdown.dirs._base.call(this,t);this.addClass('drop-left');if(p.missLeft==true){p.left=p.left+this.outerWidth();p.top=p.top+t.outerHeight();this.removeClass('drop-left');}
return{left:p.left-this.outerWidth(),top:p.top};},right:function(t,s){var p=Foundation.libs.dropdown.dirs._base.call(this,t);this.addClass('drop-right');if(p.missRight==true){p.left=p.left-this.outerWidth();p.top=p.top+t.outerHeight();this.removeClass('drop-right');}else{p.triggeredRight=true;}
var self=Foundation.libs.dropdown;if(t.outerWidth()<this.outerWidth()||self.small()||this.hasClass(s.mega_menu)){self.adjust_pip(this,t,s,p);}
return{left:p.left+t.outerWidth(),top:p.top};}},adjust_pip:function(dropdown,target,settings,position){var sheet=Foundation.stylesheet,pip_offset_base=8;if(dropdown.hasClass(settings.mega_class)){pip_offset_base=position.left+(target.outerWidth()/2)-8;}else if(this.small()){pip_offset_base+=position.left-8;}
this.rule_idx=sheet.cssRules.length;var sel_before='.f-dropdown.open:before',sel_after='.f-dropdown.open:after',css_before='left: '+pip_offset_base+'px;',css_after='left: '+(pip_offset_base-1)+'px;';if(position.missRight==true){pip_offset_base=dropdown.outerWidth()-23;sel_before='.f-dropdown.open:before',sel_after='.f-dropdown.open:after',css_before='left: '+pip_offset_base+'px;',css_after='left: '+(pip_offset_base-1)+'px;';}
if(position.triggeredRight==true){sel_before='.f-dropdown.open:before',sel_after='.f-dropdown.open:after',css_before='left:-12px;',css_after='left:-14px;';}
if(sheet.insertRule){sheet.insertRule([sel_before,'{',css_before,'}'].join(' '),this.rule_idx);sheet.insertRule([sel_after,'{',css_after,'}'].join(' '),this.rule_idx+1);}else{sheet.addRule(sel_before,css_before,this.rule_idx);sheet.addRule(sel_after,css_after,this.rule_idx+1);}},clear_idx:function(){var sheet=Foundation.stylesheet;if(typeof this.rule_idx!=='undefined'){sheet.deleteRule(this.rule_idx);sheet.deleteRule(this.rule_idx);delete this.rule_idx;}},small:function(){return matchMedia(Foundation.media_queries.small).matches&&!matchMedia(Foundation.media_queries.medium).matches;},off:function(){this.S(this.scope).off('.fndtn.dropdown');this.S('html, body').off('.fndtn.dropdown');this.S(window).off('.fndtn.dropdown');this.S('[data-dropdown-content]').off('.fndtn.dropdown');},reflow:function(){}};}(jQuery,window,window.document));;(function($,window,document,undefined){'use strict';Foundation.libs['magellan-expedition']={name:'magellan-expedition',version:'5.5.2',settings:{active_class:'active',threshold:0,destination_threshold:20,throttle_delay:30,fixed_top:0,offset_by_height:true,duration:700,easing:'swing'},init:function(scope,method,options){Foundation.inherit(this,'throttle');this.bindings(method,options);},events:function(){var self=this,S=self.S,settings=self.settings;self.set_expedition_position();S(self.scope).off('.magellan').on('click.fndtn.magellan','['+self.add_namespace('data-magellan-arrival')+'] a[href*=#]',function(e){var sameHost=((this.hostname===location.hostname)||!this.hostname),samePath=self.filterPathname(location.pathname)===self.filterPathname(this.pathname),testHash=this.hash.replace(/(:|\.|\/)/g,'\\$1'),anchor=this;if(sameHost&&samePath&&testHash){e.preventDefault();var expedition=$(this).closest('['+self.attr_name()+']'),settings=expedition.data('magellan-expedition-init'),hash=this.hash.split('#').join(''),target=$('a[name="'+hash+'"]');if(target.length===0){target=$('#'+hash);}
var scroll_top=target.offset().top-settings.destination_threshold+1;if(settings.offset_by_height){scroll_top=scroll_top-expedition.outerHeight();}
$('html, body').stop().animate({'scrollTop':scroll_top},settings.duration,settings.easing,function(){if(history.pushState){history.pushState(null,null,anchor.pathname+'#'+hash);}
else{location.hash=anchor.pathname+'#'+hash;}});}}).on('scroll.fndtn.magellan',self.throttle(this.check_for_arrivals.bind(this),settings.throttle_delay));},check_for_arrivals:function(){var self=this;self.update_arrivals();self.update_expedition_positions();},set_expedition_position:function(){var self=this;$('['+this.attr_name()+'=fixed]',self.scope).each(function(idx,el){var expedition=$(this),settings=expedition.data('magellan-expedition-init'),styles=expedition.attr('styles'),top_offset,fixed_top;expedition.attr('style','');top_offset=expedition.offset().top+settings.threshold;fixed_top=parseInt(expedition.data('magellan-fixed-top'));if(!isNaN(fixed_top)){self.settings.fixed_top=fixed_top;}
expedition.data(self.data_attr('magellan-top-offset'),top_offset);expedition.attr('style',styles);});},update_expedition_positions:function(){var self=this,window_top_offset=$(window).scrollTop();$('['+this.attr_name()+'=fixed]',self.scope).each(function(){var expedition=$(this),settings=expedition.data('magellan-expedition-init'),styles=expedition.attr('style'),top_offset=expedition.data('magellan-top-offset');if(window_top_offset+self.settings.fixed_top>=top_offset){var placeholder=expedition.prev('['+self.add_namespace('data-magellan-expedition-clone')+']');if(placeholder.length===0){placeholder=expedition.clone();placeholder.removeAttr(self.attr_name());placeholder.attr(self.add_namespace('data-magellan-expedition-clone'),'');expedition.before(placeholder);}
expedition.css({position:'fixed',top:settings.fixed_top}).addClass('fixed');}else{expedition.prev('['+self.add_namespace('data-magellan-expedition-clone')+']').remove();expedition.attr('style',styles).css('position','').css('top','').removeClass('fixed');}});},update_arrivals:function(){var self=this,window_top_offset=$(window).scrollTop();$('['+this.attr_name()+']',self.scope).each(function(){var expedition=$(this),settings=expedition.data(self.attr_name(true)+'-init'),offsets=self.offsets(expedition,window_top_offset),arrivals=expedition.find('['+self.add_namespace('data-magellan-arrival')+']'),active_item=false;offsets.each(function(idx,item){if(item.viewport_offset>=item.top_offset){var arrivals=expedition.find('['+self.add_namespace('data-magellan-arrival')+']');arrivals.not(item.arrival).removeClass(settings.active_class);item.arrival.addClass(settings.active_class);active_item=true;return true;}});if(!active_item){arrivals.removeClass(settings.active_class);}});},offsets:function(expedition,window_offset){var self=this,settings=expedition.data(self.attr_name(true)+'-init'),viewport_offset=window_offset;return expedition.find('['+self.add_namespace('data-magellan-arrival')+']').map(function(idx,el){var name=$(this).data(self.data_attr('magellan-arrival')),dest=$('['+self.add_namespace('data-magellan-destination')+'='+name+']');if(dest.length>0){var top_offset=dest.offset().top-settings.destination_threshold;if(settings.offset_by_height){top_offset=top_offset-expedition.outerHeight();}
top_offset=Math.floor(top_offset);return{destination:dest,arrival:$(this),top_offset:top_offset,viewport_offset:viewport_offset}}}).sort(function(a,b){if(a.top_offset<b.top_offset){return-1;}
if(a.top_offset>b.top_offset){return 1;}
return 0;});},data_attr:function(str){if(this.namespace.length>0){return this.namespace+'-'+str;}
return str;},off:function(){this.S(this.scope).off('.magellan');this.S(window).off('.magellan');},filterPathname:function(pathname){pathname=pathname||'';return pathname.replace(/^\//,'').replace(/(?:index|default).[a-zA-Z]{3,4}$/,'').replace(/\/$/,'');},reflow:function(){var self=this;$('['+self.add_namespace('data-magellan-expedition-clone')+']',self.scope).remove();}};}(jQuery,window,window.document));;(function($,window,document,undefined){'use strict';Foundation.libs.equalizer={name:'equalizer',version:'5.5.2',settings:{use_tallest:true,before_height_change:$.noop,after_height_change:$.noop,equalize_on_stack:false,act_on_hidden_el:false},init:function(scope,method,options){Foundation.inherit(this,'image_loaded');this.bindings(method,options);this.reflow();},events:function(){this.S(window).off('.equalizer').on('resize.fndtn.equalizer',function(e){this.reflow();}.bind(this));},equalize:function(equalizer){var isStacked=false,group=equalizer.data('equalizer'),settings=equalizer.data(this.attr_name(true)+'-init')||this.settings,vals,firstTopOffset;if(settings.act_on_hidden_el){vals=group?equalizer.find('['+this.attr_name()+'-watch="'+group+'"]'):equalizer.find('['+this.attr_name()+'-watch]');}
else{vals=group?equalizer.find('['+this.attr_name()+'-watch="'+group+'"]:visible'):equalizer.find('['+this.attr_name()+'-watch]:visible');}
if(vals.length===0){return;}
settings.before_height_change();equalizer.trigger('before-height-change.fndth.equalizer');vals.height('inherit');if(settings.equalize_on_stack===false){firstTopOffset=vals.first().offset().top;vals.each(function(){if($(this).offset().top!==firstTopOffset){isStacked=true;return false;}});if(isStacked){return;}}
var heights=vals.map(function(){return $(this).outerHeight(false)}).get();if(settings.use_tallest){var max=Math.max.apply(null,heights);vals.css('height',max);}else{var min=Math.min.apply(null,heights);vals.css('height',min);}
settings.after_height_change();equalizer.trigger('after-height-change.fndtn.equalizer');},reflow:function(){var self=this;this.S('['+this.attr_name()+']',this.scope).each(function(){var $eq_target=$(this),media_query=$eq_target.data('equalizer-mq'),ignore_media_query=true;if(media_query){media_query='is_'+media_query.replace(/-/g,'_');if(Foundation.utils.hasOwnProperty(media_query)){ignore_media_query=false;}}
self.image_loaded(self.S('img',this),function(){if(ignore_media_query||Foundation.utils[media_query]()){self.equalize($eq_target)}else{var vals=$eq_target.find('['+self.attr_name()+'-watch]:visible');vals.css('height','auto');}});});}};})(jQuery,window,window.document);;(function($,window,document,undefined){'use strict';Foundation.libs.alert={name:'alert',version:'5.5.2',settings:{callback:function(){}},init:function(scope,method,options){this.bindings(method,options);},events:function(){var self=this,S=this.S;$(this.scope).off('.alert').on('click.fndtn.alert','['+this.attr_name()+'] .close',function(e){var alertBox=S(this).closest('['+self.attr_name()+']'),settings=alertBox.data(self.attr_name(true)+'-init')||self.settings;e.preventDefault();if(Modernizr.csstransitions){alertBox.addClass('alert-close');alertBox.on('transitionend webkitTransitionEnd oTransitionEnd',function(e){S(this).trigger('close.fndtn.alert').remove();settings.callback();});}else{alertBox.fadeOut(300,function(){S(this).trigger('close.fndtn.alert').remove();settings.callback();});}});},reflow:function(){}};}(jQuery,window,window.document));;(function($,window,document,undefined){'use strict';Foundation.libs.clearing={name:'clearing',version:'5.5.2',settings:{templates:{viewing:'<a href="#" class="clearing-close">&times;</a>'+
'<div class="visible-img" style="display: none"><div class="clearing-touch-label"></div><img src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D" alt="" />'+
'<p class="clearing-caption"></p><a href="#" class="clearing-main-prev"><span></span></a>'+
'<a href="#" class="clearing-main-next"><span></span></a></div>'+
'<img class="clearing-preload-next" style="display: none" src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D" alt="" />'+
'<img class="clearing-preload-prev" style="display: none" src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D" alt="" />'},close_selectors:'.clearing-close, div.clearing-blackout',open_selectors:'',skip_selector:'',touch_label:'',init:false,locked:false},init:function(scope,method,options){var self=this;Foundation.inherit(this,'throttle image_loaded');this.bindings(method,options);if(self.S(this.scope).is('['+this.attr_name()+']')){this.assemble(self.S('li',this.scope));}else{self.S('['+this.attr_name()+']',this.scope).each(function(){self.assemble(self.S('li',this));});}},events:function(scope){var self=this,S=self.S,$scroll_container=$('.scroll-container');if($scroll_container.length>0){this.scope=$scroll_container;}
S(this.scope).off('.clearing').on('click.fndtn.clearing','ul['+this.attr_name()+'] li '+this.settings.open_selectors,function(e,current,target){var current=current||S(this),target=target||current,next=current.next('li'),settings=current.closest('['+self.attr_name()+']').data(self.attr_name(true)+'-init'),image=S(e.target);e.preventDefault();if(!settings){self.init();settings=current.closest('['+self.attr_name()+']').data(self.attr_name(true)+'-init');}
if(target.hasClass('visible')&&current[0]===target[0]&&next.length>0&&self.is_open(current)){target=next;image=S('img',target);}
self.open(image,current,target);self.update_paddles(target);}).on('click.fndtn.clearing','.clearing-main-next',function(e){self.nav(e,'next')}).on('click.fndtn.clearing','.clearing-main-prev',function(e){self.nav(e,'prev')}).on('click.fndtn.clearing',this.settings.close_selectors,function(e){Foundation.libs.clearing.close(e,this)});$(document).on('keydown.fndtn.clearing',function(e){self.keydown(e)});S(window).off('.clearing').on('resize.fndtn.clearing',function(){self.resize()});this.swipe_events(scope);},swipe_events:function(scope){var self=this,S=self.S;S(this.scope).on('touchstart.fndtn.clearing','.visible-img',function(e){if(!e.touches){e=e.originalEvent;}
var data={start_page_x:e.touches[0].pageX,start_page_y:e.touches[0].pageY,start_time:(new Date()).getTime(),delta_x:0,is_scrolling:undefined};S(this).data('swipe-transition',data);e.stopPropagation();}).on('touchmove.fndtn.clearing','.visible-img',function(e){if(!e.touches){e=e.originalEvent;}
if(e.touches.length>1||e.scale&&e.scale!==1){return;}
var data=S(this).data('swipe-transition');if(typeof data==='undefined'){data={};}
data.delta_x=e.touches[0].pageX-data.start_page_x;if(Foundation.rtl){data.delta_x=-data.delta_x;}
if(typeof data.is_scrolling==='undefined'){data.is_scrolling=!!(data.is_scrolling||Math.abs(data.delta_x)<Math.abs(e.touches[0].pageY-data.start_page_y));}
if(!data.is_scrolling&&!data.active){e.preventDefault();var direction=(data.delta_x<0)?'next':'prev';data.active=true;self.nav(e,direction);}}).on('touchend.fndtn.clearing','.visible-img',function(e){S(this).data('swipe-transition',{});e.stopPropagation();});},assemble:function($li){var $el=$li.parent();if($el.parent().hasClass('carousel')){return;}
$el.after('<div id="foundationClearingHolder"></div>');var grid=$el.detach(),grid_outerHTML='';if(grid[0]==null){return;}else{grid_outerHTML=grid[0].outerHTML;}
var holder=this.S('#foundationClearingHolder'),settings=$el.data(this.attr_name(true)+'-init'),data={grid:'<div class="carousel">'+grid_outerHTML+'</div>',viewing:settings.templates.viewing},wrapper='<div class="clearing-assembled"><div>'+data.viewing+
data.grid+'</div></div>',touch_label=this.settings.touch_label;if(Modernizr.touch){wrapper=$(wrapper).find('.clearing-touch-label').html(touch_label).end();}
holder.after(wrapper).remove();},open:function($image,current,target){var self=this,body=$(document.body),root=target.closest('.clearing-assembled'),container=self.S('div',root).first(),visible_image=self.S('.visible-img',container),image=self.S('img',visible_image).not($image),label=self.S('.clearing-touch-label',container),error=false,loaded={};$('body').on('touchmove',function(e){e.preventDefault();});image.error(function(){error=true;});function startLoad(){setTimeout(function(){this.image_loaded(image,function(){if(image.outerWidth()===1&&!error){startLoad.call(this);}else{cb.call(this,image);}}.bind(this));}.bind(this),100);}
function cb(image){var $image=$(image);$image.css('visibility','visible');$image.trigger('imageVisible');body.css('overflow','hidden');root.addClass('clearing-blackout');container.addClass('clearing-container');visible_image.show();this.fix_height(target).caption(self.S('.clearing-caption',visible_image),self.S('img',target)).center_and_label(image,label).shift(current,target,function(){target.closest('li').siblings().removeClass('visible');target.closest('li').addClass('visible');});visible_image.trigger('opened.fndtn.clearing')}
if(!this.locked()){visible_image.trigger('open.fndtn.clearing');loaded=this.load($image);if(loaded.interchange){image.attr('data-interchange',loaded.interchange).foundation('interchange','reflow');}else{image.attr('src',loaded.src).attr('data-interchange','');}
image.css('visibility','hidden');startLoad.call(this);}},close:function(e,el){e.preventDefault();var root=(function(target){if(/blackout/.test(target.selector)){return target;}else{return target.closest('.clearing-blackout');}}($(el))),body=$(document.body),container,visible_image;if(el===e.target&&root){body.css('overflow','');container=$('div',root).first();visible_image=$('.visible-img',container);visible_image.trigger('close.fndtn.clearing');this.settings.prev_index=0;$('ul['+this.attr_name()+']',root).attr('style','').closest('.clearing-blackout').removeClass('clearing-blackout');container.removeClass('clearing-container');visible_image.hide();visible_image.trigger('closed.fndtn.clearing');}
$('body').off('touchmove');return false;},is_open:function(current){return current.parent().prop('style').length>0;},keydown:function(e){var clearing=$('.clearing-blackout ul['+this.attr_name()+']'),NEXT_KEY=this.rtl?37:39,PREV_KEY=this.rtl?39:37,ESC_KEY=27;if(e.which===NEXT_KEY){this.go(clearing,'next');}
if(e.which===PREV_KEY){this.go(clearing,'prev');}
if(e.which===ESC_KEY){this.S('a.clearing-close').trigger('click.fndtn.clearing');}},nav:function(e,direction){var clearing=$('ul['+this.attr_name()+']','.clearing-blackout');e.preventDefault();this.go(clearing,direction);},resize:function(){var image=$('img','.clearing-blackout .visible-img'),label=$('.clearing-touch-label','.clearing-blackout');if(image.length){this.center_and_label(image,label);image.trigger('resized.fndtn.clearing')}},fix_height:function(target){var lis=target.parent().children(),self=this;lis.each(function(){var li=self.S(this),image=li.find('img');if(li.height()>image.outerHeight()){li.addClass('fix-height');}}).closest('ul').width(lis.length*100+'%');return this;},update_paddles:function(target){target=target.closest('li');var visible_image=target.closest('.carousel').siblings('.visible-img');if(target.next().length>0){this.S('.clearing-main-next',visible_image).removeClass('disabled');}else{this.S('.clearing-main-next',visible_image).addClass('disabled');}
if(target.prev().length>0){this.S('.clearing-main-prev',visible_image).removeClass('disabled');}else{this.S('.clearing-main-prev',visible_image).addClass('disabled');}},center_and_label:function(target,label){if(!this.rtl&&label.length>0){label.css({marginLeft:-(label.outerWidth()/2),marginTop:-(target.outerHeight()/2)-label.outerHeight()-10});}else{label.css({marginRight:-(label.outerWidth()/2),marginTop:-(target.outerHeight()/2)-label.outerHeight()-10,left:'auto',right:'50%'});}
return this;},load:function($image){var href,interchange,closest_a;if($image[0].nodeName==='A'){href=$image.attr('href');interchange=$image.data('clearing-interchange');}else{closest_a=$image.closest('a');href=closest_a.attr('href');interchange=closest_a.data('clearing-interchange');}
this.preload($image);return{'src':href?href:$image.attr('src'),'interchange':href?interchange:$image.data('clearing-interchange')}},preload:function($image){this.img($image.closest('li').next(),'next').img($image.closest('li').prev(),'prev');},img:function(img,sibling_type){if(img.length){var preload_img=$('.clearing-preload-'+sibling_type),new_a=this.S('a',img),src,interchange,image;if(new_a.length){src=new_a.attr('href');interchange=new_a.data('clearing-interchange');}else{image=this.S('img',img);src=image.attr('src');interchange=image.data('clearing-interchange');}
if(interchange){preload_img.attr('data-interchange',interchange);}else{preload_img.attr('src',src);preload_img.attr('data-interchange','');}}
return this;},caption:function(container,$image){var caption=$image.attr('data-caption');if(caption){container.html(caption).show();}else{container.text('').hide();}
return this;},go:function($ul,direction){var current=this.S('.visible',$ul),target=current[direction]();if(this.settings.skip_selector&&target.find(this.settings.skip_selector).length!=0){target=target[direction]();}
if(target.length){this.S('img',target).trigger('click.fndtn.clearing',[current,target]).trigger('change.fndtn.clearing');}},shift:function(current,target,callback){var clearing=target.parent(),old_index=this.settings.prev_index||target.index(),direction=this.direction(clearing,current,target),dir=this.rtl?'right':'left',left=parseInt(clearing.css('left'),10),width=target.outerWidth(),skip_shift;var dir_obj={};if(target.index()!==old_index&&!/skip/.test(direction)){if(/left/.test(direction)){this.lock();dir_obj[dir]=left+width;clearing.animate(dir_obj,300,this.unlock());}else if(/right/.test(direction)){this.lock();dir_obj[dir]=left-width;clearing.animate(dir_obj,300,this.unlock());}}else if(/skip/.test(direction)){skip_shift=target.index()-this.settings.up_count;this.lock();if(skip_shift>0){dir_obj[dir]=-(skip_shift*width);clearing.animate(dir_obj,300,this.unlock());}else{dir_obj[dir]=0;clearing.animate(dir_obj,300,this.unlock());}}
callback();},direction:function($el,current,target){var lis=this.S('li',$el),li_width=lis.outerWidth()+(lis.outerWidth()/4),up_count=Math.floor(this.S('.clearing-container').outerWidth()/li_width)-1,target_index=lis.index(target),response;this.settings.up_count=up_count;if(this.adjacent(this.settings.prev_index,target_index)){if((target_index>up_count)&&target_index>this.settings.prev_index){response='right';}else if((target_index>up_count-1)&&target_index<=this.settings.prev_index){response='left';}else{response=false;}}else{response='skip';}
this.settings.prev_index=target_index;return response;},adjacent:function(current_index,target_index){for(var i=target_index+1;i>=target_index-1;i--){if(i===current_index){return true;}}
return false;},lock:function(){this.settings.locked=true;},unlock:function(){this.settings.locked=false;},locked:function(){return this.settings.locked;},off:function(){this.S(this.scope).off('.fndtn.clearing');this.S(window).off('.fndtn.clearing');},reflow:function(){this.init();}};}(jQuery,window,window.document));;(function($,window,document,undefined){'use strict';Foundation.libs.tooltip={name:'tooltip',version:'5.5.2',settings:{additional_inheritable_classes:[],tooltip_class:'.tooltip',append_to:'body',touch_close_text:'Tap To Close',disable_for_touch:false,hover_delay:200,show_on:'all',tip_template:function(selector,content){return'<span data-selector="'+selector+'" id="'+selector+'" class="'
+Foundation.libs.tooltip.settings.tooltip_class.substring(1)
+'" role="tooltip">'+content+'<span class="nub"></span></span>';}},cache:{},init:function(scope,method,options){Foundation.inherit(this,'random_str');this.bindings(method,options);},should_show:function(target,tip){var settings=$.extend({},this.settings,this.data_options(target));if(settings.show_on==='all'){return true;}else if(this.small()&&settings.show_on==='small'){return true;}else if(this.medium()&&settings.show_on==='medium'){return true;}else if(this.large()&&settings.show_on==='large'){return true;}
return false;},medium:function(){return matchMedia(Foundation.media_queries['medium']).matches;},large:function(){return matchMedia(Foundation.media_queries['large']).matches;},isInitted:false,events:function(instance){var self=this,S=self.S;self.create(this.S(instance));if(this.isInitted){return;}
this.isInitted=true;self.create(this.S(instance));function _startShow(elt,$this,immediate){if(elt.timer){return;}
if(immediate){elt.timer=null;self.showTip($this);}else{elt.timer=setTimeout(function(){elt.timer=null;self.showTip($this);}.bind(elt),self.settings.hover_delay);}}
function _startHide(elt,$this){if(elt.timer){clearTimeout(elt.timer);elt.timer=null;}
self.hide($this);}
$(this.scope).off('.tooltip').on('mouseenter.fndtn.tooltip mouseleave.fndtn.tooltip touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip','['+this.attr_name()+']',function(e){var $this=S(this),settings=$.extend({},self.settings,self.data_options($this)),is_touch=false;if(Modernizr.touch&&/touchstart|MSPointerDown/i.test(e.type)&&S(e.target).is('a')){return false;}
if(/mouse/i.test(e.type)&&self.ie_touch(e)){return false;}
if($this.hasClass('open')){if(Modernizr.touch&&/touchstart|MSPointerDown/i.test(e.type)){e.preventDefault();}
self.hide($this);}else{if(settings.disable_for_touch&&Modernizr.touch&&/touchstart|MSPointerDown/i.test(e.type)){return;}else if(!settings.disable_for_touch&&Modernizr.touch&&/touchstart|MSPointerDown/i.test(e.type)){e.preventDefault();S(settings.tooltip_class+'.open').hide();is_touch=true;if($('.open['+self.attr_name()+']').length>0){var prevOpen=S($('.open['+self.attr_name()+']')[0]);self.hide(prevOpen);}}
if(/enter|over/i.test(e.type)){_startShow(this,$this);}else if(e.type==='mouseout'||e.type==='mouseleave'){_startHide(this,$this);}else{_startShow(this,$this,true);}}}).on('mouseleave.fndtn.tooltip touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip','['+this.attr_name()+'].open',function(e){if(/mouse/i.test(e.type)&&self.ie_touch(e)){return false;}
if($(this).data('tooltip-open-event-type')=='touch'&&e.type=='mouseleave'){return;}else if($(this).data('tooltip-open-event-type')=='mouse'&&/MSPointerDown|touchstart/i.test(e.type)){self.convert_to_touch($(this));}else{_startHide(this,$(this));}}).on('DOMNodeRemoved','['+this.attr_name()+']:not(a)',function(e){_startHide(this,S(this));});},ie_touch:function(e){return false;},showTip:function($target){var $tip=this.getTip($target);if(this.should_show($target,$tip)){return this.show($target);}
return;},getTip:function($target){var selector=this.selector($target),settings=$.extend({},this.settings,this.data_options($target)),tip=null;if(selector){tip=this.S('span[data-selector="'+selector+'"]'+settings.tooltip_class);}
return(typeof tip==='object')?tip:false;},selector:function($target){var dataSelector=$target.attr(this.attr_name())||$target.attr('data-selector');if(typeof dataSelector!='string'){dataSelector=this.random_str(6);$target.attr('data-selector',dataSelector).attr('aria-describedby',dataSelector);}
return dataSelector;},create:function($target){var self=this,settings=$.extend({},this.settings,this.data_options($target)),tip_template=this.settings.tip_template;if(typeof settings.tip_template==='string'&&window.hasOwnProperty(settings.tip_template)){tip_template=window[settings.tip_template];}
var $tip=$(tip_template(this.selector($target),$('<div></div>').html($target.attr('title')).html())),classes=this.inheritable_classes($target);$tip.addClass(classes).appendTo(settings.append_to);if(Modernizr.touch){$tip.append('<span class="tap-to-close">'+settings.touch_close_text+'</span>');$tip.on('touchstart.fndtn.tooltip MSPointerDown.fndtn.tooltip',function(e){self.hide($target);});}
$target.removeAttr('title').attr('title','');},reposition:function(target,tip,classes){var width,nub,nubHeight,nubWidth,column,objPos;tip.css('visibility','hidden').show();width=target.data('width');nub=tip.children('.nub');nubHeight=nub.outerHeight();nubWidth=nub.outerHeight();if(this.small()){tip.css({'width':'100%'});}else{tip.css({'width':(width)?width:'auto'});}
objPos=function(obj,top,right,bottom,left,width){return obj.css({'top':(top)?top:'auto','bottom':(bottom)?bottom:'auto','left':(left)?left:'auto','right':(right)?right:'auto'}).end();};objPos(tip,(target.offset().top+target.outerHeight()+10),'auto','auto',target.offset().left);if(this.small()){objPos(tip,(target.offset().top+target.outerHeight()+10),'auto','auto',12.5,$(this.scope).width());tip.addClass('tip-override');objPos(nub,-nubHeight,'auto','auto',target.offset().left);}else{var left=target.offset().left;if(Foundation.rtl){nub.addClass('rtl');left=target.offset().left+target.outerWidth()-tip.outerWidth();}
objPos(tip,(target.offset().top+target.outerHeight()+10),'auto','auto',left);if(nub.attr('style')){nub.removeAttr('style');}
tip.removeClass('tip-override');if(classes&&classes.indexOf('tip-top')>-1){if(Foundation.rtl){nub.addClass('rtl');}
objPos(tip,(target.offset().top-tip.outerHeight()),'auto','auto',left).removeClass('tip-override');}else if(classes&&classes.indexOf('tip-left')>-1){objPos(tip,(target.offset().top+(target.outerHeight()/2)-(tip.outerHeight()/2)),'auto','auto',(target.offset().left-tip.outerWidth()-nubHeight)).removeClass('tip-override');nub.removeClass('rtl');}else if(classes&&classes.indexOf('tip-right')>-1){objPos(tip,(target.offset().top+(target.outerHeight()/2)-(tip.outerHeight()/2)),'auto','auto',(target.offset().left+target.outerWidth()+nubHeight)).removeClass('tip-override');nub.removeClass('rtl');}}
tip.css('visibility','visible').hide();},small:function(){return matchMedia(Foundation.media_queries.small).matches&&!matchMedia(Foundation.media_queries.medium).matches;},inheritable_classes:function($target){var settings=$.extend({},this.settings,this.data_options($target)),inheritables=['tip-top','tip-left','tip-bottom','tip-right','radius','round'].concat(settings.additional_inheritable_classes),classes=$target.attr('class'),filtered=classes?$.map(classes.split(' '),function(el,i){if($.inArray(el,inheritables)!==-1){return el;}}).join(' '):'';return $.trim(filtered);},convert_to_touch:function($target){var self=this,$tip=self.getTip($target),settings=$.extend({},self.settings,self.data_options($target));if($tip.find('.tap-to-close').length===0){$tip.append('<span class="tap-to-close">'+settings.touch_close_text+'</span>');$tip.on('click.fndtn.tooltip.tapclose touchstart.fndtn.tooltip.tapclose MSPointerDown.fndtn.tooltip.tapclose',function(e){self.hide($target);});}
$target.data('tooltip-open-event-type','touch');},show:function($target){var $tip=this.getTip($target);if($target.data('tooltip-open-event-type')=='touch'){this.convert_to_touch($target);}
this.reposition($target,$tip,$target.attr('class'));$target.addClass('open');$tip.fadeIn(150);},hide:function($target){var $tip=this.getTip($target);$tip.fadeOut(150,function(){$tip.find('.tap-to-close').remove();$tip.off('click.fndtn.tooltip.tapclose MSPointerDown.fndtn.tapclose');$target.removeClass('open');});},off:function(){var self=this;this.S(this.scope).off('.fndtn.tooltip');this.S(this.settings.tooltip_class).each(function(i){$('['+self.attr_name()+']').eq(i).attr('title',$(this).text());}).remove();},reflow:function(){}};}(jQuery,window,window.document));;(function($,window,document,undefined){'use strict';Foundation.libs.abide={name:'abide',version:'5.5.2',settings:{live_validate:true,validate_on_blur:true,focus_on_invalid:true,error_labels:true,error_class:'error',timeout:1000,patterns:{alpha:/^[a-zA-Z]+$/,alpha_numeric:/^[a-zA-Z0-9]+$/,integer:/^[-+]?\d+$/,number:/^[-+]?\d*(?:[\.\,]\d+)?$/,card:/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/,cvv:/^([0-9]){3,4}$/,email:/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/,url:/^(https?|ftp|file|ssh):\/\/([-;:&=\+\$,\w]+@{1})?([-A-Za-z0-9\.]+)+:?(\d+)?((\/[-\+~%\/\.\w]+)?\??([-\+=&;%@\.\w]+)?#?([\w]+)?)?/,domain:/^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,8}$/,datetime:/^([0-2][0-9]{3})\-([0-1][0-9])\-([0-3][0-9])T([0-5][0-9])\:([0-5][0-9])\:([0-5][0-9])(Z|([\-\+]([0-1][0-9])\:00))$/,date:/(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))$/,time:/^(0[0-9]|1[0-9]|2[0-3])(:[0-5][0-9]){2}$/,dateISO:/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/,month_day_year:/^(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.]\d{4}$/,day_month_year:/^(0[1-9]|[12][0-9]|3[01])[- \/.](0[1-9]|1[012])[- \/.]\d{4}$/,color:/^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/},validators:{equalTo:function(el,required,parent){var from=document.getElementById(el.getAttribute(this.add_namespace('data-equalto'))).value,to=el.value,valid=(from===to);return valid;}}},timer:null,init:function(scope,method,options){this.bindings(method,options);},events:function(scope){var self=this,form=self.S(scope).attr('novalidate','novalidate'),settings=form.data(this.attr_name(true)+'-init')||{};this.invalid_attr=this.add_namespace('data-invalid');function validate(originalSelf,e){clearTimeout(self.timer);self.timer=setTimeout(function(){self.validate([originalSelf],e);}.bind(originalSelf),settings.timeout);}
form.off('.abide').on('submit.fndtn.abide',function(e){var is_ajax=/ajax/i.test(self.S(this).attr(self.attr_name()));return self.validate(self.S(this).find('input, textarea, select').not(":hidden, [data-abide-ignore]").get(),e,is_ajax);}).on('validate.fndtn.abide',function(e){if(settings.validate_on==='manual'){self.validate([e.target],e);}}).on('reset',function(e){return self.reset($(this),e);}).find('input, textarea, select').not(":hidden, [data-abide-ignore]").off('.abide').on('blur.fndtn.abide change.fndtn.abide',function(e){if(settings.validate_on_blur&&settings.validate_on_blur===true){validate(this,e);}
if(settings.validate_on==='change'){validate(this,e);}}).on('keydown.fndtn.abide',function(e){if(settings.live_validate&&settings.live_validate===true&&e.which!=9){validate(this,e);}
if(settings.validate_on==='tab'&&e.which===9){validate(this,e);}
else if(settings.validate_on==='change'){validate(this,e);}}).on('focus',function(e){if(navigator.userAgent.match(/iPad|iPhone|Android|BlackBerry|Windows Phone|webOS/i)){$('html, body').animate({scrollTop:$(e.target).offset().top},100);}});},reset:function(form,e){var self=this;form.removeAttr(self.invalid_attr);$('['+self.invalid_attr+']',form).removeAttr(self.invalid_attr);$('.'+self.settings.error_class,form).not('small').removeClass(self.settings.error_class);$(':input',form).not(':button, :submit, :reset, :hidden, [data-abide-ignore]').val('').removeAttr(self.invalid_attr);},validate:function(els,e,is_ajax){var validations=this.parse_patterns(els),validation_count=validations.length,form=this.S(els[0]).closest('form'),submit_event=/submit/.test(e.type);for(var i=0;i<validation_count;i++){if(!validations[i]&&(submit_event||is_ajax)){if(this.settings.focus_on_invalid){els[i].focus();}
form.trigger('invalid.fndtn.abide');this.S(els[i]).closest('form').attr(this.invalid_attr,'');return false;}}
if(submit_event||is_ajax){form.trigger('valid.fndtn.abide');}
form.removeAttr(this.invalid_attr);if(is_ajax){return false;}
return true;},parse_patterns:function(els){var i=els.length,el_patterns=[];while(i--){el_patterns.push(this.pattern(els[i]));}
return this.check_validation_and_apply_styles(el_patterns);},pattern:function(el){var type=el.getAttribute('type'),required=typeof el.getAttribute('required')==='string';var pattern=el.getAttribute('pattern')||'';if(this.settings.patterns.hasOwnProperty(pattern)&&pattern.length>0){return[el,this.settings.patterns[pattern],required];}else if(pattern.length>0){return[el,new RegExp(pattern),required];}
if(this.settings.patterns.hasOwnProperty(type)){return[el,this.settings.patterns[type],required];}
pattern=/.*/;return[el,pattern,required];},check_validation_and_apply_styles:function(el_patterns){var i=el_patterns.length,validations=[],form=this.S(el_patterns[0][0]).closest('[data-'+this.attr_name(true)+']'),settings=form.data(this.attr_name(true)+'-init')||{};while(i--){var el=el_patterns[i][0],required=el_patterns[i][2],value=el.value.trim(),direct_parent=this.S(el).parent(),validator=el.getAttribute(this.add_namespace('data-abide-validator')),is_radio=el.type==='radio',is_checkbox=el.type==='checkbox',label=this.S('label[for="'+el.getAttribute('id')+'"]'),valid_length=(required)?(el.value.length>0):true,el_validations=[];var parent,valid;if(el.getAttribute(this.add_namespace('data-equalto'))){validator='equalTo'}
if(!direct_parent.is('label')){parent=direct_parent;}else{parent=direct_parent.parent();}
if(is_radio&&required){el_validations.push(this.valid_radio(el,required));}else if(is_checkbox&&required){el_validations.push(this.valid_checkbox(el,required));}else if(validator){var validators=validator.split(' ');var last_valid=true,all_valid=true;for(var iv=0;iv<validators.length;iv++){valid=this.settings.validators[validators[iv]].apply(this,[el,required,parent])
el_validations.push(valid);all_valid=valid&&last_valid;last_valid=valid;}
if(all_valid){this.S(el).removeAttr(this.invalid_attr);parent.removeClass('error');if(label.length>0&&this.settings.error_labels){label.removeClass(this.settings.error_class).removeAttr('role');}
$(el).triggerHandler('valid');}else{this.S(el).attr(this.invalid_attr,'');parent.addClass('error');if(label.length>0&&this.settings.error_labels){label.addClass(this.settings.error_class).attr('role','alert');}
$(el).triggerHandler('invalid');}}else{if(el_patterns[i][1].test(value)&&valid_length||!required&&el.value.length<1||$(el).attr('disabled')){el_validations.push(true);}else{el_validations.push(false);}
el_validations=[el_validations.every(function(valid){return valid;})];if(el_validations[0]){this.S(el).removeAttr(this.invalid_attr);el.setAttribute('aria-invalid','false');el.removeAttribute('aria-describedby');parent.removeClass(this.settings.error_class);if(label.length>0&&this.settings.error_labels){label.removeClass(this.settings.error_class).removeAttr('role');}
$(el).triggerHandler('valid');}else{this.S(el).attr(this.invalid_attr,'');el.setAttribute('aria-invalid','true');var errorElem=parent.find('small.'+this.settings.error_class,'span.'+this.settings.error_class);var errorID=errorElem.length>0?errorElem[0].id:'';if(errorID.length>0){el.setAttribute('aria-describedby',errorID);}
parent.addClass(this.settings.error_class);if(label.length>0&&this.settings.error_labels){label.addClass(this.settings.error_class).attr('role','alert');}
$(el).triggerHandler('invalid');}}
validations=validations.concat(el_validations);}
return validations;},valid_checkbox:function(el,required){var el=this.S(el),valid=(el.is(':checked')||!required||el.get(0).getAttribute('disabled'));if(valid){el.removeAttr(this.invalid_attr).parent().removeClass(this.settings.error_class);$(el).triggerHandler('valid');}else{el.attr(this.invalid_attr,'').parent().addClass(this.settings.error_class);$(el).triggerHandler('invalid');}
return valid;},valid_radio:function(el,required){var name=el.getAttribute('name'),group=this.S(el).closest('[data-'+this.attr_name(true)+']').find("[name='"+name+"']"),count=group.length,valid=false,disabled=false;for(var i=0;i<count;i++){if(group[i].getAttribute('disabled')){disabled=true;valid=true;}else{if(group[i].checked){valid=true;}else{if(disabled){valid=false;}}}}
for(var i=0;i<count;i++){if(valid){this.S(group[i]).removeAttr(this.invalid_attr).parent().removeClass(this.settings.error_class);$(group[i]).triggerHandler('valid');}else{this.S(group[i]).attr(this.invalid_attr,'').parent().addClass(this.settings.error_class);$(group[i]).triggerHandler('invalid');}}
return valid;},valid_equal:function(el,required,parent){var from=document.getElementById(el.getAttribute(this.add_namespace('data-equalto'))).value,to=el.value,valid=(from===to);if(valid){this.S(el).removeAttr(this.invalid_attr);parent.removeClass(this.settings.error_class);if(label.length>0&&settings.error_labels){label.removeClass(this.settings.error_class);}}else{this.S(el).attr(this.invalid_attr,'');parent.addClass(this.settings.error_class);if(label.length>0&&settings.error_labels){label.addClass(this.settings.error_class);}}
return valid;},valid_oneof:function(el,required,parent,doNotValidateOthers){var el=this.S(el),others=this.S('['+this.add_namespace('data-oneof')+']'),valid=others.filter(':checked').length>0;if(valid){el.removeAttr(this.invalid_attr).parent().removeClass(this.settings.error_class);}else{el.attr(this.invalid_attr,'').parent().addClass(this.settings.error_class);}
if(!doNotValidateOthers){var _this=this;others.each(function(){_this.valid_oneof.call(_this,this,null,null,true);});}
return valid;},reflow:function(scope,options){var self=this,form=self.S('['+this.attr_name()+']').attr('novalidate','novalidate');self.S(form).each(function(idx,el){self.events(el);});}};}(jQuery,window,window.document));;(function($,window,document,undefined){'use strict';Foundation.libs.accordion={name:'accordion',version:'5.5.2',settings:{content_class:'content',active_class:'active',multi_expand:false,toggleable:true,callback:function(){}},init:function(scope,method,options){this.bindings(method,options);},events:function(instance){var self=this;var S=this.S;self.create(this.S(instance));S(this.scope).off('.fndtn.accordion').on('click.fndtn.accordion','['+this.attr_name()+'] > dd > a, ['+this.attr_name()+'] > li > a',function(e){var accordion=S(this).closest('['+self.attr_name()+']'),groupSelector=self.attr_name()+'='+accordion.attr(self.attr_name()),settings=accordion.data(self.attr_name(true)+'-init')||self.settings,target=S('#'+this.href.split('#')[1]),aunts=$('> dd, > li',accordion),siblings=aunts.children('.'+settings.content_class),active_content=siblings.filter('.'+settings.active_class);e.preventDefault();if(accordion.attr(self.attr_name())){siblings=siblings.add('['+groupSelector+'] dd > '+'.'+settings.content_class+', ['+groupSelector+'] li > '+'.'+settings.content_class);aunts=aunts.add('['+groupSelector+'] dd, ['+groupSelector+'] li');}
if(settings.toggleable&&target.is(active_content)){target.parent('dd, li').toggleClass(settings.active_class,false);target.toggleClass(settings.active_class,false);S(this).attr('aria-expanded',function(i,attr){return attr==='true'?'false':'true';});settings.callback(target);target.triggerHandler('toggled',[accordion]);accordion.triggerHandler('toggled',[target]);return;}
if(!settings.multi_expand){siblings.removeClass(settings.active_class);aunts.removeClass(settings.active_class);aunts.children('a').attr('aria-expanded','false');}
target.addClass(settings.active_class).parent().addClass(settings.active_class);settings.callback(target);target.triggerHandler('toggled',[accordion]);accordion.triggerHandler('toggled',[target]);S(this).attr('aria-expanded','true');});},create:function($instance){var self=this,accordion=$instance,aunts=$('> .accordion-navigation',accordion),settings=accordion.data(self.attr_name(true)+'-init')||self.settings;aunts.children('a').attr('aria-expanded','false');aunts.has('.'+settings.content_class+'.'+settings.active_class).children('a').attr('aria-expanded','true');if(settings.multi_expand){$instance.attr('aria-multiselectable','true');}},off:function(){},reflow:function(){}};}(jQuery,window,window.document));/*!
 * jQuery Sticky Footer 2.0
 * Corey Snyder
 * http://tangerineindustries.com
 *
 * Released under the MIT license
 *
 * Copyright 2013 Corey Snyder.
 *
 * Date: Thu Jan 22 2013 13:34:00 GMT-0630 (Eastern Daylight Time)
 * Modification for jquery 1.9+ Tue May 7 2013
 * Modification for non-jquery, removed all, now classic JS Wed Jun 12 2013
 * Modification for Foundation 5 auto height issues
 * Modification for new DOM change event listener
 */
window.onload=function(){stickyFooter();observer.observe(target,config);};var target=document.body;var observer=new MutationObserver(mutationObjectCallback);function mutationObjectCallback(mutationRecordsList){stickyFooter();};var config={attributes:true,childList:true,characterData:true};window.onresize=function(){stickyFooter();}
function getCSS(element,property){var elem=document.getElementsByTagName(element)[0];var css=null;if(elem.currentStyle){css=elem.currentStyle[property];}else if(window.getComputedStyle){css=document.defaultView.getComputedStyle(elem,null).getPropertyValue(property);}
return css;}
function stickyFooter(){observer.disconnect();document.body.setAttribute("style","height:auto");if(document.getElementsByTagName("footer")[0].getAttribute("style")!=null){document.getElementsByTagName("footer")[0].removeAttribute("style");}
if(window.innerHeight!=document.body.offsetHeight){var offset=window.innerHeight-document.body.offsetHeight;var current=getCSS("footer","margin-top");if(isNaN(current)==true){document.getElementsByTagName("footer")[0].setAttribute("style","margin-top:0px;");current=0;}else{current=parseInt(current);}
if(current+offset>parseInt(getCSS("footer","margin-top"))){document.getElementsByTagName("footer")[0].setAttribute("style","margin-top:"+(current+offset)+"px;");}}
document.body.setAttribute("style","height:100%");observer.observe(target,config);}
!function($){function UTCDate(){return new Date(Date.UTC.apply(Date,arguments));}
function UTCToday(){var today=new Date();return UTCDate(today.getUTCFullYear(),today.getUTCMonth(),today.getUTCDate());}
var Datepicker=function(element,options){var that=this;this.element=$(element);this.autoShow=options.autoShow||true;this.appendTo=options.appendTo||'body';this.closeButton=options.closeButton;this.language=options.language||this.element.data('date-language')||"en";this.language=this.language in dates?this.language:this.language.split('-')[0];this.language=this.language in dates?this.language:"en";this.isRTL=dates[this.language].rtl||false;this.format=DPGlobal.parseFormat(options.format||this.element.data('date-format')||dates[this.language].format||'mm/dd/yyyy');this.isInline=false;this.isInput=this.element.is('input');this.component=this.element.is('.date')?this.element.find('.prefix, .postfix'):false;this.hasInput=this.component&&this.element.find('input').length;this.disableDblClickSelection=options.disableDblClickSelection;this.onRender=options.onRender||function(){};if(this.component&&this.component.length===0){this.component=false;}
this.linkField=options.linkField||this.element.data('link-field')||false;this.linkFormat=DPGlobal.parseFormat(options.linkFormat||this.element.data('link-format')||'yyyy-mm-dd hh:ii:ss');this.minuteStep=options.minuteStep||this.element.data('minute-step')||5;this.pickerPosition=options.pickerPosition||this.element.data('picker-position')||'bottom-right';this._attachEvents();this.minView=0;if('minView'in options){this.minView=options.minView;}else if('minView'in this.element.data()){this.minView=this.element.data('min-view');}
this.minView=DPGlobal.convertViewMode(this.minView);this.maxView=DPGlobal.modes.length-1;if('maxView'in options){this.maxView=options.maxView;}else if('maxView'in this.element.data()){this.maxView=this.element.data('max-view');}
this.maxView=DPGlobal.convertViewMode(this.maxView);this.startViewMode='month';if('startView'in options){this.startViewMode=options.startView;}else if('startView'in this.element.data()){this.startViewMode=this.element.data('start-view');}
this.startViewMode=DPGlobal.convertViewMode(this.startViewMode);this.viewMode=this.startViewMode;if(!('minView'in options)&&!('maxView'in options)&&!(this.element.data('min-view')&&!(this.element.data('max-view')))){this.pickTime=false;if('pickTime'in options){this.pickTime=options.pickTime;}
if(this.pickTime==true){this.minView=0;this.maxView=4;}else{this.minView=2;this.maxView=4;}}
this.forceParse=true;if('forceParse'in options){this.forceParse=options.forceParse;}else if('dateForceParse'in this.element.data()){this.forceParse=this.element.data('date-force-parse');}
this.picker=$(DPGlobal.template).appendTo(this.isInline?this.element:this.appendTo).on({click:$.proxy(this.click,this),mousedown:$.proxy(this.mousedown,this)});if(this.closeButton){this.picker.find('a.datepicker-close').show();}else{this.picker.find('a.datepicker-close').hide();}
if(this.isInline){this.picker.addClass('datepicker-inline');}else{this.picker.addClass('datepicker-dropdown dropdown-menu');}
if(this.isRTL){this.picker.addClass('datepicker-rtl');this.picker.find('.prev i, .next i').toggleClass('fa fa-chevron-left fa-chevron-right').toggleClass('fa-chevron-left fa-chevron-right');}
$(document).on('mousedown',function(e){if($(e.target).closest('.datepicker.datepicker-inline, .datepicker.datepicker-dropdown').length===0){that.hide();}});this.autoclose=true;if('autoclose'in options){this.autoclose=options.autoclose;}else if('dateAutoclose'in this.element.data()){this.autoclose=this.element.data('date-autoclose');}
this.keyboardNavigation=true;if('keyboardNavigation'in options){this.keyboardNavigation=options.keyboardNavigation;}else if('dateKeyboardNavigation'in this.element.data()){this.keyboardNavigation=this.element.data('date-keyboard-navigation');}
this.todayBtn=(options.todayBtn||this.element.data('date-today-btn')||false);this.todayHighlight=(options.todayHighlight||this.element.data('date-today-highlight')||false);this.calendarWeeks=false;if('calendarWeeks'in options){this.calendarWeeks=options.calendarWeeks;}else if('dateCalendarWeeks'in this.element.data()){this.calendarWeeks=this.element.data('date-calendar-weeks');}
if(this.calendarWeeks)
this.picker.find('tfoot th.today').attr('colspan',function(i,val){return parseInt(val)+1;});this.weekStart=((options.weekStart||this.element.data('date-weekstart')||dates[this.language].weekStart||0)%7);this.weekEnd=((this.weekStart+6)%7);this.startDate=-Infinity;this.endDate=Infinity;this.daysOfWeekDisabled=[];this.setStartDate(options.startDate||this.element.data('date-startdate'));this.setEndDate(options.endDate||this.element.data('date-enddate'));this.setDaysOfWeekDisabled(options.daysOfWeekDisabled||this.element.data('date-days-of-week-disabled'));this.fillDow();this.fillMonths();this.update();this.showMode();if(this.isInline){this.show();}};Datepicker.prototype={constructor:Datepicker,_events:[],_attachEvents:function(){this._detachEvents();if(this.isInput){this._events=[[this.element,{focus:(this.autoShow)?$.proxy(this.show,this):function(){},keyup:$.proxy(this.update,this),keydown:$.proxy(this.keydown,this)}]];}else if(this.component&&this.hasInput){this._events=[[this.element.find('input'),{focus:(this.autoShow)?$.proxy(this.show,this):function(){},keyup:$.proxy(this.update,this),keydown:$.proxy(this.keydown,this)}],[this.component,{click:$.proxy(this.show,this)}]];}else if(this.element.is('div')){this.isInline=true;}else{this._events=[[this.element,{click:$.proxy(this.show,this)}]];}
if(this.disableDblClickSelection){this._events[this._events.length]=[this.element,{dblclick:function(e){e.preventDefault();e.stopPropagation();$(this).blur()}}];}
for(var i=0,el,ev;i<this._events.length;i++){el=this._events[i][0];ev=this._events[i][1];el.on(ev);}},_detachEvents:function(){for(var i=0,el,ev;i<this._events.length;i++){el=this._events[i][0];ev=this._events[i][1];el.off(ev);}
this._events=[];},show:function(e){this.picker.show();this.height=this.component?this.component.outerHeight():this.element.outerHeight();this.update();this.place();$(window).on('resize',$.proxy(this.place,this));if(e){e.stopPropagation();e.preventDefault();}
this.element.trigger({type:'show',date:this.date});},hide:function(e){if(this.isInline)return;if(!this.picker.is(':visible'))return;this.picker.hide();$(window).off('resize',this.place);this.viewMode=this.startViewMode;this.showMode();if(!this.isInput){$(document).off('mousedown',this.hide);}
if(this.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find('input').val()))
this.setValue();this.element.trigger({type:'hide',date:this.date});},remove:function(){this._detachEvents();this.picker.remove();delete this.element.data().datepicker;},getDate:function(){var d=this.getUTCDate();return new Date(d.getTime()+(d.getTimezoneOffset()*60000));},getUTCDate:function(){return this.date;},setDate:function(d){this.setUTCDate(new Date(d.getTime()-(d.getTimezoneOffset()*60000)));},setUTCDate:function(d){this.date=d;this.setValue();},setValue:function(){var formatted=this.getFormattedDate();if(!this.isInput){if(this.component){this.element.find('input').val(formatted);}
this.element.data('date',formatted);}else{this.element.val(formatted);}},getFormattedDate:function(format){if(format===undefined)
format=this.format;return DPGlobal.formatDate(this.date,format,this.language);},setStartDate:function(startDate){this.startDate=startDate||-Infinity;if(this.startDate!==-Infinity){this.startDate=DPGlobal.parseDate(this.startDate,this.format,this.language);}
this.update();this.updateNavArrows();},setEndDate:function(endDate){this.endDate=endDate||Infinity;if(this.endDate!==Infinity){this.endDate=DPGlobal.parseDate(this.endDate,this.format,this.language);}
this.update();this.updateNavArrows();},setDaysOfWeekDisabled:function(daysOfWeekDisabled){this.daysOfWeekDisabled=daysOfWeekDisabled||[];if(!$.isArray(this.daysOfWeekDisabled)){this.daysOfWeekDisabled=this.daysOfWeekDisabled.split(/,\s*/);}
this.daysOfWeekDisabled=$.map(this.daysOfWeekDisabled,function(d){return parseInt(d,10);});this.update();this.updateNavArrows();},place:function(){if(this.isInline)return;var zIndex=parseInt(this.element.parents().filter(function(){return $(this).css('z-index')!='auto';}).first().css('z-index'))+10;var textbox=this.component?this.component:this.element;var offset=textbox.offset();var height=textbox.outerHeight()+parseInt(textbox.css('margin-top'));var width=textbox.outerWidth()+parseInt(textbox.css('margin-left'));var fullOffsetTop=offset.top+height;var offsetLeft=offset.left;if((fullOffsetTop+this.picker.outerHeight())>=$(window).scrollTop()+$(window).height()){fullOffsetTop=offset.top-this.picker.outerHeight();}
if(offset.left+this.picker.width()>=$(window).width()){offsetLeft=(offset.left+width)-this.picker.width();}
this.picker.css({top:fullOffsetTop,left:offsetLeft,zIndex:zIndex});},update:function(){var date,fromArgs=false;if(arguments&&arguments.length&&(typeof arguments[0]==='string'||arguments[0]instanceof Date)){date=arguments[0];fromArgs=true;}else{date=this.isInput?this.element.val():this.element.data('date')||this.element.find('input').val();}
this.date=DPGlobal.parseDate(date,this.format,this.language);if(fromArgs)this.setValue();if(this.date<this.startDate){this.viewDate=new Date(this.startDate.valueOf());}else if(this.date>this.endDate){this.viewDate=new Date(this.endDate.valueOf());}else{this.viewDate=new Date(this.date.valueOf());}
this.fill();},fillDow:function(){var dowCnt=this.weekStart,html='<tr>';if(this.calendarWeeks){var cell='<th class="cw">&nbsp;</th>';html+=cell;this.picker.find('.datepicker-days thead tr:first-child').prepend(cell);}
while(dowCnt<this.weekStart+7){html+='<th class="dow">'+dates[this.language].daysMin[(dowCnt++)%7]+'</th>';}
html+='</tr>';this.picker.find('.datepicker-days thead').append(html);},fillMonths:function(){var html='',i=0;while(i<12){html+='<span class="month">'+dates[this.language].monthsShort[i++]+'</span>';}
this.picker.find('.datepicker-months td').html(html);},fill:function(){if(this.date==null||this.viewDate==null){return;}
var d=new Date(this.viewDate.valueOf()),year=d.getUTCFullYear(),month=d.getUTCMonth(),dayMonth=d.getUTCDate(),hours=d.getUTCHours(),minutes=d.getUTCMinutes(),startYear=this.startDate!==-Infinity?this.startDate.getUTCFullYear():-Infinity,startMonth=this.startDate!==-Infinity?this.startDate.getUTCMonth():-Infinity,endYear=this.endDate!==Infinity?this.endDate.getUTCFullYear():Infinity,endMonth=this.endDate!==Infinity?this.endDate.getUTCMonth():Infinity,currentDate=this.date&&this.date.valueOf(),today=new Date(),titleFormat=dates[this.language].titleFormat||dates['en'].titleFormat;this.picker.find('.datepicker-days thead th:eq(1)').text(dates[this.language].months[month]+' '+year);this.picker.find('.datepicker-hours thead th:eq(1)').text(dayMonth+' '+dates[this.language].months[month]+' '+year);this.picker.find('.datepicker-minutes thead th:eq(1)').text(dayMonth+' '+dates[this.language].months[month]+' '+year);this.picker.find('tfoot th.today').text(dates[this.language].today).toggle(this.todayBtn!==false);this.updateNavArrows();this.fillMonths();var prevMonth=UTCDate(year,month-1,28,0,0,0,0),day=DPGlobal.getDaysInMonth(prevMonth.getUTCFullYear(),prevMonth.getUTCMonth());prevMonth.setUTCDate(day);prevMonth.setUTCDate(day-(prevMonth.getUTCDay()-this.weekStart+7)%7);var nextMonth=new Date(prevMonth.valueOf());nextMonth.setUTCDate(nextMonth.getUTCDate()+42);nextMonth=nextMonth.valueOf();var html=[];var clsName;while(prevMonth.valueOf()<nextMonth){if(prevMonth.getUTCDay()==this.weekStart){html.push('<tr>');if(this.calendarWeeks){var a=new Date(prevMonth.getUTCFullYear(),prevMonth.getUTCMonth(),prevMonth.getUTCDate()-prevMonth.getDay()+10-(this.weekStart&&this.weekStart%7<5&&7)),b=new Date(a.getFullYear(),0,4),calWeek=~~((a-b)/864e5/7+1.5);html.push('<td class="cw">'+calWeek+'</td>');}}
clsName=' '+this.onRender(prevMonth)+' ';if(prevMonth.getUTCFullYear()<year||(prevMonth.getUTCFullYear()==year&&prevMonth.getUTCMonth()<month)){clsName+=' old';}else if(prevMonth.getUTCFullYear()>year||(prevMonth.getUTCFullYear()==year&&prevMonth.getUTCMonth()>month)){clsName+=' new';}
if(this.todayHighlight&&prevMonth.getUTCFullYear()==today.getFullYear()&&prevMonth.getUTCMonth()==today.getMonth()&&prevMonth.getUTCDate()==today.getDate()){clsName+=' today';}
if(currentDate&&prevMonth.valueOf()==currentDate){clsName+=' active';}
if(prevMonth.valueOf()<this.startDate||prevMonth.valueOf()>this.endDate||$.inArray(prevMonth.getUTCDay(),this.daysOfWeekDisabled)!==-1){clsName+=' disabled';}
html.push('<td class="day'+clsName+'">'+prevMonth.getUTCDate()+'</td>');if(prevMonth.getUTCDay()==this.weekEnd){html.push('</tr>');}
prevMonth.setUTCDate(prevMonth.getUTCDate()+1);}
this.picker.find('.datepicker-days tbody').empty().append(html.join(''));html=[];for(var i=0;i<24;i++){var actual=UTCDate(year,month,dayMonth,i);clsName='';if((actual.valueOf()+3600000)<this.startDate||actual.valueOf()>this.endDate){clsName+=' disabled';}else if(hours==i){clsName+=' active';}
html.push('<span class="hour'+clsName+'">'+i+':00</span>');}
this.picker.find('.datepicker-hours td').html(html.join(''));html=[];for(var i=0;i<60;i+=this.minuteStep){var actual=UTCDate(year,month,dayMonth,hours,i);clsName='';if(actual.valueOf()<this.startDate||actual.valueOf()>this.endDate){clsName+=' disabled';}else if(Math.floor(minutes/this.minuteStep)==Math.floor(i/this.minuteStep)){clsName+=' active';}
html.push('<span class="minute'+clsName+'">'+hours+':'+(i<10?'0'+i:i)+'</span>');}
this.picker.find('.datepicker-minutes td').html(html.join(''));var currentYear=this.date&&this.date.getUTCFullYear();var months=this.picker.find('.datepicker-months').find('th:eq(1)').text(year).end().find('span').removeClass('active');if(currentYear&&currentYear==year){months.eq(this.date.getUTCMonth()).addClass('active');}
if(year<startYear||year>endYear){months.addClass('disabled');}
if(year==startYear){months.slice(0,startMonth).addClass('disabled');}
if(year==endYear){months.slice(endMonth+1).addClass('disabled');}
html='';year=parseInt(year/10,10)*10;var yearCont=this.picker.find('.datepicker-years').find('th:eq(1)').text(year+'-'+(year+9)).end().find('td');year-=1;for(var i=-1;i<11;i++){html+='<span class="year'+(i==-1||i==10?' old':'')+(currentYear==year?' active':'')+(year<startYear||year>endYear?' disabled':'')+'">'+year+'</span>';year+=1;}
yearCont.html(html);},updateNavArrows:function(){var d=new Date(this.viewDate),year=d.getUTCFullYear(),month=d.getUTCMonth(),day=d.getUTCDate(),hour=d.getUTCHours();switch(this.viewMode){case 0:if(this.startDate!==-Infinity&&year<=this.startDate.getUTCFullYear()&&month<=this.startDate.getUTCMonth()&&day<=this.startDate.getUTCDate()&&hour<=this.startDate.getUTCHours()){this.picker.find('.prev').css({visibility:'hidden'});}else{this.picker.find('.prev').css({visibility:'visible'});}
if(this.endDate!==Infinity&&year>=this.endDate.getUTCFullYear()&&month>=this.endDate.getUTCMonth()&&day>=this.endDate.getUTCDate()&&hour>=this.endDate.getUTCHours()){this.picker.find('.next').css({visibility:'hidden'});}else{this.picker.find('.next').css({visibility:'visible'});}
break;case 1:if(this.startDate!==-Infinity&&year<=this.startDate.getUTCFullYear()&&month<=this.startDate.getUTCMonth()&&day<=this.startDate.getUTCDate()){this.picker.find('.prev').css({visibility:'hidden'});}else{this.picker.find('.prev').css({visibility:'visible'});}
if(this.endDate!==Infinity&&year>=this.endDate.getUTCFullYear()&&month>=this.endDate.getUTCMonth()&&day>=this.endDate.getUTCDate()){this.picker.find('.next').css({visibility:'hidden'});}else{this.picker.find('.next').css({visibility:'visible'});}
break;case 2:if(this.startDate!==-Infinity&&year<=this.startDate.getUTCFullYear()&&month<=this.startDate.getUTCMonth()){this.picker.find('.prev').css({visibility:'hidden'});}else{this.picker.find('.prev').css({visibility:'visible'});}
if(this.endDate!==Infinity&&year>=this.endDate.getUTCFullYear()&&month>=this.endDate.getUTCMonth()){this.picker.find('.next').css({visibility:'hidden'});}else{this.picker.find('.next').css({visibility:'visible'});}
break;case 3:case 4:if(this.startDate!==-Infinity&&year<=this.startDate.getUTCFullYear()){this.picker.find('.prev').css({visibility:'hidden'});}else{this.picker.find('.prev').css({visibility:'visible'});}
if(this.endDate!==Infinity&&year>=this.endDate.getUTCFullYear()){this.picker.find('.next').css({visibility:'hidden'});}else{this.picker.find('.next').css({visibility:'visible'});}
break;}},click:function(e){e.stopPropagation();e.preventDefault();if($(e.target).hasClass('datepicker-close')||$(e.target).parent().hasClass('datepicker-close')){this.hide();}
var target=$(e.target).closest('span, td, th');if(target.length==1){if(target.is('.disabled')){this.element.trigger({type:'outOfRange',date:this.viewDate,startDate:this.startDate,endDate:this.endDate});return;}
switch(target[0].nodeName.toLowerCase()){case'th':switch(target[0].className){case'date-switch':this.showMode(1);break;case'prev':case'next':var dir=DPGlobal.modes[this.viewMode].navStep*(target[0].className=='prev'?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveHour(this.viewDate,dir);break;case 1:this.viewDate=this.moveDate(this.viewDate,dir);break;case 2:this.viewDate=this.moveMonth(this.viewDate,dir);break;case 3:case 4:this.viewDate=this.moveYear(this.viewDate,dir);break;}
this.fill();break;case'today':var date=new Date();date=UTCDate(date.getFullYear(),date.getMonth(),date.getDate(),date.getHours(),date.getMinutes(),date.getSeconds());this.viewMode=this.startViewMode;this.showMode(0);this._setDate(date);break;}
break;case'span':if(!target.is('.disabled')){if(target.is('.month')){if(this.minView===3){var month=target.parent().find('span').index(target)||0;var year=this.viewDate.getUTCFullYear(),day=1,hours=this.viewDate.getUTCHours(),minutes=this.viewDate.getUTCMinutes(),seconds=this.viewDate.getUTCSeconds();this._setDate(UTCDate(year,month,day,hours,minutes,seconds,0));}else{this.viewDate.setUTCDate(1);var month=target.parent().find('span').index(target);this.viewDate.setUTCMonth(month);this.element.trigger({type:'changeMonth',date:this.viewDate});}}else if(target.is('.year')){this.viewDate.setUTCDate(1);var year=parseInt(target.text(),10)||0;this.viewDate.setUTCFullYear(year);this.element.trigger({type:'changeYear',date:this.viewDate});}else if(target.is('.hour')){var hours=parseInt(target.text(),10)||0;var year=this.viewDate.getUTCFullYear(),month=this.viewDate.getUTCMonth(),day=this.viewDate.getUTCDate(),minutes=this.viewDate.getUTCMinutes(),seconds=this.viewDate.getUTCSeconds();this._setDate(UTCDate(year,month,day,hours,minutes,seconds,0));}else if(target.is('.minute')){var minutes=parseInt(target.text().substr(target.text().indexOf(':')+1),10)||0;var year=this.viewDate.getUTCFullYear(),month=this.viewDate.getUTCMonth(),day=this.viewDate.getUTCDate(),hours=this.viewDate.getUTCHours(),seconds=this.viewDate.getUTCSeconds();this._setDate(UTCDate(year,month,day,hours,minutes,seconds,0));}
if(this.viewMode!=0){var oldViewMode=this.viewMode;this.showMode(-1);this.fill();if(oldViewMode==this.viewMode&&this.autoclose){this.hide();}}else{this.fill();if(this.autoclose){this.hide();}}}
break;case'td':if(target.is('.day')&&!target.is('.disabled')){var day=parseInt(target.text(),10)||1;var year=this.viewDate.getUTCFullYear(),month=this.viewDate.getUTCMonth(),hours=this.viewDate.getUTCHours(),minutes=this.viewDate.getUTCMinutes(),seconds=this.viewDate.getUTCSeconds();if(target.is('.old')){if(month===0){month=11;year-=1;}else{month-=1;}}else if(target.is('.new')){if(month==11){month=0;year+=1;}else{month+=1;}}
this._setDate(UTCDate(year,month,day,hours,minutes,seconds,0));}
var oldViewMode=this.viewMode;this.showMode(-1);this.fill();if(oldViewMode==this.viewMode&&this.autoclose){this.hide();}
break;}}},_setDate:function(date,which){if(!which||which=='date')
this.date=date;if(!which||which=='view')
this.viewDate=date;this.fill();this.setValue();this.element.trigger({type:'changeDate',date:this.date});var element;if(this.isInput){element=this.element;}else if(this.component){element=this.element.find('input');}
if(element){element.change();if(this.autoclose&&(!which||which=='date')){}}},moveHour:function(date,dir){if(!dir)return date;var new_date=new Date(date.valueOf());dir=dir>0?1:-1;new_date.setUTCHours(new_date.getUTCHours()+dir);return new_date;},moveDate:function(date,dir){if(!dir)return date;var new_date=new Date(date.valueOf());dir=dir>0?1:-1;new_date.setUTCDate(new_date.getUTCDate()+dir);return new_date;},moveMonth:function(date,dir){if(!dir)return date;var new_date=new Date(date.valueOf()),day=new_date.getUTCDate(),month=new_date.getUTCMonth(),mag=Math.abs(dir),new_month,test;dir=dir>0?1:-1;if(mag==1){test=dir==-1
?function(){return new_date.getUTCMonth()==month;}
:function(){return new_date.getUTCMonth()!=new_month;};new_month=month+dir;new_date.setUTCMonth(new_month);if(new_month<0||new_month>11)
new_month=(new_month+12)%12;}else{for(var i=0;i<mag;i++)
new_date=this.moveMonth(new_date,dir);new_month=new_date.getUTCMonth();new_date.setUTCDate(day);test=function(){return new_month!=new_date.getUTCMonth();};}
while(test()){new_date.setUTCDate(--day);new_date.setUTCMonth(new_month);}
return new_date;},moveYear:function(date,dir){return this.moveMonth(date,dir*12);},dateWithinRange:function(date){return date>=this.startDate&&date<=this.endDate;},keydown:function(e){if(this.picker.is(':not(:visible)')){if(e.keyCode==27)
this.show();return;}
var dateChanged=false,dir,day,month,newDate,newViewDate;switch(e.keyCode){case 27:this.hide();e.preventDefault();break;case 37:case 39:if(!this.keyboardNavigation)break;dir=e.keyCode==37?-1:1;if(e.ctrlKey){newDate=this.moveYear(this.date,dir);newViewDate=this.moveYear(this.viewDate,dir);}else if(e.shiftKey){newDate=this.moveMonth(this.date,dir);newViewDate=this.moveMonth(this.viewDate,dir);}else{newDate=new Date(this.date.valueOf());newDate.setUTCDate(this.date.getUTCDate()+dir);newViewDate=new Date(this.viewDate.valueOf());newViewDate.setUTCDate(this.viewDate.getUTCDate()+dir);}
if(this.dateWithinRange(newDate)){this.date=newDate;this.viewDate=newViewDate;this.setValue();this.update();e.preventDefault();dateChanged=true;}
break;case 38:case 40:if(!this.keyboardNavigation)break;dir=e.keyCode==38?-1:1;if(e.ctrlKey){newDate=this.moveYear(this.date,dir);newViewDate=this.moveYear(this.viewDate,dir);}else if(e.shiftKey){newDate=this.moveMonth(this.date,dir);newViewDate=this.moveMonth(this.viewDate,dir);}else{newDate=new Date(this.date.valueOf());newDate.setUTCDate(this.date.getUTCDate()+dir*7);newViewDate=new Date(this.viewDate.valueOf());newViewDate.setUTCDate(this.viewDate.getUTCDate()+dir*7);}
if(this.dateWithinRange(newDate)){this.date=newDate;this.viewDate=newViewDate;this.setValue();this.update();e.preventDefault();dateChanged=true;}
break;case 13:this.hide();e.preventDefault();break;case 9:this.hide();break;}
if(dateChanged){this.element.trigger({type:'changeDate',date:this.date});var element;if(this.isInput){element=this.element;}else if(this.component){element=this.element.find('input');}
if(element){element.change();}}},showMode:function(dir){if(dir){var newViewMode=Math.max(0,Math.min(DPGlobal.modes.length-1,this.viewMode+dir));if(newViewMode>=this.minView&&newViewMode<=this.maxView){this.viewMode=newViewMode;}}
this.picker.find('>div').hide().filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName).css('display','block');this.updateNavArrows();},reset:function(e){this._setDate(null,'date');}};$.fn.fdatepicker=function(option){var args=Array.apply(null,arguments);args.shift();return this.each(function(){var $this=$(this),data=$this.data('datepicker'),options=typeof option=='object'&&option;if(!data){$this.data('datepicker',(data=new Datepicker(this,$.extend({},$.fn.fdatepicker.defaults,options))));}
if(typeof option=='string'&&typeof data[option]=='function'){data[option].apply(data,args);}});};$.fn.fdatepicker.defaults={onRender:function(date){return'';}};$.fn.fdatepicker.Constructor=Datepicker;var dates=$.fn.fdatepicker.dates={'en':{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",titleFormat:"MM yyyy"}};var DPGlobal={modes:[{clsName:'minutes',navFnc:'Hours',navStep:1},{clsName:'hours',navFnc:'Date',navStep:1},{clsName:'days',navFnc:'Month',navStep:1},{clsName:'months',navFnc:'FullYear',navStep:1},{clsName:'years',navFnc:'FullYear',navStep:10}],isLeapYear:function(year){return(((year%4===0)&&(year%100!==0))||(year%400===0));},getDaysInMonth:function(year,month){return[31,(DPGlobal.isLeapYear(year)?29:28),31,30,31,30,31,31,30,31,30,31][month];},validParts:/hh?|ii?|ss?|dd?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(format){var separators=format.replace(this.validParts,'\0').split('\0'),parts=format.match(this.validParts);if(!separators||!separators.length||!parts||parts.length===0){throw new Error("Invalid date format.");}
return{separators:separators,parts:parts};},parseDate:function(date,format,language){if(date instanceof Date)return new Date(date.valueOf()-date.getTimezoneOffset()*60000);if(/^\d{4}\-\d{1,2}\-\d{1,2}$/.test(date)){format=this.parseFormat('yyyy-mm-dd');}
if(/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}$/.test(date)){format=this.parseFormat('yyyy-mm-dd hh:ii');}
if(/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}\:\d{1,2}[Z]{0,1}$/.test(date)){format=this.parseFormat('yyyy-mm-dd hh:ii:ss');}
if(/^[-+]\d+[dmwy]([\s,]+[-+]\d+[dmwy])*$/.test(date)){var part_re=/([-+]\d+)([dmwy])/,parts=date.match(/([-+]\d+)([dmwy])/g),part,dir;date=new Date();for(var i=0;i<parts.length;i++){part=part_re.exec(parts[i]);dir=parseInt(part[1]);switch(part[2]){case'd':date.setUTCDate(date.getUTCDate()+dir);break;case'm':date=Datetimepicker.prototype.moveMonth.call(Datetimepicker.prototype,date,dir);break;case'w':date.setUTCDate(date.getUTCDate()+dir*7);break;case'y':date=Datetimepicker.prototype.moveYear.call(Datetimepicker.prototype,date,dir);break;}}
return UTCDate(date.getUTCFullYear(),date.getUTCMonth(),date.getUTCDate(),date.getUTCHours(),date.getUTCMinutes(),date.getUTCSeconds());}
var parts=date&&date.match(this.nonpunctuation)||[],date=new Date(),parsed={},setters_order=['hh','h','ii','i','ss','s','yyyy','yy','M','MM','m','mm','d','dd'],setters_map={hh:function(d,v){return d.setUTCHours(v);},h:function(d,v){return d.setUTCHours(v);},ii:function(d,v){return d.setUTCMinutes(v);},i:function(d,v){return d.setUTCMinutes(v);},ss:function(d,v){return d.setUTCSeconds(v);},s:function(d,v){return d.setUTCSeconds(v);},yyyy:function(d,v){return d.setUTCFullYear(v);},yy:function(d,v){return d.setUTCFullYear(2000+v);},m:function(d,v){v-=1;while(v<0)v+=12;v%=12;d.setUTCMonth(v);while(d.getUTCMonth()!=v)
d.setUTCDate(d.getUTCDate()-1);return d;},d:function(d,v){return d.setUTCDate(v);}},val,filtered,part;setters_map['M']=setters_map['MM']=setters_map['mm']=setters_map['m'];setters_map['dd']=setters_map['d'];date=UTCDate(date.getFullYear(),date.getMonth(),date.getDate(),0,0,0);if(parts.length==format.parts.length){for(var i=0,cnt=format.parts.length;i<cnt;i++){val=parseInt(parts[i],10);part=format.parts[i];if(isNaN(val)){switch(part){case'MM':filtered=$(dates[language].months).filter(function(){var m=this.slice(0,parts[i].length),p=parts[i].slice(0,m.length);return m==p;});val=$.inArray(filtered[0],dates[language].months)+1;break;case'M':filtered=$(dates[language].monthsShort).filter(function(){var m=this.slice(0,parts[i].length),p=parts[i].slice(0,m.length);return m==p;});val=$.inArray(filtered[0],dates[language].monthsShort)+1;break;}}
parsed[part]=val;}
for(var i=0,s;i<setters_order.length;i++){s=setters_order[i];if(s in parsed&&!isNaN(parsed[s]))
setters_map[s](date,parsed[s])}}
return date;},formatDate:function(date,format,language){if(date==null){return'';}
var val={h:date.getUTCHours(),i:date.getUTCMinutes(),s:date.getUTCSeconds(),d:date.getUTCDate(),m:date.getUTCMonth()+1,M:dates[language].monthsShort[date.getUTCMonth()],MM:dates[language].months[date.getUTCMonth()],yy:date.getUTCFullYear().toString().substring(2),yyyy:date.getUTCFullYear()};val.hh=(val.h<10?'0':'')+val.h;val.ii=(val.i<10?'0':'')+val.i;val.ss=(val.s<10?'0':'')+val.s;val.dd=(val.d<10?'0':'')+val.d;val.mm=(val.m<10?'0':'')+val.m;var date=[],seps=$.extend([],format.separators);for(var i=0,cnt=format.parts.length;i<cnt;i++){if(seps.length)
date.push(seps.shift())
date.push(val[format.parts[i]]);}
return date.join('');},convertViewMode:function(viewMode){switch(viewMode){case 4:case'decade':viewMode=4;break;case 3:case'year':viewMode=3;break;case 2:case'month':viewMode=2;break;case 1:case'day':viewMode=1;break;case 0:case'hour':viewMode=0;break;}
return viewMode;},headTemplate:'<thead>'+
'<tr>'+
'<th class="prev"><i class="fa fa-chevron-left fi-arrow-left"/></th>'+
'<th colspan="5" class="date-switch"></th>'+
'<th class="next"><i class="fa fa-chevron-right fi-arrow-right"/></th>'+
'</tr>'+
'</thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr></tfoot>'};DPGlobal.template='<div class="datepicker">'+
'<div class="datepicker-minutes">'+
'<table class=" table-condensed">'+
DPGlobal.headTemplate+
DPGlobal.contTemplate+
DPGlobal.footTemplate+
'</table>'+
'</div>'+
'<div class="datepicker-hours">'+
'<table class=" table-condensed">'+
DPGlobal.headTemplate+
DPGlobal.contTemplate+
DPGlobal.footTemplate+
'</table>'+
'</div>'+
'<div class="datepicker-days">'+
'<table class=" table-condensed">'+
DPGlobal.headTemplate+
'<tbody></tbody>'+
DPGlobal.footTemplate+
'</table>'+
'</div>'+
'<div class="datepicker-months">'+
'<table class="table-condensed">'+
DPGlobal.headTemplate+
DPGlobal.contTemplate+
DPGlobal.footTemplate+
'</table>'+
'</div>'+
'<div class="datepicker-years">'+
'<table class="table-condensed">'+
DPGlobal.headTemplate+
DPGlobal.contTemplate+
DPGlobal.footTemplate+
'</table>'+
'</div>'+
'<a class="button datepicker-close tiny alert right" style="width:auto;"><i class="fa fa-remove fa-times fi-x"></i></a>'+
'</div>';$.fn.fdatepicker.DPGlobal=DPGlobal;}(window.jQuery);