Foundationzottiri
Foundationzottiri
while (i--) {
if ([Link]('.' + class_array[i]).length === 0) {
[Link]('<meta class="' + class_array[i] + '" />');
}
}
};
header_helpers([
'foundation-mq-small',
'foundation-mq-small-only',
'foundation-mq-medium',
'foundation-mq-medium-only',
'foundation-mq-large',
'foundation-mq-large-only',
'foundation-mq-xlarge',
'foundation-mq-xlarge-only',
'foundation-mq-xxlarge',
'foundation-data-attribute-namespace']);
$(function () {
if (typeof FastClick !== 'undefined') {
// Don't attach to body if undefined
if (typeof [Link] !== 'undefined') {
[Link]([Link]);
}
}
});
return $([Link](selector));
}
// Namespace functions.
return [Link]('-');
};
while (i--) {
if (i !== 0) {
[Link](parts[i]);
} else {
if ([Link] > 0) {
[Link]([Link], parts[i]);
} else {
[Link](parts[i]);
}
}
}
return [Link]().join('-');
};
if (should_bind_events) {
[Link](this);
}
};
if (S([Link]).is('[' + this.attr_name() +']')) {
[Link]([Link]);
} else {
S('[' + this.attr_name() +']', [Link]).each(bind);
}
// # Patch to fix #5043 to move this *after* the if/else clause in order for
Backbone and similar frameworks to have improved control over event binding and
data-options updating.
if (typeof method === 'string') {
return this[method].call(this, options);
}
};
function bindLoad () {
[Link]('load', loaded);
if (/MSIE (\d+\.\d+);/.test([Link])) {
var src = [Link]( 'src' ),
param = [Link]( /\?/ ) ? '&' : '?';
if () {
loaded();
return;
}
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors &
copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual
MIT/BSD license */
[Link](style, script);
styleMedia = {
matchMedium: function(media) {
var text = '@media ' + media + '{ #matchmediajs-test { width:
1px; } }';
return function(media) {
return {
matches: [Link](media || 'all'),
media: media || 'all'
};
};
}());
/*
* [Link]
* [Link]
* Requires jQuery 1.8+
*
* Copyright (c) 2012 Corey Frang
* Licensed under the MIT license.
*/
(function(jQuery) {
var animating,
lastTime = 0,
vendors = ['webkit', 'moz'],
requestAnimationFrame = [Link],
cancelAnimationFrame = [Link],
jqueryFxAvailable = 'undefined' !== typeof [Link];
function raf() {
if (animating) {
requestAnimationFrame(raf);
if (jqueryFxAvailable) {
[Link]();
}
}
}
if (requestAnimationFrame) {
// use rAF
[Link] = requestAnimationFrame;
[Link] = cancelAnimationFrame;
if (jqueryFxAvailable) {
[Link] = function (timer) {
if (timer() && [Link](timer) && !animating) {
animating = true;
raf();
}
};
[Link] = function () {
animating = false;
};
}
} else {
// polyfill
[Link] = function (callback) {
var currTime = new Date().getTime(),
timeToCall = [Link](0, 16 - (currTime - lastTime)),
id = [Link](function () {
callback(currTime + timeToCall);
}, timeToCall);
lastTime = currTime + timeToCall;
return id;
};
}( $ ));
return string;
}
[Link] = {
name : 'Foundation',
version : '5.5.2',
media_queries : {
'small' :
S('.foundation-mq-small').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+
$/g, ''),
'small-only' :
S('.foundation-mq-small-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|
[\/\\'"]+$/g, ''),
'medium' :
S('.foundation-mq-medium').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]
+$/g, ''),
'medium-only' :
S('.foundation-mq-medium-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|
[\/\\'"]+$/g, ''),
'large' :
S('.foundation-mq-large').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+
$/g, ''),
'large-only' :
S('.foundation-mq-large-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|
[\/\\'"]+$/g, ''),
'xlarge' :
S('.foundation-mq-xlarge').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]
+$/g, ''),
'xlarge-only' :
S('.foundation-mq-xlarge-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|
[\/\\'"]+$/g, ''),
'xxlarge' :
S('.foundation-mq-xxlarge').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|
[\/\\'"]+$/g, '')
},
stylesheet : $('<style></style>').appendTo('head')[0].sheet,
global : {
namespace : undefined
},
// check RTL
[Link] = /rtl/[Link](S('html').attr('dir'));
this.set_namespace();
if (libraries && typeof libraries === 'string' && !/reflow/[Link](libraries))
{
if ([Link](libraries)) {
[Link](this.init_lib(libraries, args));
}
} else {
for (var lib in [Link]) {
[Link](this.init_lib(lib, libraries));
}
}
S(window).load(function () {
S(window)
.trigger('[Link]')
.trigger('[Link]')
.trigger('[Link]')
.trigger('[Link]')
.trigger('[Link]')
.trigger('[Link]')
.trigger('[Link]')
.trigger('[Link]');
});
return scope;
},
while (i--) {
if ([Link](methods_arr[i])) {
scope[methods_arr[i]] = [Link][methods_arr[i]];
}
}
},
set_namespace : function () {
// Description:
// Don't bother reading the namespace out of the meta tag
// if the namespace has been set globally in javascript
//
// Example:
// [Link] = 'my-namespace';
// or make it an empty string:
// [Link] = '';
//
//
// If the namespace has not been set (is undefined), try to read it out of
the meta element.
// Otherwise use the globally defined namespace, even if it's empty ('')
var namespace = ( [Link] === undefined ) ? $('.foundation-
data-attribute-namespace').css('font-family') : [Link];
libs : {},
// Description:
// Fast Selector wrapper returns jQuery object. Only use where
getElementById
// is not available.
//
// Arguments:
// Selector (String): CSS selector describing the element(s) to be
// returned as a jQuery object.
//
// Scope (String): CSS selector describing the area to be searched.
Default
// is document.
//
// Returns:
// Element (jQuery Object): jQuery object containing elements matching the
// selector within the scope.
S : S,
// Description:
// Executes a function a max of once every n milliseconds
//
// Arguments:
// Func (Function): Function to be throttled.
//
// Delay (Integer): Function execution threshold in milliseconds.
//
// Returns:
// Lazy_function (Function): Function with throttling applied.
throttle : function (func, delay) {
var timer = null;
return function () {
var context = this, args = arguments;
if (timer == null) {
timer = setTimeout(function () {
[Link](context, args);
timer = null;
}, delay);
}
};
},
// Description:
// Executes a function when it stops being invoked for n seconds
// Modified version of _.debounce() [Link]
//
// Arguments:
// Func (Function): Function to be debounced.
//
// Delay (Integer): Function execution threshold in milliseconds.
//
// Immediate (Bool): Whether the function should be called at the
beginning
// of the delay instead of the end. Default is false.
//
// Returns:
// Lazy_function (Function): Function with debouncing applied.
debounce : function (func, delay, immediate) {
var timeout, result;
return function () {
var context = this, args = arguments;
var later = function () {
timeout = null;
if (!immediate) {
result = [Link](context, args);
}
};
var callNow = immediate && !timeout;
clearTimeout(timeout);
timeout = setTimeout(later, delay);
if (callNow) {
result = [Link](context, args);
}
return result;
};
},
// Description:
// Parses data-options attribute
//
// Arguments:
// El (jQuery Object): Element to be parsed.
//
// Returns:
// Options (Javascript Object): Contents of the element's data-options
// attribute.
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 = [Link];
if ([Link] > 0) {
return [Link](namespace + '-' + data_attr_name);
}
return [Link](data_attr_name);
};
while (ii--) {
p = opts_arr[ii].split(':');
p = [p[0], [Link](1).join(':')];
if (/true/[Link](p[1])) {
p[1] = true;
}
if (/false/[Link](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]);
}
}
return opts;
},
// Description:
// Adds JS-recognizable media queries
//
// Arguments:
// Media (String): Key string for the media query to be stored as in
// Foundation.media_queries
//
// Class (String): Class name for the generated <meta> tag
register_media : function (media, media_class) {
if (Foundation.media_queries[media] === undefined) {
$('head').append('<meta class="' + media_class + '"/>');
Foundation.media_queries[media] = removeQuotes($('.' +
media_class).css('font-family'));
}
},
// Description:
// Add custom CSS within a JS-defined media query
//
// Arguments:
// Rule (String): CSS rule to be appended to the document.
//
// Media (String): Optional media query string for the CSS rule to be
// nested under.
add_custom_rule : function (rule, media) {
if (media === undefined && [Link]) {
[Link](rule,
[Link]);
} else {
var query = Foundation.media_queries[media];
// Description:
// Performs a callback function when an image is fully loaded
//
// Arguments:
// Image (jQuery Object): Image(s) to check if loaded.
//
// Callback (Function): Function to execute when image is fully loaded.
image_loaded : function (images, callback) {
var self = this,
unloaded = [Link];
function pictures_has_height(images) {
var pictures_number = [Link];
return true;
}
[Link](function () {
single_image_loaded(self.S(this), function () {
unloaded -= 1;
if (unloaded === 0) {
callback(images);
}
});
});
},
// Description:
// Returns a random, alphanumeric string
//
// Arguments:
// Length (Integer): Length of string to be generated. Defaults to random
// integer.
//
// Returns:
// Rand (String): Pseudo-random, alphanumeric string.
random_str : function () {
if (![Link]) {
[Link] = 0;
}
[Link] = [Link] || [([Link] || 'F'), (+new
Date).toString(36)].join('-');
// Description:
// Helper for [Link]
//
// Arguments:
// mq (String): Media query
//
// Returns:
// (Boolean): Whether the media query passes or not
match : function (mq) {
return [Link](mq).matches;
},
// Description:
// Helpers for checking Foundation default media queries with JS
//
// Returns:
// (Boolean): Whether the media query passes or not
is_small_up : function () {
return [Link](Foundation.media_queries.small);
},
is_medium_up : function () {
return [Link](Foundation.media_queries.medium);
},
is_large_up : function () {
return [Link](Foundation.media_queries.large);
},
is_xlarge_up : function () {
return [Link](Foundation.media_queries.xlarge);
},
is_xxlarge_up : function () {
return [Link](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();
}
}
};
$.[Link] = function () {
var args = [Link](arguments, 0);
return [Link](function () {
[Link](Foundation, [this].concat(args));
return this;
});
};
[Link] = {
name : 'abide',
version : '5.5.2',
settings : {
live_validate : true,
validate_on_blur : true,
// validate_on: 'tab', // tab (when user tabs between fields), change (input
changes), manual (call custom events)
focus_on_invalid : true,
error_labels : true, // labels with a for="inputId" will recieve an `error`
class
error_class : 'error',
timeout : 1000,
patterns : {
alpha : /^[a-zA-Z]+$/,
alpha_numeric : /^[a-zA-Z0-9]+$/,
integer : /^[-+]?\d+$/,
number : /^[-+]?\d*(?:[\.\,]\d+)?$/,
// [Link]
[Link]#valid-e-mail-address
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])?)+$/,
// [Link]
url/
url: /^(https?|ftp|file|ssh):\/\/([-;:&=\+\$,\w]+@{1})?([-A-Za-z0-9\.]+)+:?
(\d+)?((\/[-\+~%\/\.\w]+)?\??([-\+=&;%@\.\w]+)?#?([\w]+)?)?/,
// [Link]
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))$/,
// YYYY-MM-DD
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))$/,
// HH:MM:SS
time : /^(0[0-9]|1[0-9]|2[0-3])(:[0-5][0-9]){2}$/,
dateISO : /^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/,
// MM/DD/YYYY
month_day_year : /^(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.]\
d{4}$/,
// DD/MM/YYYY
day_month_year : /^(0[1-9]|[12][0-9]|3[01])[- \/.](0[1-9]|1[012])[- \/.]\
d{4}$/,
// #FFF or #FFFFFF
color : /^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/
},
validators : {
equalTo : function (el, required, parent) {
var from =
[Link]([Link](this.add_namespace('data-equalto'))).value,
to = [Link],
valid = (from === to);
return valid;
}
}
},
timer : null,
this.invalid_attr = this.add_namespace('data-invalid');
function validate(originalSelf, e) {
clearTimeout([Link]);
[Link] = setTimeout(function () {
[Link]([originalSelf], e);
}.bind(originalSelf), [Link]);
}
form
.off('.abide')
.on('[Link]', function (e) {
var is_ajax = /ajax/[Link](self.S(this).attr(self.attr_name()));
return [Link](self.S(this).find('input, textarea,
select').not(":hidden, [data-abide-ignore]").get(), e, is_ajax);
})
.on('[Link]', function (e) {
if (settings.validate_on === 'manual') {
[Link]([[Link]], e);
}
})
.on('reset', function (e) {
return [Link]($(this), e);
})
.find('input, textarea, select').not(":hidden, [data-abide-ignore]")
.off('.abide')
.on('[Link] [Link]', function (e) {
// old settings fallback
// will be deprecated with F6 release
if (settings.validate_on_blur && settings.validate_on_blur === true) {
validate(this, e);
}
// new settings combining validate options into one setting
if (settings.validate_on === 'change') {
validate(this, e);
}
})
.on('[Link]', function (e) {
// old settings fallback
// will be deprecated with F6 release
if (settings.live_validate && settings.live_validate === true &&
[Link] != 9) {
validate(this, e);
}
// new settings combining validate options into one setting
if (settings.validate_on === 'tab' && [Link] === 9) {
validate(this, e);
}
else if (settings.validate_on === 'change') {
validate(this, e);
}
})
.on('focus', function (e) {
if ([Link](/iPad|iPhone|Android|BlackBerry|Windows
Phone|webOS/i)) {
$('html, body').animate({
scrollTop: $([Link]).offset().top
}, 100);
}
});
},
// Has to count up to make sure the focus gets applied to the top error
for (var i = 0; i < validation_count; i++) {
if (!validations[i] && (submit_event || is_ajax)) {
if ([Link].focus_on_invalid) {
els[i].focus();
}
[Link]('[Link]');
this.S(els[i]).closest('form').attr(this.invalid_attr, '');
return false;
}
}
if (submit_event || is_ajax) {
[Link]('[Link]');
}
[Link](this.invalid_attr);
if (is_ajax) {
return false;
}
return true;
},
while (i--) {
el_patterns.push([Link](els[i]));
}
return this.check_validation_and_apply_styles(el_patterns);
},
if ([Link](type)) {
return [el, [Link][type], required];
}
pattern = /.*/;
if (!direct_parent.is('label')) {
parent = direct_parent;
} else {
parent = direct_parent.parent();
}
} else if (validator) {
// Validate using each of the specified (space-delimited) validators.
var validators = [Link](' ');
var last_valid = true, all_valid = true;
for (var iv = 0; iv < [Link]; iv++) {
valid = [Link][validators[iv]].apply(this, [el,
required, parent])
el_validations.push(valid);
all_valid = valid && last_valid;
last_valid = valid;
}
if (all_valid) {
this.S(el).removeAttr(this.invalid_attr);
[Link]('error');
if ([Link] > 0 && [Link].error_labels) {
[Link]([Link].error_class).removeAttr('role');
}
$(el).triggerHandler('valid');
} else {
this.S(el).attr(this.invalid_attr, '');
[Link]('error');
if ([Link] > 0 && [Link].error_labels) {
[Link]([Link].error_class).attr('role', 'alert');
}
$(el).triggerHandler('invalid');
}
} else {
// [Link]('aria-describedby', $(el).find('.error')[0].id);
[Link]([Link].error_class);
if ([Link] > 0 && [Link].error_labels) {
[Link]([Link].error_class).attr('role', 'alert');
}
$(el).triggerHandler('invalid');
}
}
validations = [Link](el_validations);
}
return validations;
},
if (valid) {
[Link](this.invalid_attr).parent().removeClass([Link].error_class);
$(el).triggerHandler('valid');
} else {
[Link](this.invalid_attr,
'').parent().addClass([Link].error_class);
$(el).triggerHandler('invalid');
}
return valid;
},
// Has to count up to make sure the focus gets applied to the top error
for (var i=0; i < count; i++) {
if( group[i].getAttribute('disabled') ){
disabled=true;
valid=true;
} else {
if (group[i].checked){
valid = true;
} else {
if( disabled ){
valid = false;
}
}
}
}
// Has to count up to make sure the focus gets applied to the top error
for (var i = 0; i < count; i++) {
if (valid) {
this.S(group[i]).removeAttr(this.invalid_attr).parent().removeClass([Link].e
rror_class);
$(group[i]).triggerHandler('valid');
} else {
this.S(group[i]).attr(this.invalid_attr,
'').parent().addClass([Link].error_class);
$(group[i]).triggerHandler('invalid');
}
}
return valid;
},
if (valid) {
this.S(el).removeAttr(this.invalid_attr);
[Link]([Link].error_class);
if ([Link] > 0 && settings.error_labels) {
[Link]([Link].error_class);
}
} else {
this.S(el).attr(this.invalid_attr, '');
[Link]([Link].error_class);
if ([Link] > 0 && settings.error_labels) {
[Link]([Link].error_class);
}
}
return valid;
},
if (valid) {
[Link](this.invalid_attr).parent().removeClass([Link].error_class);
} else {
[Link](this.invalid_attr,
'').parent().addClass([Link].error_class);
}
if (!doNotValidateOthers) {
var _this = this;
[Link](function () {
_this.valid_oneof.call(_this, this, null, null, true);
});
}
return valid;
},
[Link] = {
name : 'accordion',
version : '5.5.2',
settings : {
content_class : 'content',
active_class : 'active',
multi_expand : false,
toggleable : true,
callback : function () {}
},
S([Link])
.off('.[Link]')
.on('[Link]', '[' + this.attr_name() + '] > dd > a, [' +
this.attr_name() + '] > li > a', function (e) {
var accordion = S(this).closest('[' + self.attr_name() + ']'),
groupSelector = self.attr_name() + '=' +
[Link](self.attr_name()),
settings = [Link](self.attr_name(true) + '-init') ||
[Link],
target = S('#' + [Link]('#')[1]),
aunts = $('> dd, > li', accordion),
siblings = [Link]('.' + settings.content_class),
active_content = [Link]('.' + settings.active_class);
[Link]();
if ([Link](self.attr_name())) {
siblings = [Link]('[' + groupSelector + '] dd > ' + '.' +
settings.content_class + ', [' + groupSelector + '] li > ' + '.' +
settings.content_class);
aunts = [Link]('[' + groupSelector + '] dd, [' + groupSelector + ']
li');
}
if (!settings.multi_expand) {
[Link](settings.active_class);
[Link](settings.active_class);
[Link]('a').attr('aria-expanded','false');
}
[Link](settings.active_class).parent().addClass(settings.active_class);
[Link](target);
[Link]('toggled', [accordion]);
[Link]('toggled', [target]);
S(this).attr('aria-expanded','true');
});
},
create: function($instance) {
var self = this,
accordion = $instance,
aunts = $('> .accordion-navigation', accordion),
settings = [Link](self.attr_name(true) + '-init') ||
[Link];
[Link]('a').attr('aria-expanded','false');
[Link]('.' + settings.content_class + '.' +
settings.active_class).children('a').attr('aria-expanded','true');
if (settings.multi_expand) {
$[Link]('aria-multiselectable','true');
}
},
reflow : function () {}
};
}(jQuery, window, [Link]));
[Link] = {
name : 'alert',
version : '5.5.2',
settings : {
callback : function () {}
},
events : function () {
var self = this,
S = this.S;
[Link]();
if ([Link]) {
[Link]('alert-close');
[Link]('transitionend webkitTransitionEnd oTransitionEnd', function
(e) {
S(this).trigger('[Link]').remove();
[Link]();
});
} else {
[Link](300, function () {
S(this).trigger('[Link]').remove();
[Link]();
});
}
});
},
reflow : function () {}
};
}(jQuery, window, [Link]));
[Link] = {
name : 'clearing',
version : '5.5.2',
settings : {
templates : {
viewing : '<a href="#" class="clearing-close">×</a>' +
'<div class="visible-img" style="display: none"><div class="clearing-
touch-label"></div><img
src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D" alt="" />' +
'<p class="clearing-caption"></p><a href="#" class="clearing-main-
prev"><span></span></a>' +
'<a href="#" class="clearing-main-next"><span></span></a></div>' +
'<img class="clearing-preload-next" style="display: none"
src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D" alt="" />' +
'<img class="clearing-preload-prev" style="display: none"
src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D" alt="" />'
},
touch_label : '',
[Link](method, options);
if ($scroll_container.length > 0) {
[Link] = $scroll_container;
}
S([Link])
.off('.clearing')
.on('[Link]', 'ul[' + this.attr_name() + '] li ' +
[Link].open_selectors,
function (e, current, target) {
var current = current || S(this),
target = target || current,
next = [Link]('li'),
settings = [Link]('[' + self.attr_name() +
']').data(self.attr_name(true) + '-init'),
image = S([Link]);
[Link]();
if (!settings) {
[Link]();
settings = [Link]('[' + self.attr_name() +
']').data(self.attr_name(true) + '-init');
}
.on('[Link]', '.clearing-main-next',
function (e) { [Link](e, 'next') })
.on('[Link]', '.clearing-main-prev',
function (e) { [Link](e, 'prev') })
.on('[Link]', [Link].close_selectors,
function (e) { [Link](e, this) });
$(document).on('[Link]',
function (e) { [Link](e) });
S(window).off('.clearing').on('[Link]',
function () { [Link]() });
this.swipe_events(scope);
},
S([Link])
.on('[Link]', '.visible-img', function (e) {
if (![Link]) { e = [Link]; }
var data = {
start_page_x : [Link][0].pageX,
start_page_y : [Link][0].pageY,
start_time : (new Date()).getTime(),
delta_x : 0,
is_scrolling : undefined
};
S(this).data('swipe-transition', data);
[Link]();
})
.on('[Link]', '.visible-img', function (e) {
if (![Link]) {
e = [Link];
}
// Ignore pinch/zoom events
if ([Link] > 1 || [Link] && [Link] !== 1) {
return;
}
if ([Link]) {
data.delta_x = -data.delta_x;
}
if ($[Link]().hasClass('carousel')) {
return;
}
$[Link]('<div id="foundationClearingHolder"></div>');
if (grid[0] == null) {
return;
} else {
grid_outerHTML = grid[0].outerHTML;
}
if ([Link]) {
wrapper = $(wrapper).find('.clearing-touch-label').html(touch_label).end();
}
[Link](wrapper).remove();
},
[Link](function () {
error = true;
});
function startLoad() {
setTimeout(function () {
this.image_loaded(image, function () {
if ([Link]() === 1 && !error) {
[Link](this);
} else {
[Link](this, image);
}
}.bind(this));
}.bind(this), 100);
}
function cb (image) {
var $image = $(image);
$[Link]('visibility', 'visible');
$[Link]('imageVisible');
// toggle the gallery
[Link]('overflow', 'hidden');
[Link]('clearing-blackout');
[Link]('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 () {
[Link]('li').siblings().removeClass('visible');
[Link]('li').addClass('visible');
});
visible_image.trigger('[Link]')
}
if (![Link]()) {
visible_image.trigger('[Link]');
// set the image to the selected thumbnail
loaded = [Link]($image);
if ([Link]) {
image
.attr('data-interchange', [Link])
.foundation('interchange', 'reflow');
} else {
image
.attr('src', [Link])
.attr('data-interchange', '');
}
[Link]('visibility', 'hidden');
[Link](this);
}
},
return false;
},
[Link]();
[Link](clearing, direction);
},
resize : function () {
var image = $('img', '.clearing-blackout .visible-img'),
label = $('.clearing-touch-label', '.clearing-blackout');
if ([Link]) {
this.center_and_label(image, label);
[Link]('[Link]')
}
},
// visual adjustments
fix_height : function (target) {
var lis = [Link]().children(),
self = this;
[Link](function () {
var li = self.S(this),
image = [Link]('img');
return this;
},
if ([Link]().length > 0) {
this.S('.clearing-main-next', visible_image).removeClass('disabled');
} else {
this.S('.clearing-main-next', visible_image).addClass('disabled');
}
if ([Link]().length > 0) {
this.S('.clearing-main-prev', visible_image).removeClass('disabled');
} else {
this.S('.clearing-main-prev', visible_image).addClass('disabled');
}
},
[Link]($image);
return {
'src': href ? href : $[Link]('src'),
'interchange': href ? interchange : $[Link]('clearing-interchange')
}
},
if (new_a.length) {
src = new_a.attr('href');
interchange = new_a.data('clearing-interchange');
} else {
image = this.S('img', img);
src = [Link]('src');
interchange = [Link]('clearing-interchange');
}
if (interchange) {
preload_img.attr('data-interchange', interchange);
} else {
preload_img.attr('src', src);
preload_img.attr('data-interchange', '');
}
}
return this;
},
// image caption
if (caption) {
container
.html(caption)
.show();
} else {
container
.text('')
.hide();
}
return this;
},
// directional methods
if ([Link]) {
this.S('img', target)
.trigger('[Link]', [current, target])
.trigger('[Link]');
}
},
callback();
},
[Link].up_count = up_count;
if ([Link]([Link].prev_index, target_index)) {
if ((target_index > up_count) && target_index > [Link].prev_index) {
response = 'right';
} else if ((target_index > up_count - 1) && target_index <=
[Link].prev_index) {
response = 'left';
} else {
response = false;
}
} else {
response = 'skip';
}
[Link].prev_index = target_index;
return response;
},
// lock management
lock : function () {
[Link] = true;
},
unlock : function () {
[Link] = false;
},
locked : function () {
return [Link];
},
off : function () {
this.S([Link]).off('.[Link]');
this.S(window).off('.[Link]');
},
reflow : function () {
[Link]();
}
};
[Link] = {
name : 'dropdown',
version : '5.5.2',
settings : {
active_class : 'open',
disabled_class : 'disabled',
mega_class : 'mega',
align : 'bottom',
is_hover : false,
hover_timeout : 150,
opened : function () {},
closed : function () {}
},
S([Link])
.off('.dropdown')
.on('[Link]', '[' + this.attr_name() + ']', function (e) {
var settings = S(this).data(self.attr_name(true) + '-init') ||
[Link];
if (!settings.is_hover || [Link]) {
[Link]();
if (S(this).parent('[data-reveal-id]').length) {
[Link]();
}
[Link]($(this));
}
})
.on('[Link]', '[' + this.attr_name() + '], [' +
this.attr_name() + '-content]', function (e) {
var $this = S(this),
dropdown,
target;
clearTimeout([Link]);
if ($[Link](self.data_attr())) {
dropdown = S('#' + $[Link](self.data_attr()));
target = $this;
} else {
dropdown = $this;
target = S('[' + self.attr_name() + '="' + [Link]('id') + '"]');
}
if (settings.is_hover) {
[Link](self, [dropdown, target]);
}
})
.on('[Link]', '[' + this.attr_name() + '], [' +
this.attr_name() + '-content]', function (e) {
var $this = S(this);
var settings;
if ($[Link](self.data_attr())) {
settings = $[Link](self.data_attr(true) + '-init') ||
[Link];
} else {
var target = S('[' + self.attr_name() + '="' + S(this).attr('id') +
'"]'),
settings = [Link](self.attr_name(true) + '-init') ||
[Link];
}
[Link] = setTimeout(function () {
if ($[Link](self.data_attr())) {
if (settings.is_hover) {
[Link](self, S('#' + $[Link](self.data_attr())));
}
} else {
if (settings.is_hover) {
[Link](self, $this);
}
}
}.bind(this), settings.hover_timeout);
})
.on('[Link]', function (e) {
var parent = S([Link]).closest('[' + self.attr_name() + '-content]');
var links = [Link]('a');
if (!(S([Link]).data('revealId')) &&
([Link] > 0 && (S([Link]).is('[' + self.attr_name() + '-
content]') ||
$.contains([Link]()[0], [Link])))) {
[Link]();
return;
}
S(window)
.off('.dropdown')
.on('[Link]', [Link](function () {
[Link](self);
}, 50));
[Link]();
},
self.S(this).trigger('[Link]', [dropdown]);
}
});
[Link]('f-open-' + this.attr_name(true));
},
closeall : function () {
var self = this;
$.each(self.S('.f-open-' + this.attr_name(true)), function () {
[Link](self, self.S(this));
});
},
data_attr : function () {
if ([Link] > 0) {
return [Link] + '-' + [Link];
}
return [Link];
},
if ([Link]([Link].active_class)) {
[Link](this, dropdown);
if ([Link]('target') !== [Link](0)) {
[Link](this, dropdown, target);
}
} else {
[Link](this, dropdown, target);
}
},
resize : function () {
var dropdown = this.S('[' + this.attr_name() + '-content].open');
var target = $([Link]("target"));
this.clear_idx();
if ([Link]()) {
var p = [Link](dropdown, target, settings);
[Link]('style', '').css({
position : 'absolute',
top : offset
});
return dropdown;
},
[Link]('style', '').css(css);
},
[Link] -= [Link];
[Link] -= [Link];
if () {
//miss top
if ([Link]().top <= [Link]()) {
[Link] = true;
actualBoundary = [Link] - actualMarginWidth;
[Link] = true;
}
//miss right
if ([Link]().left + [Link]() > [Link]().left +
actualMarginWidth && [Link]().left - actualMarginWidth > [Link]()) {
[Link] = true;
[Link] = false;
}
//miss left
if ([Link]().left - [Link]() <= 0) {
[Link] = true;
[Link] = false;
}
}
return p;
},
[Link]('drop-top');
if ([Link] == true) {
[Link] = [Link] + [Link]() + [Link]();
[Link]('drop-top');
}
if ([Link] == true) {
[Link] = [Link] - [Link]() + [Link]();
}
if ([Link]) {
return {left : [Link] - [Link]() + [Link](),
top : [Link] - [Link]()};
}
if ([Link] == true) {
[Link] = [Link] - [Link]() + [Link]();
}
if ([Link]) {
return {left : [Link] - [Link]() + [Link](), top : [Link] +
[Link]()};
}
[Link]('drop-left');
if ([Link] == true) {
[Link] = [Link] + [Link]();
[Link] = [Link] + [Link]();
[Link]('drop-left');
}
[Link]('drop-right');
if ([Link] == true) {
[Link] = [Link] - [Link]();
[Link] = [Link] + [Link]();
[Link]('drop-right');
} else {
[Link] = true;
}
if ([Link](settings.mega_class)) {
pip_offset_base = [Link] + ([Link]() / 2) - 8;
} else if ([Link]()) {
pip_offset_base += [Link] - 8;
}
this.rule_idx = [Link];
//default
var sel_before = '.[Link]:before',
sel_after = '.[Link]:after',
css_before = 'left: ' + pip_offset_base + 'px;',
css_after = 'left: ' + (pip_offset_base - 1) + 'px;';
if ([Link] == true) {
pip_offset_base = [Link]() - 23;
sel_before = '.[Link]:before',
sel_after = '.[Link]:after',
css_before = 'left: ' + pip_offset_base + 'px;',
css_after = 'left: ' + (pip_offset_base - 1) + 'px;';
}
//just a case where right is fired, but its not missing right
if ([Link] == true) {
sel_before = '.[Link]:before',
sel_after = '.[Link]:after',
css_before = 'left:-12px;',
css_after = 'left:-14px;';
}
if ([Link]) {
[Link]([sel_before, '{', css_before, '}'].join(' '),
this.rule_idx);
[Link]([sel_after, '{', css_after, '}'].join(' '), this.rule_idx
+ 1);
} else {
[Link](sel_before, css_before, this.rule_idx);
[Link](sel_after, css_after, this.rule_idx + 1);
}
},
small : function () {
return matchMedia(Foundation.media_queries.small).matches &&
!matchMedia(Foundation.media_queries.medium).matches;
},
off : function () {
this.S([Link]).off('.[Link]');
this.S('html, body').off('.[Link]');
this.S(window).off('.[Link]');
this.S('[data-dropdown-content]').off('.[Link]');
},
reflow : function () {}
};
}(jQuery, window, [Link]));
[Link] = {
name : 'equalizer',
version : '5.5.2',
settings : {
use_tallest : true,
before_height_change : $.noop,
after_height_change : $.noop,
equalize_on_stack : false,
act_on_hidden_el: false
},
events : function () {
this.S(window).off('.equalizer').on('[Link]', function (e) {
[Link]();
}.bind(this));
},
equalize : function (equalizer) {
var isStacked = false,
group = [Link]('equalizer'),
settings = [Link](this.attr_name(true)+'-init') || [Link],
vals,
firstTopOffset;
if (settings.act_on_hidden_el) {
vals = group ? [Link]('['+this.attr_name()+'-watch="'+group+'"]') :
[Link]('['+this.attr_name()+'-watch]');
}
else {
vals = group ? [Link]('['+this.attr_name()+'-
watch="'+group+'"]:visible') : [Link]('['+this.attr_name()+'-
watch]:visible');
}
if ([Link] === 0) {
return;
}
settings.before_height_change();
[Link]('[Link]');
[Link]('inherit');
if (settings.use_tallest) {
var max = [Link](null, heights);
[Link]('height', max);
} else {
var min = [Link](null, heights);
[Link]('height', min);
}
settings.after_height_change();
[Link]('[Link]');
},
reflow : function () {
var self = this;
if (media_query) {
media_query = 'is_' + media_query.replace(/-/g, '_');
if ([Link](media_query)) {
ignore_media_query = false;
}
}
[Link] = {
name : 'interchange',
version : '5.5.2',
cache : {},
images_loaded : false,
nodes_loaded : false,
settings : {
load_attr : 'interchange',
named_queries : {
'default' : 'only screen',
'small' : Foundation.media_queries['small'],
'small-only' : Foundation.media_queries['small-only'],
'medium' : Foundation.media_queries['medium'],
'medium-only' : Foundation.media_queries['medium-only'],
'large' : Foundation.media_queries['large'],
'large-only' : Foundation.media_queries['large-only'],
'xlarge' : Foundation.media_queries['xlarge'],
'xlarge-only' : Foundation.media_queries['xlarge-only'],
'xxlarge' : Foundation.media_queries['xxlarge'],
'landscape' : 'only screen and (orientation: landscape)',
'portrait' : 'only screen and (orientation: portrait)',
'retina' : 'only screen and (-webkit-min-device-pixel-ratio: 2),' +
'only screen and (min--moz-device-pixel-ratio: 2),' +
'only screen and (-o-min-device-pixel-ratio: 2/1),' +
'only screen and (min-device-pixel-ratio: 2),' +
'only screen and (min-resolution: 192dpi),' +
'only screen and (min-resolution: 2dppx)'
},
directives : {
replace : function (el, path, trigger) {
// The trigger argument, if called within the directive, fires
// an event named after the directive on the element, passing
// any parameters along to the event that you pass to trigger.
//
// ex. trigger(), trigger([a, b, c]), or trigger(a, b, c)
//
// This allows you to bind a callback like so:
// $('#interchangeContainer').on('replace', function (e, a, b, c) {
// [Link]($(this).html(), a, b, c);
// });
[Link]("src", path);
return trigger(el[0].src);
}
var last_path = [Link](this.data_attr + '-last-path'),
self = this;
if (last_path == path) {
return;
}
if (/\.(gif|jpg|jpeg|tiff|png)([?#].*)?/[Link](path)) {
$(el).css('background-image', 'url(' + path + ')');
[Link]('interchange-last-path', path);
return trigger(path);
}
}
}
},
this.data_attr = this.set_data_attr();
$.extend(true, [Link], method, options);
[Link](method, options);
[Link]();
},
get_media_hash : function () {
var mediaHash = '';
for (var queryName in [Link].named_queries ) {
mediaHash +=
matchMedia([Link].named_queries[queryName]).[Link]();
}
return mediaHash;
},
events : function () {
var self = this, prevMediaHash;
$(window)
.off('.interchange')
.on('[Link]', [Link](function () {
var currMediaHash = self.get_media_hash();
if (currMediaHash !== prevMediaHash) {
[Link]();
}
prevMediaHash = currMediaHash;
}, 50));
return this;
},
resize : function () {
var cache = [Link];
if (!this.images_loaded || !this.nodes_loaded) {
setTimeout($.proxy([Link], this), 50);
return;
}
return function() {
[Link]([Link][1], args);
}
}(passed)));
}
}
}
},
if (count > 0) {
var el = this.S('[' + this.add_namespace('data-uuid') + '="' + uuid +
'"]');
while (count--) {
var mq, rule = scenarios[count][2];
if ([Link].named_queries.hasOwnProperty(rule)) {
mq = matchMedia([Link].named_queries[rule]);
} else {
mq = matchMedia(rule);
}
if ([Link]) {
return {el : el, scenario : scenarios[count]};
}
}
}
return false;
},
update_images : function () {
var images = this.S('img[' + this.data_attr + ']'),
count = [Link],
i = count,
loaded_count = 0,
data_attr = this.data_attr;
[Link] = {};
this.cached_images = [];
this.images_loaded = (count === 0);
while (i--) {
loaded_count++;
if (images[i]) {
var str = images[i].getAttribute(data_attr) || '';
if ([Link] > 0) {
this.cached_images.push(images[i]);
}
}
return this;
},
update_nodes : function () {
var nodes = this.S('[' + this.data_attr + ']').not('img'),
count = [Link],
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 ([Link] > 0) {
this.cached_nodes.push(nodes[i]);
}
return this;
},
while (i--) {
[Link]($(this['cached_' + type][i]));
}
return $(window).trigger('[Link]');
},
if ([Link] > 0) {
return trimmed;
}
return 'replace';
},
} else {
var cached_split = scenario[0].split(/,\s*$/),
path = cached_split[0],
directive = '';
}
if (i > 0) {
while (i--) {
// split array between comma delimited content and mq
// regex: comma, optional space, open parenthesis
var scenario = raw_arr[i].split(/,\s?\(/);
if ([Link] > 1) {
var params = this.parse_scenario(scenario);
[Link](params);
}
}
}
if ([Link][current_uuid]) {
return [Link][current_uuid];
}
[Link](this.add_namespace('data-uuid'), uuid);
return [Link][uuid] = scenarios;
},
return str;
},
return [Link].load_attr;
}
if ([Link] > 0) {
return 'data-' + [Link] + '-' + [Link].load_attr;
}
while (i--) {
if (raw[i].replace(/[\W\d]+/, '').length > 4) {
[Link](raw[i]);
}
}
return output;
},
reflow : function () {
[Link]('images', true);
[Link]('nodes', true);
}
};
[Link] = {
name : 'joyride',
version : '5.5.2',
defaults : {
expose : false, // turn on or off the expose feature
modal : true, // Whether to cover page with modal
during the tour
keyboard : true, // enable left, right and esc
keystrokes
tip_location : 'bottom', // 'top' or 'bottom' in relation to
parent
nub_position : 'auto', // override on a per tooltip bases
scroll_speed : 1500, // Page scrolling speed in
milliseconds, 0 = no scroll animation
scroll_animation : 'linear', // supports 'swing' and 'linear',
extend with jQuery UI.
timer : 0, // 0 = no timer , all other numbers =
timer in milliseconds
start_timer_on_click : true, // true or false - true requires
clicking the first button start the timer
start_offset : 0, // the index of the tooltip you want to
start on (index of the li)
next_button : true, // true or false to control whether a
next button is used
prev_button : true, // true or false to control whether a
prev button is used
tip_animation : 'fade', // 'pop' or 'fade' in each tip
pause_after : [], // array of indexes where to pause the
tour after
exposed : [], // array of expose elements
tip_animation_fade_speed : 300, // when tipAnimation = 'fade' this is
speed in milliseconds for the transition
cookie_monster : false, // true or false to control whether
cookies are used
cookie_name : 'joyride', // Name the cookie you'll use
cookie_domain : false, // Will this cookie be attached to a
domain, ie. '.[Link]'
cookie_expires : 365, // set when you would like the cookie
to expire.
tip_container : 'body', // Where will the tip be attached
abort_on_close : true, // When true, the close event will not
fire any callback
tip_location_patterns : {
top : ['bottom'],
bottom : [], // bottom should not need to be repositioned
left : ['right', 'top', 'bottom'],
right : ['left', 'top', 'bottom']
},
post_ride_callback : function () {}, // A method to call once the tour
closes (canceled or complete)
post_step_callback : function () {}, // A method to call after each
step
pre_step_callback : function () {}, // A method to call before each
step
pre_ride_callback : function () {}, // A method to call before the
tour starts (passed index, tip, and cloned exposed element)
post_expose_callback : function () {}, // A method to call after an
element has been exposed
template : { // HTML segments for tip layout
link : '<a href="#close" class="joyride-close-tip">×</a>',
timer : '<div class="joyride-timer-indicator-wrap"><span
class="joyride-timer-indicator"></span></div>',
tip : '<div class="joyride-tip-guide"><span class="joyride-
nub"></span></div>',
wrapper : '<div class="joyride-content-wrapper"></div>',
button : '<a href="#" class="small button joyride-next-tip"></a>',
prev_button : '<a href="#" class="small button joyride-prev-tip"></a>',
modal : '<div class="joyride-modal-bg"></div>',
expose : '<div class="joyride-expose-wrapper"></div>',
expose_cover : '<div class="joyride-expose-cover"></div>'
},
expose_add_class : '' // One or more space-separated class names to be added
to exposed element
},
init : function (scope, method, options) {
[Link](this, 'throttle random_str');
[Link](method, options)
},
go_next : function () {
if ([Link].$[Link]().length < 1) {
[Link]();
} else if ([Link] > 0) {
clearTimeout([Link]);
[Link]();
[Link]();
[Link]();
} else {
[Link]();
[Link]();
}
},
go_prev : function () {
if ([Link].$[Link]().length < 1) {
// Do nothing if there are no prev element
} else if ([Link] > 0) {
clearTimeout([Link]);
[Link]();
[Link](null, true);
[Link]();
} else {
[Link]();
[Link](null, true);
}
},
events : function () {
var self = this;
$([Link])
.off('.joyride')
.on('[Link]', '.joyride-next-tip, .joyride-modal-bg', function
(e) {
[Link]();
this.go_next()
}.bind(this))
.on('[Link]', '.joyride-prev-tip', function (e) {
[Link]();
this.go_prev();
}.bind(this))
switch ([Link]) {
case 39: // right arrow
[Link]();
this.go_next();
break;
case 37: // left arrow
[Link]();
this.go_prev();
break;
case 27: // escape
[Link]();
[Link]([Link].abort_on_close);
}
}.bind(this));
$(window)
.off('.joyride')
.on('[Link]', [Link](function () {
if ($('[' + self.attr_name() + ']').length > 0 && [Link].$next_tip
&& [Link]) {
if ([Link] > 0) {
var $els = $([Link]);
$[Link](function () {
var $this = $(this);
self.un_expose($this);
[Link]($this);
});
}
if (self.is_phone()) {
self.pos_phone();
} else {
self.pos_default(false);
}
}
}, 100));
},
start : function () {
var self = this,
$this = $('[' + this.attr_name() + ']', [Link]),
integer_settings = ['timer', 'scrollSpeed', 'startOffset',
'tipAnimationFadeSpeed', 'cookieExpires'],
int_settings_count = integer_settings.length;
if (!$[Link] > 0) {
return;
}
if (![Link]) {
[Link]();
}
[Link] = $[Link](this.attr_name(true) + '-init');
// Make sure that settings parsed from data_options are integers where
necessary
var i = int_settings_count;
while (i--) {
[Link][integer_settings[i]] =
parseInt([Link][integer_settings[i]], 10);
}
[Link]({$li : $this, index : index});
});
}
},
resume : function () {
this.set_li();
[Link]();
},
$blank = $([Link]).addClass(opts.tip_class);
content = $.trim($([Link]).html()) +
this.prev_button_text(opts.prev_button_text, [Link]) +
this.button_text(opts.button_text) +
[Link] +
this.timer_instance([Link]);
$[Link]($([Link]));
$[Link]().attr(this.add_namespace('data-index'), [Link]);
$('.joyride-content-wrapper', $blank).append(content);
return $blank[0];
},
// Add the disabled class to the button if it's the first element
if (idx == 0) {
txt = $
([Link].prev_button).append(txt).addClass('disabled')[0].outerHTML;
} else {
txt = $([Link].prev_button).append(txt)[0].outerHTML;
}
} else {
txt = '';
}
return txt;
},
$([Link].tip_container).append($tip_content);
},
// are we paused?
if ([Link].$li === undefined || ($.inArray([Link].$[Link](),
[Link].pause_after) === -1)) {
[Link] = 0;
[Link].pre_step_callback([Link].$[Link](), [Link].
$next_tip);
[Link].tip_settings.tip_location_pattern =
[Link].tip_location_patterns[[Link].tip_settings.tip_location];
$timer = [Link].$next_tip.find('.joyride-timer-indicator');
if (/pop/[Link]([Link].tip_animation)) {
$[Link](0);
if ([Link] > 0) {
[Link].$next_tip.show();
setTimeout(function () {
$[Link]({
width : $[Link]().width()
}, [Link], 'linear');
}.bind(this), [Link].tip_animation_fade_speed);
} else {
[Link].$next_tip.show();
} else if (/fade/[Link]([Link].tip_animation)) {
$[Link](0);
if ([Link] > 0) {
[Link].$next_tip
.fadeIn([Link].tip_animation_fade_speed)
.show();
setTimeout(function () {
$[Link]({
width : $[Link]().width()
}, [Link], 'linear');
}.bind(this), [Link].tip_animation_fade_speed);
} else {
[Link].
$next_tip.fadeIn([Link].tip_animation_fade_speed);
}
}
[Link].$current_tip = [Link].$next_tip;
[Link](init, is_prev);
} else {
[Link]();
}
} else {
[Link] = true;
},
is_phone : function () {
return matchMedia(Foundation.media_queries.small).matches &&
!matchMedia(Foundation.media_queries.medium).matches;
},
hide : function () {
if ([Link] && [Link]) {
this.un_expose();
}
if (![Link]) {
$('.joyride-modal-bg').hide();
}
this.set_target();
},
set_next_tip : function () {
[Link].$next_tip = $('.joyride-tip-guide').eq([Link].
$[Link]());
[Link].$next_tip.data('closed', '');
},
set_target : function () {
var cl = [Link].$[Link](this.add_namespace('data-class')),
id = [Link].$[Link](this.add_namespace('data-id')),
$sel = function () {
if (id) {
return $([Link](id));
} else if (cl) {
return $('.' + cl).first();
} else {
return $('body');
}
};
[Link].$target = $sel();
},
scroll_to : function () {
var window_half, tipOffset;
window_half = $(window).height() / 2;
tipOffset = [Link]([Link].$[Link]().top - window_half +
[Link].$next_tip.outerHeight());
if (tipOffset != 0) {
$('html, body').stop().animate({
scrollTop : tipOffset
}, [Link].scroll_speed, 'swing');
}
},
paused : function () {
return ($.inArray(([Link].$[Link]() + 1), [Link].pause_after)
=== -1);
},
restart : function () {
[Link]();
[Link].$li = undefined;
[Link]('init');
},
if (!/body/[Link]([Link].$[Link])) {
var topAdjustment = [Link].tip_settings.tipAdjustmentY ?
parseInt([Link].tip_settings.tipAdjustmentY) : 0,
leftAdjustment = [Link].tip_settings.tipAdjustmentX ?
parseInt([Link].tip_settings.tipAdjustmentX) : 0;
if ([Link]()) {
if ([Link]) {
[Link].$next_tip.css({
top : ([Link].$[Link]().top + nub_height +
[Link].$[Link]() + topAdjustment),
left : [Link].$[Link]().left + [Link].
$[Link]() - [Link].$next_tip.outerWidth() + leftAdjustment});
} else {
[Link].$next_tip.css({
top : ([Link].$[Link]().top + nub_height +
[Link].$[Link]() + topAdjustment),
left : [Link].$[Link]().left + leftAdjustment});
}
this.nub_position($nub, [Link].tip_settings.nub_position,
'top');
} else if ([Link]()) {
if ([Link]) {
[Link].$next_tip.css({
top : ([Link].$[Link]().top - [Link].
$next_tip.outerHeight() - nub_height + topAdjustment),
left : [Link].$[Link]().left + [Link].
$[Link]() - [Link].$next_tip.outerWidth()});
} else {
[Link].$next_tip.css({
top : ([Link].$[Link]().top - [Link].
$next_tip.outerHeight() - nub_height + topAdjustment),
left : [Link].$[Link]().left + leftAdjustment});
}
this.nub_position($nub, [Link].tip_settings.nub_position,
'bottom');
} else if ([Link]()) {
[Link].$next_tip.css({
top : [Link].$[Link]().top + topAdjustment,
left : ([Link].$[Link]() + [Link].
$[Link]().left + nub_width + leftAdjustment)});
this.nub_position($nub, [Link].tip_settings.nub_position,
'left');
} else if ([Link]()) {
[Link].$next_tip.css({
top : [Link].$[Link]().top + topAdjustment,
left : ([Link].$[Link]().left - [Link].
$next_tip.outerWidth() - nub_width + leftAdjustment)});
this.nub_position($nub, [Link].tip_settings.nub_position,
'right');
if () &&
[Link] < [Link].tip_settings.tip_location_pattern.length) {
$[Link]('bottom')
.removeClass('top')
.removeClass('right')
.removeClass('left');
[Link].tip_settings.tip_location =
[Link].tip_settings.tip_location_pattern[[Link]];
[Link]++;
this.pos_default();
} else if ([Link].$[Link]) {
this.pos_modal($nub);
if (toggle) {
[Link].$next_tip.hide();
[Link].$next_tip.css('visibility', 'visible');
}
},
$[Link]('bottom')
.removeClass('top')
.removeClass('right')
.removeClass('left');
if (toggle) {
[Link].$next_tip.css('visibility', 'hidden');
[Link].$next_tip.show();
}
if (!/body/[Link]([Link].$[Link])) {
if ([Link]()) {
[Link].$next_tip.offset({top : [Link].
$[Link]().top - tip_height - nub_height});
$[Link]('bottom');
} else {
[Link].$next_tip.offset({top : [Link].$[Link]().top
+ target_height + nub_height});
$[Link]('top');
}
} else if ([Link].$[Link]) {
this.pos_modal($nub);
}
if (toggle) {
[Link].$next_tip.hide();
[Link].$next_tip.css('visibility', 'visible');
}
},
this.show_modal();
},
show_modal : function () {
if (![Link].$next_tip.data('closed')) {
var joyridemodalbg = $('.joyride-modal-bg');
if ([Link] < 1) {
var joyridemodalbg = $([Link]);
[Link]('body');
}
if (/pop/[Link]([Link].tip_animation)) {
[Link]();
} else {
[Link]([Link].tip_animation_fade_speed);
}
}
},
expose : function () {
var expose,
exposeCover,
el,
origCSS,
origClasses,
randId = 'expose-' + this.random_str(6);
if ([Link] < 1) {
if ([Link]) {
[Link]('element not valid', el);
}
return false;
}
expose = $([Link]);
[Link].$[Link](expose);
[Link]({
top : [Link]().top,
left : [Link]().left,
width : [Link](true),
height : [Link](true)
});
exposeCover = $([Link].expose_cover);
origCSS = {
zIndex : [Link]('z-index'),
position : [Link]('position')
};
if ([Link] == 'static') {
[Link]('position', 'relative');
}
[Link]('expose-css', origCSS);
[Link]('orig-class', origClasses);
[Link]('class', origClasses + ' ' + [Link].expose_add_class);
[Link]({
top : [Link]().top,
left : [Link]().left,
width : [Link](true),
height : [Link](true)
});
if ([Link]) {
this.show_modal();
}
[Link].$[Link](exposeCover);
[Link](randId);
[Link](randId);
[Link]('expose', randId);
[Link].post_expose_callback([Link].$[Link](), [Link].
$next_tip, el);
this.add_exposed(el);
},
un_expose : function () {
var exposeId,
el,
expose,
origCSS,
origClasses,
clearAll = false;
if ([Link] < 1) {
if ([Link]) {
[Link]('element not valid', el);
}
return false;
}
exposeId = [Link]('expose');
expose = $('.' + exposeId);
if ([Link] > 1) {
clearAll = arguments[1];
}
origCSS = [Link]('expose-css');
if ([Link] == 'auto') {
[Link]('z-index', '');
} else {
[Link]('z-index', [Link]);
}
if ([Link] != [Link]('position')) {
if ([Link] == 'static') {// this is default, no need to set it.
[Link]('position', '');
} else {
[Link]('position', [Link]);
}
}
origClasses = [Link]('orig-class');
[Link]('class', origClasses);
[Link]('orig-classes');
[Link]('expose');
[Link]('expose-z-index');
this.remove_exposed(el);
},
while (i--) {
if ([Link][i] == search) {
[Link](i, 1);
return;
}
}
},
center : function () {
var $w = $(window);
[Link].$next_tip.css({
top : ((($[Link]() - [Link].$next_tip.outerHeight()) / 2) +
$[Link]()),
left : ((($[Link]() - [Link].$next_tip.outerWidth()) / 2) +
$[Link]())
});
return true;
},
bottom : function () {
return /bottom/[Link]([Link].tip_settings.tip_location);
},
top : function () {
return /top/[Link]([Link].tip_settings.tip_location);
},
right : function () {
return /right/[Link]([Link].tip_settings.tip_location);
},
left : function () {
return /left/[Link]([Link].tip_settings.tip_location);
},
return [
[Link]().top < top,
right < [Link]().left + [Link](),
bottom < [Link]().top + [Link](),
[Link]() > [Link]().left
];
},
while (i--) {
if (hidden_corners[i]) {
return false;
}
}
return true;
},
startTimer : function () {
if ([Link].$[Link]) {
[Link] = setTimeout(function () {
[Link]();
[Link]();
[Link]();
}.bind(this), [Link]);
} else {
clearTimeout([Link]);
}
},
if ([Link] > 0) {
clearTimeout([Link]);
}
[Link].$next_tip.data('closed', true);
[Link] = false;
$('.joyride-modal-bg').hide();
[Link].$current_tip.hide();
$('.joyride-tip-guide').remove();
},
off : function () {
$([Link]).off('.joyride');
$(window).off('.joyride');
$('.joyride-close-tip, .joyride-next-tip, .joyride-modal-
bg').off('.joyride');
$('.joyride-tip-guide, .joyride-modal-bg').remove();
clearTimeout([Link]);
[Link] = {};
},
reflow : function () {}
};
}(jQuery, window, [Link]));
[Link]['magellan-expedition'] = {
name : 'magellan-expedition',
version : '5.5.2',
settings : {
active_class : 'active',
threshold : 0, // pixels from the top of the expedition for it to become
fixes
destination_threshold : 20, // pixels from the top of destination for it to
be considered active
throttle_delay : 30, // calculation throttling to increase framerate
fixed_top : 0, // top distance in pixels assigend to the fixed element on
scroll
offset_by_height : true, // whether to offset the destination by the
expedition height. Usually you want this to be true, unless your expedition is on
the side.
duration : 700, // animation duration time
easing : 'swing' // animation easing
},
events : function () {
var self = this,
S = self.S,
settings = [Link];
S([Link])
.off('.magellan')
.on('[Link]', '[' + self.add_namespace('data-magellan-
arrival') + '] a[href*=#]', function (e) {
var sameHost = (([Link] === [Link]) || ![Link]),
samePath = [Link]([Link]) ===
[Link]([Link]),
testHash = [Link](/(:|\.|\/)/g, '\\$1'),
anchor = this;
if ([Link] === 0) {
target = $('#' + hash);
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]', [Link]).each(function (idx, el) {
var expedition = $(this),
settings = [Link]('magellan-expedition-init'),
styles = [Link]('styles'), // save styles
top_offset, fixed_top;
[Link]('style', '');
top_offset = [Link]().top + [Link];
[Link](self.data_attr('magellan-top-offset'), top_offset);
[Link]('style', styles);
});
},
update_expedition_positions : function () {
var self = this,
window_top_offset = $(window).scrollTop();
update_arrivals : function () {
var self = this,
window_top_offset = $(window).scrollTop();
if (!active_item) {
[Link](settings.active_class);
}
});
},
return str;
},
off : function () {
this.S([Link]).off('.magellan');
this.S(window).off('.magellan');
},
reflow : function () {
var self = this;
// remove placeholder expeditions used for height calculation purposes
$('[' + self.add_namespace('data-magellan-expedition-clone') + ']',
[Link]).remove();
}
};
}(jQuery, window, [Link]));
[Link] = {
name : 'offcanvas',
version : '5.5.2',
settings : {
open_method : 'move',
close_on_click : false
},
events : function () {
var self = this,
S = self.S,
move_class = '',
right_postfix = '',
left_postfix = '';
S([Link]).off('.offcanvas')
.on('[Link]', '.left-off-canvas-toggle', function (e) {
self.click_toggle_class(e, move_class + right_postfix);
if ([Link].open_method !== 'overlap') {
S('.left-submenu').removeClass(move_class + right_postfix);
}
$('.left-off-canvas-toggle').attr('aria-expanded', 'true');
})
.on('[Link]', '.left-off-canvas-menu a', function (e) {
var settings = self.get_settings(e);
var parent = S(this).parent();
if ($off_canvas.length === 0) {
$off_canvas = this.S('.off-canvas-wrap');
}
return $off_canvas;
},
reflow : function () {}
};
}(jQuery, window, [Link]));
[Link] = function () {
return slides_container.children(settings.slide_selector);
};
[Link]().first().addClass(settings.active_slide_class);
self.build_markup = function () {
slides_container.wrap('<div class="' + settings.container_class +
'"></div>');
container = slides_container.parent();
slides_container.addClass(settings.slides_container_class);
if (settings.stack_on_small) {
[Link](settings.stack_on_small_class);
}
if (settings.navigation_arrows) {
[Link]($('<a
href="#"><span></span></a>').addClass(settings.prev_class));
[Link]($('<a
href="#"><span></span></a>').addClass(settings.next_class));
}
if ([Link]) {
timer_container = $('<div>').addClass(settings.timer_container_class);
timer_container.append('<span>');
timer_container.append($('<div>').addClass(settings.timer_progress_class));
timer_container.addClass(settings.timer_paused_class);
[Link](timer_container);
}
if (settings.slide_number) {
number_container = $('<div>').addClass(settings.slide_number_class);
number_container.append('<span></span> ' + settings.slide_number_text + '
<span></span>');
[Link](number_container);
}
if ([Link]) {
bullets_container = $('<ol>').addClass(settings.bullets_container_class);
[Link](bullets_container);
bullets_container.wrap('<div class="orbit-bullets-container"></div>');
[Link]().each(function (idx, el) {
var bullet = $('<li>').attr('data-orbit-slide', idx).on('click',
self.link_bullet);;
bullets_container.append(bullet);
});
}
};
[Link]('zIndex', 2);
[Link](settings.active_slide_class);
[Link]('zIndex', 4).addClass(settings.active_slide_class);
slides_container.trigger('[Link]');
settings.before_slide_change();
self.update_active_link(next_idx);
self.timer_callback = function () {
self._goto(idx + 1, true);
}
self.compute_dimensions = function () {
var current = $([Link]().get(idx));
var h = [Link]();
if (!settings.variable_height) {
[Link]().each(function(){
if ($(this).outerHeight() > h) { h = $(this).outerHeight(); }
});
}
slides_container.height(h);
};
self.create_timer = function () {
var t = new Timer(
[Link]('.' + settings.timer_container_class),
settings,
self.timer_callback
);
return t;
};
self.stop_timer = function () {
if (typeof timer === 'object') {
[Link]();
}
};
self.toggle_timer = function () {
var t = [Link]('.' + settings.timer_container_class);
if ([Link](settings.timer_paused_class)) {
if (typeof timer === 'undefined') {timer = self.create_timer();}
[Link]();
} else {
if (typeof timer === 'object') {[Link]();}
}
};
[Link] = function () {
self.build_markup();
if ([Link]) {
timer = self.create_timer();
[Link].image_loaded([Link]().children('img'), [Link]);
}
animate = new FadeAnimation(settings, slides_container);
if ([Link] === 'slide') {
animate = new SlideAnimation(settings, slides_container);
}
if (settings.next_on_click) {
[Link]('click', '.' + settings.slides_container_class + ' [data-
orbit-slide]', self.link_bullet);
}
[Link]('click', self.toggle_timer);
if ([Link]) {
[Link]('[Link]', function (e) {
if (![Link]) {e = [Link];}
var data = {
start_page_x : [Link][0].pageX,
start_page_y : [Link][0].pageY,
start_time : (new Date()).getTime(),
delta_x : 0,
is_scrolling : undefined
};
[Link]('swipe-transition', data);
[Link]();
})
.on('[Link]', function (e) {
if (![Link]) {
e = [Link];
}
// Ignore pinch/zoom events
if ([Link] > 1 || [Link] && [Link] !== 1) {
return;
}
[Link]();
};
[Link] = function () {
clearTimeout(timeout);
[Link](settings.timer_paused_class);
left = -1;
self.update_progress(0);
};
[Link] = function () {
if () {return true;}
left = (left === -1) ? duration : left;
[Link](settings.timer_paused_class);
start = new Date().getTime();
[Link]({'width' : '100%'}, left, 'linear');
timeout = setTimeout(function () {
[Link]();
callback();
}, left);
[Link]('[Link]')
};
[Link] = function () {
if ([Link](settings.timer_paused_class)) {return true;}
clearTimeout(timeout);
[Link](settings.timer_paused_class);
var end = new Date().getTime();
left = left - (end - start);
var w = 100 - ((left / duration) * 100);
self.update_progress(w);
[Link]('[Link]');
};
};
[Link] = {
name : 'orbit',
version : '5.5.2',
settings : {
animation : 'slide',
timer_speed : 10000,
pause_on_hover : true,
resume_on_mouseout : false,
next_on_click : true,
animation_speed : 500,
stack_on_small : false,
navigation_arrows : true,
slide_number : true,
slide_number_text : 'of',
container_class : 'orbit-container',
stack_on_small_class : 'orbit-stack-on-small',
next_class : 'orbit-next',
prev_class : 'orbit-prev',
timer_container_class : 'orbit-timer',
timer_paused_class : 'paused',
timer_progress_class : 'orbit-progress',
slides_container_class : 'orbit-slides-container',
preloader_class : 'preloader',
slide_selector : '*',
bullets_container_class : 'orbit-bullets',
bullets_active_class : 'active',
slide_number_class : 'orbit-slide-number',
caption_class : 'orbit-caption',
active_slide_class : 'active',
orbit_transition_class : 'orbit-transitioning',
bullets : true,
circular : true,
timer : true,
variable_height : false,
swipe : true,
before_slide_change : noop,
after_slide_change : noop
},
reflow : function () {
var self = this;
if (self.S([Link]).is('[data-orbit]')) {
var $el = self.S([Link]);
var instance = $[Link]([Link] + '-instance');
instance.compute_dimensions();
} else {
self.S('[data-orbit]', [Link]).each(function (idx, el) {
var $el = self.S(el);
var opts = self.data_options($el);
var instance = $[Link]([Link] + '-instance');
instance.compute_dimensions();
});
}
}
};
[Link] = {
name : 'reveal',
version : '5.5.2',
locked : false,
settings : {
animation : 'fadeAndPop',
animation_speed : 250,
close_on_background_click : true,
close_on_esc : true,
dismiss_modal_class : 'close-reveal-modal',
multiple_opened : false,
bg_class : 'reveal-modal-bg',
root_element : 'body',
open : function(){},
opened : function(){},
close : function(){},
closed : function(){},
on_ajax_error: $.noop,
bg : $('.reveal-modal-bg'),
css : {
open : {
'opacity' : 0,
'visibility' : 'visible',
'display' : 'block'
},
close : {
'opacity' : 1,
'visibility' : 'hidden',
'display' : 'none'
}
}
},
S([Link])
.off('.reveal')
.on('[Link]', '[' + this.add_namespace('data-reveal-id') +
']:not([disabled])', function (e) {
[Link]();
if (![Link]) {
var element = S(this),
ajax = [Link](self.data_attr('reveal-ajax')),
replaceContentSel = [Link](self.data_attr('reveal-replace-
content'));
[Link] = true;
S(document)
.on('[Link]', this.close_targets(), function (e) {
[Link]();
if (![Link]) {
var settings = S('[' + self.attr_name() +
'].open').data(self.attr_name(true) + '-init') || [Link],
bg_clicked = S([Link])[0] === S('.' + settings.bg_class)[0];
if (bg_clicked) {
if (settings.close_on_background_click) {
[Link]();
} else {
return;
}
}
[Link] = true;
[Link](self, bg_clicked ? S('[' + self.attr_name() +
'].open:not(.toback)') : S(this).closest('[' + self.attr_name() + ']'));
}
});
return true;
},
// PATCH #3: turning on key up capture only when a reveal window is open
key_up_on : function (scope) {
var self = this;
// PATCH #1: fixing multiple keyup event trigger from single key press
self.S('body').off('[Link]').on('[Link]', function
( event ) {
var open_modal = self.S('[' + self.attr_name() + '].open'),
settings = open_modal.data(self.attr_name(true) + '-init') ||
[Link] ;
// PATCH #2: making sure that the close event can be called only while
unlocked,
// so that multiple [Link] events don't prevent clean
closing of the reveal window.
if ( settings && [Link] === 27 && settings.close_on_esc && !
[Link]) { // 27 is the keycode for the Escape key
[Link](self, open_modal);
}
});
return true;
},
// PATCH #3: turning on key up capture only when a reveal window is open
key_up_off : function (scope) {
this.S('body').off('[Link]');
return true;
},
if (target) {
if (typeof [Link] !== 'undefined') {
// Find the named node; only use the first one found, since the rest of
the code assumes there's only one node
modal = self.S('#' + [Link](self.data_attr('reveal-id'))).first();
} else {
modal = self.S([Link]);
ajax_settings = target;
}
} else {
modal = self.S([Link]);
}
if () {
var open_modal = self.S('[' + self.attr_name() + '].open');
[Link]('tabindex','0').attr('aria-hidden','false');
[Link]('[Link]').trigger('[Link]');
if (open_modal.length < 1) {
this.toggle_bg(modal, true);
}
[Link](modal, [Link]);
} 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;
}
}
self.S(modal).foundation('section', 'reflow');
self.S(modal).children().foundation();
if (open_modal.length > 0) {
if (settings.multiple_opened) {
self.to_back(open_modal);
} else {
[Link](open_modal, [Link]);
}
}
[Link](modal, [Link]);
}
});
$.ajax(ajax_settings);
}
}
self.S(window).trigger('resize');
},
if (open_modals.length > 0) {
[Link]('tabindex','0').attr('aria-hidden','true');
[Link] = true;
this.key_up_off(modal); // PATCH #3: turning on key up capture only when
a reveal window is open
[Link]('[Link]');
if (settings.multiple_opened) {
[Link](modal, [Link], settings);
self.to_front($($.makeArray(open_modals).reverse()[1]));
} else {
[Link](open_modals, [Link], settings);
}
}
},
close_targets : function () {
var base = '.' + [Link].dismiss_modal_class;
if ([Link].close_on_background_click) {
return base + ', .' + [Link].bg_class;
}
return base;
},
if ([Link](root_element).length === 0) {
var placeholder = [Link]('<div style="display: none;" />').parent();
[Link]('[Link]', function () {
[Link]().appendTo(placeholder);
[Link]().unbind('[Link]');
});
[Link]().appendTo(root_element);
}
return setTimeout(function () {
return el
.css(css)
.animate(end_css, settings.animation_speed, 'linear', function () {
[Link] = false;
[Link]('[Link]');
})
.addClass('open');
}, settings.animation_speed / 2);
}
if ([Link]) {
[Link] = $(window).scrollTop() + [Link]('css-top') + 'px';
var end_css = {opacity: 1};
return setTimeout(function () {
return el
.css(css)
.animate(end_css, settings.animation_speed, 'linear', function () {
[Link] = false;
[Link]('[Link]');
})
.addClass('open');
}, settings.animation_speed / 2);
}
return [Link](css).show().css({opacity :
1}).addClass('open').trigger('[Link]');
}
[Link] = false;
return [Link]();
},
to_back : function(el) {
[Link]('toback');
},
to_front : function(el) {
[Link]('toback');
},
return setTimeout(function () {
return el
.animate(end_css, settings.animation_speed, 'linear', function () {
[Link] = false;
[Link](css).trigger('[Link]');
})
.removeClass('open');
}, settings.animation_speed / 2);
}
if ([Link]) {
var end_css = {opacity : 0};
return setTimeout(function () {
return el
.animate(end_css, settings.animation_speed, 'linear', function () {
[Link] = false;
[Link](css).trigger('[Link]');
})
.removeClass('open');
}, settings.animation_speed / 2);
}
return
[Link]().css(css).removeClass('open').trigger('[Link]');
}
return [Link]();
},
if ([Link] > 0) {
[Link]('data-src', iframe[0].src);
[Link]('src', [Link]('src'));
[Link]();
}
},
if ([Link] > 0) {
var data_src = [Link]('data-src');
if (typeof data_src === 'string') {
iframe[0].src = [Link]('data-src');
} else {
var src = iframe[0].src;
iframe[0].src = undefined;
iframe[0].src = src;
}
[Link]();
}
},
return str;
},
cache_offset : function (modal) {
var offset = [Link]().height() + parseInt([Link]('top'), 10) +
[Link];
[Link]();
return offset;
},
off : function () {
$([Link]).off('.[Link]');
},
reflow : function () {}
};
/*
* getAnimationData('popAndFade') // {animate: true, pop: true, fade: true}
* getAnimationData('fade') // {animate: true, pop: false, fade: true}
* getAnimationData('pop') // {animate: true, pop: true, fade: false}
* getAnimationData('foo') // {animate: false, pop: false, fade: false}
* getAnimationData(null) // {animate: false, pop: false, fade: false}
*/
function getAnimationData(str) {
var fade = /fade/[Link](str);
var pop = /pop/[Link](str);
return {
animate : fade || pop,
pop : pop,
fade : fade
};
}
}(jQuery, window, [Link]));
[Link] = {
name : 'slider',
version : '5.5.2',
settings : {
start : 0,
end : 100,
step : 1,
precision : null,
initial : null,
display_selector : '',
vertical : false,
trigger_input_change : false,
on_change : function () {}
},
cache : {},
events : function () {
var self = this;
$([Link])
.off('.slider')
.on('[Link] [Link]
[Link]',
'[' + self.attr_name() + ']:not(.disabled, [disabled]) .range-slider-
handle', function (e) {
if (![Link]) {
[Link]();
self.set_active_slider($([Link]));
}
})
.on('[Link] [Link]
[Link]', function (e) {
if (!![Link]) {
[Link]();
if ($.data([Link][0], 'settings').vertical) {
var scroll_offset = 0;
if (![Link]) {
scroll_offset = [Link];
}
self.calculate_position([Link],
self.get_cursor_position(e, 'y') + scroll_offset);
} else {
self.calculate_position([Link],
self.get_cursor_position(e, 'x'));
}
}
})
.on('[Link] [Link] [Link]',
function (e) {
self.remove_active_slider();
})
.on('[Link]', function (e) {
[Link].on_change();
});
self.S(window)
.on('[Link]', [Link](function (e) {
[Link]();
}, 300));
if (settings.display_selector != '') {
$(settings.display_selector).each(function(){
if ([Link]('value')) {
$(this).change(function(){
// is there a better way to do this?
[Link]("slider", "set_value", $(this).val());
});
}
});
}
});
},
return position;
},
remove_active_slider : function () {
[Link] = null;
},
requestAnimationFrame(function () {
var pct;
self.set_ui($handle, norm);
});
},
if ([Link]) {
$[Link]('.range-slider-active-segment').css('height',
progress_bar_length + '%');
} else {
$[Link]('.range-slider-active-segment').css('width',
progress_bar_length + '%');
}
$handle_parent.attr(this.attr_name(), value).trigger('[Link]');
$hidden_inputs.val(value);
if (settings.trigger_input_change) {
$hidden_inputs.trigger('[Link]');
}
if (!$handle[0].hasAttribute('aria-valuemin')) {
$[Link]({
'aria-valuemin' : [Link],
'aria-valuemax' : [Link]
});
}
$[Link]('aria-valuenow', value);
if (settings.display_selector != '') {
$(settings.display_selector).each(function () {
if ([Link]('value')) {
$(this).val(value);
} else {
$(this).text(value);
}
});
}
},
if ([Link]) {
$.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());
}
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));
}
});
}
};
[Link] = {
name : 'tab',
version : '5.5.2',
settings : {
active_class : 'active',
callback : function () {},
deep_linking : false,
scroll_to_content : true,
is_hover : false
},
default_tab_hashes : [],
// store the initial href, which is used to allow correct behaviour of the
// browser back button when deep linking is turned on.
self.entry_location = [Link];
[Link](method, options);
this.handle_location_hash_change();
},
events : function () {
var self = this,
S = this.S;
S([Link])
.off('.tab')
// Key event: focus/tab key
.on('[Link]', '[' + this.attr_name() + '] > * > a', function(e)
{
var el = this;
var keyCode = [Link] || [Link];
// if user pressed tab key
if (keyCode == 9) {
[Link]();
// TODO: Change usual_tab_behavior into accessibility function?
usual_tab_behavior(e, el);
}
})
// Click event: tab title
.on('[Link]', '[' + this.attr_name() + '] > * > a', function(e) {
var el = this;
usual_tab_behavior(e, el);
})
// Hover event: tab title
.on('[Link]', '[' + 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());
}
});
// Location hash change event
S(window).on('[Link]', function (e) {
[Link]();
self.handle_location_hash_change();
});
},
handle_location_hash_change : function () {
switch ([Link]) {
case 37:
$target = $prev;
break;
case 39:
$target = $next;
break;
default:
$target = false
break;
}
if ($[Link]) {
$[Link]({
'tabindex' : '-1',
'aria-selected' : null
});
$[Link]({
'tabindex' : '0',
'aria-selected' : true
}).focus();
}
// Hide panels
$('[role="tabpanel"]')
.attr('aria-hidden', 'true');
$('#' + $([Link]).attr('href').substring(1))
.attr('aria-hidden', null);
},
go_to_hash = function(hash) {
// This function allows correct behaviour of the browser's back button
when deep linking is enabled. Without it
// the user would get continually redirected to the default hash.
var is_entry_location = [Link] === self.entry_location,
default_hash = settings.scroll_to_content ?
self.default_tab_hashes[0] : is_entry_location ? [Link] :'fndtn-' +
self.default_tab_hashes[0].replace('#', '')
if (settings.deep_linking) {
if (settings.scroll_to_content) {
tab_link.off('keydown').on('keydown', interpret_keyup_action );
},
reflow : function () {}
};
}(jQuery, window, [Link]));
[Link] = {
name : 'tooltip',
version : '5.5.2',
settings : {
additional_inheritable_classes : [],
tooltip_class : '.tooltip',
append_to : 'body',
touch_close_text : 'Tap To Close',
disable_for_touch : false,
hover_delay : 200,
show_on : 'all',
tip_template : function (selector, content) {
return '<span data-selector="' + selector + '" id="' + selector + '"
class="'
+ [Link].tooltip_class.substring(1)
+ '" role="tooltip">' + content + '<span class="nub"></span></span>';
}
},
cache : {},
medium : function () {
return matchMedia(Foundation.media_queries['medium']).matches;
},
large : function () {
return matchMedia(Foundation.media_queries['large']).matches;
},
[Link](this.S(instance));
if (immediate) {
[Link] = null;
[Link]($this);
} else {
[Link] = setTimeout(function () {
[Link] = null;
[Link]($this);
}.bind(elt), [Link].hover_delay);
}
}
[Link]($this);
}
$([Link])
.off('.tooltip')
.on('[Link] [Link]
[Link] [Link]',
'[' + this.attr_name() + ']', function (e) {
var $this = S(this),
settings = $.extend({}, [Link], self.data_options($this)),
is_touch = false;
if ($[Link]('open')) {
if ([Link] && /touchstart|MSPointerDown/[Link]([Link])) {
[Link]();
}
[Link]($this);
} else {
if (settings.disable_for_touch && [Link] && /touchstart|
MSPointerDown/[Link]([Link])) {
return;
} else if (!settings.disable_for_touch && [Link] &&
/touchstart|MSPointerDown/[Link]([Link])) {
[Link]();
S(settings.tooltip_class + '.open').hide();
is_touch = true;
// close other open tooltips on touch
if ($('.open[' + self.attr_name() + ']').length > 0) {
var prevOpen = S($('.open[' + self.attr_name() + ']')[0]);
[Link](prevOpen);
}
}
if (/enter|over/[Link]([Link])) {
_startShow(this, $this);
if (selector) {
tip = this.S('span[data-selector="' + selector + '"]' +
settings.tooltip_class);
}
return dataSelector;
},
$[Link](classes).appendTo(settings.append_to);
if ([Link]) {
$[Link]('<span class="tap-to-close">' + settings.touch_close_text +
'</span>');
$[Link]('[Link] [Link]', function
(e) {
[Link]($target);
});
}
$[Link]('title').attr('title', '');
},
width = [Link]('width');
nub = [Link]('.nub');
nubHeight = [Link]();
nubWidth = [Link]();
if ([Link]()) {
[Link]({'width' : '100%'});
} else {
[Link]({'width' : (width) ? width : 'auto'});
}
if ([Link]()) {
objPos(tip, ([Link]().top + [Link]() + 10), 'auto',
'auto', 12.5, $([Link]).width());
[Link]('tip-override');
objPos(nub, -nubHeight, 'auto', 'auto', [Link]().left);
} else {
var left = [Link]().left;
if ([Link]) {
[Link]('rtl');
left = [Link]().left + [Link]() - [Link]();
}
[Link]('tip-override');
if (classes && [Link]('tip-top') > -1) {
if ([Link]) {
[Link]('rtl');
}
objPos(tip, ([Link]().top - [Link]()), 'auto', 'auto',
left)
.removeClass('tip-override');
} else if (classes && [Link]('tip-left') > -1) {
objPos(tip, ([Link]().top + ([Link]() / 2) -
([Link]() / 2)), 'auto', 'auto', ([Link]().left - [Link]()
- nubHeight))
.removeClass('tip-override');
[Link]('rtl');
} else if (classes && [Link]('tip-right') > -1) {
objPos(tip, ([Link]().top + ([Link]() / 2) -
([Link]() / 2)), 'auto', 'auto', ([Link]().left +
[Link]() + nubHeight))
.removeClass('tip-override');
[Link]('rtl');
}
}
[Link]('visibility', 'visible').hide();
},
small : function () {
return matchMedia(Foundation.media_queries.small).matches &&
!matchMedia(Foundation.media_queries.medium).matches;
},
return $.trim(filtered);
},
if ($[Link]('.tap-to-close').length === 0) {
$[Link]('<span class="tap-to-close">' + settings.touch_close_text +
'</span>');
$[Link]('[Link] [Link]
[Link]', function (e) {
[Link]($target);
});
}
$[Link]('tooltip-open-event-type', 'touch');
},
if ($[Link]('tooltip-open-event-type') == 'touch') {
this.convert_to_touch($target);
}
off : function () {
var self = this;
this.S([Link]).off('.[Link]');
this.S([Link].tooltip_class).each(function (i) {
$('[' + self.attr_name() + ']').eq(i).attr('title', $(this).text());
}).remove();
},
reflow : function () {}
};
}(jQuery, window, [Link]));
[Link] = {
name : 'topbar',
version : '5.5.2',
settings : {
index : 0,
start_offset : 0,
sticky_class : 'sticky',
custom_back_text : true,
back_text : 'Back',
mobile_show_parent_link : true,
is_hover : true,
scrolltop : true, // jump to top when sticky nav menu toggle is clicked
sticky_on : 'all',
dropdown_autoclose: true
},
self.register_media('topbar', 'foundation-mq-topbar');
[Link](method, options);
if (![Link]) {
[Link](topbar);
}
if (settings.is_hover) {
self.S('.has-dropdown', topbar).addClass('not-click');
} else {
self.S('.has-dropdown', topbar).removeClass('not-click');
}
if ([Link]('fixed')) {
self.S('body').addClass('f-topbar-fixed');
}
});
},
return false;
},
if (toggleEl) {
topbar = self.S(toggleEl).closest('[' + this.attr_name() + ']');
} else {
topbar = self.S('[' + this.attr_name() + ']');
}
if ([Link]()) {
if (![Link]) {
[Link]({left : '0%'});
$('>.name', section).css({left : '100%'});
} else {
[Link]({right : '0%'});
$('>.name', section).css({right : '100%'});
}
self.S('[Link]', section).removeClass('moved');
[Link]('index', 0);
topbar
.toggleClass('expanded')
.css('height', '');
}
if ([Link]) {
if () {
if ([Link]('fixed')) {
[Link]().addClass('fixed');
[Link]('fixed');
self.S('body').addClass('f-topbar-fixed');
}
} else if ([Link]().hasClass('fixed')) {
if ([Link]) {
[Link]().removeClass('fixed');
[Link]('fixed');
self.S('body').removeClass('f-topbar-fixed');
[Link](0, 0);
} else {
[Link]().removeClass('expanded');
}
}
} else {
if (self.is_sticky(topbar, [Link](), settings)) {
[Link]().addClass('fixed');
}
if ([Link]().hasClass('fixed')) {
if () {
[Link]('fixed');
[Link]().removeClass('expanded');
self.update_sticky_positioning();
} else {
[Link]('fixed');
[Link]().addClass('expanded');
self.S('body').addClass('f-topbar-fixed');
}
}
}
},
timer : null,
S([Link])
.off('.topbar')
.on('[Link]', '[' + this.attr_name() + '] .toggle-topbar',
function (e) {
[Link]();
[Link](this);
})
.on('[Link] [Link]', '.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 = [Link]('[' + self.attr_name() + ']'),
settings = [Link](self.attr_name(true) + '-init');
})
.on('[Link]', '[' + this.attr_name() + '] [Link]-dropdown',
function (e) {
var li = S(this),
target = S([Link]),
topbar = [Link]('[' + self.attr_name() + ']'),
settings = [Link](self.attr_name(true) + '-init');
if ([Link]('revealId')) {
[Link]();
return;
}
if ([Link]()) {
return;
}
[Link]();
if ([Link]('hover')) {
li
.removeClass('hover')
.find('li')
.removeClass('hover');
[Link]('[Link]')
.removeClass('hover');
} else {
[Link]('hover');
$(li).siblings().removeClass('hover');
[Link]();
if (![Link]) {
[Link]({left : -(100 * [Link]('index')) + '%'});
[Link]('>.name').css({left : 100 * [Link]('index') +
'%'});
} else {
[Link]({right : -(100 * [Link]('index')) + '%'});
[Link]('>.name').css({right : 100 * [Link]('index') +
'%'});
}
[Link]('height', $[Link]('ul').outerHeight(true) +
[Link]('height'));
}
});
S(window).off('.topbar').on('[Link]', [Link](function ()
{
[Link](self);
}, 50)).trigger('[Link]').load(function () {
// Ensure that the offset is calculated after all of the pages resources
have loaded
S(this).trigger('[Link]');
});
if ([Link] > 0) {
return;
}
S('[' + self.attr_name() + '] [Link]').removeClass('hover');
});
// Go up a level on Click
S([Link]).on('[Link]', '[' + this.attr_name() + '] .has-
dropdown .back', function (e) {
[Link]();
if (![Link]) {
[Link]({left : -(100 * [Link]('index')) + '%'});
[Link]('>.name').css({left : 100 * [Link]('index') + '%'});
} else {
[Link]({right : -(100 * [Link]('index')) + '%'});
[Link]('>.name').css({right : 100 * [Link]('index') + '%'});
}
if ([Link]('index') === 0) {
[Link]('height', '');
} else {
[Link]('height', $[Link](true) +
[Link]('height'));
}
setTimeout(function () {
$[Link]('moved');
}, 300);
});
resize : function () {
var self = this;
self.S('[' + this.attr_name() + ']').each(function () {
var topbar = self.S(this),
settings = [Link](self.attr_name(true) + '-init');
if (![Link]()) {
var doToggle = [Link]('expanded');
topbar
.css('height', '')
.removeClass('expanded')
.find('li')
.removeClass('hover');
if (doToggle) {
[Link](topbar);
}
}
stickyOffset = [Link]().top;
if (self.S([Link]).hasClass('f-topbar-fixed')) {
stickyOffset -= [Link]('height');
}
[Link]('stickyoffset', stickyOffset);
[Link]('fixed');
} else {
stickyOffset = [Link]().top;
[Link]('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;
},
self.S('.has-dropdown>a', section).each(function () {
var $link = self.S(this),
$dropdown = $[Link]('.dropdown'),
url = $[Link]('href'),
$titleLi;
if (!$[Link]('.[Link]').length) {
[Link](topbar);
},
return total;
},
sticky : function () {
var self = this;
this.S(window).on('scroll', function () {
self.update_sticky_positioning();
});
},
update_sticky_positioning : function () {
var klass = '.' + [Link].sticky_class,
$window = this.S(window),
self = this;
if ([Link].sticky_topbar &&
self.is_sticky([Link].sticky_topbar,[Link].sticky_topbar.parent(),
[Link])) {
var distance = [Link].sticky_topbar.data('stickyoffset') +
[Link].start_offset;
if (!self.S(klass).hasClass('expanded')) {
if ($[Link]() > (distance)) {
if (!self.S(klass).hasClass('fixed')) {
self.S(klass).addClass('fixed');
self.S('body').addClass('f-topbar-fixed');
}
} else if ($[Link]() <= distance) {
if (self.S(klass).hasClass('fixed')) {
self.S(klass).removeClass('fixed');
self.S('body').removeClass('f-topbar-fixed');
}
}
}
}
},
off : function () {
this.S([Link]).off('.[Link]');
this.S(window).off('.[Link]');
},
reflow : function () {}
};
}(jQuery, window, [Link]));