From c7e0e25400d204149e86a6d06874100ca8b73aae Mon Sep 17 00:00:00 2001 From: pg Date: Fri, 16 Oct 2015 13:43:20 +0200 Subject: [PATCH] initial commit --- .gitignore | 4 + assets/app.js | 99 ++++++ assets/css/style.css | 111 +++++++ assets/js/foundation.js | 387 ++++++++++++++++++++++++ assets/js/jquery-1.11.3.min.js | 5 + assets/js/wavesurfer.min.js | 5 + assets/js/wavesurfer.spectrogram.min.js | 3 + assets/wavesurfer.min.js | 5 + first_insert.js | 71 +++++ index.js | 34 +++ mydb.sqlite | Bin 0 -> 5120 bytes package.json | 16 + views/index.jade | 19 ++ views/mixin.jade | 24 ++ views/page.jade | 7 + yourdb/000003.log | Bin 0 -> 746 bytes yourdb/CURRENT | 1 + yourdb/LOCK | 0 yourdb/LOG | 1 + yourdb/MANIFEST-000002 | Bin 0 -> 50 bytes 20 files changed, 792 insertions(+) create mode 100644 .gitignore create mode 100644 assets/app.js create mode 100644 assets/css/style.css create mode 100644 assets/js/foundation.js create mode 100644 assets/js/jquery-1.11.3.min.js create mode 100644 assets/js/wavesurfer.min.js create mode 100644 assets/js/wavesurfer.spectrogram.min.js create mode 100644 assets/wavesurfer.min.js create mode 100644 first_insert.js create mode 100644 index.js create mode 100644 mydb.sqlite create mode 100644 package.json create mode 100644 views/index.jade create mode 100644 views/mixin.jade create mode 100644 views/page.jade create mode 100644 yourdb/000003.log create mode 100644 yourdb/CURRENT create mode 100644 yourdb/LOCK create mode 100644 yourdb/LOG create mode 100644 yourdb/MANIFEST-000002 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..685f24f --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +assets/audio_files/* +node_modules/* +*.swp +.git diff --git a/assets/app.js b/assets/app.js new file mode 100644 index 0000000..208f007 --- /dev/null +++ b/assets/app.js @@ -0,0 +1,99 @@ + + + +/*$( document ).ready(function() { +// var wavesurfer = Object.create(WaveSurfer); + console.log(emissions) + $("[id=^waveform_]").each(function(){ + ; + //createAudioView( "#{e.url}", "waveform_#{i}")} + }) +}) +*/ +var createAudioView = function ( url, id ) { + var wavesurfer = Object.create(WaveSurfer); + console.log(id) + wavesurfer.init({ + container: document.querySelector(id), + backend: 'MediaElement', + waveColor: 'violet', + progressColor: 'purple', + height: 120 + }); + console.log(wavesurfer) + wavesurfer.load(url) + +} +/* + +// Init on DOM ready +document.addEventListener('DOMContentLoaded', function () { + wavesurfer.init({ + container: '#waveform', + waveColor: 'violet', + progressColor: 'purple', + height: 120 + }); +}); + + +// Bind controls +document.addEventListener('DOMContentLoaded', function () { + var playPause = document.querySelector('#playPause'); + playPause.addEventListener('click', function () { + wavesurfer.playPause(); + }); + + // Toggle play/pause text + wavesurfer.on('play', function () { + document.querySelector('#play').style.display = 'none'; + document.querySelector('#pause').style.display = ''; + }); + wavesurfer.on('pause', function () { + document.querySelector('#play').style.display = ''; + document.querySelector('#pause').style.display = 'none'; + }); + + + // The playlist links + var links = document.querySelectorAll('#playlist a'); + var currentTrack = 0; + + // Load a track by index and highlight the corresponding link + var setCurrentSong = function (index) { + links[currentTrack].classList.remove('active'); + currentTrack = index; + links[currentTrack].classList.add('active'); + wavesurfer.load(links[currentTrack].href); + }; + + // Load the track on click + Array.prototype.forEach.call(links, function (link, index) { + link.addEventListener('click', function (e) { + e.preventDefault(); + setCurrentSong(index); + }); + }); + + // Play on audio load + wavesurfer.on('ready', function () { + wavesurfer.play(); + }); + + // Go to the next track on finish + wavesurfer.on('finish', function () { + setCurrentSong((currentTrack + 1) % links.length); + }); + + // Load the first track + setCurrentSong(currentTrack); + + var request = $.ajax({ + url: "/emissions/all", + method: "GET", + dataType: "json" + }).done(function (msg){ console.log(msg)}) + +}); + +*/ diff --git a/assets/css/style.css b/assets/css/style.css new file mode 100644 index 0000000..5cc8e0f --- /dev/null +++ b/assets/css/style.css @@ -0,0 +1,111 @@ +/* Space out content a bit */ +body { + padding-top: 20px; + padding-bottom: 20px; +} + +/* Everything but the jumbotron gets side spacing for mobile first views */ +.header, +.marketing, +.footer { + padding-left: 15px; + padding-right: 15px; +} + +/* Custom page header */ +.header { + border-bottom: 1px solid #e5e5e5; +} + +/* Make the masthead heading the same height as the navigation */ +.header h3 { + margin-top: 0; + margin-bottom: 0; + line-height: 40px; + padding-bottom: 19px; +} + +/* Custom page footer */ +.footer { + padding-top: 19px; + color: #777; + border-top: 1px solid #e5e5e5; +} + +/* Customize container */ +@media (min-width: 1024px) { + .container { + max-width: 900px; + } +} + +.container-narrow > hr { + margin: 30px 0; +} + +/* Supporting marketing content */ +.marketing { + margin: 40px 0; +} + +.marketing p + h4 { + margin-top: 28px; +} + +/* Responsive: Portrait tablets and up */ +@media screen and (min-width: 768px) { + /* Remove the padding we set earlier */ + .header, + .marketing, + .footer { + padding-left: 0; + padding-right: 0; + } + /* Space out the masthead */ + .header { + margin-bottom: 30px; + } +} + +.controls { + padding: 30px 0 15px; + text-align: center; +} + +.controls .btn { + margin-bottom: 15px; +} + +@media screen and (min-width: 990px) { + .controls .mark-controls { + display: inline; + } +} + +.lead { + text-align: center; + padding: 20px; +} + +#waveform { + position: relative; +} + +#progress-bar { + position: absolute; + z-index: 10; + top: 50%; + margin-top: -10px; + left: 5%; + width: 90%; +} + +#drop { + border: 3px dashed #ddd; + padding: 30px; +} + +#drop.wavesurfer-dragover { + border-color: #333; +} + diff --git a/assets/js/foundation.js b/assets/js/foundation.js new file mode 100644 index 0000000..6530bae --- /dev/null +++ b/assets/js/foundation.js @@ -0,0 +1,387 @@ +(function($,window,document,undefined){'use strict';var header_helpers=function(class_array){var head=$('head');head.prepend($.map(class_array,function(class_name){if(head.has('.'+ class_name).length===0){return'';}}));};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);}};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').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('');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.abide={name:'abide',version:'5.5.3',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){var id=this.getAttribute('id'),eqTo=form.find('[data-equalto="'+ id+'"]');if(settings.validate_on_blur&&settings.validate_on_blur===true){validate(this,e);} +if(typeof eqTo.get(0)!=="undefined"&&eqTo.val().length){validate(eqTo.get(0),e);} +if(settings.validate_on==='change'){validate(this,e);}}).on('keydown.fndtn.abide',function(e){var id=this.getAttribute('id'),eqTo=form.find('[data-equalto="'+ id+'"]');if(settings.live_validate&&settings.live_validate===true&&e.which!=9){validate(this,e);} +if(typeof eqTo.get(0)!=="undefined"&&eqTo.val().length){validate(eqTo.get(0),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;i0){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=[];if(i==0){return validations;} +var 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;iv0&&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;i0&&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.3',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).addClass(settings.active_class).children('a').attr('aria-expanded','true');if(settings.multi_expand){$instance.attr('aria-multiselectable','true');}},toggle:function(options){var options=typeof options!=='undefined'?options:{};var selector=typeof options.selector!=='undefined'?options.selector:'';var toggle_state=typeof options.toggle_state!=='undefined'?options.toggle_state:'';var $accordion=typeof options.$accordion!=='undefined'?options.$accordion:this.S(this.scope).closest('['+ this.attr_name()+']');var $items=$accordion.find('> dd'+ selector+', > li'+ selector);if($items.length<1){if(window.console){console.error('Selection not found.',selector);} +return false;} +var S=this.S;var active_class=this.settings.active_class;$items.each(function(){var $item=S(this);var is_active=$item.hasClass(active_class);if((is_active&&toggle_state==='close')||(!is_active&&toggle_state==='open')||toggle_state===''){$item.find('> a').trigger('click.fndtn.accordion');}});},open:function(options){var options=typeof options!=='undefined'?options:{};options.toggle_state='open';this.toggle(options);},close:function(options){var options=typeof options!=='undefined'?options:{};options.toggle_state='close';this.toggle(options);},off:function(){},reflow:function(){}};}(jQuery,window,window.document));;(function($,window,document,undefined){'use strict';Foundation.libs.alert={name:'alert',version:'5.5.3',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.3',settings:{templates:{viewing:'×'+''+''+''},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')&¤t[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)');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:'',viewing:settings.templates.viewing},wrapper='
'+ data.viewing+ +data.grid+'
',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){var containerPlain=container.get(0);containerPlain.innerHTML=caption;container.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.dropdown={name:'dropdown',version:'5.5.3',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,s){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;var windowWidth=window.innerWidth;if(document.getElementsByClassName('row')[0]){actualBodyWidth=document.getElementsByClassName('row')[0].clientWidth;}else{actualBodyWidth=windowWidth;} +var actualMarginWidth=(windowWidth- actualBodyWidth)/ 2; +var actualBoundary=actualBodyWidth;if(!this.hasClass('mega')&&!s.ignore_repositioning){var outerWidth=this.outerWidth();var o_left=t.offset().left;if(t.offset().top<=this.outerHeight()){p.missTop=true;actualBoundary=windowWidth- actualMarginWidth;p.leftRightFlag=true;} +if(o_left+ outerWidth>o_left+ actualMarginWidth&&o_left- actualMarginWidth>outerWidth){p.missRight=true;p.missLeft=false;} +if(o_left- 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,s);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()0){var el=this.S('['+ this.add_namespace('data-uuid')+'="'+ uuid+'"]');while(count--){var mq,rule=scenarios[count][2];if(this.settings.named_queries.hasOwnProperty(rule)){mq=matchMedia(this.settings.named_queries[rule]);}else{mq=matchMedia(rule);} +if(mq.matches){return{el:el,scenario:scenarios[count]};}}} +return false;},load:function(type,force_update){if(typeof this['cached_'+ type]==='undefined'||force_update){this['update_'+ type]();} +return this['cached_'+ type];},update_images:function(){var images=this.S('img['+ this.data_attr+']'),count=images.length,i=count,loaded_count=0,data_attr=this.data_attr;this.cache={};this.cached_images=[];this.images_loaded=(count===0);while(i--){loaded_count++;if(images[i]){var str=images[i].getAttribute(data_attr)||'';if(str.length>0){this.cached_images.push(images[i]);}} +if(loaded_count===count){this.images_loaded=true;this.enhance('images');}} +return this;},update_nodes:function(){var nodes=this.S('['+ this.data_attr+']').not('img'),count=nodes.length,i=count,loaded_count=0,data_attr=this.data_attr;this.cached_nodes=[];this.nodes_loaded=(count===0);while(i--){loaded_count++;var str=nodes[i].getAttribute(data_attr)||'';if(str.length>0){this.cached_nodes.push(nodes[i]);} +if(loaded_count===count){this.nodes_loaded=true;this.enhance('nodes');}} +return this;},enhance:function(type){var i=this['cached_'+ type].length;while(i--){this.object($(this['cached_'+ type][i]));} +return $(window).trigger('resize.fndtn.interchange');},convert_directive:function(directive){var trimmed=this.trim(directive);if(trimmed.length>0){return trimmed;} +return'replace';},parse_scenario:function(scenario){var directive_match=scenario[0].match(/(.+),\s*(\w+)\s*$/),media_query=scenario[1].match(/(.*)\)/);if(directive_match){var path=directive_match[1],directive=directive_match[2];}else{var cached_split=scenario[0].split(/,\s*$/),path=cached_split[0],directive='';} +return[this.trim(path),this.convert_directive(directive),this.trim(media_query[1])];},object:function(el){var raw_arr=this.parse_data_attr(el),scenarios=[],i=raw_arr.length;if(i>0){while(i--){var scenario=raw_arr[i].split(/,\s?\(/);if(scenario.length>1){var params=this.parse_scenario(scenario);scenarios.push(params);}}} +return this.store(el,scenarios);},store:function(el,scenarios){var uuid=this.random_str(),current_uuid=el.data(this.add_namespace('uuid',true));if(this.cache[current_uuid]){return this.cache[current_uuid];} +el.attr(this.add_namespace('data-uuid'),uuid);return this.cache[uuid]=scenarios;},trim:function(str){if(typeof str==='string'){return $.trim(str);} +return str;},set_data_attr:function(init){if(init){if(this.namespace.length>0){return this.namespace+'-'+ this.settings.load_attr;} +return this.settings.load_attr;} +if(this.namespace.length>0){return'data-'+ this.namespace+'-'+ this.settings.load_attr;} +return'data-'+ this.settings.load_attr;},parse_data_attr:function(el){var raw=el.attr(this.attr_name()).split(/\[(.*?)\]/),i=raw.length,output=[];while(i--){if(raw[i].replace(/[\W\d]+/,'').length>4){output.push(raw[i]);}} +return output;},reflow:function(){this.load('images',true);this.load('nodes',true);}};}(jQuery,window,window.document));;(function($,window,document,undefined){'use strict';var Modernizr=Modernizr||false;Foundation.libs.joyride={name:'joyride',version:'5.5.3',defaults:{expose:false,modal:true,keyboard:true,tip_location:'bottom',nub_position:'auto',scroll_speed:1500,scroll_animation:'linear',timer:0,start_timer_on_click:true,start_offset:0,next_button:true,prev_button:true,tip_animation:'fade',pause_after:[],exposed:[],tip_animation_fade_speed:300,cookie_monster:false,cookie_name:'joyride',cookie_domain:false,cookie_expires:365,tip_container:'body',abort_on_close:true,tip_location_patterns:{top:['bottom'],bottom:[],left:['right','top','bottom'],right:['left','top','bottom']},post_ride_callback:function(){},post_step_callback:function(){},pre_step_callback:function(){},pre_ride_callback:function(){},post_expose_callback:function(){},template:{link:'×',timer:'
',tip:'
',wrapper:'
',button:'',prev_button:'',modal:'
',expose:'
',expose_cover:'
'},expose_add_class:''},init:function(scope,method,options){Foundation.inherit(this,'throttle random_str');this.settings=this.settings||$.extend({},this.defaults,(options||method));this.bindings(method,options)},go_next:function(){if(this.settings.$li.next().length<1){this.end();}else if(this.settings.timer>0){clearTimeout(this.settings.automate);this.hide();this.show();this.startTimer();}else{this.hide();this.show();}},go_prev:function(){if(this.settings.$li.prev().length<1){}else if(this.settings.timer>0){clearTimeout(this.settings.automate);this.hide();this.show(null,true);this.startTimer();}else{this.hide();this.show(null,true);}},events:function(){var self=this;$(this.scope).off('.joyride').on('click.fndtn.joyride','.joyride-next-tip, .joyride-modal-bg',function(e){e.preventDefault();this.go_next()}.bind(this)).on('click.fndtn.joyride','.joyride-prev-tip',function(e){e.preventDefault();this.go_prev();}.bind(this)).on('click.fndtn.joyride','.joyride-close-tip',function(e){e.preventDefault();this.end(this.settings.abort_on_close);}.bind(this)).on('keyup.fndtn.joyride',function(e){if(!this.settings.keyboard||!this.settings.riding){return;} +switch(e.which){case 39:e.preventDefault();this.go_next();break;case 37:e.preventDefault();this.go_prev();break;case 27:e.preventDefault();this.end(this.settings.abort_on_close);}}.bind(this));$(window).off('.joyride').on('resize.fndtn.joyride',self.throttle(function(){if($('['+ self.attr_name()+']').length>0&&self.settings.$next_tip&&self.settings.riding){if(self.settings.exposed.length>0){var $els=$(self.settings.exposed);$els.each(function(){var $this=$(this);self.un_expose($this);self.expose($this);});} +if(self.is_phone()){self.pos_phone();}else{self.pos_default(false);}}},100));},start:function(){var self=this,$this=$('['+ this.attr_name()+']',this.scope),integer_settings=['timer','scrollSpeed','startOffset','tipAnimationFadeSpeed','cookieExpires'],int_settings_count=integer_settings.length;if(!$this.length>0){return;} +if(!this.settings.init){this.events();} +this.settings=$this.data(this.attr_name(true)+'-init');this.settings.$content_el=$this;this.settings.$body=$(this.settings.tip_container);this.settings.body_offset=$(this.settings.tip_container).position();this.settings.$tip_content=this.settings.$content_el.find('> li');this.settings.paused=false;this.settings.attempts=0;this.settings.riding=true;if(typeof $.cookie!=='function'){this.settings.cookie_monster=false;} +if(!this.settings.cookie_monster||this.settings.cookie_monster&&!$.cookie(this.settings.cookie_name)){this.settings.$tip_content.each(function(index){var $this=$(this);this.settings=$.extend({},self.defaults,self.data_options($this));var i=int_settings_count;while(i--){self.settings[integer_settings[i]]=parseInt(self.settings[integer_settings[i]],10);} +self.create({$li:$this,index:index});});if(!this.settings.start_timer_on_click&&this.settings.timer>0){this.show('init');this.startTimer();}else{this.show('init');}}},resume:function(){this.set_li();this.show();},tip_template:function(opts){var $blank,content;opts.tip_class=opts.tip_class||'';$blank=$(this.settings.template.tip).addClass(opts.tip_class);content=$.trim($(opts.li).html())+ +this.prev_button_text(opts.prev_button_text,opts.index)+ +this.button_text(opts.button_text)+ +this.settings.template.link+ +this.timer_instance(opts.index);$blank.append($(this.settings.template.wrapper));$blank.first().attr(this.add_namespace('data-index'),opts.index);$('.joyride-content-wrapper',$blank).append(content);return $blank[0];},timer_instance:function(index){var txt;if((index===0&&this.settings.start_timer_on_click&&this.settings.timer>0)||this.settings.timer===0){txt='';}else{txt=$(this.settings.template.timer)[0].outerHTML;} +return txt;},button_text:function(txt){if(this.settings.tip_settings.next_button){txt=$.trim(txt)||'Next';txt=$(this.settings.template.button).append(txt)[0].outerHTML;}else{txt='';} +return txt;},prev_button_text:function(txt,idx){if(this.settings.tip_settings.prev_button){txt=$.trim(txt)||'Previous';if(idx==0){txt=$(this.settings.template.prev_button).append(txt).addClass('disabled')[0].outerHTML;}else{txt=$(this.settings.template.prev_button).append(txt)[0].outerHTML;}}else{txt='';} +return txt;},create:function(opts){this.settings.tip_settings=$.extend({},this.settings,this.data_options(opts.$li));var buttonText=opts.$li.attr(this.add_namespace('data-button'))||opts.$li.attr(this.add_namespace('data-text')),prevButtonText=opts.$li.attr(this.add_namespace('data-button-prev'))||opts.$li.attr(this.add_namespace('data-prev-text')),tipClass=opts.$li.attr('class'),$tip_content=$(this.tip_template({tip_class:tipClass,index:opts.index,button_text:buttonText,prev_button_text:prevButtonText,li:opts.$li}));$(this.settings.tip_container).append($tip_content);},show:function(init,is_prev){var $timer=null;if(this.settings.$li===undefined||($.inArray(this.settings.$li.index(),this.settings.pause_after)===-1)){if(this.settings.paused){this.settings.paused=false;}else{this.set_li(init,is_prev);} +this.settings.attempts=0;if(this.settings.$li.length&&this.settings.$target.length>0){if(init){this.settings.pre_ride_callback(this.settings.$li.index(),this.settings.$next_tip);if(this.settings.modal){this.show_modal();}} +this.settings.pre_step_callback(this.settings.$li.index(),this.settings.$next_tip);if(this.settings.modal&&this.settings.expose){this.expose();} +this.settings.tip_settings=$.extend({},this.settings,this.data_options(this.settings.$li));this.settings.timer=parseInt(this.settings.timer,10);this.settings.tip_settings.tip_location_pattern=this.settings.tip_location_patterns[this.settings.tip_settings.tip_location];if(!/body/i.test(this.settings.$target.selector)&&!this.settings.expose){var joyridemodalbg=$('.joyride-modal-bg');if(/pop/i.test(this.settings.tipAnimation)){joyridemodalbg.hide();}else{joyridemodalbg.fadeOut(this.settings.tipAnimationFadeSpeed);} +this.scroll_to();} +if(this.is_phone()){this.pos_phone(true);}else{this.pos_default(true);} +$timer=this.settings.$next_tip.find('.joyride-timer-indicator');if(/pop/i.test(this.settings.tip_animation)){$timer.width(0);if(this.settings.timer>0){this.settings.$next_tip.show();setTimeout(function(){$timer.animate({width:$timer.parent().width()},this.settings.timer,'linear');}.bind(this),this.settings.tip_animation_fade_speed);}else{this.settings.$next_tip.show();}}else if(/fade/i.test(this.settings.tip_animation)){$timer.width(0);if(this.settings.timer>0){this.settings.$next_tip.fadeIn(this.settings.tip_animation_fade_speed).show();setTimeout(function(){$timer.animate({width:$timer.parent().width()},this.settings.timer,'linear');}.bind(this),this.settings.tip_animation_fade_speed);}else{this.settings.$next_tip.fadeIn(this.settings.tip_animation_fade_speed);}} +this.settings.$current_tip=this.settings.$next_tip;}else if(this.settings.$li&&this.settings.$target.length<1){this.show(init,is_prev);}else{this.end();}}else{this.settings.paused=true;}},is_phone:function(){return matchMedia(Foundation.media_queries.small).matches&&!matchMedia(Foundation.media_queries.medium).matches;},hide:function(){if(this.settings.modal&&this.settings.expose){this.un_expose();} +if(!this.settings.modal){$('.joyride-modal-bg').hide();} +this.settings.$current_tip.css('visibility','hidden');setTimeout($.proxy(function(){this.hide();this.css('visibility','visible');},this.settings.$current_tip),0);this.settings.post_step_callback(this.settings.$li.index(),this.settings.$current_tip);},set_li:function(init,is_prev){if(init){this.settings.$li=this.settings.$tip_content.eq(this.settings.start_offset);this.set_next_tip();this.settings.$current_tip=this.settings.$next_tip;}else{if(is_prev){this.settings.$li=this.settings.$li.prev();}else{this.settings.$li=this.settings.$li.next();} +this.set_next_tip();} +this.set_target();},set_next_tip:function(){this.settings.$next_tip=$('.joyride-tip-guide').eq(this.settings.$li.index());this.settings.$next_tip.data('closed','');},set_target:function(){var cl=this.settings.$li.attr(this.add_namespace('data-class')),id=this.settings.$li.attr(this.add_namespace('data-id')),$sel=function(){if(id){return $(document.getElementById(id));}else if(cl){return $('.'+ cl).first();}else{return $('body');}};this.settings.$target=$sel();},scroll_to:function(){var window_half,tipOffset;window_half=$(window).height()/ 2; +tipOffset=Math.ceil(this.settings.$target.offset().top- window_half+ this.settings.$next_tip.outerHeight());if(tipOffset!=0){$('html, body').stop().animate({scrollTop:tipOffset},this.settings.scroll_speed,'swing');}},paused:function(){return($.inArray((this.settings.$li.index()+ 1),this.settings.pause_after)===-1);},restart:function(){this.hide();this.settings.$li=undefined;this.show('init');},pos_default:function(init){var $nub=this.settings.$next_tip.find('.joyride-nub'),nub_width=Math.ceil($nub.outerWidth()/ 2), +nub_height=Math.ceil($nub.outerHeight()/ 2), +toggle=init||false;if(toggle){this.settings.$next_tip.css('visibility','hidden');this.settings.$next_tip.show();} +if(!/body/i.test(this.settings.$target.selector)){var topAdjustment=this.settings.tip_settings.tipAdjustmentY?parseInt(this.settings.tip_settings.tipAdjustmentY):0,leftAdjustment=this.settings.tip_settings.tipAdjustmentX?parseInt(this.settings.tip_settings.tipAdjustmentX):0;if(this.bottom()){if(this.rtl){this.settings.$next_tip.css({top:(this.settings.$target.offset().top+ nub_height+ this.settings.$target.outerHeight()+ topAdjustment),left:this.settings.$target.offset().left+ this.settings.$target.outerWidth()- this.settings.$next_tip.outerWidth()+ leftAdjustment});}else{this.settings.$next_tip.css({top:(this.settings.$target.offset().top+ nub_height+ this.settings.$target.outerHeight()+ topAdjustment),left:this.settings.$target.offset().left+ leftAdjustment});} +this.nub_position($nub,this.settings.tip_settings.nub_position,'top');}else if(this.top()){if(this.rtl){this.settings.$next_tip.css({top:(this.settings.$target.offset().top- this.settings.$next_tip.outerHeight()- nub_height+ topAdjustment),left:this.settings.$target.offset().left+ this.settings.$target.outerWidth()- this.settings.$next_tip.outerWidth()});}else{this.settings.$next_tip.css({top:(this.settings.$target.offset().top- this.settings.$next_tip.outerHeight()- nub_height+ topAdjustment),left:this.settings.$target.offset().left+ leftAdjustment});} +this.nub_position($nub,this.settings.tip_settings.nub_position,'bottom');}else if(this.right()){this.settings.$next_tip.css({top:this.settings.$target.offset().top+ topAdjustment,left:(this.settings.$target.outerWidth()+ this.settings.$target.offset().left+ nub_width+ leftAdjustment)});this.nub_position($nub,this.settings.tip_settings.nub_position,'left');}else if(this.left()){this.settings.$next_tip.css({top:this.settings.$target.offset().top+ topAdjustment,left:(this.settings.$target.offset().left- this.settings.$next_tip.outerWidth()- nub_width+ leftAdjustment)});this.nub_position($nub,this.settings.tip_settings.nub_position,'right');} +if(!this.visible(this.corners(this.settings.$next_tip))&&this.settings.attempts0&&arguments[0]instanceof $){el=arguments[0];}else if(this.settings.$target&&!/body/i.test(this.settings.$target.selector)){el=this.settings.$target;}else{return false;} +if(el.length<1){if(window.console){console.error('element not valid',el);} +return false;} +expose=$(this.settings.template.expose);this.settings.$body.append(expose);expose.css({top:el.offset().top,left:el.offset().left,width:el.outerWidth(true),height:el.outerHeight(true)});exposeCover=$(this.settings.template.expose_cover);origCSS={zIndex:el.css('z-index'),position:el.css('position')};origClasses=el.attr('class')==null?'':el.attr('class');el.css('z-index',parseInt(expose.css('z-index'))+ 1);if(origCSS.position=='static'){el.css('position','relative');} +el.data('expose-css',origCSS);el.data('orig-class',origClasses);el.attr('class',origClasses+' '+ this.settings.expose_add_class);exposeCover.css({top:el.offset().top,left:el.offset().left,width:el.outerWidth(true),height:el.outerHeight(true)});if(this.settings.modal){this.show_modal();} +this.settings.$body.append(exposeCover);expose.addClass(randId);exposeCover.addClass(randId);el.data('expose',randId);this.settings.post_expose_callback(this.settings.$li.index(),this.settings.$next_tip,el);this.add_exposed(el);},un_expose:function(){var exposeId,el,expose,origCSS,origClasses,clearAll=false;if(arguments.length>0&&arguments[0]instanceof $){el=arguments[0];}else if(this.settings.$target&&!/body/i.test(this.settings.$target.selector)){el=this.settings.$target;}else{return false;} +if(el.length<1){if(window.console){console.error('element not valid',el);} +return false;} +exposeId=el.data('expose');expose=$('.'+ exposeId);if(arguments.length>1){clearAll=arguments[1];} +if(clearAll===true){$('.joyride-expose-wrapper,.joyride-expose-cover').remove();}else{expose.remove();} +origCSS=el.data('expose-css');if(origCSS.zIndex=='auto'){el.css('z-index','');}else{el.css('z-index',origCSS.zIndex);} +if(origCSS.position!=el.css('position')){if(origCSS.position=='static'){el.css('position','');}else{el.css('position',origCSS.position);}} +origClasses=el.data('orig-class');el.attr('class',origClasses);el.removeData('orig-classes');el.removeData('expose');el.removeData('expose-z-index');this.remove_exposed(el);},add_exposed:function(el){this.settings.exposed=this.settings.exposed||[];if(el instanceof $||typeof el==='object'){this.settings.exposed.push(el[0]);}else if(typeof el=='string'){this.settings.exposed.push(el);}},remove_exposed:function(el){var search,i;if(el instanceof $){search=el[0]}else if(typeof el=='string'){search=el;} +this.settings.exposed=this.settings.exposed||[];i=this.settings.exposed.length;while(i--){if(this.settings.exposed[i]==search){this.settings.exposed.splice(i,1);return;}}},center:function(){var $w=$(window);this.settings.$next_tip.css({top:((($w.height()- this.settings.$next_tip.outerHeight())/ 2) + $w.scrollTop()), +left:((($w.width()- this.settings.$next_tip.outerWidth())/ 2) + $w.scrollLeft()) +});return true;},bottom:function(){return/bottom/i.test(this.settings.tip_settings.tip_location);},top:function(){return/top/i.test(this.settings.tip_settings.tip_location);},right:function(){return/right/i.test(this.settings.tip_settings.tip_location);},left:function(){return/left/i.test(this.settings.tip_settings.tip_location);},corners:function(el){if(el.length===0){return[false,false,false,false];} +var w=$(window),window_half=w.height()/ 2, +tipOffset=Math.ceil(this.settings.$target.offset().top- window_half+ this.settings.$next_tip.outerHeight()),right=w.width()+ w.scrollLeft(),offsetBottom=w.height()+ tipOffset,bottom=w.height()+ w.scrollTop(),top=w.scrollTop();if(tipOffsetbottom){bottom=offsetBottom;} +return[el.offset().topel.offset().left];},visible:function(hidden_corners){var i=hidden_corners.length;while(i--){if(hidden_corners[i]){return false;}} +return true;},nub_position:function(nub,pos,def){if(pos==='auto'){nub.addClass(def);}else{nub.addClass(pos);}},startTimer:function(){if(this.settings.$li.length){this.settings.automate=setTimeout(function(){this.hide();this.show();this.startTimer();}.bind(this),this.settings.timer);}else{clearTimeout(this.settings.automate);}},end:function(abort){if(this.settings.cookie_monster){$.cookie(this.settings.cookie_name,'ridden',{expires:this.settings.cookie_expires,domain:this.settings.cookie_domain});} +if(this.settings.timer>0){clearTimeout(this.settings.automate);} +if(this.settings.modal&&this.settings.expose){this.un_expose();} +$(this.scope).off('keyup.joyride') +this.settings.$next_tip.data('closed',true);this.settings.riding=false;$('.joyride-modal-bg').hide();this.settings.$current_tip.hide();if(typeof abort==='undefined'||abort===false){this.settings.post_step_callback(this.settings.$li.index(),this.settings.$current_tip);this.settings.post_ride_callback(this.settings.$li.index(),this.settings.$current_tip);} +$('.joyride-tip-guide').remove();},off:function(){$(this.scope).off('.joyride');$(window).off('.joyride');$('.joyride-close-tip, .joyride-next-tip, .joyride-modal-bg').off('.joyride');$('.joyride-tip-guide, .joyride-modal-bg').remove();clearTimeout(this.settings.automate);},reflow:function(){}};}(jQuery,window,window.document));;(function($,window,document,undefined){'use strict';Foundation.libs['magellan-expedition']={name:'magellan-expedition',version:'5.5.3',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+ anchor.search+'#'+ hash);}else{location.hash=anchor.pathname+ anchor.search+'#'+ 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_offsetb.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.offcanvas={name:'offcanvas',version:'5.5.3',settings:{open_method:'move',close_on_click:false},init:function(scope,method,options){this.bindings(method,options);},events:function(){var self=this,S=self.S,move_class='',right_postfix='',left_postfix='',top_postfix='',bottom_postfix='';if(this.settings.open_method==='move'){move_class='move-';right_postfix='right';left_postfix='left';top_postfix='top';bottom_postfix='bottom';}else if(this.settings.open_method==='overlap_single'){move_class='offcanvas-overlap-';right_postfix='right';left_postfix='left';top_postfix='top';bottom_postfix='bottom';}else if(this.settings.open_method==='overlap'){move_class='offcanvas-overlap';} +S(this.scope).off('.offcanvas').on('click.fndtn.offcanvas','.left-off-canvas-toggle',function(e){self.click_toggle_class(e,move_class+ right_postfix);if(self.settings.open_method!=='overlap'){S('.left-submenu').removeClass(move_class+ right_postfix);} +$('.left-off-canvas-toggle').attr('aria-expanded','true');}).on('click.fndtn.offcanvas','.left-off-canvas-menu a',function(e){var settings=self.get_settings(e);var parent=S(this).parent();if(settings.close_on_click&&!parent.hasClass('has-submenu')&&!parent.hasClass('back')){self.hide.call(self,move_class+ right_postfix,self.get_wrapper(e));parent.parent().removeClass(move_class+ right_postfix);}else if(S(this).parent().hasClass('has-submenu')){e.preventDefault();S(this).siblings('.left-submenu').toggleClass(move_class+ right_postfix);}else if(parent.hasClass('back')){e.preventDefault();parent.parent().removeClass(move_class+ right_postfix);} +$('.left-off-canvas-toggle').attr('aria-expanded','true');}).on('click.fndtn.offcanvas','.right-off-canvas-toggle',function(e){self.click_toggle_class(e,move_class+ left_postfix);if(self.settings.open_method!=='overlap'){S('.right-submenu').removeClass(move_class+ left_postfix);} +$('.right-off-canvas-toggle').attr('aria-expanded','true');}).on('click.fndtn.offcanvas','.right-off-canvas-menu a',function(e){var settings=self.get_settings(e);var parent=S(this).parent();if(settings.close_on_click&&!parent.hasClass('has-submenu')&&!parent.hasClass('back')){self.hide.call(self,move_class+ left_postfix,self.get_wrapper(e));parent.parent().removeClass(move_class+ left_postfix);}else if(S(this).parent().hasClass('has-submenu')){e.preventDefault();S(this).siblings('.right-submenu').toggleClass(move_class+ left_postfix);}else if(parent.hasClass('back')){e.preventDefault();parent.parent().removeClass(move_class+ left_postfix);} +$('.right-off-canvas-toggle').attr('aria-expanded','true');}).on('click.fndtn.offcanvas','.top-off-canvas-toggle',function(e){self.click_toggle_class(e,move_class+ bottom_postfix);if(self.settings.open_method!=='overlap'){S('.top-submenu').removeClass(move_class+ bottom_postfix);} +$('.top-off-canvas-toggle').attr('aria-expanded','true');}).on('click.fndtn.offcanvas','.top-off-canvas-menu a',function(e){var settings=self.get_settings(e);var parent=S(this).parent();if(settings.close_on_click&&!parent.hasClass('has-submenu')&&!parent.hasClass('back')){self.hide.call(self,move_class+ bottom_postfix,self.get_wrapper(e));parent.parent().removeClass(move_class+ bottom_postfix);}else if(S(this).parent().hasClass('has-submenu')){e.preventDefault();S(this).siblings('.top-submenu').toggleClass(move_class+ bottom_postfix);}else if(parent.hasClass('back')){e.preventDefault();parent.parent().removeClass(move_class+ bottom_postfix);} +$('.top-off-canvas-toggle').attr('aria-expanded','true');}).on('click.fndtn.offcanvas','.bottom-off-canvas-toggle',function(e){self.click_toggle_class(e,move_class+ top_postfix);if(self.settings.open_method!=='overlap'){S('.bottom-submenu').removeClass(move_class+ top_postfix);} +$('.bottom-off-canvas-toggle').attr('aria-expanded','true');}).on('click.fndtn.offcanvas','.bottom-off-canvas-menu a',function(e){var settings=self.get_settings(e);var parent=S(this).parent();if(settings.close_on_click&&!parent.hasClass('has-submenu')&&!parent.hasClass('back')){self.hide.call(self,move_class+ top_postfix,self.get_wrapper(e));parent.parent().removeClass(move_class+ top_postfix);}else if(S(this).parent().hasClass('has-submenu')){e.preventDefault();S(this).siblings('.bottom-submenu').toggleClass(move_class+ top_postfix);}else if(parent.hasClass('back')){e.preventDefault();parent.parent().removeClass(move_class+ top_postfix);} +$('.bottom-off-canvas-toggle').attr('aria-expanded','true');}).on('click.fndtn.offcanvas','.exit-off-canvas',function(e){self.click_remove_class(e,move_class+ left_postfix);S('.right-submenu').removeClass(move_class+ left_postfix);if(right_postfix){self.click_remove_class(e,move_class+ right_postfix);S('.left-submenu').removeClass(move_class+ left_postfix);} +$('.right-off-canvas-toggle').attr('aria-expanded','true');}).on('click.fndtn.offcanvas','.exit-off-canvas',function(e){self.click_remove_class(e,move_class+ left_postfix);$('.left-off-canvas-toggle').attr('aria-expanded','false');if(right_postfix){self.click_remove_class(e,move_class+ right_postfix);$('.right-off-canvas-toggle').attr('aria-expanded','false');}}).on('click.fndtn.offcanvas','.exit-off-canvas',function(e){self.click_remove_class(e,move_class+ top_postfix);S('.bottom-submenu').removeClass(move_class+ top_postfix);if(bottom_postfix){self.click_remove_class(e,move_class+ bottom_postfix);S('.top-submenu').removeClass(move_class+ top_postfix);} +$('.bottom-off-canvas-toggle').attr('aria-expanded','true');}).on('click.fndtn.offcanvas','.exit-off-canvas',function(e){self.click_remove_class(e,move_class+ top_postfix);$('.top-off-canvas-toggle').attr('aria-expanded','false');if(bottom_postfix){self.click_remove_class(e,move_class+ bottom_postfix);$('.bottom-off-canvas-toggle').attr('aria-expanded','false');}});},toggle:function(class_name,$off_canvas){$off_canvas=$off_canvas||this.get_wrapper();if($off_canvas.is('.'+ class_name)){this.hide(class_name,$off_canvas);}else{this.show(class_name,$off_canvas);}},show:function(class_name,$off_canvas){$off_canvas=$off_canvas||this.get_wrapper();$off_canvas.trigger('open.fndtn.offcanvas');$off_canvas.addClass(class_name);},hide:function(class_name,$off_canvas){$off_canvas=$off_canvas||this.get_wrapper();$off_canvas.trigger('close.fndtn.offcanvas');$off_canvas.removeClass(class_name);},click_toggle_class:function(e,class_name){e.preventDefault();var $off_canvas=this.get_wrapper(e);this.toggle(class_name,$off_canvas);},click_remove_class:function(e,class_name){e.preventDefault();var $off_canvas=this.get_wrapper(e);this.hide(class_name,$off_canvas);},get_settings:function(e){var offcanvas=this.S(e.target).closest('['+ this.attr_name()+']');return offcanvas.data(this.attr_name(true)+'-init')||this.settings;},get_wrapper:function(e){var $off_canvas=this.S(e?e.target:this.scope).closest('.off-canvas-wrap');if($off_canvas.length===0){$off_canvas=this.S('.off-canvas-wrap');} +return $off_canvas;},reflow:function(){}};}(jQuery,window,window.document));;(function($,window,document,undefined){'use strict';var noop=function(){};var Orbit=function(el,settings){if(el.hasClass(settings.slides_container_class)){return this;} +var self=this,container,slides_container=el,number_container,bullets_container,timer_container,idx=0,animate,timer,locked=false,adjust_height_after=false;self.slides=function(){return slides_container.children(settings.slide_selector);};self.slides().first().addClass(settings.active_slide_class);self.update_slide_number=function(index){if(settings.slide_number){number_container.find('span:first').text(parseInt(index)+ 1);number_container.find('span:last').text(self.slides().length);} +if(settings.bullets){bullets_container.children().removeClass(settings.bullets_active_class);$(bullets_container.children().get(index)).addClass(settings.bullets_active_class);}};self.update_active_link=function(index){var link=$('[data-orbit-link="'+ self.slides().eq(index).attr('data-orbit-slide')+'"]');link.siblings().removeClass(settings.bullets_active_class);link.addClass(settings.bullets_active_class);};self.build_markup=function(){slides_container.wrap('
');container=slides_container.parent();slides_container.addClass(settings.slides_container_class);if(settings.stack_on_small){container.addClass(settings.stack_on_small_class);} +if(settings.navigation_arrows){container.append($('').addClass(settings.prev_class));container.append($('').addClass(settings.next_class));} +if(settings.timer){timer_container=$('
').addClass(settings.timer_container_class);timer_container.append('');timer_container.append($('
').addClass(settings.timer_progress_class));timer_container.addClass(settings.timer_paused_class);container.append(timer_container);} +if(settings.slide_number){number_container=$('
').addClass(settings.slide_number_class);number_container.append(' '+ settings.slide_number_text+' ');container.append(number_container);} +if(settings.bullets){bullets_container=$('
    ').addClass(settings.bullets_container_class);container.append(bullets_container);bullets_container.wrap('
    ');self.slides().each(function(idx,el){var bullet=$('
  1. ').attr('data-orbit-slide',idx).on('click',self.link_bullet);;bullets_container.append(bullet);});}};self._goto=function(next_idx,start_timer){if(next_idx===idx){return false;} +if(typeof timer==='object'){timer.restart();} +var slides=self.slides();var dir='next';locked=true;if(next_idx=slides.length){if(!settings.circular){return false;} +next_idx=0;}else if(next_idx<0){if(!settings.circular){return false;} +next_idx=slides.length- 1;} +var current=$(slides.get(idx));var next=$(slides.get(next_idx));current.css('zIndex',2);current.removeClass(settings.active_slide_class);next.css('zIndex',4).addClass(settings.active_slide_class);slides_container.trigger('before-slide-change.fndtn.orbit');settings.before_slide_change();self.update_active_link(next_idx);var callback=function(){var unlock=function(){idx=next_idx;locked=false;if(start_timer===true){timer=self.create_timer();timer.start();} +self.update_slide_number(idx);slides_container.trigger('after-slide-change.fndtn.orbit',[{slide_number:idx,total_slides:slides.length}]);settings.after_slide_change(idx,slides.length);};if(slides_container.outerHeight()!=next.outerHeight()&&settings.variable_height){slides_container.animate({'height':next.outerHeight()},250,'linear',unlock);}else{unlock();}};if(slides.length===1){callback();return false;} +var start_animation=function(){if(dir==='next'){animate.next(current,next,callback);} +if(dir==='prev'){animate.prev(current,next,callback);}};if(next.outerHeight()>slides_container.outerHeight()&&settings.variable_height){slides_container.animate({'height':next.outerHeight()},250,'linear',start_animation);}else{start_animation();}};self.next=function(e){e.stopImmediatePropagation();e.preventDefault();self._goto(idx+ 1);};self.prev=function(e){e.stopImmediatePropagation();e.preventDefault();self._goto(idx- 1);};self.link_custom=function(e){e.preventDefault();var link=$(this).attr('data-orbit-link');if((typeof link==='string')&&(link=$.trim(link))!=''){var slide=container.find('[data-orbit-slide='+ link+']');if(slide.index()!=-1){self._goto(slide.index());}}};self.link_bullet=function(e){var index=$(this).attr('data-orbit-slide');if((typeof index==='string')&&(index=$.trim(index))!=''){if(isNaN(parseInt(index))){var slide=container.find('[data-orbit-slide='+ index+']');if(slide.index()!=-1){self._goto(slide.index()+ 1);}}else{self._goto(parseInt(index));}}} +self.timer_callback=function(){self._goto(idx+ 1,true);} +self.compute_dimensions=function(){var current=$(self.slides().get(idx));var h=current.outerHeight();if(!settings.variable_height){self.slides().each(function(){if($(this).outerHeight()>h){h=$(this).outerHeight();}});} +slides_container.height(h);};self.create_timer=function(){var t=new Timer(container.find('.'+ settings.timer_container_class),settings,self.timer_callback);return t;};self.stop_timer=function(){if(typeof timer==='object'){timer.stop();}};self.toggle_timer=function(){var t=container.find('.'+ settings.timer_container_class);if(t.hasClass(settings.timer_paused_class)){if(typeof timer==='undefined'){timer=self.create_timer();} +timer.start();}else{if(typeof timer==='object'){timer.stop();}}};self.init=function(){self.build_markup();if(settings.timer){timer=self.create_timer();Foundation.utils.image_loaded(this.slides().children('img'),timer.start);} +animate=new FadeAnimation(settings,slides_container);if(settings.animation==='slide'){animate=new SlideAnimation(settings,slides_container);} +container.on('click','.'+ settings.next_class,self.next);container.on('click','.'+ settings.prev_class,self.prev);if(settings.next_on_click){container.on('click','.'+ settings.slides_container_class+' [data-orbit-slide]',self.link_bullet);} +container.on('click',self.toggle_timer);if(settings.swipe){container.on('touchstart.fndtn.orbit',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};container.data('swipe-transition',data);e.stopPropagation();}).on('touchmove.fndtn.orbit',function(e){if(!e.touches){e=e.originalEvent;} +if(e.touches.length>1||e.scale&&e.scale!==1){return;} +var data=container.data('swipe-transition');if(typeof data==='undefined'){data={};} +data.delta_x=e.touches[0].pageX- data.start_page_x;if(typeof data.is_scrolling==='undefined'){data.is_scrolling=!!(data.is_scrolling||Math.abs(data.delta_x)0){S(this.scope).on('open.fndtn.reveal',this.settings.open).on('opened.fndtn.reveal',this.settings.opened).on('opened.fndtn.reveal',this.open_video).on('close.fndtn.reveal',this.settings.close).on('closed.fndtn.reveal',this.settings.closed).on('closed.fndtn.reveal',this.close_video);}else{S(this.scope).on('open.fndtn.reveal','['+ self.attr_name()+']',this.settings.open).on('opened.fndtn.reveal','['+ self.attr_name()+']',this.settings.opened).on('opened.fndtn.reveal','['+ self.attr_name()+']',this.open_video).on('close.fndtn.reveal','['+ self.attr_name()+']',this.settings.close).on('closed.fndtn.reveal','['+ self.attr_name()+']',this.settings.closed).on('closed.fndtn.reveal','['+ self.attr_name()+']',this.close_video);} +return true;},key_up_on:function(scope){var self=this;self.S('body').off('keyup.fndtn.reveal').on('keyup.fndtn.reveal',function(event){var open_modal=self.S('['+ self.attr_name()+'].open'),settings=open_modal.data(self.attr_name(true)+'-init')||self.settings;if(settings&&event.which===27&&settings.close_on_esc&&!self.locked){self.close.call(self,open_modal);}});return true;},key_up_off:function(scope){this.S('body').off('keyup.fndtn.reveal');return true;},open:function(target,ajax_settings){var self=this,modal;if(target){if(typeof target.selector!=='undefined'){modal=self.S('#'+ target.data(self.data_attr('reveal-id'))).first();}else{modal=self.S(this.scope);ajax_settings=target;}}else{modal=self.S(this.scope);} +var settings=modal.data(self.attr_name(true)+'-init');settings=settings||this.settings;if(modal.hasClass('open')&&target!==undefined&&target.attr('data-reveal-id')==modal.attr('id')){return self.close(modal);} +if(!modal.hasClass('open')){var open_modal=self.S('['+ self.attr_name()+'].open');if(typeof modal.data('css-top')==='undefined'){modal.data('css-top',parseInt(modal.css('top'),10)).data('offset',this.cache_offset(modal));} +modal.attr('tabindex','0').attr('aria-hidden','false');this.key_up_on(modal);modal.on('open.fndtn.reveal',function(e){if(e.namespace!=='fndtn.reveal')return;});modal.on('open.fndtn.reveal').trigger('open.fndtn.reveal');if(open_modal.length<1){this.toggle_bg(modal,true);} +if(typeof ajax_settings==='string'){ajax_settings={url:ajax_settings};} +var openModal=function(){if(open_modal.length>0){if(settings.multiple_opened){self.to_back(open_modal);}else{self.hide(open_modal,settings.css.close);}} +if(settings.multiple_opened){openModals.push(modal);} +self.show(modal,settings.css.open);};if(typeof ajax_settings==='undefined'||!ajax_settings.url){openModal();}else{var old_success=typeof ajax_settings.success!=='undefined'?ajax_settings.success:null;$.extend(ajax_settings,{success:function(data,textStatus,jqXHR){if($.isFunction(old_success)){var result=old_success(data,textStatus,jqXHR);if(typeof result=='string'){data=result;}} +if(typeof options!=='undefined'&&typeof options.replaceContentSel!=='undefined'){modal.find(options.replaceContentSel).html(data);}else{modal.html(data);} +self.S(modal).foundation('section','reflow');self.S(modal).children().foundation();openModal();}});if(settings.on_ajax_error!==$.noop){$.extend(ajax_settings,{error:settings.on_ajax_error});} +$.ajax(ajax_settings);}} +self.S(window).trigger('resize');},close:function(modal){var modal=modal&&modal.length?modal:this.S(this.scope),open_modals=this.S('['+ this.attr_name()+'].open'),settings=modal.data(this.attr_name(true)+'-init')||this.settings,self=this;if(open_modals.length>0){modal.removeAttr('tabindex','0').attr('aria-hidden','true');this.locked=true;this.key_up_off(modal);modal.trigger('close.fndtn.reveal');if((settings.multiple_opened&&open_modals.length===1)||!settings.multiple_opened||modal.length>1){self.toggle_bg(modal,false);self.to_front(modal);} +if(settings.multiple_opened){var isCurrent=modal.is(':not(.toback)');self.hide(modal,settings.css.close,settings);if(isCurrent){openModals.pop();}else{openModals=$.grep(openModals,function(elt){var isThis=elt[0]===modal[0];if(isThis){self.to_front(modal);} +return!isThis;});} +if(openModals.length>0){self.to_front(openModals[openModals.length- 1]);}}else{self.hide(open_modals,settings.css.close,settings);}}},close_targets:function(){var base='.'+ this.settings.dismiss_modal_class;if(this.settings.close_on_background_click){return base+', .'+ this.settings.bg_class;} +return base;},toggle_bg:function(modal,state){if(this.S('.'+ this.settings.bg_class).length===0){this.settings.bg=$('
    ',{'class':this.settings.bg_class}).appendTo('body').hide();} +var visible=this.settings.bg.filter(':visible').length>0;if(state!=visible){if(state==undefined?visible:!state){this.hide(this.settings.bg);}else{this.show(this.settings.bg);}}},show:function(el,css){if(css){var settings=el.data(this.attr_name(true)+'-init')||this.settings,root_element=settings.root_element,context=this;if(el.parent(root_element).length===0){var placeholder=el.wrap('
    ').parent();el.on('closed.fndtn.reveal.wrapped',function(){el.detach().appendTo(placeholder);el.unwrap().unbind('closed.fndtn.reveal.wrapped');});el.detach().appendTo(root_element);} +var animData=getAnimationData(settings.animation);if(!animData.animate){this.locked=false;} +if(animData.pop){css.top=$(window).scrollTop()- el.data('offset')+'px';var end_css={top:$(window).scrollTop()+ el.data('css-top')+'px',opacity:1};return setTimeout(function(){return el.css(css).animate(end_css,settings.animation_speed,'linear',function(){context.locked=false;el.trigger('opened.fndtn.reveal');}).addClass('open');},settings.animation_speed/2);} +css.top=$(window).scrollTop()+ el.data('css-top')+'px';if(animData.fade){var end_css={opacity:1};return setTimeout(function(){return el.css(css).animate(end_css,settings.animation_speed,'linear',function(){context.locked=false;el.trigger('opened.fndtn.reveal');}).addClass('open');},settings.animation_speed/2);} +return el.css(css).show().css({opacity:1}).addClass('open').trigger('opened.fndtn.reveal');} +var settings=this.settings;if(getAnimationData(settings.animation).fade){return el.fadeIn(settings.animation_speed/2);} +this.locked=false;return el.show();},to_back:function(el){el.addClass('toback');},to_front:function(el){el.removeClass('toback');},hide:function(el,css){if(css){var settings=el.data(this.attr_name(true)+'-init'),context=this;settings=settings||this.settings;var animData=getAnimationData(settings.animation);if(!animData.animate){this.locked=false;} +if(animData.pop){var end_css={top:- $(window).scrollTop()- el.data('offset')+'px',opacity:0};return setTimeout(function(){return el.animate(end_css,settings.animation_speed,'linear',function(){context.locked=false;el.css(css).trigger('closed.fndtn.reveal');}).removeClass('open');},settings.animation_speed/2);} +if(animData.fade){var end_css={opacity:0};return setTimeout(function(){return el.animate(end_css,settings.animation_speed,'linear',function(){context.locked=false;el.css(css).trigger('closed.fndtn.reveal');}).removeClass('open');},settings.animation_speed/2);} +return el.hide().css(css).removeClass('open').trigger('closed.fndtn.reveal');} +var settings=this.settings;if(getAnimationData(settings.animation).fade){return el.fadeOut(settings.animation_speed/2);} +return el.hide();},close_video:function(e){var video=$('.flex-video',e.target),iframe=$('iframe',video);if(iframe.length>0){iframe.attr('data-src',iframe[0].src);iframe.attr('src',iframe.attr('src'));video.hide();}},open_video:function(e){var video=$('.flex-video',e.target),iframe=video.find('iframe');if(iframe.length>0){var data_src=iframe.attr('data-src');if(typeof data_src==='string'){iframe[0].src=iframe.attr('data-src');}else{var src=iframe[0].src;iframe[0].src=undefined;iframe[0].src=src;} +video.show();}},data_attr:function(str){if(this.namespace.length>0){return this.namespace+'-'+ str;} +return str;},cache_offset:function(modal){var offset=modal.show().height()+ parseInt(modal.css('top'),10)+ modal.scrollY;modal.hide();return offset;},off:function(){$(this.scope).off('.fndtn.reveal');},reflow:function(){}};function getAnimationData(str){var fade=/fade/i.test(str);var pop=/pop/i.test(str);return{animate:fade||pop,pop:pop,fade:fade};}}(jQuery,window,window.document));;(function($,window,document,undefined){'use strict';Foundation.libs.slider={name:'slider',version:'5.5.3',settings:{start:0,end:100,step:1,precision:2,initial:null,display_selector:'',vertical:false,trigger_input_change:false,on_change:function(){}},cache:{},init:function(scope,method,options){Foundation.inherit(this,'throttle');this.bindings(method,options);this.reflow();},events:function(){var self=this;$(this.scope).off('.slider').on('mousedown.fndtn.slider touchstart.fndtn.slider pointerdown.fndtn.slider','['+ self.attr_name()+']:not(.disabled, [disabled]) .range-slider-handle',function(e){if(!self.cache.active){e.preventDefault();self.set_active_slider($(e.target));}}).on('mousemove.fndtn.slider touchmove.fndtn.slider pointermove.fndtn.slider',function(e){if(!!self.cache.active){e.preventDefault();if($.data(self.cache.active[0],'settings').vertical){var scroll_offset=0;if(!e.pageY){scroll_offset=window.scrollY;} +self.calculate_position(self.cache.active,self.get_cursor_position(e,'y')+ scroll_offset);}else{self.calculate_position(self.cache.active,self.get_cursor_position(e,'x'));}}}).on('mouseup.fndtn.slider touchend.fndtn.slider pointerup.fndtn.slider',function(e){if(!self.cache.active){var slider=$(e.target).attr('role')==='slider'?$(e.target):$(e.target).closest('.range-slider').find("[role='slider']");if(slider.length&&(!slider.parent().hasClass('disabled')&&!slider.parent().attr('disabled'))){self.set_active_slider(slider);if($.data(self.cache.active[0],'settings').vertical){var scroll_offset=0;if(!e.pageY){scroll_offset=window.scrollY;} +self.calculate_position(self.cache.active,self.get_cursor_position(e,'y')+ scroll_offset);}else{self.calculate_position(self.cache.active,self.get_cursor_position(e,'x'));}}} +self.remove_active_slider();}).on('change.fndtn.slider',function(e){self.settings.on_change();});self.S(window).on('resize.fndtn.slider',self.throttle(function(e){self.reflow();},300));this.S('['+ this.attr_name()+']').each(function(){var slider=$(this),handle=slider.children('.range-slider-handle')[0],settings=self.initialize_settings(handle);if(settings.display_selector!=''){$(settings.display_selector).each(function(){if($(this).attr('value')){$(this).off('change').on('change',function(){slider.foundation("slider","set_value",$(this).val());});}});}});},get_cursor_position:function(e,xy){var pageXY='page'+ xy.toUpperCase(),clientXY='client'+ xy.toUpperCase(),position;if(typeof e[pageXY]!=='undefined'){position=e[pageXY];}else if(typeof e.originalEvent[clientXY]!=='undefined'){position=e.originalEvent[clientXY];}else if(e.originalEvent.touches&&e.originalEvent.touches[0]&&typeof e.originalEvent.touches[0][clientXY]!=='undefined'){position=e.originalEvent.touches[0][clientXY];}else if(e.currentPoint&&typeof e.currentPoint[xy]!=='undefined'){position=e.currentPoint[xy];} +return position;},set_active_slider:function($handle){this.cache.active=$handle;},remove_active_slider:function(){this.cache.active=null;},calculate_position:function($handle,cursor_x){var self=this,settings=$.data($handle[0],'settings'),handle_l=$.data($handle[0],'handle_l'),handle_o=$.data($handle[0],'handle_o'),bar_l=$.data($handle[0],'bar_l'),bar_o=$.data($handle[0],'bar_o');requestAnimationFrame(function(){var pct;if(Foundation.rtl&&!settings.vertical){pct=self.limit_to(((bar_o+ bar_l- cursor_x)/ bar_l), 0, 1); +}else{pct=self.limit_to(((cursor_x- bar_o)/ bar_l), 0, 1); +} +pct=settings.vertical?1- pct:pct;var norm=self.normalized_value(pct,settings.start,settings.end,settings.step,settings.precision);self.set_ui($handle,norm);});},set_ui:function($handle,value){var settings=$.data($handle[0],'settings'),handle_l=$.data($handle[0],'handle_l'),bar_l=$.data($handle[0],'bar_l'),norm_pct=this.normalized_percentage(value,settings.start,settings.end),handle_offset=norm_pct*(bar_l- handle_l)- 1,progress_bar_length=norm_pct*100,$handle_parent=$handle.parent(),$hidden_inputs=$handle.parent().children('input[type=hidden]');if(Foundation.rtl&&!settings.vertical){handle_offset=-handle_offset;} +handle_offset=settings.vertical?-handle_offset+ bar_l- handle_l+ 1:handle_offset;this.set_translate($handle,handle_offset,settings.vertical);if(settings.vertical){$handle.siblings('.range-slider-active-segment').css('height',progress_bar_length+'%');}else{$handle.siblings('.range-slider-active-segment').css('width',progress_bar_length+'%');} +$handle_parent.attr(this.attr_name(),value).trigger('change.fndtn.slider');$hidden_inputs.val(value);if(settings.trigger_input_change){$hidden_inputs.trigger('change.fndtn.slider');} +if(!$handle[0].hasAttribute('aria-valuemin')){$handle.attr({'aria-valuemin':settings.start,'aria-valuemax':settings.end});} +$handle.attr('aria-valuenow',value);if(settings.display_selector!=''){$(settings.display_selector).each(function(){if(this.hasAttribute('value')){$(this).val(value);}else{$(this).text(value);}});}},normalized_percentage:function(val,start,end){return Math.min(1,(val- start)/ (end - start)); +},normalized_value:function(val,start,end,step,precision){var range=end- start,point=val*range,mod=(point-(point%step))/ step, +rem=point%step,round=(rem>=step*0.5?step:0);return((mod*step+ round)+ start).toFixed(precision);},set_translate:function(ele,offset,vertical){if(vertical){$(ele).css('-webkit-transform','translateY('+ offset+'px)').css('-moz-transform','translateY('+ offset+'px)').css('-ms-transform','translateY('+ offset+'px)').css('-o-transform','translateY('+ offset+'px)').css('transform','translateY('+ offset+'px)');}else{$(ele).css('-webkit-transform','translateX('+ offset+'px)').css('-moz-transform','translateX('+ offset+'px)').css('-ms-transform','translateX('+ offset+'px)').css('-o-transform','translateX('+ offset+'px)').css('transform','translateX('+ offset+'px)');}},limit_to:function(val,min,max){return Math.min(Math.max(val,min),max);},initialize_settings:function(handle){var settings=$.extend({},this.settings,this.data_options($(handle).parent())),decimal_places_match_result;if(settings.precision===null){decimal_places_match_result=(''+ settings.step).match(/\.([\d]*)/);settings.precision=decimal_places_match_result&&decimal_places_match_result[1]?decimal_places_match_result[1].length:0;} +if(settings.vertical){$.data(handle,'bar_o',$(handle).parent().offset().top);$.data(handle,'bar_l',$(handle).parent().outerHeight());$.data(handle,'handle_o',$(handle).offset().top);$.data(handle,'handle_l',$(handle).outerHeight());}else{$.data(handle,'bar_o',$(handle).parent().offset().left);$.data(handle,'bar_l',$(handle).parent().outerWidth());$.data(handle,'handle_o',$(handle).offset().left);$.data(handle,'handle_l',$(handle).outerWidth());} +$.data(handle,'bar',$(handle).parent());return $.data(handle,'settings',settings);},set_initial_position:function($ele){var settings=$.data($ele.children('.range-slider-handle')[0],'settings'),initial=((typeof settings.initial=='number'&&!isNaN(settings.initial))?settings.initial:Math.floor((settings.end- settings.start)*0.5/settings.step)*settings.step+ settings.start),$handle=$ele.children('.range-slider-handle');this.set_ui($handle,initial);},set_value:function(value){var self=this;$('['+ self.attr_name()+']',this.scope).each(function(){$(this).attr(self.attr_name(),value);});if(!!$(this.scope).attr(self.attr_name())){$(this.scope).attr(self.attr_name(),value);} +self.reflow();},reflow:function(){var self=this;self.S('['+ this.attr_name()+']').each(function(){var handle=$(this).children('.range-slider-handle')[0],val=$(this).attr(self.attr_name());self.initialize_settings(handle);if(val){self.set_ui($(handle),parseFloat(val));}else{self.set_initial_position($(this));}});}};}(jQuery,window,window.document));;(function($,window,document,undefined){'use strict';Foundation.libs.tab={name:'tab',version:'5.5.3',settings:{active_class:'active',callback:function(){},deep_linking:false,scroll_to_content:true,is_hover:false},default_tab_hashes:[],init:function(scope,method,options){var self=this,S=this.S;S('['+ this.attr_name()+'] > .active > a',this.scope).each(function(){self.default_tab_hashes.push(this.hash);});this.bindings(method,options);this.handle_location_hash_change();},events:function(){var self=this,S=this.S;var usual_tab_behavior=function(e,target){var settings=S(target).closest('['+ self.attr_name()+']').data(self.attr_name(true)+'-init');if(!settings.is_hover||Modernizr.touch){var keyCode=e.keyCode||e.which;if(keyCode!==9){e.preventDefault();e.stopPropagation();} +self.toggle_active_tab(S(target).parent());}};S(this.scope).off('.tab').on('keydown.fndtn.tab','['+ this.attr_name()+'] > * > a',function(e){var keyCode=e.keyCode||e.which;if(keyCode===13||keyCode===32){var el=this;usual_tab_behavior(e,el);}}).on('click.fndtn.tab','['+ this.attr_name()+'] > * > a',function(e){var el=this;usual_tab_behavior(e,el);}).on('mouseenter.fndtn.tab','['+ this.attr_name()+'] > * > a',function(e){var settings=S(this).closest('['+ self.attr_name()+']').data(self.attr_name(true)+'-init');if(settings.is_hover){self.toggle_active_tab(S(this).parent());}});S(window).on('hashchange.fndtn.tab',function(e){e.preventDefault();self.handle_location_hash_change();});},handle_location_hash_change:function(){var self=this,S=this.S;S('['+ this.attr_name()+']',this.scope).each(function(){var settings=S(this).data(self.attr_name(true)+'-init');if(settings.deep_linking){var hash;if(settings.scroll_to_content){hash=self.scope.location.hash;}else{hash=self.scope.location.hash.replace('fndtn-','');} +if(hash!=''){var hash_element=S(hash);if(hash_element.hasClass('content')&&hash_element.parent().hasClass('tabs-content')){self.toggle_active_tab($('['+ self.attr_name()+'] > * > a[href='+ hash+']').parent());}else{var hash_tab_container_id=hash_element.closest('.content').attr('id');if(hash_tab_container_id!=undefined){self.toggle_active_tab($('['+ self.attr_name()+'] > * > a[href=#'+ hash_tab_container_id+']').parent(),hash);}}}else{for(var ind=0;ind * > a[href='+ self.default_tab_hashes[ind]+']').parent());}}}});},toggle_active_tab:function(tab,location_hash){var self=this,S=self.S,tabs=tab.closest('['+ this.attr_name()+']'),tab_link=tab.find('a'),anchor=tab.children('a').first(),target_hash='#'+ anchor.attr('href').split('#')[1],target=S(target_hash),siblings=tab.siblings(),settings=tabs.data(this.attr_name(true)+'-init'),interpret_keyup_action=function(e){var $original=$(this);var $prev=$(this).parents('li').prev().children('[role="tab"]');var $next=$(this).parents('li').next().children('[role="tab"]');var $target;switch(e.keyCode){case 37:$target=$prev;break;case 39:$target=$next;break;default:$target=false +break;} +if($target.length){$original.attr({'tabindex':'-1','aria-selected':null});$target.attr({'tabindex':'0','aria-selected':true}).focus();} +$('[role="tabpanel"]').attr('aria-hidden','true');$('#'+ $(document.activeElement).attr('href').substring(1)).attr('aria-hidden',null);},go_to_hash=function(hash){var default_hash=settings.scroll_to_content?self.default_tab_hashes[0]:'fndtn-'+ self.default_tab_hashes[0].replace('#','');if(hash!==default_hash||window.location.hash){window.location.hash=hash;}};if(anchor.data('tab-content')){target_hash='#'+ anchor.data('tab-content').split('#')[1];target=S(target_hash);} +if(settings.deep_linking){if(settings.scroll_to_content){go_to_hash(location_hash||target_hash);if(location_hash==undefined||location_hash==target_hash){tab.parent()[0].scrollIntoView();}else{S(target_hash)[0].scrollIntoView();}}else{if(location_hash!=undefined){go_to_hash('fndtn-'+ location_hash.replace('#',''));}else{go_to_hash('fndtn-'+ target_hash.replace('#',''));}}} +tab.addClass(settings.active_class).triggerHandler('opened');tab_link.attr({'aria-selected':'true',tabindex:0});siblings.removeClass(settings.active_class) +siblings.find('a').attr({'aria-selected':'false'});target.siblings().removeClass(settings.active_class).attr({'aria-hidden':'true'});target.addClass(settings.active_class).attr('aria-hidden','false').removeAttr('tabindex');settings.callback(tab);target.triggerHandler('toggled',[target]);tabs.triggerHandler('toggled',[tab]);tab_link.off('keydown').on('keydown',interpret_keyup_action);},data_attr:function(str){if(this.namespace.length>0){return this.namespace+'-'+ str;} +return str;},off:function(){},reflow:function(){}};}(jQuery,window,window.document));;(function($,window,document,undefined){'use strict';Foundation.libs.tooltip={name:'tooltip',version:'5.5.3',settings:{additional_inheritable_classes:[],tooltip_class:'.tooltip',append_to:'body',touch_close_text:'Tap To Close',disable_for_touch:false,hover_delay:200,fade_in_duration:150,fade_out_duration:150,show_on:'all',tip_template:function(selector,content){return''+ content+'';}},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;},events:function(instance){var self=this,S=self.S;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 DOMAttrModified','['+ 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),$('
    ').html($target.attr('title')).html())),classes=this.inheritable_classes($target);$tip.addClass(classes).appendTo(settings.append_to);if(Modernizr.touch){$tip.append(''+ settings.touch_close_text+'');$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,objPos;tip.css('visibility','hidden').show();width=target.data('width');nub=tip.children('.nub');nubHeight=nub.outerHeight();nubWidth=nub.outerWidth();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();};var o_top=target.offset().top;var o_left=target.offset().left;var outerHeight=target.outerHeight();objPos(tip,(o_top+ outerHeight+ 10),'auto','auto',o_left);if(this.small()){objPos(tip,(o_top+ outerHeight+ 10),'auto','auto',12.5,$(this.scope).width());tip.addClass('tip-override');objPos(nub,-nubHeight,'auto','auto',o_left);}else{if(Foundation.rtl){nub.addClass('rtl');o_left=o_left+ target.outerWidth()- tip.outerWidth();} +objPos(tip,(o_top+ outerHeight+ 10),'auto','auto',o_left);if(nub.attr('style')){nub.removeAttr('style');} +tip.removeClass('tip-override');var tip_outerHeight=tip.outerHeight();if(classes&&classes.indexOf('tip-top')>-1){if(Foundation.rtl){nub.addClass('rtl');} +objPos(tip,(o_top- tip_outerHeight),'auto','auto',o_left).removeClass('tip-override');}else if(classes&&classes.indexOf('tip-left')>-1){objPos(tip,(o_top+(outerHeight/2)-(tip_outerHeight/2)),'auto','auto',(o_left- tip.outerWidth()- nubHeight)).removeClass('tip-override');nub.removeClass('rtl');}else if(classes&&classes.indexOf('tip-right')>-1){objPos(tip,(o_top+(outerHeight/2)-(tip_outerHeight/2)),'auto','auto',(o_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(''+ settings.touch_close_text+'');$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(this.settings.fade_in_duration);},hide:function($target){var $tip=this.getTip($target);$tip.fadeOut(this.settings.fade_out_duration,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.topbar={name:'topbar',version:'5.5.3',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=$('
  2. ');}else{$titleLi=$('
  3. ');} +if(settings.custom_back_text==true){$('h5>a',$titleLi).html(settings.back_text);}else{$('h5>a',$titleLi).html('« '+ $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)); \ No newline at end of file diff --git a/assets/js/jquery-1.11.3.min.js b/assets/js/jquery-1.11.3.min.js new file mode 100644 index 0000000..0f60b7b --- /dev/null +++ b/assets/js/jquery-1.11.3.min.js @@ -0,0 +1,5 @@ +/*! jQuery v1.11.3 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.3",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b="length"in a&&a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1; + +return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML="
    a",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function aa(){return!0}function ba(){return!1}function ca(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),ha=/^\s+/,ia=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ja=/<([\w:]+)/,ka=/\s*$/g,ra={option:[1,""],legend:[1,"
    ","
    "],area:[1,"",""],param:[1,"",""],thead:[1,"","
    "],tr:[2,"","
    "],col:[2,"","
    "],td:[3,"","
    "],_default:k.htmlSerialize?[0,"",""]:[1,"X
    ","
    "]},sa=da(y),ta=sa.appendChild(y.createElement("div"));ra.optgroup=ra.option,ra.tbody=ra.tfoot=ra.colgroup=ra.caption=ra.thead,ra.th=ra.td;function ua(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ua(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function va(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wa(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xa(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function ya(a){var b=pa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function za(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Aa(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Ba(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xa(b).text=a.text,ya(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!ga.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ta.innerHTML=a.outerHTML,ta.removeChild(f=ta.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ua(f),h=ua(a),g=0;null!=(e=h[g]);++g)d[g]&&Ba(e,d[g]);if(b)if(c)for(h=h||ua(a),d=d||ua(f),g=0;null!=(e=h[g]);g++)Aa(e,d[g]);else Aa(a,f);return d=ua(f,"script"),d.length>0&&za(d,!i&&ua(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=da(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(la.test(f)){h=h||o.appendChild(b.createElement("div")),i=(ja.exec(f)||["",""])[1].toLowerCase(),l=ra[i]||ra._default,h.innerHTML=l[1]+f.replace(ia,"<$1>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&ha.test(f)&&p.push(b.createTextNode(ha.exec(f)[0])),!k.tbody){f="table"!==i||ka.test(f)?""!==l[1]||ka.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ua(p,"input"),va),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ua(o.appendChild(f),"script"),g&&za(h),c)){e=0;while(f=h[e++])oa.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ua(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&za(ua(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ua(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fa,""):void 0;if(!("string"!=typeof a||ma.test(a)||!k.htmlSerialize&&ga.test(a)||!k.leadingWhitespace&&ha.test(a)||ra[(ja.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ia,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ua(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ua(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&na.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ua(i,"script"),xa),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ua(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,ya),j=0;f>j;j++)d=g[j],oa.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qa,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Ca,Da={};function Ea(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fa(a){var b=y,c=Da[a];return c||(c=Ea(a,b),"none"!==c&&c||(Ca=(Ca||m("