Last active
December 11, 2015 07:58
-
-
Save Shelob9/4569861 to your computer and use it in GitHub Desktop.
This is a minified version of all of the javascript for ZURB's Foundation except for jquery itself and app.js. I included all files I found in https://github.com/zurb/foundation/tree/master/vendor/assets/javascripts/foundation except for app.js, index.js and jquery.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Modernizr 2.6.2 (Custom Build) | MIT & BSD | |
* Build: http://modernizr.com/download/#-inlinesvg-svg-svgclippaths-touch-shiv-mq-cssclasses-teststyles-prefixes-ie8compat-load | |
*/ | |
;window.Modernizr=function(a,b,c){function y(a){j.cssText=a}function z(a,b){return y(m.join(a+";")+(b||""))}function A(a,b){return typeof a===b}function B(a,b){return!!~(""+a).indexOf(b)}function C(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:A(f,"function")?f.bind(d||b):f}return!1}var d="2.6.2",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n={svg:"http://www.w3.org/2000/svg"},o={},p={},q={},r=[],s=r.slice,t,u=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["­",'<style id="s',h,'">',a,"</style>"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},v=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return u("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},w={}.hasOwnProperty,x;!A(w,"undefined")&&!A(w.call,"undefined")?x=function(a,b){return w.call(a,b)}:x=function(a,b){return b in a&&A(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=s.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(s.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(s.call(arguments)))};return e}),o.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:u(["@media (",m.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},o.svg=function(){return!!b.createElementNS&&!!b.createElementNS(n.svg,"svg").createSVGRect},o.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="<svg/>",(a.firstChild&&a.firstChild.namespaceURI)==n.svg},o.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(l.call(b.createElementNS(n.svg,"clipPath")))};for(var D in o)x(o,D)&&(t=D.toLowerCase(),e[t]=o[D](),r.push((e[t]?"":"no-")+t));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)x(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},y(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e<g;e++)d.createElement(f[e]);return d}function p(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return r.shivMethods?n(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+l().join().replace(/\w+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(r,b.frag)}function q(a){a||(a=b);var c=m(a);return r.shivCSS&&!f&&!c.hasCSS&&(c.hasCSS=!!k(a,"article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}")),j||p(a,c),a}var c=a.html5||{},d=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,e=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,f,g="_html5shiv",h=0,i={},j;(function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=m,e.mq=v,e.testStyles=u,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+r.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i<a.length;i++)j=a[i],e(j)?g(j,0,l,0):w(j)?B(j):Object(j)===j&&h(j,l);else Object(a)===a&&h(a,l)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))},Modernizr.addTest("ie8compat",function(){return!window.addEventListener&&document.documentMode&&document.documentMode===7}); | |
/*! | |
* jQuery Cookie Plugin v1.3 | |
* https://github.com/carhartl/jquery-cookie | |
* | |
* Copyright 2011, Klaus Hartl | |
* Dual licensed under the MIT or GPL Version 2 licenses. | |
* http://www.opensource.org/licenses/mit-license.php | |
* http://www.opensource.org/licenses/GPL-2.0 | |
*/ | |
(function(f,b,g){var a=/\+/g;function e(h){return h}function c(h){return decodeURIComponent(h.replace(a," "))}var d=f.cookie=function(q,p,v){if(p!==g){v=f.extend({},d.defaults,v);if(p===null){v.expires=-1}if(typeof v.expires==="number"){var r=v.expires,u=v.expires=new Date();u.setDate(u.getDate()+r)}p=d.json?JSON.stringify(p):String(p);return(b.cookie=[encodeURIComponent(q),"=",d.raw?p:encodeURIComponent(p),v.expires?"; expires="+v.expires.toUTCString():"",v.path?"; path="+v.path:"",v.domain?"; domain="+v.domain:"",v.secure?"; secure":""].join(""))}var h=d.raw?e:c;var s=b.cookie.split("; ");for(var o=0,m=s.length;o<m;o++){var n=s[o].split("=");if(h(n.shift())===q){var k=h(n.join("="));return d.json?JSON.parse(k):k}}return null};d.defaults={};f.removeCookie=function(i,h){if(f.cookie(i)!==null){f.cookie(i,null,h);return true}return false}})(jQuery,document);(function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a)}else{a(jQuery)}})(function(t,k){var c=6,e=t.event.add,w=t.event.remove,z=function(S,R,T){t.event.trigger(R,T,S)},D=(function(){return(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(S,R){return window.setTimeout(function(){S()},25)})})(),g={textarea:true,input:true,select:true,button:true},i={move:"mousemove",cancel:"mouseup dragstart",end:"mouseup"},d={move:"touchmove",cancel:"touchend",end:"touchend"};function o(T){var V=T,U=false,R=false;function S(W){if(U){V();D(S);R=true;U=false}else{R=false}}this.kick=function(W){U=true;if(!R){S()}};this.end=function(X){var W=V;if(!X){return}if(!R){X()}else{V=U?function(){W();X()}:X;U=true}}}function L(){return true}function Q(){return false}function C(R){R.preventDefault()}function O(R){if(g[R.target.tagName.toLowerCase()]){return}R.preventDefault()}function G(R){return(R.which===1&&!R.ctrlKey&&!R.altKey)}function M(T,U){var S,R;if(T.identifiedTouch){return T.identifiedTouch(U)}S=-1;R=T.length;while(++S<R){if(T[S].identifier===U){return T[S]}}}function m(S,R){var T=M(S.changedTouches,R.identifier);if(!T){return}if(T.pageX===R.pageX&&T.pageY===R.pageY){return}return T}function p(S){var R;if(!G(S)){return}R={target:S.target,startX:S.pageX,startY:S.pageY,timeStamp:S.timeStamp};e(document,i.move,v,R);e(document,i.cancel,y,R)}function v(S){var R=S.data;s(S,R,S,A)}function y(R){A()}function A(){w(document,i.move,v);w(document,i.cancel,A)}function P(S){var T,R;if(g[S.target.tagName.toLowerCase()]){return}T=S.changedTouches[0];R={target:T.target,startX:T.pageX,startY:T.pageY,timeStamp:S.timeStamp,identifier:T.identifier};e(document,d.move+"."+T.identifier,q,R);e(document,d.cancel+"."+T.identifier,E,R)}function q(S){var R=S.data,T=m(S,R);if(!T){return}s(S,R,T,N)}function E(S){var R=S.data,T=M(S.changedTouches,R.identifier);if(!T){return}N(R.identifier)}function N(R){w(document,"."+R,q);w(document,"."+R,E)}function s(V,U,W,T){var S=W.pageX-U.startX,R=W.pageY-U.startY;if((S*S)+(R*R)<(c*c)){return}r(V,U,W,S,R,T)}function I(){this._handled=L;return false}function K(R){R._handled()}function r(V,Z,T,Y,W,X){var S=Z.target,U,R;U=V.targetTouches;R=V.timeStamp-Z.timeStamp;Z.type="movestart";Z.distX=Y;Z.distY=W;Z.deltaX=Y;Z.deltaY=W;Z.pageX=T.pageX;Z.pageY=T.pageY;Z.velocityX=Y/R;Z.velocityY=W/R;Z.targetTouches=U;Z.finger=U?U.length:1;Z._handled=I;Z._preventTouchmoveDefault=function(){V.preventDefault()};z(Z.target,Z);X(Z.identifier)}function H(S){var R=S.data.event,T=S.data.timer;F(R,S,S.timeStamp,T)}function b(S){var R=S.data.event,T=S.data.timer;a();x(R,T,function(){setTimeout(function(){w(R.target,"click",Q)},0)})}function a(R){w(document,i.move,H);w(document,i.end,b)}function B(S){var R=S.data.event,U=S.data.timer,T=m(S,R);if(!T){return}S.preventDefault();R.targetTouches=S.targetTouches;F(R,T,S.timeStamp,U)}function h(S){var R=S.data.event,U=S.data.timer,T=M(S.changedTouches,R.identifier);if(!T){return}l(R);x(R,U)}function l(R){w(document,"."+R.identifier,B);w(document,"."+R.identifier,h)}function F(S,V,R,U){var T=R-S.timeStamp;S.type="move";S.distX=V.pageX-S.startX;S.distY=V.pageY-S.startY;S.deltaX=V.pageX-S.pageX;S.deltaY=V.pageY-S.pageY;S.velocityX=0.3*S.velocityX+0.7*S.deltaX/T;S.velocityY=0.3*S.velocityY+0.7*S.deltaY/T;S.pageX=V.pageX;S.pageY=V.pageY;U.kick()}function x(S,T,R){T.end(function(){S.type="moveend";z(S.target,S);return R&&R()})}function f(T,S,R){e(this,"movestart.move",K);return true}function u(R){w(this,"dragstart drag",C);w(this,"mousedown touchstart",O);w(this,"movestart",K);return true}function J(R){if(R.namespace==="move"||R.namespace==="moveend"){return}e(this,"dragstart."+R.guid+" drag."+R.guid,C,k,R.selector);e(this,"mousedown."+R.guid,O,k,R.selector)}function n(R){if(R.namespace==="move"||R.namespace==="moveend"){return}w(this,"dragstart."+R.guid+" drag."+R.guid);w(this,"mousedown."+R.guid)}t.event.special.movestart={setup:f,teardown:u,add:J,remove:n,_default:function(T){var R,S;if(!T._handled()){return}R={target:T.target,startX:T.startX,startY:T.startY,pageX:T.pageX,pageY:T.pageY,distX:T.distX,distY:T.distY,deltaX:T.deltaX,deltaY:T.deltaY,velocityX:T.velocityX,velocityY:T.velocityY,timeStamp:T.timeStamp,identifier:T.identifier,targetTouches:T.targetTouches,finger:T.finger};S={event:R,timer:new o(function(U){z(T.target,R)})};if(T.identifier===k){e(T.target,"click",Q);e(document,i.move,H,S);e(document,i.end,b,S)}else{T._preventTouchmoveDefault();e(document,d.move+"."+T.identifier,B,S);e(document,d.end+"."+T.identifier,h,S)}}};t.event.special.move={setup:function(){e(this,"movestart.move",t.noop)},teardown:function(){w(this,"movestart.move",t.noop)}};t.event.special.moveend={setup:function(){e(this,"movestart.moveend",t.noop)},teardown:function(){w(this,"movestart.moveend",t.noop)}};e(document,"mousedown.move",p);e(document,"touchstart.move",P);if(typeof Array.prototype.indexOf==="function"){(function(T,U){var S=["changedTouches","targetTouches"],R=S.length;while(R--){if(T.event.props.indexOf(S[R])===-1){T.event.props.push(S[R])}}})(t)}});(function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a)}else{a(jQuery)}})(function(g,h){var f=g.event.add,c=g.event.remove,d=function(k,i,l){g.event.trigger(i,l,k)},e={threshold:0.4,sensitivity:6};function b(m){var i,k,l;i=m.target.offsetWidth;k=m.target.offsetHeight;l={distX:m.distX,distY:m.distY,velocityX:m.velocityX,velocityY:m.velocityY,finger:m.finger};if(m.distX>m.distY){if(m.distX>-m.distY){if(m.distX/i>e.threshold||m.velocityX*m.distX/i*e.sensitivity>1){l.type="swiperight";d(m.currentTarget,l)}}else{if(-m.distY/k>e.threshold||m.velocityY*m.distY/i*e.sensitivity>1){l.type="swipeup";d(m.currentTarget,l)}}}else{if(m.distX>-m.distY){if(m.distY/k>e.threshold||m.velocityY*m.distY/i*e.sensitivity>1){l.type="swipedown";d(m.currentTarget,l)}}else{if(-m.distX/i>e.threshold||m.velocityX*m.distX/i*e.sensitivity>1){l.type="swipeleft";d(m.currentTarget,l)}}}}function a(i){var k=g.data(i,"event_swipe");if(!k){k={count:0};g.data(i,"event_swipe",k)}return k}g.event.special.swipe=g.event.special.swipeleft=g.event.special.swiperight=g.event.special.swipeup=g.event.special.swipedown={setup:function(l,k,i){var l=a(this);if(l.count++>0){return}f(this,"moveend",b);return true},teardown:function(){var i=a(this);if(--i.count>0){return}c(this,"moveend",b);return true},settings:e}});(function(b,a,c){b.fn.foundationAccordion=function(e){var d=function(f){return f.hasClass("hover")&&!Modernizr.touch};b(document).on("mouseenter",".accordion li",function(){var g=b(this).parent();if(d(g)){var f=b(this).children(".content").first();b(".content",g).not(f).hide().parent("li").removeClass("active");f.show(0,function(){f.parent("li").addClass("active")})}});b(document).on("click.fndtn",".accordion li .title",function(){var f=b(this).closest("li"),h=f.parent();if(!d(h)){var g=f.children(".content").first();if(f.hasClass("active")){h.find("li").removeClass("active").end().find(".content").hide()}else{b(".content",h).not(g).hide().parent("li").removeClass("active");g.show(0,function(){g.parent("li").addClass("active")})}}})}})(jQuery,this);(function(b,a,c){b.fn.foundationAlerts=function(d){var e=b.extend({callback:b.noop},d);b(document).on("click",".alert-box a.close",function(f){f.preventDefault();b(this).closest(".alert-box").fadeOut(function(){b(this).remove();e.callback()})})}})(jQuery,this);(function(b,a,c){b.fn.foundationButtons=function(m){var g=b(document),e=b.extend({dropdownAsToggle:false,activeClass:"active"},m),f=function(n){b(".button.dropdown").find("ul").not(n).removeClass("show-dropdown")},i=function(n){var o=b(".button.dropdown").not(n);o.add(b("> span."+e.activeClass,o)).removeClass(e.activeClass)};g.on("click.fndtn",".button.disabled",function(n){n.preventDefault()});b(".button.dropdown > ul",this).addClass("no-hover");g.on("click.fndtn",".button.dropdown:not(.split), .button.dropdown.split span",function(p){var o=b(this),n=o.closest(".button.dropdown"),q=b("> ul",n);if(["A","BUTTON"].indexOf(p.target.nodeName)==-1){p.preventDefault()}setTimeout(function(){f(e.dropdownAsToggle?"":q);q.toggleClass("show-dropdown");if(e.dropdownAsToggle){i(n);o.toggleClass(e.activeClass)}},0)});g.on("click.fndtn","body, html",function(n){if(c==n.originalEvent){return}if(!b(n.originalEvent.target).is(".button.dropdown:not(.split), .button.dropdown.split span")){f();if(e.dropdownAsToggle){i()}}});var h=b(".button.dropdown:not(.large):not(.small):not(.tiny):visible",this).outerHeight()-1,l=b(".button.large.dropdown:visible",this).outerHeight()-1,d=b(".button.small.dropdown:visible",this).outerHeight()-1,k=b(".button.tiny.dropdown:visible",this).outerHeight()-1;b(".button.dropdown:not(.large):not(.small):not(.tiny) > ul",this).css("top",h);b(".button.dropdown.large > ul",this).css("top",l);b(".button.dropdown.small > ul",this).css("top",d);b(".button.dropdown.tiny > ul",this).css("top",k);b(".button.dropdown.up:not(.large):not(.small):not(.tiny) > ul",this).css("top","auto").css("bottom",h-2);b(".button.dropdown.up.large > ul",this).css("top","auto").css("bottom",l-2);b(".button.dropdown.up.small > ul",this).css("top","auto").css("bottom",d-2);b(".button.dropdown.up.tiny > ul",this).css("top","auto").css("bottom",k-2)}})(jQuery,this);(function(d,c,a,f){var e={templates:{viewing:'<a href="#" class="clearing-close">×</a><div class="visible-img" style="display: none"><img src="#"><p class="clearing-caption"></p><a href="#" class="clearing-main-left"></a><a href="#" class="clearing-main-right"></a></div>'},close_selectors:"a.clearing-close",initialized:false,locked:false},b={init:function(g,h){return this.find("ul[data-clearing]").each(function(){var m=d(a),k=d(this),i=i||{},n=n||{},l=k.data("fndtn.clearing.settings");if(!l){i.$parent=k.parent();k.data("fndtn.clearing.settings",d.extend({},e,i));b.assemble(k.find("li"));if(!e.initialized){b.events(k);if(Modernizr.touch){b.swipe_events()}}}})},events:function(h){var g=h.data("fndtn.clearing.settings");d(a).on("click.fndtn.clearing","ul[data-clearing] li",function(m,l,k){var l=l||d(this),k=k||l,i=l.parent().data("fndtn.clearing.settings");m.preventDefault();if(!i){l.parent().foundationClearing()}b.open(d(m.target),l,k);b.update_paddles(k)}).on("click.fndtn.clearing",".clearing-main-right",function(i){b.nav(i,"next")}).on("click.fndtn.clearing",".clearing-main-left",function(i){b.nav(i,"prev")}).on("click.fndtn.clearing",g.close_selectors,this.close).on("keydown.fndtn.clearing",this.keydown);d(c).on("resize.fndtn.clearing",this.resize);e.initialized=true},swipe_events:function(){d(a).bind("swipeleft","ul[data-clearing]",function(g){b.nav(g,"next")}).bind("swiperight","ul[data-clearing]",function(g){b.nav(g,"prev")}).bind("movestart","ul[data-clearing]",function(g){if((g.distX>g.distY&&g.distX<-g.distY)||(g.distX<g.distY&&g.distX>-g.distY)){g.preventDefault()}})},assemble:function(m){var h=m.parent(),i=h.data("fndtn.clearing.settings"),g=h.detach(),k={grid:'<div class="carousel">'+this.outerHTML(g[0])+"</div>",viewing:i.templates.viewing},l='<div class="clearing-assembled"><div>'+k.viewing+k.grid+"</div></div>";return i.$parent.append(l)},open:function(k,n,m){var h=m.closest(".clearing-assembled"),g=h.find("div:first"),i=g.find(".visible-img"),l=i.find("img").not(k);if(!b.locked()){l.attr("src",this.load(k));l.loaded(function(){h.addClass("clearing-blackout");g.addClass("clearing-container");this.caption(i.find(".clearing-caption"),k);i.show();this.fix_height(m);this.center(l);this.shift(n,m,function(){m.siblings().removeClass("visible");m.addClass("visible")})}.bind(this))}},close:function(k){k.preventDefault();var h=(function(l){if(/blackout/.test(l.selector)){return l}else{return l.closest(".clearing-blackout")}}(d(this))),g,i;if(this===k.target&&h){g=h.find("div:first"),i=g.find(".visible-img");e.prev_index=0;h.find("ul[data-clearing]").attr("style","");h.removeClass("clearing-blackout");g.removeClass("clearing-container");i.hide()}return false},keydown:function(h){var g=d(".clearing-blackout").find("ul[data-clearing]");if(h.which===39){b.go(g,"next")}if(h.which===37){b.go(g,"prev")}if(h.which===27){d("a.clearing-close").trigger("click")}},nav:function(i,h){var g=d(".clearing-blackout").find("ul[data-clearing]");i.preventDefault();this.go(g,h)},resize:function(){var g=d(".clearing-blackout .visible-img").find("img");if(g.length>0){b.center(g)}},fix_height:function(h){var g=h.siblings();g.each(function(){var i=d(this),k=i.find("img");if(i.height()>k.outerHeight()){i.addClass("fix-height")}}).closest("ul").width(g.length*100+"%")},update_paddles:function(h){var g=h.closest(".carousel").siblings(".visible-img");if(h.next().length>0){g.find(".clearing-main-right").removeClass("disabled")}else{g.find(".clearing-main-right").addClass("disabled")}if(h.prev().length>0){g.find(".clearing-main-left").removeClass("disabled")}else{g.find(".clearing-main-left").addClass("disabled")}},load:function(h){var g=h.parent().attr("href");this.preload(h);if(g){return g}return h.attr("src")},preload:function(g){this.img(g.closest("li").next());this.img(g.closest("li").prev())},img:function(g){if(g.length>0){var h=new Image(),i=g.find("a");if(i.length>0){h.src=i.attr("href")}else{h.src=g.find("img").attr("src")}}},caption:function(g,i){var h=i.data("caption");if(h){g.text(h).show()}else{g.text("").hide()}},go:function(g,k){var i=g.find(".visible"),h=i[k]();if(h.length>0){h.find("img").trigger("click",[i,h])}},shift:function(k,l,p){var m=l.parent(),i=e.prev_index,n=this.direction(m,k,l),h=parseInt(m.css("left"),10),g=l.outerWidth(),o;if(l.index()!==i&&!/skip/.test(n)){if(/left/.test(n)){this.lock();m.animate({left:h+g},300,this.unlock)}else{if(/right/.test(n)){this.lock();m.animate({left:h-g},300,this.unlock)}}}else{if(/skip/.test(n)){o=l.index()-e.up_count;this.lock();if(o>0){m.animate({left:-(o*g)},300,this.unlock)}else{m.animate({left:0},300,this.unlock)}}}p()},lock:function(){e.locked=true},unlock:function(){e.locked=false},locked:function(){return e.locked},direction:function(k,m,l){var i=k.find("li"),h=i.outerWidth()+(i.outerWidth()/4),n=Math.floor(d(".clearing-container").outerWidth()/h)-1,o=i.index(l),g;e.up_count=n;if(this.adjacent(e.prev_index,o)){if((o>n)&&o>e.prev_index){g="right"}else{if((o>n-1)&&o<=e.prev_index){g="left"}else{g=false}}}else{g="skip"}e.prev_index=o;return g},adjacent:function(k,h){for(var g=h+1;g>=h-1;g--){if(g===k){return true}}return false},center:function(g){g.css({marginLeft:-(g.outerWidth()/2),marginTop:-(g.outerHeight()/2)})},outerHTML:function(g){return g.outerHTML||new XMLSerializer().serializeToString(g)}};d.fn.foundationClearing=function(g){if(b[g]){return b[g].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof g==="object"||!g){return b.init.apply(this,arguments)}else{d.error("Method "+g+" does not exist on jQuery.foundationClearing")}}};(function(g){g.fn.loaded=function(o,m){var k=g.extend({},g.fn.loaded.defaults,m),i=this.find("img").add(this.filter("img")),l=i.length;function h(){l-=1;!l&&o()}function n(){this.one("load",h);if(g.browser.msie){var q=this.attr("src"),p=q.match(/\?/)?"&":"?";p+=k.cachePrefix+"="+(new Date()).getTime();this.attr("src",q+p)}}return i.each(function(){var p=g(this);if(!p.attr("src")){h();return}this.complete||this.readyState===4?h():n.call(p)})};g.fn.loaded.defaults={cachePrefix:"random"}}(jQuery))}(jQuery,this,this.document));(function(d){var c=function(){return{tmp:[],hidden:null,adjust:function(g){var f=this;f.hidden=g.parents().andSelf().filter(":hidden");f.hidden.each(function(){var h=d(this);f.tmp.push(h.attr("style"));h.css({visibility:"hidden",display:"block"})})},reset:function(){var f=this;f.hidden.each(function(h){var g=d(this),k=f.tmp[h];if(k===undefined){g.removeAttr("style")}else{g.attr("style",k)}});f.tmp=[];f.hidden=null}}};jQuery.foundation=jQuery.foundation||{};jQuery.foundation.customForms=jQuery.foundation.customForms||{};d.foundation.customForms.appendCustomMarkup=function(h){var i={disable_class:"no-custom"};h=d.extend(i,h);function g(k,n){var o=d(n).hide(),m=o.attr("type"),l=o.next("span.custom."+m);if(l.length===0){l=d('<span class="custom '+m+'"></span>').insertAfter(o)}l.toggleClass("checked",o.is(":checked"));l.toggleClass("disabled",o.is(":disabled"))}function f(v,m){var y=c();var r=d(m),q=r.next("div.custom.dropdown"),s=q.find("ul"),t=q.find(".current"),x=q.find(".selector"),p=r.find("option"),n=p.filter(":selected"),w=0,u="",l;var k=false;if(r.hasClass(h.disable_class)){return}if(q.length===0){var o=r.hasClass("small")?"small":r.hasClass("medium")?"medium":r.hasClass("large")?"large":r.hasClass("expand")?"expand":"";q=d('<div class="'+["custom","dropdown",o].join(" ")+'"><a href="#" class="selector"></a><ul /></div>');x=q.find(".selector");s=q.find("ul");u=p.map(function(){return"<li>"+d(this).html()+"</li>"}).get().join("");s.append(u);k=q.prepend('<a href="#" class="current">'+n.html()+"</a>").find(".current");r.after(q).hide()}else{u=p.map(function(){return"<li>"+d(this).html()+"</li>"}).get().join("");s.html("").append(u)}q.toggleClass("disabled",r.is(":disabled"));l=s.find("li");p.each(function(z){if(this.selected){l.eq(z).addClass("selected");if(k){k.html(d(this).html())}}});s.css("width","auto");q.css("width","auto");if(!q.is(".small, .medium, .large, .expand")){q.addClass("open");y.adjust(s);w=(l.outerWidth()>w)?l.outerWidth():w;y.reset();q.removeClass("open");q.width(w+18);s.width(w+16)}}d("form.custom input:radio[data-customforms!=disabled]").each(g);d("form.custom input:checkbox[data-customforms!=disabled]").each(g);d("form.custom select[data-customforms!=disabled]").each(f)};var b=function(f){var g=0,h=f.next();$options=f.find("option");h.find("ul").html("");$options.each(function(){$li=d("<li>"+d(this).html()+"</li>");h.find("ul").append($li)});$options.each(function(i){if(this.selected){h.find("li").eq(i).addClass("selected");h.find(".current").html(d(this).html())}});h.removeAttr("style").find("ul").removeAttr("style");h.find("li").each(function(){h.addClass("open");if(d(this).outerWidth()>g){g=d(this).outerWidth()}h.removeClass("open")});h.css("width",g+18+"px");h.find("ul").css("width",g+16+"px")};var a=function(f){var h=f.prev(),g=h[0];if(false===h.is(":disabled")){g.checked=((g.checked)?false:true);f.toggleClass("checked");h.trigger("change")}};var e=function(f){var i=f.prev(),h=i.closest("form.custom"),g=i[0];if(false===i.is(":disabled")){h.find('input:radio[name="'+i.attr("name")+'"]').next().not(f).removeClass("checked");if(!f.hasClass("checked")){f.toggleClass("checked")}g.checked=f.hasClass("checked");i.trigger("change")}};d(document).on("click","form.custom span.custom.checkbox",function(f){f.preventDefault();f.stopPropagation();a(d(this))});d(document).on("click","form.custom span.custom.radio",function(f){f.preventDefault();f.stopPropagation();e(d(this))});d(document).on("change","form.custom select[data-customforms!=disabled]",function(f){b(d(this))});d(document).on("click","form.custom label",function(g){var f=d("#"+d(this).attr("for")+"[data-customforms!=disabled]"),i,h;if(f.length!==0){if(f.attr("type")==="checkbox"){g.preventDefault();i=d(this).find("span.custom.checkbox");if(i.length==0){i=d(this).next("span.custom.checkbox")}if(i.length==0){i=d(this).prev("span.custom.checkbox")}a(i)}else{if(f.attr("type")==="radio"){g.preventDefault();h=d(this).find("span.custom.radio");if(h.length==0){h=d(this).next("span.custom.radio")}if(h.length==0){h=d(this).prev("span.custom.radio")}e(h)}}}});d(document).on("click","form.custom div.custom.dropdown a.current, form.custom div.custom.dropdown a.selector",function(g){var i=d(this),h=i.closest("div.custom.dropdown"),f=h.prev();g.preventDefault();d("div.dropdown").removeClass("open");if(false===f.is(":disabled")){h.toggleClass("open");if(h.hasClass("open")){d(document).bind("click.customdropdown",function(k){h.removeClass("open");d(document).unbind(".customdropdown")})}else{d(document).unbind(".customdropdown")}return false}});d(document).on("click","form.custom div.custom.dropdown li",function(i){var k=d(this),g=k.closest("div.custom.dropdown"),h=g.prev(),f=0;i.preventDefault();i.stopPropagation();d("div.dropdown").removeClass("open");k.closest("ul").find("li").removeClass("selected");k.addClass("selected");g.removeClass("open").find("a.current").html(k.html());k.closest("ul").find("li").each(function(l){if(k[0]==this){f=l}});h[0].selectedIndex=f;h.trigger("change")});d.fn.foundationCustomForms=d.foundation.customForms.appendCustomMarkup})(jQuery);(function(d,c,g){var f={version:"2.0.3",tipLocation:"bottom",nubPosition:"auto",scrollSpeed:300,timer:0,startTimerOnClick:true,startOffset:0,nextButton:true,tipAnimation:"fade",pauseAfter:[],tipAnimationFadeSpeed:300,cookieMonster:false,cookieName:"joyride",cookieDomain:false,tipContainer:"body",postRideCallback:d.noop,postStepCallback:d.noop,template:{link:'<a href="#close" class="joyride-close-tip">X</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>'}},e=e||false,b={},a={init:function(h){return this.each(function(){if(d.isEmptyObject(b)){b=d.extend(true,f,h);b.document=c.document;b.$document=d(b.document);b.$window=d(c);b.$content_el=d(this);b.body_offset=d(b.tipContainer).position();b.$tip_content=d("> li",b.$content_el);b.paused=false;b.attempts=0;b.tipLocationPatterns={top:["bottom"],bottom:[],left:["right","top","bottom"],right:["left","top","bottom"]};a.jquery_check();if(!d.isFunction(d.cookie)){b.cookieMonster=false}if(!b.cookieMonster||!d.cookie(b.cookieName)){b.$tip_content.each(function(i){a.create({$li:d(this),index:i})});if(!b.startTimerOnClick&&b.timer>0){a.show("init");a.startTimer()}else{a.show("init")}}b.$document.on("click.joyride",".joyride-next-tip, .joyride-modal-bg",function(i){i.preventDefault();if(b.$li.next().length<1){a.end()}else{if(b.timer>0){clearTimeout(b.automate);a.hide();a.show();a.startTimer()}else{a.hide();a.show()}}});b.$document.on("click.joyride",".joyride-close-tip",function(i){i.preventDefault();a.end()});b.$window.bind("resize.joyride",function(i){if(a.is_phone()){a.pos_phone()}else{a.pos_default()}})}else{a.restart()}})},resume:function(){a.set_li();a.show()},tip_template:function(i){var k,h;i.tip_class=i.tip_class||"";k=d(b.template.tip).addClass(i.tip_class);h=d.trim(d(i.li).html())+a.button_text(i.button_text)+b.template.link+a.timer_instance(i.index);k.append(d(b.template.wrapper));k.first().attr("data-index",i.index);d(".joyride-content-wrapper",k).append(h);return k[0]},timer_instance:function(i){var h;if((i===0&&b.startTimerOnClick&&b.timer>0)||b.timer===0){h=""}else{h=a.outerHTML(d(b.template.timer)[0])}return h},button_text:function(h){if(b.nextButton){h=d.trim(h)||"Next";h=a.outerHTML(d(b.template.button).append(h)[0])}else{h=""}return h},create:function(k){var i=k.$li.attr("data-button")||k.$li.attr("data-text"),h=k.$li.attr("class"),l=d(a.tip_template({tip_class:h,index:k.index,button_text:i,li:k.$li}));d(b.tipContainer).append(l)},show:function(o){var l={},k,i=[],h=0,n,m=null;if(b.$li===g||(d.inArray(b.$li.index(),b.pauseAfter)===-1)){if(b.paused){b.paused=false}else{a.set_li(o)}b.attempts=0;if(b.$li.length&&b.$target.length>0){i=(b.$li.data("options")||":").split(";");h=i.length;for(k=h-1;k>=0;k--){n=i[k].split(":");if(n.length===2){l[d.trim(n[0])]=d.trim(n[1])}}b.tipSettings=d.extend({},b,l);b.tipSettings.tipLocationPattern=b.tipLocationPatterns[b.tipSettings.tipLocation];if(!/body/i.test(b.$target.selector)){a.scroll_to()}if(a.is_phone()){a.pos_phone(true)}else{a.pos_default(true)}m=d(".joyride-timer-indicator",b.$next_tip);if(/pop/i.test(b.tipAnimation)){m.outerWidth(0);if(b.timer>0){b.$next_tip.show();m.animate({width:d(".joyride-timer-indicator-wrap",b.$next_tip).outerWidth()},b.timer)}else{b.$next_tip.show()}}else{if(/fade/i.test(b.tipAnimation)){m.outerWidth(0);if(b.timer>0){b.$next_tip.fadeIn(b.tipAnimationFadeSpeed);b.$next_tip.show();m.animate({width:d(".joyride-timer-indicator-wrap",b.$next_tip).outerWidth()},b.timer)}else{b.$next_tip.fadeIn(b.tipAnimationFadeSpeed)}}}b.$current_tip=b.$next_tip}else{if(b.$li&&b.$target.length<1){a.show()}else{a.end()}}}else{b.paused=true}},is_phone:function(){if(e){return e.mq("only screen and (max-width: 767px)")}return(b.$window.width()<767)?true:false},hide:function(){b.postStepCallback(b.$li.index(),b.$current_tip);d(".joyride-modal-bg").hide();b.$current_tip.hide()},set_li:function(h){if(h){b.$li=b.$tip_content.eq(b.startOffset);a.set_next_tip();b.$current_tip=b.$next_tip}else{b.$li=b.$li.next();a.set_next_tip()}a.set_target()},set_next_tip:function(){b.$next_tip=d(".joyride-tip-guide[data-index="+b.$li.index()+"]")},set_target:function(){var h=b.$li.attr("data-class"),k=b.$li.attr("data-id"),i=function(){if(k){return d(b.document.getElementById(k))}else{if(h){return d("."+h).first()}else{return d("body")}}};b.$target=i()},scroll_to:function(){var i,h;i=b.$window.height()/2;h=Math.ceil(b.$target.offset().top-i+b.$next_tip.outerHeight());d("html, body").stop().animate({scrollTop:h},b.scrollSpeed)},paused:function(){if((d.inArray((b.$li.index()+1),b.pauseAfter)===-1)){return true}return false},destroy:function(){b.$document.off(".joyride");d(c).off(".joyride");d(".joyride-close-tip, .joyride-next-tip, .joyride-modal-bg").off(".joyride");d(".joyride-tip-guide, .joyride-modal-bg").remove();clearTimeout(b.automate);b={}},restart:function(){a.hide();b.$li=g;a.show("init")},pos_default:function(m){var i=Math.ceil(b.$window.height()/2),l=b.$next_tip.offset(),k=d(".joyride-nub",b.$next_tip),n=Math.ceil(k.outerHeight()/2),h=m||false;if(h){b.$next_tip.css("visibility","hidden");b.$next_tip.show()}if(!/body/i.test(b.$target.selector)){if(a.bottom()){b.$next_tip.css({top:(b.$target.offset().top+n+b.$target.outerHeight()),left:b.$target.offset().left});a.nub_position(k,b.tipSettings.nubPosition,"top")}else{if(a.top()){b.$next_tip.css({top:(b.$target.offset().top-b.$next_tip.outerHeight()-n),left:b.$target.offset().left});a.nub_position(k,b.tipSettings.nubPosition,"bottom")}else{if(a.right()){b.$next_tip.css({top:b.$target.offset().top,left:(b.$target.outerWidth()+b.$target.offset().left)});a.nub_position(k,b.tipSettings.nubPosition,"left")}else{if(a.left()){b.$next_tip.css({top:b.$target.offset().top,left:(b.$target.offset().left-b.$next_tip.outerWidth()-n)});a.nub_position(k,b.tipSettings.nubPosition,"right")}}}}if(!a.visible(a.corners(b.$next_tip))&&b.attempts<b.tipSettings.tipLocationPattern.length){k.removeClass("bottom").removeClass("top").removeClass("right").removeClass("left");b.tipSettings.tipLocation=b.tipSettings.tipLocationPattern[b.attempts];b.attempts++;a.pos_default(true)}}else{if(b.$li.length){a.pos_modal(k)}}if(h){b.$next_tip.hide();b.$next_tip.css("visibility","visible")}},pos_phone:function(n){var m=b.$next_tip.outerHeight(),l=b.$next_tip.offset(),k=b.$target.outerHeight(),i=d(".joyride-nub",b.$next_tip),o=Math.ceil(i.outerHeight()/2),h=n||false;i.removeClass("bottom").removeClass("top").removeClass("right").removeClass("left");if(h){b.$next_tip.css("visibility","hidden");b.$next_tip.show()}if(!/body/i.test(b.$target.selector)){if(a.top()){b.$next_tip.offset({top:b.$target.offset().top-m-o});i.addClass("bottom")}else{b.$next_tip.offset({top:b.$target.offset().top+k+o});i.addClass("top")}}else{if(b.$li.length){a.pos_modal(i)}}if(h){b.$next_tip.hide();b.$next_tip.css("visibility","visible")}},pos_modal:function(h){a.center();h.hide();if(d(".joyride-modal-bg").length<1){d("body").append('<div class="joyride-modal-bg">').show()}if(/pop/i.test(b.tipAnimation)){d(".joyride-modal-bg").show()}else{d(".joyride-modal-bg").fadeIn(b.tipAnimationFadeSpeed)}},center:function(){var h=b.$window;b.$next_tip.css({top:(((h.height()-b.$next_tip.outerHeight())/2)+h.scrollTop()),left:(((h.width()-b.$next_tip.outerWidth())/2)+h.scrollLeft())});return true},bottom:function(){return/bottom/i.test(b.tipSettings.tipLocation)},top:function(){return/top/i.test(b.tipSettings.tipLocation)},right:function(){return/right/i.test(b.tipSettings.tipLocation)},left:function(){return/left/i.test(b.tipSettings.tipLocation)},corners:function(l){var h=b.$window,k=h.width()+h.scrollLeft(),i=h.width()+h.scrollTop();return[l.offset().top<=h.scrollTop(),k<=l.offset().left+l.outerWidth(),i<=l.offset().top+l.outerHeight(),h.scrollLeft()>=l.offset().left]},visible:function(h){var k=h.length;while(k--){if(h[k]){return false}}return true},nub_position:function(h,k,i){if(k==="auto"){h.addClass(i)}else{h.addClass(k)}},startTimer:function(){if(b.$li.length){b.automate=setTimeout(function(){a.hide();a.show();a.startTimer()},b.timer)}else{clearTimeout(b.automate)}},end:function(){if(b.cookieMonster){d.cookie(b.cookieName,"ridden",{expires:365,domain:b.cookieDomain})}if(b.timer>0){clearTimeout(b.automate)}d(".joyride-modal-bg").hide();b.$current_tip.hide();b.postStepCallback(b.$li.index(),b.$current_tip);b.postRideCallback(b.$li.index(),b.$current_tip)},jquery_check:function(){if(!d.isFunction(d.fn.on)){d.fn.on=function(h,k,i){return this.delegate(k,h,i)};d.fn.off=function(h,k,i){return this.undelegate(k,h,i)};return false}return true},outerHTML:function(h){return h.outerHTML||new XMLSerializer().serializeToString(h)},version:function(){return b.version}};d.fn.joyride=function(h){if(a[h]){return a[h].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof h==="object"||!h){return a.init.apply(this,arguments)}else{d.error("Method "+h+" does not exist on jQuery.joyride")}}}}(jQuery,this));(function(b,a,c){b.fn.foundationMagellan=function(d){var k=b(a),i=b(document),h=b("[data-magellan-expedition=fixed]"),g={threshold:(h.length)?h.outerHeight(true):0,activeClass:"active"},d=b.extend({},g,d);i.on("magellan.arrival","[data-magellan-arrival]",function(o){var m=b(this),n=m.closest("[data-magellan-expedition]"),l=n.attr("data-magellan-active-class")||d.activeClass;m.closest("[data-magellan-expedition]").find("[data-magellan-arrival]").not(this).removeClass(l);m.addClass(l)});var e=b("[data-magellan-expedition]");e.find("[data-magellan-arrival]:first").addClass(e.attr("data-magellan-active-class")||d.activeClass);h.on("magellan.update-position",function(){var l=b(this);l.data("magellan-fixed-position","");l.data("magellan-top-offset","")}).trigger("magellan.update-position");k.on("resize.magellan",function(){h.trigger("magellan.update-position")});k.on("scroll.magellan",function(){var l=k.scrollTop();h.each(function(){var m=b(this);if(m.data("magellan-top-offset")===""){m.data("magellan-top-offset",m.offset().top)}var n=(l+d.threshold)>m.data("magellan-top-offset");if(m.data("magellan-fixed-position")!=n){m.data("magellan-fixed-position",n);if(n){m.css({position:"fixed",top:0})}else{m.css({position:"",top:""})}}})});var f=b("[data-magellan-destination]:last");if(f.length>0){k.on("scroll.magellan",function(n){var m=k.scrollTop(),l=m+k.outerHeight(true),o=Math.ceil(f.offset().top);b("[data-magellan-destination]").each(function(){var r=b(this),q=r.attr("data-magellan-destination"),p=r.offset().top-m;if(p<=d.threshold){b("[data-magellan-arrival="+q+"]").trigger("magellan.arrival")}if(l>=i.outerHeight(true)&&o>m&&o<l){b("[data-magellan-arrival]:last").trigger("magellan.arrival")}})})}}}(jQuery,this));(function(b,a,c){b.fn.foundationMediaQueryViewer=function(d){var e=b.extend(d,{toggleKey:77}),f=b(document);f.on("keyup.mediaQueryViewer",":input",function(g){if(g.which===e.toggleKey){g.stopPropagation()}});f.on("keyup.mediaQueryViewer",function(g){var h=b("#fqv");if(g.which===e.toggleKey){if(h.length>0){h.remove()}else{b("body").prepend('<div id="fqv" style="position:fixed;top:4px;left:4px;z-index:999;color:#fff;"><p style="font-size:12px;background:rgba(0,0,0,0.75);padding:5px;margin-bottom:1px;line-height:1.2;"><span class="left">Media:</span> <span style="font-weight:bold;" class="show-for-xlarge">Extra Large</span><span style="font-weight:bold;" class="show-for-large">Large</span><span style="font-weight:bold;" class="show-for-medium">Medium</span><span style="font-weight:bold;" class="show-for-small">Small</span><span style="font-weight:bold;" class="show-for-landscape">Landscape</span><span style="font-weight:bold;" class="show-for-portrait">Portrait</span><span style="font-weight:bold;" class="show-for-touch">Touch</span></p></div>')}}})}})(jQuery,this);(function(b,a,c){b.fn.foundationNavigation=function(e){var d=false;if(Modernizr.touch||navigator.userAgent.match(/Windows Phone/i)){b(document).on("click.fndtn touchstart.fndtn",".nav-bar a.flyout-toggle",function(g){g.preventDefault();var f=b(this).siblings(".flyout").first();if(d===false){b(".nav-bar .flyout").not(f).slideUp(500);f.slideToggle(500,function(){d=false})}d=true});b(".nav-bar>li.has-flyout",this).addClass("is-touch")}else{b(".nav-bar>li.has-flyout",this).on("mouseenter mouseleave",function(h){if(h.type=="mouseenter"){b(".nav-bar").find(".flyout").hide();b(this).children(".flyout").show()}if(h.type=="mouseleave"){var g=b(this).children(".flyout"),f=g.find("input"),i=function(l){var k;if(l.length>0){l.each(function(){if(b(this).is(":focus")){k=true}});return k}return false};if(!i(f)){b(this).children(".flyout").hide()}}})}}})(jQuery,this);(function(b){b.fn.findFirstImage=function(){return this.first().find("img").andSelf().filter("img").first()};var a={defaults:{animation:"horizontal-push",animationSpeed:600,timer:true,advanceSpeed:4000,pauseOnHover:false,startClockOnMouseOut:false,startClockOnMouseOutAfter:1000,directionalNav:true,directionalNavRightText:"Right",directionalNavLeftText:"Left",captions:true,captionAnimation:"fade",captionAnimationSpeed:600,resetTimerOnClick:false,bullets:false,bulletThumbs:false,bulletThumbLocation:"",bulletThumbsHideOnSmall:true,afterSlideChange:b.noop,afterLoadComplete:b.noop,fluid:true,centerBullets:true,singleCycle:false,slideNumber:false,stackOnSmall:false},activeSlide:0,numberSlides:0,orbitWidth:null,orbitHeight:null,locked:null,timerRunning:null,degrees:0,wrapperHTML:'<div class="orbit-wrapper" />',timerHTML:'<div class="timer"><span class="mask"><span class="rotator"></span></span><span class="pause"></span></div>',captionHTML:'<div class="orbit-caption"></div>',directionalNavHTML:'<div class="slider-nav hide-for-small"><span class="right"></span><span class="left"></span></div>',bulletHTML:'<ul class="orbit-bullets"></ul>',slideNumberHTML:'<span class="orbit-slide-counter"></span>',init:function(f,e){var c,g=0,d=this;this.clickTimer=b.proxy(this.clickTimer,this);this.addBullet=b.proxy(this.addBullet,this);this.resetAndUnlock=b.proxy(this.resetAndUnlock,this);this.stopClock=b.proxy(this.stopClock,this);this.startTimerAfterMouseLeave=b.proxy(this.startTimerAfterMouseLeave,this);this.clearClockMouseLeaveTimer=b.proxy(this.clearClockMouseLeaveTimer,this);this.rotateTimer=b.proxy(this.rotateTimer,this);this.options=b.extend({},this.defaults,e);if(this.options.timer==="false"){this.options.timer=false}if(this.options.captions==="false"){this.options.captions=false}if(this.options.directionalNav==="false"){this.options.directionalNav=false}this.$element=b(f);this.$wrapper=this.$element.wrap(this.wrapperHTML).parent();this.$slides=this.$element.children("img, a, div, figure, li");this.$element.on("movestart",function(h){if((h.distX>h.distY&&h.distX<-h.distY)||(h.distX<h.distY&&h.distX>-h.distY)){h.preventDefault()}});this.$element.bind("orbit.next",function(){d.shift("next")});this.$element.bind("orbit.prev",function(){d.shift("prev")});this.$element.bind("swipeleft",function(){b(this).trigger("orbit.next")});this.$element.bind("swiperight",function(){b(this).trigger("orbit.prev")});this.$element.bind("orbit.goto",function(i,h){d.shift(h)});this.$element.bind("orbit.start",function(i,h){d.startClock()});this.$element.bind("orbit.stop",function(i,h){d.stopClock()});c=this.$slides.filter("img");if(c.length===0){this.loaded()}else{c.bind("imageready",function(){g+=1;if(g===c.length){d.loaded()}})}},loaded:function(){this.$element.addClass("orbit").css({width:"1px",height:"1px"});if(this.options.stackOnSmall){this.$element.addClass("orbit-stack-on-small")}this.$slides.addClass("orbit-slide").css({opacity:0});this.setDimentionsFromLargestSlide();this.updateOptionsIfOnlyOneSlide();this.setupFirstSlide();this.notifySlideChange();if(this.options.timer){this.setupTimer();this.startClock()}if(this.options.captions){this.setupCaptions()}if(this.options.directionalNav){this.setupDirectionalNav()}if(this.options.bullets){this.setupBulletNav();this.setActiveBullet()}this.options.afterLoadComplete.call(this);Holder.run()},currentSlide:function(){return this.$slides.eq(this.activeSlide)},notifySlideChange:function(){if(this.options.slideNumber){var c=(this.activeSlide+1)+" of "+this.$slides.length;this.$element.trigger("orbit.change",{slideIndex:this.activeSlide,slideCount:this.$slides.length});if(this.$counter===undefined){var d=b(this.slideNumberHTML).html(c);this.$counter=d;this.$wrapper.append(this.$counter)}else{this.$counter.html(c)}}},setDimentionsFromLargestSlide:function(){var d=this,c;d.$element.add(d.$wrapper).width(this.$slides.first().outerWidth());d.$element.add(d.$wrapper).height(this.$slides.first().height());d.orbitWidth=this.$slides.first().outerWidth();d.orbitHeight=this.$slides.first().height();c=this.$slides.first().findFirstImage().clone();this.$slides.each(function(){var e=b(this),g=e.outerWidth(),f=e.height();if(g>d.$element.outerWidth()){d.$element.add(d.$wrapper).width(g);d.orbitWidth=d.$element.outerWidth()}if(f>d.$element.height()){d.$element.add(d.$wrapper).height(f);d.orbitHeight=d.$element.height();c=b(this).findFirstImage().clone()}d.numberSlides+=1});if(this.options.fluid){if(typeof this.options.fluid==="string"){c=b("<img>").attr("data-src","holder.js/"+this.options.fluid)}d.$element.prepend(c);c.addClass("fluid-placeholder");d.$element.add(d.$wrapper).css({width:"inherit"});d.$element.add(d.$wrapper).css({height:"inherit"});b(window).bind("resize",function(){d.orbitWidth=d.$element.outerWidth();d.orbitHeight=d.$element.height()})}},lock:function(){this.locked=true},unlock:function(){this.locked=false},updateOptionsIfOnlyOneSlide:function(){if(this.$slides.length===1){this.options.directionalNav=false;this.options.timer=false;this.options.bullets=false}},setupFirstSlide:function(){var c=this;this.$slides.first().css({"z-index":3,opacity:1}).fadeIn(function(){c.$slides.css({display:"block"})})},startClock:function(){var c=this;if(!this.options.timer){return false}if(this.$timer.is(":hidden")){this.clock=setInterval(function(){c.$element.trigger("orbit.next")},this.options.advanceSpeed)}else{this.timerRunning=true;this.$pause.removeClass("active");this.clock=setInterval(this.rotateTimer,this.options.advanceSpeed/180,false)}},rotateTimer:function(d){var c="rotate("+this.degrees+"deg)";this.degrees+=2;this.$rotator.css({"-webkit-transform":c,"-moz-transform":c,"-o-transform":c,"-ms-transform":c});if(d){this.degrees=0;this.$rotator.removeClass("move");this.$mask.removeClass("move")}if(this.degrees>180){this.$rotator.addClass("move");this.$mask.addClass("move")}if(this.degrees>360){this.$rotator.removeClass("move");this.$mask.removeClass("move");this.degrees=0;this.$element.trigger("orbit.next")}},stopClock:function(){if(!this.options.timer){return false}else{this.timerRunning=false;clearInterval(this.clock);this.$pause.addClass("active")}},setupTimer:function(){this.$timer=b(this.timerHTML);this.$wrapper.append(this.$timer);this.$rotator=this.$timer.find(".rotator");this.$mask=this.$timer.find(".mask");this.$pause=this.$timer.find(".pause");this.$timer.click(this.clickTimer);if(this.options.startClockOnMouseOut){this.$wrapper.mouseleave(this.startTimerAfterMouseLeave);this.$wrapper.mouseenter(this.clearClockMouseLeaveTimer)}if(this.options.pauseOnHover){this.$wrapper.mouseenter(this.stopClock)}},startTimerAfterMouseLeave:function(){var c=this;this.outTimer=setTimeout(function(){if(!c.timerRunning){c.startClock()}},this.options.startClockOnMouseOutAfter)},clearClockMouseLeaveTimer:function(){clearTimeout(this.outTimer)},clickTimer:function(){if(!this.timerRunning){this.startClock()}else{this.stopClock()}},setupCaptions:function(){this.$caption=b(this.captionHTML);this.$wrapper.append(this.$caption);this.setCaption()},setCaption:function(){var d=this.currentSlide().attr("data-caption"),c;if(!this.options.captions){return false}if(d){if(b.trim(b(d).text()).length<1){return false}if(d.charAt(0)=="#"){d=d.substring(1,d.length)}c=b("#"+d).html();this.$caption.attr("id",d).html(c);switch(this.options.captionAnimation){case"none":this.$caption.show();break;case"fade":this.$caption.fadeIn(this.options.captionAnimationSpeed);break;case"slideOpen":this.$caption.slideDown(this.options.captionAnimationSpeed);break}}else{switch(this.options.captionAnimation){case"none":this.$caption.hide();break;case"fade":this.$caption.fadeOut(this.options.captionAnimationSpeed);break;case"slideOpen":this.$caption.slideUp(this.options.captionAnimationSpeed);break}}},setupDirectionalNav:function(){var c=this,d=b(this.directionalNavHTML);d.find(".right").html(this.options.directionalNavRightText);d.find(".left").html(this.options.directionalNavLeftText);this.$wrapper.append(d);this.$wrapper.find(".left").click(function(){c.stopClock();if(c.options.resetTimerOnClick){c.rotateTimer(true);c.startClock()}c.$element.trigger("orbit.prev")});this.$wrapper.find(".right").click(function(){c.stopClock();if(c.options.resetTimerOnClick){c.rotateTimer(true);c.startClock()}c.$element.trigger("orbit.next")})},setupBulletNav:function(){this.$bullets=b(this.bulletHTML);this.$wrapper.append(this.$bullets);this.$slides.each(this.addBullet);this.$element.addClass("with-bullets");if(this.options.centerBullets){this.$bullets.css("margin-left",-this.$bullets.outerWidth()/2)}if(this.options.bulletThumbsHideOnSmall){this.$bullets.addClass("hide-for-small")}},addBullet:function(g,e){var d=g+1,h=b("<li>"+(d)+"</li>"),c,f=this;if(this.options.bulletThumbs){c=b(e).attr("data-thumb");if(c){h.addClass("has-thumb").css({background:"url("+this.options.bulletThumbLocation+c+") no-repeat"})}}this.$bullets.append(h);h.data("index",g);h.click(function(){f.stopClock();if(f.options.resetTimerOnClick){f.rotateTimer(true);f.startClock()}f.$element.trigger("orbit.goto",[h.data("index")])})},setActiveBullet:function(){if(!this.options.bullets){return false}else{this.$bullets.find("li").removeClass("active").eq(this.activeSlide).addClass("active")}},resetAndUnlock:function(){this.$slides.eq(this.prevActiveSlide).css({"z-index":1});this.unlock();this.options.afterSlideChange.call(this,this.$slides.eq(this.prevActiveSlide),this.$slides.eq(this.activeSlide))},shift:function(d){var c=d;this.prevActiveSlide=this.activeSlide;if(this.prevActiveSlide==c){return false}if(this.$slides.length=="1"){return false}if(!this.locked){this.lock();if(d=="next"){this.activeSlide++;if(this.activeSlide==this.numberSlides){this.activeSlide=0}}else{if(d=="prev"){this.activeSlide--;if(this.activeSlide<0){this.activeSlide=this.numberSlides-1}}else{this.activeSlide=d;if(this.prevActiveSlide<this.activeSlide){c="next"}else{if(this.prevActiveSlide>this.activeSlide){c="prev"}}}}this.setActiveBullet();this.notifySlideChange();this.$slides.eq(this.prevActiveSlide).css({"z-index":2});if(this.options.animation=="fade"){this.$slides.eq(this.activeSlide).css({opacity:0,"z-index":3}).animate({opacity:1},this.options.animationSpeed,this.resetAndUnlock);this.$slides.eq(this.prevActiveSlide).animate({opacity:0},this.options.animationSpeed)}if(this.options.animation=="horizontal-slide"){if(c=="next"){this.$slides.eq(this.activeSlide).css({left:this.orbitWidth,"z-index":3}).css("opacity",1).animate({left:0},this.options.animationSpeed,this.resetAndUnlock)}if(c=="prev"){this.$slides.eq(this.activeSlide).css({left:-this.orbitWidth,"z-index":3}).css("opacity",1).animate({left:0},this.options.animationSpeed,this.resetAndUnlock)}this.$slides.eq(this.prevActiveSlide).css("opacity",0)}if(this.options.animation=="vertical-slide"){if(c=="prev"){this.$slides.eq(this.activeSlide).css({top:this.orbitHeight,"z-index":3}).css("opacity",1).animate({top:0},this.options.animationSpeed,this.resetAndUnlock);this.$slides.eq(this.prevActiveSlide).css("opacity",0)}if(c=="next"){this.$slides.eq(this.activeSlide).css({top:-this.orbitHeight,"z-index":3}).css("opacity",1).animate({top:0},this.options.animationSpeed,this.resetAndUnlock)}this.$slides.eq(this.prevActiveSlide).css("opacity",0)}if(this.options.animation=="horizontal-push"){if(c=="next"){this.$slides.eq(this.activeSlide).css({left:this.orbitWidth,"z-index":3}).animate({left:0,opacity:1},this.options.animationSpeed,this.resetAndUnlock);this.$slides.eq(this.prevActiveSlide).animate({left:-this.orbitWidth},this.options.animationSpeed,"",function(){b(this).css({opacity:0})})}if(c=="prev"){this.$slides.eq(this.activeSlide).css({left:-this.orbitWidth,"z-index":3}).animate({left:0,opacity:1},this.options.animationSpeed,this.resetAndUnlock);this.$slides.eq(this.prevActiveSlide).animate({left:this.orbitWidth},this.options.animationSpeed,"",function(){b(this).css({opacity:0})})}}if(this.options.animation=="vertical-push"){if(c=="next"){this.$slides.eq(this.activeSlide).css({top:-this.orbitHeight,"z-index":3}).css("opacity",1).animate({top:0,opacity:1},this.options.animationSpeed,this.resetAndUnlock);this.$slides.eq(this.prevActiveSlide).css("opacity",0).animate({top:this.orbitHeight},this.options.animationSpeed,"")}if(c=="prev"){this.$slides.eq(this.activeSlide).css({top:this.orbitHeight,"z-index":3}).css("opacity",1).animate({top:0},this.options.animationSpeed,this.resetAndUnlock);this.$slides.eq(this.prevActiveSlide).css("opacity",0).animate({top:-this.orbitHeight},this.options.animationSpeed)}}this.setCaption()}if(this.activeSlide===this.$slides.length-1&&this.options.singleCycle){this.stopClock()}}};b.fn.orbit=function(c){return this.each(function(){var d=b.extend({},a);d.init(this,c)})}})(jQuery); | |
/*! | |
* jQuery imageready Plugin | |
* http://www.zurb.com/playground/ | |
* | |
* Copyright 2011, ZURB | |
* Released under the MIT License | |
*/ | |
(function(c){var b={};c.event.special.imageready={setup:function(f,e,d){b=f||b},add:function(d){var e=c(this),f;if(this.nodeType===1&&this.tagName.toLowerCase()==="img"&&this.src!==""){if(b.forceLoad){f=e.attr("src");e.attr("src","");a(this,d.handler);e.attr("src",f)}else{if(this.complete||this.readyState===4){d.handler.apply(this,arguments)}else{a(this,d.handler)}}}},teardown:function(d){c(this).unbind(".imageready")}};function a(d,f){var e=c(d);e.bind("load.imageready",function(){f.apply(d,arguments);e.unbind("load.imageready")})}}(jQuery));var Holder=Holder||{};(function(b,g){var l=false,f=false,a=document.createElement("canvas");function e(w,I){var x="complete",J="readystatechange",H=!1,A=H,D=!0,z=w.document,F=z.documentElement,C=z.addEventListener?"addEventListener":"attachEvent",G=z.addEventListener?"removeEventListener":"detachEvent",B=z.addEventListener?"":"on",p=function(n){(n.type!=J||z.readyState==x)&&((n.type=="load"?w:z)[G](B+n.type,p,H),!A&&(A=!0)&&I.call(w,null))},q=function(){try{F.doScroll("left")}catch(o){setTimeout(q,50);return}p("poll")};if(z.readyState==x){I.call(w,"lazy")}else{if(z.createEventObject&&F.doScroll){try{D=!w.frameElement}catch(E){}D&&q()}z[C](B+"DOMContentLoaded",p,H),z[C](B+J,p,H),w[C](B+"load",p,H)}}function d(o){o=o.match(/^(\W)?(.*)/);var n=document["getElement"+(o[1]?o[1]=="#"?"ById":"sByClassName":"sByTagName")](o[2]);var p=[];n!=null&&(n.length?p=n:n.length==0?p=n:p=[n]);return p}function i(o,n){var r={};for(var q in o){r[q]=o[q]}for(var p in n){r[p]=n[p]}return r}function k(o,s,q){var p=[s.height,s.width].sort();var u=Math.round(p[1]/16),n=Math.round(p[0]/16);var r=Math.max(q.size,u);a.width=s.width;a.height=s.height;o.textAlign="center";o.textBaseline="middle";o.fillStyle=q.background;o.fillRect(0,0,s.width,s.height);o.fillStyle=q.foreground;o.font="bold "+r+"px sans-serif";var t=q.text?q.text:(s.width+"x"+s.height);if(Math.round(o.measureText(t).width)/s.width>1){r=Math.max(n,q.size)}o.font="bold "+r+"px sans-serif";o.fillText(t,(s.width/2),(s.height/2),s.width);return a.toDataURL("image/png")}if(!a.getContext){f=true}else{if(a.toDataURL("image/png").indexOf("data:image/png")<0){f=true}else{var m=a.getContext("2d")}}var c={domain:"holder.js",images:"img",themes:{gray:{background:"#eee",foreground:"#aaa",size:12},social:{background:"#3a5a97",foreground:"#fff",size:12},industrial:{background:"#434A52",foreground:"#C2F200",size:12}}};b.flags={dimensions:{regex:/([0-9]+)x([0-9]+)/,output:function(o){var n=this.regex.exec(o);return{width:+n[1],height:+n[2]}}},colors:{regex:/#([0-9a-f]{3,})\:#([0-9a-f]{3,})/i,output:function(o){var n=this.regex.exec(o);return{size:c.themes.gray.size,foreground:"#"+n[2],background:"#"+n[1]}}},text:{regex:/text\:(.*)/,output:function(n){return this.regex.exec(n)[1]}}};for(var h in b.flags){b.flags[h].match=function(n){return n.match(this.regex)}}b.add_theme=function(n,o){n!=null&&o!=null&&(c.themes[n]=o);return b};b.add_image=function(s,q){var r=d(q);if(r.length){for(var p=0,n=r.length;p<n;p++){var o=document.createElement("img");o.setAttribute("data-src",s);r[p].appendChild(o)}}return b};b.run=function(s){var A=i(c,s),x=d(A.images),y=true;for(var u=x.length,w=0;w<u;w++){var v=c.themes.gray;var p=x[w].getAttribute("data-src")||x[w].getAttribute("src");if(p&&!!~p.indexOf(A.domain)){var r=false,n=null,z=null;var t=p.substr(p.indexOf(A.domain)+A.domain.length+1).split("/");for(sl=t.length,j=0;j<sl;j++){if(b.flags.dimensions.match(t[j])){r=true;n=b.flags.dimensions.output(t[j])}else{if(b.flags.colors.match(t[j])){v=b.flags.colors.output(t[j])}else{if(A.themes[t[j]]){v=A.themes[t[j]]}else{if(b.flags.text.match(t[j])){z=b.flags.text.output(t[j])}}}}}if(r){x[w].setAttribute("data-src",p);var q=n.width+"x"+n.height;x[w].setAttribute("alt",z?z:v.text?v.text+" ["+q+"]":q);x[w].style.backgroundColor=v.background;var v=(z?i(v,{text:z}):v);if(!f){x[w].setAttribute("src",k(m,n,v))}}}}return b};e(g,function(){l||b.run()})})(Holder,window);(function(b){var a=false;b(document).on("click","a[data-reveal-id]",function(d){d.preventDefault();var c=b(this).attr("data-reveal-id");b("#"+c).reveal(b(this).data())});b.fn.reveal=function(c){var e=b(document),d={animation:"fadeAndPop",animationSpeed:300,closeOnBackgroundClick:true,dismissModalClass:"close-reveal-modal",open:b.noop,opened:b.noop,close:b.noop,closed:b.noop};c=b.extend({},d,c);return this.not(".reveal-modal.open").each(function(){var t=b(this),l=parseInt(t.css("top"),10),o=t.height()+l,n=false,i=b(".reveal-modal-bg"),m={open:{top:0,opacity:0,visibility:"visible",display:"block"},close:{top:l,opacity:1,visibility:"hidden",display:"none"}},h;if(i.length===0){i=b("<div />",{"class":"reveal-modal-bg"}).insertAfter(t);i.fadeTo("fast",0.8)}function p(){n=false}function u(){n=true}function r(){var v=b(".reveal-modal.open");if(v.length===1){a=true;v.trigger("reveal:close")}}function q(){if(!n){u();r();t.addClass("open");if(c.animation==="fadeAndPop"){m.open.top=e.scrollTop()-o;m.open.opacity=0;t.css(m.open);i.fadeIn(c.animationSpeed/2);t.delay(c.animationSpeed/2).animate({top:e.scrollTop()+l+"px",opacity:1},c.animationSpeed,function(){t.trigger("reveal:opened")})}if(c.animation==="fade"){m.open.top=e.scrollTop()+l;m.open.opacity=0;t.css(m.open);i.fadeIn(c.animationSpeed/2);t.delay(c.animationSpeed/2).animate({opacity:1},c.animationSpeed,function(){t.trigger("reveal:opened")})}if(c.animation==="none"){m.open.top=e.scrollTop()+l;m.open.opacity=1;t.css(m.open);i.css({display:"block"});t.trigger("reveal:opened")}}}function f(){var w=t.find(".flex-video"),v=w.find("iframe");if(v.length>0){v.attr("src",v.data("src"));w.fadeIn(100)}}t.bind("reveal:open.reveal",q);t.bind("reveal:open.reveal",f);function k(){if(!n){u();t.removeClass("open");if(c.animation==="fadeAndPop"){t.animate({top:e.scrollTop()-o+"px",opacity:0},c.animationSpeed/2,function(){t.css(m.close)});if(!a){i.delay(c.animationSpeed).fadeOut(c.animationSpeed,function(){t.trigger("reveal:closed")})}else{t.trigger("reveal:closed")}}if(c.animation==="fade"){t.animate({opacity:0},c.animationSpeed,function(){t.css(m.close)});if(!a){i.delay(c.animationSpeed).fadeOut(c.animationSpeed,function(){t.trigger("reveal:closed")})}else{t.trigger("reveal:closed")}}if(c.animation==="none"){t.css(m.close);if(!a){i.css({display:"none"})}t.trigger("reveal:closed")}a=false}}function s(){t.unbind(".reveal");i.unbind(".reveal");h.unbind(".reveal");b("body").unbind(".reveal")}function g(){var w=t.find(".flex-video"),v=w.find("iframe");if(v.length>0){v.data("src",v.attr("src"));v.attr("src","");w.fadeOut(100)}}t.bind("reveal:close.reveal",k);t.bind("reveal:closed.reveal",g);t.bind("reveal:opened.reveal reveal:closed.reveal",p);t.bind("reveal:closed.reveal",s);t.bind("reveal:open.reveal",c.open);t.bind("reveal:opened.reveal",c.opened);t.bind("reveal:close.reveal",c.close);t.bind("reveal:closed.reveal",c.closed);t.trigger("reveal:open");h=b("."+c.dismissModalClass).bind("click.reveal",function(){t.trigger("reveal:close")});if(c.closeOnBackgroundClick){i.css({cursor:"pointer"});i.bind("click.reveal",function(){t.trigger("reveal:close")})}b("body").bind("keyup.reveal",function(v){if(v.which===27){t.trigger("reveal:close")}})})}}(jQuery));(function(e,d,a,f){var c={callback:e.noop,deep_linking:true,init:false},b={init:function(g){c=e.extend({},c,g);return this.each(function(){if(!c.init){b.events()}if(c.deep_linking){b.from_hash()}})},events:function(){e(a).on("click.fndtn",".tabs a",function(g){b.set_tab(e(this).parent("dd, li"),g)});c.init=true},set_tab:function(k,m){var i=k.closest("dl, ul").find(".active"),l=k.children("a").attr("href"),h=/^#/.test(l),g=e(l+"Tab");if(h&&g.length>0){if(m&&!c.deep_linking){m.preventDefault()}g.closest(".tabs-content").children("li").removeClass("active").hide();g.css("display","block").addClass("active")}i.removeClass("active");k.addClass("active");c.callback()},from_hash:function(){var h=d.location.hash,g=e('a[href="'+h+'"]');g.trigger("click.fndtn")}};e.fn.foundationTabs=function(g){if(b[g]){return b[g].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof g==="object"||!g){return b.init.apply(this,arguments)}else{e.error("Method "+g+" does not exist on jQuery.foundationTabs")}}}}(jQuery,this,this.document));(function(d,c,e){var b={bodyHeight:0,selector:".has-tip",additionalInheritableClasses:[],tooltipClass:".tooltip",tipTemplate:function(f,g){return'<span data-selector="'+f+'" class="'+b.tooltipClass.substring(1)+'">'+g+'<span class="nub"></span></span>'}},a={init:function(f){b=d.extend(b,f);b.selector=b.targetClass?b.targetClass:b.selector;return this.each(function(){var g=d("body");if(Modernizr.touch){g.on("click.tooltip touchstart.tooltip touchend.tooltip",b.selector,function(h){h.preventDefault();d(b.tooltipClass).hide();a.showOrCreateTip(d(this))});g.on("click.tooltip touchstart.tooltip touchend.tooltip",b.tooltipClass,function(h){h.preventDefault();d(this).fadeOut(150)})}else{g.on("mouseenter.tooltip mouseleave.tooltip",b.selector,function(i){var h=d(this);if(i.type==="mouseenter"){a.showOrCreateTip(h)}else{if(i.type==="mouseleave"){a.hide(h)}}})}d(this).data("tooltips",true)})},showOrCreateTip:function(f,g){var h=a.getTip(f);if(h&&h.length>0){a.show(f)}else{a.create(f,g)}},getTip:function(g){var f=a.selector(g),h=null;if(f){h=d("span[data-selector="+f+"]"+b.tooltipClass)}return(h.length>0)?h:false},selector:function(f){var h=f.attr("id"),g=f.data("selector");if(h===e&&g===e){g="tooltip"+Math.random().toString(36).substring(7);f.attr("data-selector",g)}return(h)?h:g},create:function(f,h){var i=d(b.tipTemplate(a.selector(f),d("<div>").html(h?h:f.attr("title")).html())),g=a.inheritable_classes(f);i.addClass(g).appendTo("body");if(Modernizr.touch){i.append('<span class="tap-to-close">tap to close </span>')}f.removeAttr("title");a.show(f)},reposition:function(k,n,h){var f,o,m,i,g,l;n.css("visibility","hidden").show();f=k.data("width");o=n.children(".nub");m=o.outerHeight();i=o.outerWidth();l=function(u,t,q,p,s,r){return u.css({top:t,bottom:p,left:s,right:q,"max-width":(r)?r:"auto"}).end()};l(n,(k.offset().top+k.outerHeight()+10),"auto","auto",k.offset().left,f);l(o,-m,"auto","auto",10);if(d(c).width()<767){g=k.closest(".columns");if(g.length<0){g=d("body")}n.width(g.outerWidth()-25).css("left",15).addClass("tip-override");l(o,-m,"auto","auto",k.offset().left)}else{if(h&&h.indexOf("tip-top")>-1){l(n,(k.offset().top-n.outerHeight()-m),"auto","auto",k.offset().left,f).removeClass("tip-override");l(o,"auto","auto",-m,"auto")}else{if(h&&h.indexOf("tip-left")>-1){l(n,(k.offset().top+(k.outerHeight()/2)-m),"auto","auto",(k.offset().left-n.outerWidth()-10),f).removeClass("tip-override");l(o,(n.outerHeight()/2)-(m/2),-m,"auto","auto")}else{if(h&&h.indexOf("tip-right")>-1){l(n,(k.offset().top+(k.outerHeight()/2)-m),"auto","auto",(k.offset().left+k.outerWidth()+10),f).removeClass("tip-override");l(o,(n.outerHeight()/2)-(m/2),"auto","auto",-m)}else{if(h&&h.indexOf("tip-centered-top")>-1){l(n,(k.offset().top-n.outerHeight()-m),"auto","auto",(k.offset().left+((k.outerWidth()-n.outerWidth())/2)),f).removeClass("tip-override");l(o,"auto",((n.outerWidth()/2)-(m/2)),-m,"auto")}else{if(h&&h.indexOf("tip-centered-bottom")>-1){l(n,(k.offset().top+k.outerHeight()+10),"auto","auto",(k.offset().left+((k.outerWidth()-n.outerWidth())/2)),f).removeClass("tip-override");l(o,-m,((n.outerWidth()/2)-(m/2)),"auto","auto")}}}}}}n.css("visibility","visible").hide()},inheritable_classes:function(i){var h=["tip-top","tip-left","tip-bottom","tip-right","tip-centered-top","tip-centered-bottom","noradius"].concat(b.additionalInheritableClasses),g=i.attr("class"),f=g?d.map(g.split(" "),function(l,k){if(d.inArray(l,h)!==-1){return l}}).join(" "):"";return d.trim(f)},show:function(f){var g=a.getTip(f);a.reposition(f,g,f.attr("class"));g.fadeIn(150)},hide:function(f){var g=a.getTip(f);g.fadeOut(150)},reload:function(){var f=d(this);return(f.data("tooltips"))?f.foundationTooltips("destroy").foundationTooltips("init"):f.foundationTooltips("init")},destroy:function(){return this.each(function(){d(c).off(".tooltip");d(b.selector).off(".tooltip");d(b.tooltipClass).each(function(f){d(d(b.selector).get(f)).attr("title",d(this).text())}).remove()})}};d.fn.foundationTooltips=function(f){if(a[f]){return a[f].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof f==="object"||!f){return a.init.apply(this,arguments)}else{d.error("Method "+f+" does not exist on jQuery.foundationTooltips")}}}}(jQuery,this));(function(d,c,f){var b={index:0,initialized:false},a={init:function(h){return this.each(function(){b=d.extend(b,h);b.$w=d(c),b.$topbar=d("nav.top-bar"),b.$section=b.$topbar.find("section"),b.$titlebar=b.$topbar.children("ul:first");var i=d("<div class='top-bar-js-breakpoint'/>").appendTo("body");b.breakPoint=i.width();i.remove();if(!b.initialized){a.assemble();b.initialized=true}if(!b.height){a.largestUL()}if(b.$topbar.parent().hasClass("fixed")){d("body").css("padding-top",b.$topbar.outerHeight())}d(".top-bar .toggle-topbar").die("click.fndtn").live("click.fndtn",function(k){k.preventDefault();if(a.breakpoint()){b.$topbar.toggleClass("expanded");b.$topbar.css("min-height","")}if(!b.$topbar.hasClass("expanded")){b.$section.css({left:"0%"});b.$section.find(">.name").css({left:"100%"});b.$section.find("li.moved").removeClass("moved");b.index=0}});d(".top-bar .has-dropdown>a").die("click.fndtn").live("click.fndtn",function(m){if(Modernizr.touch||a.breakpoint()){m.preventDefault()}if(a.breakpoint()){var l=d(this),k=l.closest("li");b.index+=1;k.addClass("moved");b.$section.css({left:-(100*b.index)+"%"});b.$section.find(">.name").css({left:100*b.index+"%"});l.siblings("ul").height(b.height+b.$titlebar.outerHeight(true));b.$topbar.css("min-height",b.height+b.$titlebar.outerHeight(true)*2)}});d(c).on("resize.fndtn.topbar",function(){if(!a.breakpoint()){b.$topbar.css("min-height","")}});d(".top-bar .has-dropdown .back").die("click.fndtn").live("click.fndtn",function(n){n.preventDefault();var m=d(this),l=m.closest("li.moved"),k=l.parent();b.index-=1;b.$section.css({left:-(100*b.index)+"%"});b.$section.find(">.name").css({left:100*b.index+"%"});if(b.index===0){b.$topbar.css("min-height",0)}setTimeout(function(){l.removeClass("moved")},300)})})},breakpoint:function(){return b.$w.width()<b.breakPoint},assemble:function(){b.$section.detach();b.$section.find(".has-dropdown>a").each(function(){var h=d(this),k=h.siblings(".dropdown"),i=d('<li class="title back js-generated"><h5><a href="#"></a></h5></li>');i.find("h5>a").html(h.html());k.prepend(i)});b.$section.appendTo(b.$topbar)},largestUL:function(){var i=b.$topbar.find("section ul ul"),k=i.first(),h=0;i.each(function(){if(d(this).children("li").length>k.children("li").length){k=d(this)}});k.children("li").each(function(){h+=d(this).outerHeight(true)});b.height=h}};d.fn.foundationTopBar=function(h){if(a[h]){return a[h].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof h==="object"||!h){return a.init.apply(this,arguments)}else{d.error("Method "+h+" does not exist on jQuery.foundationTopBar")}}};if(d(".sticky").length>0){var g=d(".sticky").length?d(".sticky").offset().top:0,e=d(c);e.scroll(function(){if(e.scrollTop()>=g){d(".sticky").addClass("fixed")}else{if(e.scrollTop()<g){d(".sticky").removeClass("fixed")}}})}}(jQuery,this));(function(d,a,e){var h=e("#topMenu"),b="click.fndtn";if(h.length>0){h.css("margin-top",h.height()*-1)}var g=e("#sidebarButton");if(g.length>0){e("#sidebarButton").on(b,function(i){i.preventDefault();e("body").toggleClass("active")})}var f=e("#menuButton");if(f.length>0){e("#menuButton").on(b,function(i){i.preventDefault();e("body").toggleClass("active-menu")})}var c=e("#switchPanels");if(c.length>0){e("#switchPanels dd").on(b,function(k){k.preventDefault();var l=e(this).children("a").attr("href"),i=e(l).index();e(this).toggleClass("active").siblings().removeClass("active");e(l).parent().css("left",(i*(-100)+"%"))})}e("#nav li a").on(b,function(l){l.preventDefault();var k=e(this).attr("href"),i=e(k);e("html, body").animate({scrollTop:i.offset().top},300)})}(this,document,jQuery)); | |
/*! http://mths.be/placeholder v2.0.7 by @mathias */ | |
(function(g,i,d){var a="placeholder" in i.createElement("input"),e="placeholder" in i.createElement("textarea"),k=d.fn,c=d.valHooks,m,l;if(a&&e){l=k.placeholder=function(){return this};l.input=l.textarea=true}else{l=k.placeholder=function(){var n=this;n.filter((a?"textarea":":input")+"[placeholder]").not(".placeholder").bind({"focus.placeholder":b,"blur.placeholder":f}).data("placeholder-enabled",true).trigger("blur.placeholder");return n};l.input=a;l.textarea=e;m={get:function(o){var n=d(o);return n.data("placeholder-enabled")&&n.hasClass("placeholder")?"":o.value},set:function(o,p){var n=d(o);if(!n.data("placeholder-enabled")){return o.value=p}if(p==""){o.value=p;if(o!=i.activeElement){f.call(o)}}else{if(n.hasClass("placeholder")){b.call(o,true,p)||(o.value=p)}else{o.value=p}}return n}};a||(c.input=m);e||(c.textarea=m);d(function(){d(i).delegate("form","submit.placeholder",function(){var n=d(".placeholder",this).each(b);setTimeout(function(){n.each(f)},10)})});d(g).bind("beforeunload.placeholder",function(){d(".placeholder").each(function(){this.value=""})})}function h(o){var n={},p=/^jQuery\d+$/;d.each(o.attributes,function(r,q){if(q.specified&&!p.test(q.name)){n[q.name]=q.value}});return n}function b(o,p){var n=this,q=d(n);if(n.value==q.attr("placeholder")&&q.hasClass("placeholder")){if(q.data("placeholder-password")){q=q.hide().next().show().attr("id",q.removeAttr("id").data("placeholder-id"));if(o===true){return q[0].value=p}q.focus()}else{n.value="";q.removeClass("placeholder");n==i.activeElement&&n.select()}}}function f(){var s,n=this,r=d(n),o=r,q=this.id;if(n.value==""){if(n.type=="password"){if(!r.data("placeholder-textinput")){try{s=r.clone().attr({type:"text"})}catch(p){s=d("<input>").attr(d.extend(h(this),{type:"text"}))}s.removeAttr("name").data({"placeholder-password":true,"placeholder-id":q}).bind("focus.placeholder",b);r.data({"placeholder-textinput":s,"placeholder-id":q}).before(s)}r=r.removeAttr("id").hide().prev().attr("id",q).show()}r.addClass("placeholder");r[0].value=r.attr("placeholder")}else{r.removeClass("placeholder")}}}(this,document,jQuery)); | |
/*! | |
* jQuery Cookie Plugin v1.3 | |
* https://github.com/carhartl/jquery-cookie | |
* | |
* Copyright 2011, Klaus Hartl | |
* Dual licensed under the MIT or GPL Version 2 licenses. | |
* http://www.opensource.org/licenses/mit-license.php | |
* http://www.opensource.org/licenses/GPL-2.0 | |
*/ | |
(function(f,b,g){var a=/\+/g;function e(h){return h}function c(h){return decodeURIComponent(h.replace(a," "))}var d=f.cookie=function(q,p,v){if(p!==g){v=f.extend({},d.defaults,v);if(p===null){v.expires=-1}if(typeof v.expires==="number"){var r=v.expires,u=v.expires=new Date();u.setDate(u.getDate()+r)}p=d.json?JSON.stringify(p):String(p);return(b.cookie=[encodeURIComponent(q),"=",d.raw?p:encodeURIComponent(p),v.expires?"; expires="+v.expires.toUTCString():"",v.path?"; path="+v.path:"",v.domain?"; domain="+v.domain:"",v.secure?"; secure":""].join(""))}var h=d.raw?e:c;var s=b.cookie.split("; ");for(var o=0,m=s.length;o<m;o++){var n=s[o].split("=");if(h(n.shift())===q){var k=h(n.join("="));return d.json?JSON.parse(k):k}}return null};d.defaults={};f.removeCookie=function(i,h){if(f.cookie(i)!==null){f.cookie(i,null,h);return true}return false}})(jQuery,document);(function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a)}else{a(jQuery)}})(function(t,k){var c=6,e=t.event.add,w=t.event.remove,z=function(S,R,T){t.event.trigger(R,T,S)},D=(function(){return(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(S,R){return window.setTimeout(function(){S()},25)})})(),g={textarea:true,input:true,select:true,button:true},i={move:"mousemove",cancel:"mouseup dragstart",end:"mouseup"},d={move:"touchmove",cancel:"touchend",end:"touchend"};function o(T){var V=T,U=false,R=false;function S(W){if(U){V();D(S);R=true;U=false}else{R=false}}this.kick=function(W){U=true;if(!R){S()}};this.end=function(X){var W=V;if(!X){return}if(!R){X()}else{V=U?function(){W();X()}:X;U=true}}}function L(){return true}function Q(){return false}function C(R){R.preventDefault()}function O(R){if(g[R.target.tagName.toLowerCase()]){return}R.preventDefault()}function G(R){return(R.which===1&&!R.ctrlKey&&!R.altKey)}function M(T,U){var S,R;if(T.identifiedTouch){return T.identifiedTouch(U)}S=-1;R=T.length;while(++S<R){if(T[S].identifier===U){return T[S]}}}function m(S,R){var T=M(S.changedTouches,R.identifier);if(!T){return}if(T.pageX===R.pageX&&T.pageY===R.pageY){return}return T}function p(S){var R;if(!G(S)){return}R={target:S.target,startX:S.pageX,startY:S.pageY,timeStamp:S.timeStamp};e(document,i.move,v,R);e(document,i.cancel,y,R)}function v(S){var R=S.data;s(S,R,S,A)}function y(R){A()}function A(){w(document,i.move,v);w(document,i.cancel,A)}function P(S){var T,R;if(g[S.target.tagName.toLowerCase()]){return}T=S.changedTouches[0];R={target:T.target,startX:T.pageX,startY:T.pageY,timeStamp:S.timeStamp,identifier:T.identifier};e(document,d.move+"."+T.identifier,q,R);e(document,d.cancel+"."+T.identifier,E,R)}function q(S){var R=S.data,T=m(S,R);if(!T){return}s(S,R,T,N)}function E(S){var R=S.data,T=M(S.changedTouches,R.identifier);if(!T){return}N(R.identifier)}function N(R){w(document,"."+R,q);w(document,"."+R,E)}function s(V,U,W,T){var S=W.pageX-U.startX,R=W.pageY-U.startY;if((S*S)+(R*R)<(c*c)){return}r(V,U,W,S,R,T)}function I(){this._handled=L;return false}function K(R){R._handled()}function r(V,Z,T,Y,W,X){var S=Z.target,U,R;U=V.targetTouches;R=V.timeStamp-Z.timeStamp;Z.type="movestart";Z.distX=Y;Z.distY=W;Z.deltaX=Y;Z.deltaY=W;Z.pageX=T.pageX;Z.pageY=T.pageY;Z.velocityX=Y/R;Z.velocityY=W/R;Z.targetTouches=U;Z.finger=U?U.length:1;Z._handled=I;Z._preventTouchmoveDefault=function(){V.preventDefault()};z(Z.target,Z);X(Z.identifier)}function H(S){var R=S.data.event,T=S.data.timer;F(R,S,S.timeStamp,T)}function b(S){var R=S.data.event,T=S.data.timer;a();x(R,T,function(){setTimeout(function(){w(R.target,"click",Q)},0)})}function a(R){w(document,i.move,H);w(document,i.end,b)}function B(S){var R=S.data.event,U=S.data.timer,T=m(S,R);if(!T){return}S.preventDefault();R.targetTouches=S.targetTouches;F(R,T,S.timeStamp,U)}function h(S){var R=S.data.event,U=S.data.timer,T=M(S.changedTouches,R.identifier);if(!T){return}l(R);x(R,U)}function l(R){w(document,"."+R.identifier,B);w(document,"."+R.identifier,h)}function F(S,V,R,U){var T=R-S.timeStamp;S.type="move";S.distX=V.pageX-S.startX;S.distY=V.pageY-S.startY;S.deltaX=V.pageX-S.pageX;S.deltaY=V.pageY-S.pageY;S.velocityX=0.3*S.velocityX+0.7*S.deltaX/T;S.velocityY=0.3*S.velocityY+0.7*S.deltaY/T;S.pageX=V.pageX;S.pageY=V.pageY;U.kick()}function x(S,T,R){T.end(function(){S.type="moveend";z(S.target,S);return R&&R()})}function f(T,S,R){e(this,"movestart.move",K);return true}function u(R){w(this,"dragstart drag",C);w(this,"mousedown touchstart",O);w(this,"movestart",K);return true}function J(R){if(R.namespace==="move"||R.namespace==="moveend"){return}e(this,"dragstart."+R.guid+" drag."+R.guid,C,k,R.selector);e(this,"mousedown."+R.guid,O,k,R.selector)}function n(R){if(R.namespace==="move"||R.namespace==="moveend"){return}w(this,"dragstart."+R.guid+" drag."+R.guid);w(this,"mousedown."+R.guid)}t.event.special.movestart={setup:f,teardown:u,add:J,remove:n,_default:function(T){var R,S;if(!T._handled()){return}R={target:T.target,startX:T.startX,startY:T.startY,pageX:T.pageX,pageY:T.pageY,distX:T.distX,distY:T.distY,deltaX:T.deltaX,deltaY:T.deltaY,velocityX:T.velocityX,velocityY:T.velocityY,timeStamp:T.timeStamp,identifier:T.identifier,targetTouches:T.targetTouches,finger:T.finger};S={event:R,timer:new o(function(U){z(T.target,R)})};if(T.identifier===k){e(T.target,"click",Q);e(document,i.move,H,S);e(document,i.end,b,S)}else{T._preventTouchmoveDefault();e(document,d.move+"."+T.identifier,B,S);e(document,d.end+"."+T.identifier,h,S)}}};t.event.special.move={setup:function(){e(this,"movestart.move",t.noop)},teardown:function(){w(this,"movestart.move",t.noop)}};t.event.special.moveend={setup:function(){e(this,"movestart.moveend",t.noop)},teardown:function(){w(this,"movestart.moveend",t.noop)}};e(document,"mousedown.move",p);e(document,"touchstart.move",P);if(typeof Array.prototype.indexOf==="function"){(function(T,U){var S=["changedTouches","targetTouches"],R=S.length;while(R--){if(T.event.props.indexOf(S[R])===-1){T.event.props.push(S[R])}}})(t)}});(function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a)}else{a(jQuery)}})(function(g,h){var f=g.event.add,c=g.event.remove,d=function(k,i,l){g.event.trigger(i,l,k)},e={threshold:0.4,sensitivity:6};function b(m){var i,k,l;i=m.target.offsetWidth;k=m.target.offsetHeight;l={distX:m.distX,distY:m.distY,velocityX:m.velocityX,velocityY:m.velocityY,finger:m.finger};if(m.distX>m.distY){if(m.distX>-m.distY){if(m.distX/i>e.threshold||m.velocityX*m.distX/i*e.sensitivity>1){l.type="swiperight";d(m.currentTarget,l)}}else{if(-m.distY/k>e.threshold||m.velocityY*m.distY/i*e.sensitivity>1){l.type="swipeup";d(m.currentTarget,l)}}}else{if(m.distX>-m.distY){if(m.distY/k>e.threshold||m.velocityY*m.distY/i*e.sensitivity>1){l.type="swipedown";d(m.currentTarget,l)}}else{if(-m.distX/i>e.threshold||m.velocityX*m.distX/i*e.sensitivity>1){l.type="swipeleft";d(m.currentTarget,l)}}}}function a(i){var k=g.data(i,"event_swipe");if(!k){k={count:0};g.data(i,"event_swipe",k)}return k}g.event.special.swipe=g.event.special.swipeleft=g.event.special.swiperight=g.event.special.swipeup=g.event.special.swipedown={setup:function(l,k,i){var l=a(this);if(l.count++>0){return}f(this,"moveend",b);return true},teardown:function(){var i=a(this);if(--i.count>0){return}c(this,"moveend",b);return true},settings:e}});(function(b,a,c){b.fn.foundationAccordion=function(e){var d=function(f){return f.hasClass("hover")&&!Modernizr.touch};b(document).on("mouseenter",".accordion li",function(){var g=b(this).parent();if(d(g)){var f=b(this).children(".content").first();b(".content",g).not(f).hide().parent("li").removeClass("active");f.show(0,function(){f.parent("li").addClass("active")})}});b(document).on("click.fndtn",".accordion li .title",function(){var f=b(this).closest("li"),h=f.parent();if(!d(h)){var g=f.children(".content").first();if(f.hasClass("active")){h.find("li").removeClass("active").end().find(".content").hide()}else{b(".content",h).not(g).hide().parent("li").removeClass("active");g.show(0,function(){g.parent("li").addClass("active")})}}})}})(jQuery,this);(function(b,a,c){b.fn.foundationAlerts=function(d){var e=b.extend({callback:b.noop},d);b(document).on("click",".alert-box a.close",function(f){f.preventDefault();b(this).closest(".alert-box").fadeOut(function(){b(this).remove();e.callback()})})}})(jQuery,this);(function(b,a,c){b.fn.foundationButtons=function(m){var g=b(document),e=b.extend({dropdownAsToggle:false,activeClass:"active"},m),f=function(n){b(".button.dropdown").find("ul").not(n).removeClass("show-dropdown")},i=function(n){var o=b(".button.dropdown").not(n);o.add(b("> span."+e.activeClass,o)).removeClass(e.activeClass)};g.on("click.fndtn",".button.disabled",function(n){n.preventDefault()});b(".button.dropdown > ul",this).addClass("no-hover");g.on("click.fndtn",".button.dropdown:not(.split), .button.dropdown.split span",function(p){var o=b(this),n=o.closest(".button.dropdown"),q=b("> ul",n);if(["A","BUTTON"].indexOf(p.target.nodeName)==-1){p.preventDefault()}setTimeout(function(){f(e.dropdownAsToggle?"":q);q.toggleClass("show-dropdown");if(e.dropdownAsToggle){i(n);o.toggleClass(e.activeClass)}},0)});g.on("click.fndtn","body, html",function(n){if(c==n.originalEvent){return}if(!b(n.originalEvent.target).is(".button.dropdown:not(.split), .button.dropdown.split span")){f();if(e.dropdownAsToggle){i()}}});var h=b(".button.dropdown:not(.large):not(.small):not(.tiny):visible",this).outerHeight()-1,l=b(".button.large.dropdown:visible",this).outerHeight()-1,d=b(".button.small.dropdown:visible",this).outerHeight()-1,k=b(".button.tiny.dropdown:visible",this).outerHeight()-1;b(".button.dropdown:not(.large):not(.small):not(.tiny) > ul",this).css("top",h);b(".button.dropdown.large > ul",this).css("top",l);b(".button.dropdown.small > ul",this).css("top",d);b(".button.dropdown.tiny > ul",this).css("top",k);b(".button.dropdown.up:not(.large):not(.small):not(.tiny) > ul",this).css("top","auto").css("bottom",h-2);b(".button.dropdown.up.large > ul",this).css("top","auto").css("bottom",l-2);b(".button.dropdown.up.small > ul",this).css("top","auto").css("bottom",d-2);b(".button.dropdown.up.tiny > ul",this).css("top","auto").css("bottom",k-2)}})(jQuery,this);(function(d,c,a,f){var e={templates:{viewing:'<a href="#" class="clearing-close">×</a><div class="visible-img" style="display: none"><img src="#"><p class="clearing-caption"></p><a href="#" class="clearing-main-left"></a><a href="#" class="clearing-main-right"></a></div>'},close_selectors:"a.clearing-close",initialized:false,locked:false},b={init:function(g,h){return this.find("ul[data-clearing]").each(function(){var m=d(a),k=d(this),i=i||{},n=n||{},l=k.data("fndtn.clearing.settings");if(!l){i.$parent=k.parent();k.data("fndtn.clearing.settings",d.extend({},e,i));b.assemble(k.find("li"));if(!e.initialized){b.events(k);if(Modernizr.touch){b.swipe_events()}}}})},events:function(h){var g=h.data("fndtn.clearing.settings");d(a).on("click.fndtn.clearing","ul[data-clearing] li",function(m,l,k){var l=l||d(this),k=k||l,i=l.parent().data("fndtn.clearing.settings");m.preventDefault();if(!i){l.parent().foundationClearing()}b.open(d(m.target),l,k);b.update_paddles(k)}).on("click.fndtn.clearing",".clearing-main-right",function(i){b.nav(i,"next")}).on("click.fndtn.clearing",".clearing-main-left",function(i){b.nav(i,"prev")}).on("click.fndtn.clearing",g.close_selectors,this.close).on("keydown.fndtn.clearing",this.keydown);d(c).on("resize.fndtn.clearing",this.resize);e.initialized=true},swipe_events:function(){d(a).bind("swipeleft","ul[data-clearing]",function(g){b.nav(g,"next")}).bind("swiperight","ul[data-clearing]",function(g){b.nav(g,"prev")}).bind("movestart","ul[data-clearing]",function(g){if((g.distX>g.distY&&g.distX<-g.distY)||(g.distX<g.distY&&g.distX>-g.distY)){g.preventDefault()}})},assemble:function(m){var h=m.parent(),i=h.data("fndtn.clearing.settings"),g=h.detach(),k={grid:'<div class="carousel">'+this.outerHTML(g[0])+"</div>",viewing:i.templates.viewing},l='<div class="clearing-assembled"><div>'+k.viewing+k.grid+"</div></div>";return i.$parent.append(l)},open:function(k,n,m){var h=m.closest(".clearing-assembled"),g=h.find("div:first"),i=g.find(".visible-img"),l=i.find("img").not(k);if(!b.locked()){l.attr("src",this.load(k));l.loaded(function(){h.addClass("clearing-blackout");g.addClass("clearing-container");this.caption(i.find(".clearing-caption"),k);i.show();this.fix_height(m);this.center(l);this.shift(n,m,function(){m.siblings().removeClass("visible");m.addClass("visible")})}.bind(this))}},close:function(k){k.preventDefault();var h=(function(l){if(/blackout/.test(l.selector)){return l}else{return l.closest(".clearing-blackout")}}(d(this))),g,i;if(this===k.target&&h){g=h.find("div:first"),i=g.find(".visible-img");e.prev_index=0;h.find("ul[data-clearing]").attr("style","");h.removeClass("clearing-blackout");g.removeClass("clearing-container");i.hide()}return false},keydown:function(h){var g=d(".clearing-blackout").find("ul[data-clearing]");if(h.which===39){b.go(g,"next")}if(h.which===37){b.go(g,"prev")}if(h.which===27){d("a.clearing-close").trigger("click")}},nav:function(i,h){var g=d(".clearing-blackout").find("ul[data-clearing]");i.preventDefault();this.go(g,h)},resize:function(){var g=d(".clearing-blackout .visible-img").find("img");if(g.length>0){b.center(g)}},fix_height:function(h){var g=h.siblings();g.each(function(){var i=d(this),k=i.find("img");if(i.height()>k.outerHeight()){i.addClass("fix-height")}}).closest("ul").width(g.length*100+"%")},update_paddles:function(h){var g=h.closest(".carousel").siblings(".visible-img");if(h.next().length>0){g.find(".clearing-main-right").removeClass("disabled")}else{g.find(".clearing-main-right").addClass("disabled")}if(h.prev().length>0){g.find(".clearing-main-left").removeClass("disabled")}else{g.find(".clearing-main-left").addClass("disabled")}},load:function(h){var g=h.parent().attr("href");this.preload(h);if(g){return g}return h.attr("src")},preload:function(g){this.img(g.closest("li").next());this.img(g.closest("li").prev())},img:function(g){if(g.length>0){var h=new Image(),i=g.find("a");if(i.length>0){h.src=i.attr("href")}else{h.src=g.find("img").attr("src")}}},caption:function(g,i){var h=i.data("caption");if(h){g.text(h).show()}else{g.text("").hide()}},go:function(g,k){var i=g.find(".visible"),h=i[k]();if(h.length>0){h.find("img").trigger("click",[i,h])}},shift:function(k,l,p){var m=l.parent(),i=e.prev_index,n=this.direction(m,k,l),h=parseInt(m.css("left"),10),g=l.outerWidth(),o;if(l.index()!==i&&!/skip/.test(n)){if(/left/.test(n)){this.lock();m.animate({left:h+g},300,this.unlock)}else{if(/right/.test(n)){this.lock();m.animate({left:h-g},300,this.unlock)}}}else{if(/skip/.test(n)){o=l.index()-e.up_count;this.lock();if(o>0){m.animate({left:-(o*g)},300,this.unlock)}else{m.animate({left:0},300,this.unlock)}}}p()},lock:function(){e.locked=true},unlock:function(){e.locked=false},locked:function(){return e.locked},direction:function(k,m,l){var i=k.find("li"),h=i.outerWidth()+(i.outerWidth()/4),n=Math.floor(d(".clearing-container").outerWidth()/h)-1,o=i.index(l),g;e.up_count=n;if(this.adjacent(e.prev_index,o)){if((o>n)&&o>e.prev_index){g="right"}else{if((o>n-1)&&o<=e.prev_index){g="left"}else{g=false}}}else{g="skip"}e.prev_index=o;return g},adjacent:function(k,h){for(var g=h+1;g>=h-1;g--){if(g===k){return true}}return false},center:function(g){g.css({marginLeft:-(g.outerWidth()/2),marginTop:-(g.outerHeight()/2)})},outerHTML:function(g){return g.outerHTML||new XMLSerializer().serializeToString(g)}};d.fn.foundationClearing=function(g){if(b[g]){return b[g].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof g==="object"||!g){return b.init.apply(this,arguments)}else{d.error("Method "+g+" does not exist on jQuery.foundationClearing")}}};(function(g){g.fn.loaded=function(o,m){var k=g.extend({},g.fn.loaded.defaults,m),i=this.find("img").add(this.filter("img")),l=i.length;function h(){l-=1;!l&&o()}function n(){this.one("load",h);if(g.browser.msie){var q=this.attr("src"),p=q.match(/\?/)?"&":"?";p+=k.cachePrefix+"="+(new Date()).getTime();this.attr("src",q+p)}}return i.each(function(){var p=g(this);if(!p.attr("src")){h();return}this.complete||this.readyState===4?h():n.call(p)})};g.fn.loaded.defaults={cachePrefix:"random"}}(jQuery))}(jQuery,this,this.document));(function(d){var c=function(){return{tmp:[],hidden:null,adjust:function(g){var f=this;f.hidden=g.parents().andSelf().filter(":hidden");f.hidden.each(function(){var h=d(this);f.tmp.push(h.attr("style"));h.css({visibility:"hidden",display:"block"})})},reset:function(){var f=this;f.hidden.each(function(h){var g=d(this),k=f.tmp[h];if(k===undefined){g.removeAttr("style")}else{g.attr("style",k)}});f.tmp=[];f.hidden=null}}};jQuery.foundation=jQuery.foundation||{};jQuery.foundation.customForms=jQuery.foundation.customForms||{};d.foundation.customForms.appendCustomMarkup=function(h){var i={disable_class:"no-custom"};h=d.extend(i,h);function g(k,n){var o=d(n).hide(),m=o.attr("type"),l=o.next("span.custom."+m);if(l.length===0){l=d('<span class="custom '+m+'"></span>').insertAfter(o)}l.toggleClass("checked",o.is(":checked"));l.toggleClass("disabled",o.is(":disabled"))}function f(v,m){var y=c();var r=d(m),q=r.next("div.custom.dropdown"),s=q.find("ul"),t=q.find(".current"),x=q.find(".selector"),p=r.find("option"),n=p.filter(":selected"),w=0,u="",l;var k=false;if(r.hasClass(h.disable_class)){return}if(q.length===0){var o=r.hasClass("small")?"small":r.hasClass("medium")?"medium":r.hasClass("large")?"large":r.hasClass("expand")?"expand":"";q=d('<div class="'+["custom","dropdown",o].join(" ")+'"><a href="#" class="selector"></a><ul /></div>');x=q.find(".selector");s=q.find("ul");u=p.map(function(){return"<li>"+d(this).html()+"</li>"}).get().join("");s.append(u);k=q.prepend('<a href="#" class="current">'+n.html()+"</a>").find(".current");r.after(q).hide()}else{u=p.map(function(){return"<li>"+d(this).html()+"</li>"}).get().join("");s.html("").append(u)}q.toggleClass("disabled",r.is(":disabled"));l=s.find("li");p.each(function(z){if(this.selected){l.eq(z).addClass("selected");if(k){k.html(d(this).html())}}});s.css("width","auto");q.css("width","auto");if(!q.is(".small, .medium, .large, .expand")){q.addClass("open");y.adjust(s);w=(l.outerWidth()>w)?l.outerWidth():w;y.reset();q.removeClass("open");q.width(w+18);s.width(w+16)}}d("form.custom input:radio[data-customforms!=disabled]").each(g);d("form.custom input:checkbox[data-customforms!=disabled]").each(g);d("form.custom select[data-customforms!=disabled]").each(f)};var b=function(f){var g=0,h=f.next();$options=f.find("option");h.find("ul").html("");$options.each(function(){$li=d("<li>"+d(this).html()+"</li>");h.find("ul").append($li)});$options.each(function(i){if(this.selected){h.find("li").eq(i).addClass("selected");h.find(".current").html(d(this).html())}});h.removeAttr("style").find("ul").removeAttr("style");h.find("li").each(function(){h.addClass("open");if(d(this).outerWidth()>g){g=d(this).outerWidth()}h.removeClass("open")});h.css("width",g+18+"px");h.find("ul").css("width",g+16+"px")};var a=function(f){var h=f.prev(),g=h[0];if(false===h.is(":disabled")){g.checked=((g.checked)?false:true);f.toggleClass("checked");h.trigger("change")}};var e=function(f){var i=f.prev(),h=i.closest("form.custom"),g=i[0];if(false===i.is(":disabled")){h.find('input:radio[name="'+i.attr("name")+'"]').next().not(f).removeClass("checked");if(!f.hasClass("checked")){f.toggleClass("checked")}g.checked=f.hasClass("checked");i.trigger("change")}};d(document).on("click","form.custom span.custom.checkbox",function(f){f.preventDefault();f.stopPropagation();a(d(this))});d(document).on("click","form.custom span.custom.radio",function(f){f.preventDefault();f.stopPropagation();e(d(this))});d(document).on("change","form.custom select[data-customforms!=disabled]",function(f){b(d(this))});d(document).on("click","form.custom label",function(g){var f=d("#"+d(this).attr("for")+"[data-customforms!=disabled]"),i,h;if(f.length!==0){if(f.attr("type")==="checkbox"){g.preventDefault();i=d(this).find("span.custom.checkbox");if(i.length==0){i=d(this).next("span.custom.checkbox")}if(i.length==0){i=d(this).prev("span.custom.checkbox")}a(i)}else{if(f.attr("type")==="radio"){g.preventDefault();h=d(this).find("span.custom.radio");if(h.length==0){h=d(this).next("span.custom.radio")}if(h.length==0){h=d(this).prev("span.custom.radio")}e(h)}}}});d(document).on("click","form.custom div.custom.dropdown a.current, form.custom div.custom.dropdown a.selector",function(g){var i=d(this),h=i.closest("div.custom.dropdown"),f=h.prev();g.preventDefault();d("div.dropdown").removeClass("open");if(false===f.is(":disabled")){h.toggleClass("open");if(h.hasClass("open")){d(document).bind("click.customdropdown",function(k){h.removeClass("open");d(document).unbind(".customdropdown")})}else{d(document).unbind(".customdropdown")}return false}});d(document).on("click","form.custom div.custom.dropdown li",function(i){var k=d(this),g=k.closest("div.custom.dropdown"),h=g.prev(),f=0;i.preventDefault();i.stopPropagation();d("div.dropdown").removeClass("open");k.closest("ul").find("li").removeClass("selected");k.addClass("selected");g.removeClass("open").find("a.current").html(k.html());k.closest("ul").find("li").each(function(l){if(k[0]==this){f=l}});h[0].selectedIndex=f;h.trigger("change")});d.fn.foundationCustomForms=d.foundation.customForms.appendCustomMarkup})(jQuery);(function(d,c,g){var f={version:"2.0.3",tipLocation:"bottom",nubPosition:"auto",scrollSpeed:300,timer:0,startTimerOnClick:true,startOffset:0,nextButton:true,tipAnimation:"fade",pauseAfter:[],tipAnimationFadeSpeed:300,cookieMonster:false,cookieName:"joyride",cookieDomain:false,tipContainer:"body",postRideCallback:d.noop,postStepCallback:d.noop,template:{link:'<a href="#close" class="joyride-close-tip">X</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>'}},e=e||false,b={},a={init:function(h){return this.each(function(){if(d.isEmptyObject(b)){b=d.extend(true,f,h);b.document=c.document;b.$document=d(b.document);b.$window=d(c);b.$content_el=d(this);b.body_offset=d(b.tipContainer).position();b.$tip_content=d("> li",b.$content_el);b.paused=false;b.attempts=0;b.tipLocationPatterns={top:["bottom"],bottom:[],left:["right","top","bottom"],right:["left","top","bottom"]};a.jquery_check();if(!d.isFunction(d.cookie)){b.cookieMonster=false}if(!b.cookieMonster||!d.cookie(b.cookieName)){b.$tip_content.each(function(i){a.create({$li:d(this),index:i})});if(!b.startTimerOnClick&&b.timer>0){a.show("init");a.startTimer()}else{a.show("init")}}b.$document.on("click.joyride",".joyride-next-tip, .joyride-modal-bg",function(i){i.preventDefault();if(b.$li.next().length<1){a.end()}else{if(b.timer>0){clearTimeout(b.automate);a.hide();a.show();a.startTimer()}else{a.hide();a.show()}}});b.$document.on("click.joyride",".joyride-close-tip",function(i){i.preventDefault();a.end()});b.$window.bind("resize.joyride",function(i){if(a.is_phone()){a.pos_phone()}else{a.pos_default()}})}else{a.restart()}})},resume:function(){a.set_li();a.show()},tip_template:function(i){var k,h;i.tip_class=i.tip_class||"";k=d(b.template.tip).addClass(i.tip_class);h=d.trim(d(i.li).html())+a.button_text(i.button_text)+b.template.link+a.timer_instance(i.index);k.append(d(b.template.wrapper));k.first().attr("data-index",i.index);d(".joyride-content-wrapper",k).append(h);return k[0]},timer_instance:function(i){var h;if((i===0&&b.startTimerOnClick&&b.timer>0)||b.timer===0){h=""}else{h=a.outerHTML(d(b.template.timer)[0])}return h},button_text:function(h){if(b.nextButton){h=d.trim(h)||"Next";h=a.outerHTML(d(b.template.button).append(h)[0])}else{h=""}return h},create:function(k){var i=k.$li.attr("data-button")||k.$li.attr("data-text"),h=k.$li.attr("class"),l=d(a.tip_template({tip_class:h,index:k.index,button_text:i,li:k.$li}));d(b.tipContainer).append(l)},show:function(o){var l={},k,i=[],h=0,n,m=null;if(b.$li===g||(d.inArray(b.$li.index(),b.pauseAfter)===-1)){if(b.paused){b.paused=false}else{a.set_li(o)}b.attempts=0;if(b.$li.length&&b.$target.length>0){i=(b.$li.data("options")||":").split(";");h=i.length;for(k=h-1;k>=0;k--){n=i[k].split(":");if(n.length===2){l[d.trim(n[0])]=d.trim(n[1])}}b.tipSettings=d.extend({},b,l);b.tipSettings.tipLocationPattern=b.tipLocationPatterns[b.tipSettings.tipLocation];if(!/body/i.test(b.$target.selector)){a.scroll_to()}if(a.is_phone()){a.pos_phone(true)}else{a.pos_default(true)}m=d(".joyride-timer-indicator",b.$next_tip);if(/pop/i.test(b.tipAnimation)){m.outerWidth(0);if(b.timer>0){b.$next_tip.show();m.animate({width:d(".joyride-timer-indicator-wrap",b.$next_tip).outerWidth()},b.timer)}else{b.$next_tip.show()}}else{if(/fade/i.test(b.tipAnimation)){m.outerWidth(0);if(b.timer>0){b.$next_tip.fadeIn(b.tipAnimationFadeSpeed);b.$next_tip.show();m.animate({width:d(".joyride-timer-indicator-wrap",b.$next_tip).outerWidth()},b.timer)}else{b.$next_tip.fadeIn(b.tipAnimationFadeSpeed)}}}b.$current_tip=b.$next_tip}else{if(b.$li&&b.$target.length<1){a.show()}else{a.end()}}}else{b.paused=true}},is_phone:function(){if(e){return e.mq("only screen and (max-width: 767px)")}return(b.$window.width()<767)?true:false},hide:function(){b.postStepCallback(b.$li.index(),b.$current_tip);d(".joyride-modal-bg").hide();b.$current_tip.hide()},set_li:function(h){if(h){b.$li=b.$tip_content.eq(b.startOffset);a.set_next_tip();b.$current_tip=b.$next_tip}else{b.$li=b.$li.next();a.set_next_tip()}a.set_target()},set_next_tip:function(){b.$next_tip=d(".joyride-tip-guide[data-index="+b.$li.index()+"]")},set_target:function(){var h=b.$li.attr("data-class"),k=b.$li.attr("data-id"),i=function(){if(k){return d(b.document.getElementById(k))}else{if(h){return d("."+h).first()}else{return d("body")}}};b.$target=i()},scroll_to:function(){var i,h;i=b.$window.height()/2;h=Math.ceil(b.$target.offset().top-i+b.$next_tip.outerHeight());d("html, body").stop().animate({scrollTop:h},b.scrollSpeed)},paused:function(){if((d.inArray((b.$li.index()+1),b.pauseAfter)===-1)){return true}return false},destroy:function(){b.$document.off(".joyride");d(c).off(".joyride");d(".joyride-close-tip, .joyride-next-tip, .joyride-modal-bg").off(".joyride");d(".joyride-tip-guide, .joyride-modal-bg").remove();clearTimeout(b.automate);b={}},restart:function(){a.hide();b.$li=g;a.show("init")},pos_default:function(m){var i=Math.ceil(b.$window.height()/2),l=b.$next_tip.offset(),k=d(".joyride-nub",b.$next_tip),n=Math.ceil(k.outerHeight()/2),h=m||false;if(h){b.$next_tip.css("visibility","hidden");b.$next_tip.show()}if(!/body/i.test(b.$target.selector)){if(a.bottom()){b.$next_tip.css({top:(b.$target.offset().top+n+b.$target.outerHeight()),left:b.$target.offset().left});a.nub_position(k,b.tipSettings.nubPosition,"top")}else{if(a.top()){b.$next_tip.css({top:(b.$target.offset().top-b.$next_tip.outerHeight()-n),left:b.$target.offset().left});a.nub_position(k,b.tipSettings.nubPosition,"bottom")}else{if(a.right()){b.$next_tip.css({top:b.$target.offset().top,left:(b.$target.outerWidth()+b.$target.offset().left)});a.nub_position(k,b.tipSettings.nubPosition,"left")}else{if(a.left()){b.$next_tip.css({top:b.$target.offset().top,left:(b.$target.offset().left-b.$next_tip.outerWidth()-n)});a.nub_position(k,b.tipSettings.nubPosition,"right")}}}}if(!a.visible(a.corners(b.$next_tip))&&b.attempts<b.tipSettings.tipLocationPattern.length){k.removeClass("bottom").removeClass("top").removeClass("right").removeClass("left");b.tipSettings.tipLocation=b.tipSettings.tipLocationPattern[b.attempts];b.attempts++;a.pos_default(true)}}else{if(b.$li.length){a.pos_modal(k)}}if(h){b.$next_tip.hide();b.$next_tip.css("visibility","visible")}},pos_phone:function(n){var m=b.$next_tip.outerHeight(),l=b.$next_tip.offset(),k=b.$target.outerHeight(),i=d(".joyride-nub",b.$next_tip),o=Math.ceil(i.outerHeight()/2),h=n||false;i.removeClass("bottom").removeClass("top").removeClass("right").removeClass("left");if(h){b.$next_tip.css("visibility","hidden");b.$next_tip.show()}if(!/body/i.test(b.$target.selector)){if(a.top()){b.$next_tip.offset({top:b.$target.offset().top-m-o});i.addClass("bottom")}else{b.$next_tip.offset({top:b.$target.offset().top+k+o});i.addClass("top")}}else{if(b.$li.length){a.pos_modal(i)}}if(h){b.$next_tip.hide();b.$next_tip.css("visibility","visible")}},pos_modal:function(h){a.center();h.hide();if(d(".joyride-modal-bg").length<1){d("body").append('<div class="joyride-modal-bg">').show()}if(/pop/i.test(b.tipAnimation)){d(".joyride-modal-bg").show()}else{d(".joyride-modal-bg").fadeIn(b.tipAnimationFadeSpeed)}},center:function(){var h=b.$window;b.$next_tip.css({top:(((h.height()-b.$next_tip.outerHeight())/2)+h.scrollTop()),left:(((h.width()-b.$next_tip.outerWidth())/2)+h.scrollLeft())});return true},bottom:function(){return/bottom/i.test(b.tipSettings.tipLocation)},top:function(){return/top/i.test(b.tipSettings.tipLocation)},right:function(){return/right/i.test(b.tipSettings.tipLocation)},left:function(){return/left/i.test(b.tipSettings.tipLocation)},corners:function(l){var h=b.$window,k=h.width()+h.scrollLeft(),i=h.width()+h.scrollTop();return[l.offset().top<=h.scrollTop(),k<=l.offset().left+l.outerWidth(),i<=l.offset().top+l.outerHeight(),h.scrollLeft()>=l.offset().left]},visible:function(h){var k=h.length;while(k--){if(h[k]){return false}}return true},nub_position:function(h,k,i){if(k==="auto"){h.addClass(i)}else{h.addClass(k)}},startTimer:function(){if(b.$li.length){b.automate=setTimeout(function(){a.hide();a.show();a.startTimer()},b.timer)}else{clearTimeout(b.automate)}},end:function(){if(b.cookieMonster){d.cookie(b.cookieName,"ridden",{expires:365,domain:b.cookieDomain})}if(b.timer>0){clearTimeout(b.automate)}d(".joyride-modal-bg").hide();b.$current_tip.hide();b.postStepCallback(b.$li.index(),b.$current_tip);b.postRideCallback(b.$li.index(),b.$current_tip)},jquery_check:function(){if(!d.isFunction(d.fn.on)){d.fn.on=function(h,k,i){return this.delegate(k,h,i)};d.fn.off=function(h,k,i){return this.undelegate(k,h,i)};return false}return true},outerHTML:function(h){return h.outerHTML||new XMLSerializer().serializeToString(h)},version:function(){return b.version}};d.fn.joyride=function(h){if(a[h]){return a[h].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof h==="object"||!h){return a.init.apply(this,arguments)}else{d.error("Method "+h+" does not exist on jQuery.joyride")}}}}(jQuery,this));(function(b,a,c){b.fn.foundationMagellan=function(d){var k=b(a),i=b(document),h=b("[data-magellan-expedition=fixed]"),g={threshold:(h.length)?h.outerHeight(true):0,activeClass:"active"},d=b.extend({},g,d);i.on("magellan.arrival","[data-magellan-arrival]",function(o){var m=b(this),n=m.closest("[data-magellan-expedition]"),l=n.attr("data-magellan-active-class")||d.activeClass;m.closest("[data-magellan-expedition]").find("[data-magellan-arrival]").not(this).removeClass(l);m.addClass(l)});var e=b("[data-magellan-expedition]");e.find("[data-magellan-arrival]:first").addClass(e.attr("data-magellan-active-class")||d.activeClass);h.on("magellan.update-position",function(){var l=b(this);l.data("magellan-fixed-position","");l.data("magellan-top-offset","")}).trigger("magellan.update-position");k.on("resize.magellan",function(){h.trigger("magellan.update-position")});k.on("scroll.magellan",function(){var l=k.scrollTop();h.each(function(){var m=b(this);if(m.data("magellan-top-offset")===""){m.data("magellan-top-offset",m.offset().top)}var n=(l+d.threshold)>m.data("magellan-top-offset");if(m.data("magellan-fixed-position")!=n){m.data("magellan-fixed-position",n);if(n){m.css({position:"fixed",top:0})}else{m.css({position:"",top:""})}}})});var f=b("[data-magellan-destination]:last");if(f.length>0){k.on("scroll.magellan",function(n){var m=k.scrollTop(),l=m+k.outerHeight(true),o=Math.ceil(f.offset().top);b("[data-magellan-destination]").each(function(){var r=b(this),q=r.attr("data-magellan-destination"),p=r.offset().top-m;if(p<=d.threshold){b("[data-magellan-arrival="+q+"]").trigger("magellan.arrival")}if(l>=i.outerHeight(true)&&o>m&&o<l){b("[data-magellan-arrival]:last").trigger("magellan.arrival")}})})}}}(jQuery,this));(function(b,a,c){b.fn.foundationMediaQueryViewer=function(d){var e=b.extend(d,{toggleKey:77}),f=b(document);f.on("keyup.mediaQueryViewer",":input",function(g){if(g.which===e.toggleKey){g.stopPropagation()}});f.on("keyup.mediaQueryViewer",function(g){var h=b("#fqv");if(g.which===e.toggleKey){if(h.length>0){h.remove()}else{b("body").prepend('<div id="fqv" style="position:fixed;top:4px;left:4px;z-index:999;color:#fff;"><p style="font-size:12px;background:rgba(0,0,0,0.75);padding:5px;margin-bottom:1px;line-height:1.2;"><span class="left">Media:</span> <span style="font-weight:bold;" class="show-for-xlarge">Extra Large</span><span style="font-weight:bold;" class="show-for-large">Large</span><span style="font-weight:bold;" class="show-for-medium">Medium</span><span style="font-weight:bold;" class="show-for-small">Small</span><span style="font-weight:bold;" class="show-for-landscape">Landscape</span><span style="font-weight:bold;" class="show-for-portrait">Portrait</span><span style="font-weight:bold;" class="show-for-touch">Touch</span></p></div>')}}})}})(jQuery,this);(function(b,a,c){b.fn.foundationNavigation=function(e){var d=false;if(Modernizr.touch||navigator.userAgent.match(/Windows Phone/i)){b(document).on("click.fndtn touchstart.fndtn",".nav-bar a.flyout-toggle",function(g){g.preventDefault();var f=b(this).siblings(".flyout").first();if(d===false){b(".nav-bar .flyout").not(f).slideUp(500);f.slideToggle(500,function(){d=false})}d=true});b(".nav-bar>li.has-flyout",this).addClass("is-touch")}else{b(".nav-bar>li.has-flyout",this).on("mouseenter mouseleave",function(h){if(h.type=="mouseenter"){b(".nav-bar").find(".flyout").hide();b(this).children(".flyout").show()}if(h.type=="mouseleave"){var g=b(this).children(".flyout"),f=g.find("input"),i=function(l){var k;if(l.length>0){l.each(function(){if(b(this).is(":focus")){k=true}});return k}return false};if(!i(f)){b(this).children(".flyout").hide()}}})}}})(jQuery,this);(function(b){b.fn.findFirstImage=function(){return this.first().find("img").andSelf().filter("img").first()};var a={defaults:{animation:"horizontal-push",animationSpeed:600,timer:true,advanceSpeed:4000,pauseOnHover:false,startClockOnMouseOut:false,startClockOnMouseOutAfter:1000,directionalNav:true,directionalNavRightText:"Right",directionalNavLeftText:"Left",captions:true,captionAnimation:"fade",captionAnimationSpeed:600,resetTimerOnClick:false,bullets:false,bulletThumbs:false,bulletThumbLocation:"",bulletThumbsHideOnSmall:true,afterSlideChange:b.noop,afterLoadComplete:b.noop,fluid:true,centerBullets:true,singleCycle:false,slideNumber:false,stackOnSmall:false},activeSlide:0,numberSlides:0,orbitWidth:null,orbitHeight:null,locked:null,timerRunning:null,degrees:0,wrapperHTML:'<div class="orbit-wrapper" />',timerHTML:'<div class="timer"><span class="mask"><span class="rotator"></span></span><span class="pause"></span></div>',captionHTML:'<div class="orbit-caption"></div>',directionalNavHTML:'<div class="slider-nav hide-for-small"><span class="right"></span><span class="left"></span></div>',bulletHTML:'<ul class="orbit-bullets"></ul>',slideNumberHTML:'<span class="orbit-slide-counter"></span>',init:function(f,e){var c,g=0,d=this;this.clickTimer=b.proxy(this.clickTimer,this);this.addBullet=b.proxy(this.addBullet,this);this.resetAndUnlock=b.proxy(this.resetAndUnlock,this);this.stopClock=b.proxy(this.stopClock,this);this.startTimerAfterMouseLeave=b.proxy(this.startTimerAfterMouseLeave,this);this.clearClockMouseLeaveTimer=b.proxy(this.clearClockMouseLeaveTimer,this);this.rotateTimer=b.proxy(this.rotateTimer,this);this.options=b.extend({},this.defaults,e);if(this.options.timer==="false"){this.options.timer=false}if(this.options.captions==="false"){this.options.captions=false}if(this.options.directionalNav==="false"){this.options.directionalNav=false}this.$element=b(f);this.$wrapper=this.$element.wrap(this.wrapperHTML).parent();this.$slides=this.$element.children("img, a, div, figure, li");this.$element.on("movestart",function(h){if((h.distX>h.distY&&h.distX<-h.distY)||(h.distX<h.distY&&h.distX>-h.distY)){h.preventDefault()}});this.$element.bind("orbit.next",function(){d.shift("next")});this.$element.bind("orbit.prev",function(){d.shift("prev")});this.$element.bind("swipeleft",function(){b(this).trigger("orbit.next")});this.$element.bind("swiperight",function(){b(this).trigger("orbit.prev")});this.$element.bind("orbit.goto",function(i,h){d.shift(h)});this.$element.bind("orbit.start",function(i,h){d.startClock()});this.$element.bind("orbit.stop",function(i,h){d.stopClock()});c=this.$slides.filter("img");if(c.length===0){this.loaded()}else{c.bind("imageready",function(){g+=1;if(g===c.length){d.loaded()}})}},loaded:function(){this.$element.addClass("orbit").css({width:"1px",height:"1px"});if(this.options.stackOnSmall){this.$element.addClass("orbit-stack-on-small")}this.$slides.addClass("orbit-slide").css({opacity:0});this.setDimentionsFromLargestSlide();this.updateOptionsIfOnlyOneSlide();this.setupFirstSlide();this.notifySlideChange();if(this.options.timer){this.setupTimer();this.startClock()}if(this.options.captions){this.setupCaptions()}if(this.options.directionalNav){this.setupDirectionalNav()}if(this.options.bullets){this.setupBulletNav();this.setActiveBullet()}this.options.afterLoadComplete.call(this);Holder.run()},currentSlide:function(){return this.$slides.eq(this.activeSlide)},notifySlideChange:function(){if(this.options.slideNumber){var c=(this.activeSlide+1)+" of "+this.$slides.length;this.$element.trigger("orbit.change",{slideIndex:this.activeSlide,slideCount:this.$slides.length});if(this.$counter===undefined){var d=b(this.slideNumberHTML).html(c);this.$counter=d;this.$wrapper.append(this.$counter)}else{this.$counter.html(c)}}},setDimentionsFromLargestSlide:function(){var d=this,c;d.$element.add(d.$wrapper).width(this.$slides.first().outerWidth());d.$element.add(d.$wrapper).height(this.$slides.first().height());d.orbitWidth=this.$slides.first().outerWidth();d.orbitHeight=this.$slides.first().height();c=this.$slides.first().findFirstImage().clone();this.$slides.each(function(){var e=b(this),g=e.outerWidth(),f=e.height();if(g>d.$element.outerWidth()){d.$element.add(d.$wrapper).width(g);d.orbitWidth=d.$element.outerWidth()}if(f>d.$element.height()){d.$element.add(d.$wrapper).height(f);d.orbitHeight=d.$element.height();c=b(this).findFirstImage().clone()}d.numberSlides+=1});if(this.options.fluid){if(typeof this.options.fluid==="string"){c=b("<img>").attr("data-src","holder.js/"+this.options.fluid)}d.$element.prepend(c);c.addClass("fluid-placeholder");d.$element.add(d.$wrapper).css({width:"inherit"});d.$element.add(d.$wrapper).css({height:"inherit"});b(window).bind("resize",function(){d.orbitWidth=d.$element.outerWidth();d.orbitHeight=d.$element.height()})}},lock:function(){this.locked=true},unlock:function(){this.locked=false},updateOptionsIfOnlyOneSlide:function(){if(this.$slides.length===1){this.options.directionalNav=false;this.options.timer=false;this.options.bullets=false}},setupFirstSlide:function(){var c=this;this.$slides.first().css({"z-index":3,opacity:1}).fadeIn(function(){c.$slides.css({display:"block"})})},startClock:function(){var c=this;if(!this.options.timer){return false}if(this.$timer.is(":hidden")){this.clock=setInterval(function(){c.$element.trigger("orbit.next")},this.options.advanceSpeed)}else{this.timerRunning=true;this.$pause.removeClass("active");this.clock=setInterval(this.rotateTimer,this.options.advanceSpeed/180,false)}},rotateTimer:function(d){var c="rotate("+this.degrees+"deg)";this.degrees+=2;this.$rotator.css({"-webkit-transform":c,"-moz-transform":c,"-o-transform":c,"-ms-transform":c});if(d){this.degrees=0;this.$rotator.removeClass("move");this.$mask.removeClass("move")}if(this.degrees>180){this.$rotator.addClass("move");this.$mask.addClass("move")}if(this.degrees>360){this.$rotator.removeClass("move");this.$mask.removeClass("move");this.degrees=0;this.$element.trigger("orbit.next")}},stopClock:function(){if(!this.options.timer){return false}else{this.timerRunning=false;clearInterval(this.clock);this.$pause.addClass("active")}},setupTimer:function(){this.$timer=b(this.timerHTML);this.$wrapper.append(this.$timer);this.$rotator=this.$timer.find(".rotator");this.$mask=this.$timer.find(".mask");this.$pause=this.$timer.find(".pause");this.$timer.click(this.clickTimer);if(this.options.startClockOnMouseOut){this.$wrapper.mouseleave(this.startTimerAfterMouseLeave);this.$wrapper.mouseenter(this.clearClockMouseLeaveTimer)}if(this.options.pauseOnHover){this.$wrapper.mouseenter(this.stopClock)}},startTimerAfterMouseLeave:function(){var c=this;this.outTimer=setTimeout(function(){if(!c.timerRunning){c.startClock()}},this.options.startClockOnMouseOutAfter)},clearClockMouseLeaveTimer:function(){clearTimeout(this.outTimer)},clickTimer:function(){if(!this.timerRunning){this.startClock()}else{this.stopClock()}},setupCaptions:function(){this.$caption=b(this.captionHTML);this.$wrapper.append(this.$caption);this.setCaption()},setCaption:function(){var d=this.currentSlide().attr("data-caption"),c;if(!this.options.captions){return false}if(d){if(b.trim(b(d).text()).length<1){return false}if(d.charAt(0)=="#"){d=d.substring(1,d.length)}c=b("#"+d).html();this.$caption.attr("id",d).html(c);switch(this.options.captionAnimation){case"none":this.$caption.show();break;case"fade":this.$caption.fadeIn(this.options.captionAnimationSpeed);break;case"slideOpen":this.$caption.slideDown(this.options.captionAnimationSpeed);break}}else{switch(this.options.captionAnimation){case"none":this.$caption.hide();break;case"fade":this.$caption.fadeOut(this.options.captionAnimationSpeed);break;case"slideOpen":this.$caption.slideUp(this.options.captionAnimationSpeed);break}}},setupDirectionalNav:function(){var c=this,d=b(this.directionalNavHTML);d.find(".right").html(this.options.directionalNavRightText);d.find(".left").html(this.options.directionalNavLeftText);this.$wrapper.append(d);this.$wrapper.find(".left").click(function(){c.stopClock();if(c.options.resetTimerOnClick){c.rotateTimer(true);c.startClock()}c.$element.trigger("orbit.prev")});this.$wrapper.find(".right").click(function(){c.stopClock();if(c.options.resetTimerOnClick){c.rotateTimer(true);c.startClock()}c.$element.trigger("orbit.next")})},setupBulletNav:function(){this.$bullets=b(this.bulletHTML);this.$wrapper.append(this.$bullets);this.$slides.each(this.addBullet);this.$element.addClass("with-bullets");if(this.options.centerBullets){this.$bullets.css("margin-left",-this.$bullets.outerWidth()/2)}if(this.options.bulletThumbsHideOnSmall){this.$bullets.addClass("hide-for-small")}},addBullet:function(g,e){var d=g+1,h=b("<li>"+(d)+"</li>"),c,f=this;if(this.options.bulletThumbs){c=b(e).attr("data-thumb");if(c){h.addClass("has-thumb").css({background:"url("+this.options.bulletThumbLocation+c+") no-repeat"})}}this.$bullets.append(h);h.data("index",g);h.click(function(){f.stopClock();if(f.options.resetTimerOnClick){f.rotateTimer(true);f.startClock()}f.$element.trigger("orbit.goto",[h.data("index")])})},setActiveBullet:function(){if(!this.options.bullets){return false}else{this.$bullets.find("li").removeClass("active").eq(this.activeSlide).addClass("active")}},resetAndUnlock:function(){this.$slides.eq(this.prevActiveSlide).css({"z-index":1});this.unlock();this.options.afterSlideChange.call(this,this.$slides.eq(this.prevActiveSlide),this.$slides.eq(this.activeSlide))},shift:function(d){var c=d;this.prevActiveSlide=this.activeSlide;if(this.prevActiveSlide==c){return false}if(this.$slides.length=="1"){return false}if(!this.locked){this.lock();if(d=="next"){this.activeSlide++;if(this.activeSlide==this.numberSlides){this.activeSlide=0}}else{if(d=="prev"){this.activeSlide--;if(this.activeSlide<0){this.activeSlide=this.numberSlides-1}}else{this.activeSlide=d;if(this.prevActiveSlide<this.activeSlide){c="next"}else{if(this.prevActiveSlide>this.activeSlide){c="prev"}}}}this.setActiveBullet();this.notifySlideChange();this.$slides.eq(this.prevActiveSlide).css({"z-index":2});if(this.options.animation=="fade"){this.$slides.eq(this.activeSlide).css({opacity:0,"z-index":3}).animate({opacity:1},this.options.animationSpeed,this.resetAndUnlock);this.$slides.eq(this.prevActiveSlide).animate({opacity:0},this.options.animationSpeed)}if(this.options.animation=="horizontal-slide"){if(c=="next"){this.$slides.eq(this.activeSlide).css({left:this.orbitWidth,"z-index":3}).css("opacity",1).animate({left:0},this.options.animationSpeed,this.resetAndUnlock)}if(c=="prev"){this.$slides.eq(this.activeSlide).css({left:-this.orbitWidth,"z-index":3}).css("opacity",1).animate({left:0},this.options.animationSpeed,this.resetAndUnlock)}this.$slides.eq(this.prevActiveSlide).css("opacity",0)}if(this.options.animation=="vertical-slide"){if(c=="prev"){this.$slides.eq(this.activeSlide).css({top:this.orbitHeight,"z-index":3}).css("opacity",1).animate({top:0},this.options.animationSpeed,this.resetAndUnlock);this.$slides.eq(this.prevActiveSlide).css("opacity",0)}if(c=="next"){this.$slides.eq(this.activeSlide).css({top:-this.orbitHeight,"z-index":3}).css("opacity",1).animate({top:0},this.options.animationSpeed,this.resetAndUnlock)}this.$slides.eq(this.prevActiveSlide).css("opacity",0)}if(this.options.animation=="horizontal-push"){if(c=="next"){this.$slides.eq(this.activeSlide).css({left:this.orbitWidth,"z-index":3}).animate({left:0,opacity:1},this.options.animationSpeed,this.resetAndUnlock);this.$slides.eq(this.prevActiveSlide).animate({left:-this.orbitWidth},this.options.animationSpeed,"",function(){b(this).css({opacity:0})})}if(c=="prev"){this.$slides.eq(this.activeSlide).css({left:-this.orbitWidth,"z-index":3}).animate({left:0,opacity:1},this.options.animationSpeed,this.resetAndUnlock);this.$slides.eq(this.prevActiveSlide).animate({left:this.orbitWidth},this.options.animationSpeed,"",function(){b(this).css({opacity:0})})}}if(this.options.animation=="vertical-push"){if(c=="next"){this.$slides.eq(this.activeSlide).css({top:-this.orbitHeight,"z-index":3}).css("opacity",1).animate({top:0,opacity:1},this.options.animationSpeed,this.resetAndUnlock);this.$slides.eq(this.prevActiveSlide).css("opacity",0).animate({top:this.orbitHeight},this.options.animationSpeed,"")}if(c=="prev"){this.$slides.eq(this.activeSlide).css({top:this.orbitHeight,"z-index":3}).css("opacity",1).animate({top:0},this.options.animationSpeed,this.resetAndUnlock);this.$slides.eq(this.prevActiveSlide).css("opacity",0).animate({top:-this.orbitHeight},this.options.animationSpeed)}}this.setCaption()}if(this.activeSlide===this.$slides.length-1&&this.options.singleCycle){this.stopClock()}}};b.fn.orbit=function(c){return this.each(function(){var d=b.extend({},a);d.init(this,c)})}})(jQuery); | |
/*! | |
* jQuery imageready Plugin | |
* http://www.zurb.com/playground/ | |
* | |
* Copyright 2011, ZURB | |
* Released under the MIT License | |
*/ | |
(function(c){var b={};c.event.special.imageready={setup:function(f,e,d){b=f||b},add:function(d){var e=c(this),f;if(this.nodeType===1&&this.tagName.toLowerCase()==="img"&&this.src!==""){if(b.forceLoad){f=e.attr("src");e.attr("src","");a(this,d.handler);e.attr("src",f)}else{if(this.complete||this.readyState===4){d.handler.apply(this,arguments)}else{a(this,d.handler)}}}},teardown:function(d){c(this).unbind(".imageready")}};function a(d,f){var e=c(d);e.bind("load.imageready",function(){f.apply(d,arguments);e.unbind("load.imageready")})}}(jQuery));var Holder=Holder||{};(function(b,g){var l=false,f=false,a=document.createElement("canvas");function e(w,I){var x="complete",J="readystatechange",H=!1,A=H,D=!0,z=w.document,F=z.documentElement,C=z.addEventListener?"addEventListener":"attachEvent",G=z.addEventListener?"removeEventListener":"detachEvent",B=z.addEventListener?"":"on",p=function(n){(n.type!=J||z.readyState==x)&&((n.type=="load"?w:z)[G](B+n.type,p,H),!A&&(A=!0)&&I.call(w,null))},q=function(){try{F.doScroll("left")}catch(o){setTimeout(q,50);return}p("poll")};if(z.readyState==x){I.call(w,"lazy")}else{if(z.createEventObject&&F.doScroll){try{D=!w.frameElement}catch(E){}D&&q()}z[C](B+"DOMContentLoaded",p,H),z[C](B+J,p,H),w[C](B+"load",p,H)}}function d(o){o=o.match(/^(\W)?(.*)/);var n=document["getElement"+(o[1]?o[1]=="#"?"ById":"sByClassName":"sByTagName")](o[2]);var p=[];n!=null&&(n.length?p=n:n.length==0?p=n:p=[n]);return p}function i(o,n){var r={};for(var q in o){r[q]=o[q]}for(var p in n){r[p]=n[p]}return r}function k(o,s,q){var p=[s.height,s.width].sort();var u=Math.round(p[1]/16),n=Math.round(p[0]/16);var r=Math.max(q.size,u);a.width=s.width;a.height=s.height;o.textAlign="center";o.textBaseline="middle";o.fillStyle=q.background;o.fillRect(0,0,s.width,s.height);o.fillStyle=q.foreground;o.font="bold "+r+"px sans-serif";var t=q.text?q.text:(s.width+"x"+s.height);if(Math.round(o.measureText(t).width)/s.width>1){r=Math.max(n,q.size)}o.font="bold "+r+"px sans-serif";o.fillText(t,(s.width/2),(s.height/2),s.width);return a.toDataURL("image/png")}if(!a.getContext){f=true}else{if(a.toDataURL("image/png").indexOf("data:image/png")<0){f=true}else{var m=a.getContext("2d")}}var c={domain:"holder.js",images:"img",themes:{gray:{background:"#eee",foreground:"#aaa",size:12},social:{background:"#3a5a97",foreground:"#fff",size:12},industrial:{background:"#434A52",foreground:"#C2F200",size:12}}};b.flags={dimensions:{regex:/([0-9]+)x([0-9]+)/,output:function(o){var n=this.regex.exec(o);return{width:+n[1],height:+n[2]}}},colors:{regex:/#([0-9a-f]{3,})\:#([0-9a-f]{3,})/i,output:function(o){var n=this.regex.exec(o);return{size:c.themes.gray.size,foreground:"#"+n[2],background:"#"+n[1]}}},text:{regex:/text\:(.*)/,output:function(n){return this.regex.exec(n)[1]}}};for(var h in b.flags){b.flags[h].match=function(n){return n.match(this.regex)}}b.add_theme=function(n,o){n!=null&&o!=null&&(c.themes[n]=o);return b};b.add_image=function(s,q){var r=d(q);if(r.length){for(var p=0,n=r.length;p<n;p++){var o=document.createElement("img");o.setAttribute("data-src",s);r[p].appendChild(o)}}return b};b.run=function(s){var A=i(c,s),x=d(A.images),y=true;for(var u=x.length,w=0;w<u;w++){var v=c.themes.gray;var p=x[w].getAttribute("data-src")||x[w].getAttribute("src");if(p&&!!~p.indexOf(A.domain)){var r=false,n=null,z=null;var t=p.substr(p.indexOf(A.domain)+A.domain.length+1).split("/");for(sl=t.length,j=0;j<sl;j++){if(b.flags.dimensions.match(t[j])){r=true;n=b.flags.dimensions.output(t[j])}else{if(b.flags.colors.match(t[j])){v=b.flags.colors.output(t[j])}else{if(A.themes[t[j]]){v=A.themes[t[j]]}else{if(b.flags.text.match(t[j])){z=b.flags.text.output(t[j])}}}}}if(r){x[w].setAttribute("data-src",p);var q=n.width+"x"+n.height;x[w].setAttribute("alt",z?z:v.text?v.text+" ["+q+"]":q);x[w].style.backgroundColor=v.background;var v=(z?i(v,{text:z}):v);if(!f){x[w].setAttribute("src",k(m,n,v))}}}}return b};e(g,function(){l||b.run()})})(Holder,window);(function(b){var a=false;b(document).on("click","a[data-reveal-id]",function(d){d.preventDefault();var c=b(this).attr("data-reveal-id");b("#"+c).reveal(b(this).data())});b.fn.reveal=function(c){var e=b(document),d={animation:"fadeAndPop",animationSpeed:300,closeOnBackgroundClick:true,dismissModalClass:"close-reveal-modal",open:b.noop,opened:b.noop,close:b.noop,closed:b.noop};c=b.extend({},d,c);return this.not(".reveal-modal.open").each(function(){var t=b(this),l=parseInt(t.css("top"),10),o=t.height()+l,n=false,i=b(".reveal-modal-bg"),m={open:{top:0,opacity:0,visibility:"visible",display:"block"},close:{top:l,opacity:1,visibility:"hidden",display:"none"}},h;if(i.length===0){i=b("<div />",{"class":"reveal-modal-bg"}).insertAfter(t);i.fadeTo("fast",0.8)}function p(){n=false}function u(){n=true}function r(){var v=b(".reveal-modal.open");if(v.length===1){a=true;v.trigger("reveal:close")}}function q(){if(!n){u();r();t.addClass("open");if(c.animation==="fadeAndPop"){m.open.top=e.scrollTop()-o;m.open.opacity=0;t.css(m.open);i.fadeIn(c.animationSpeed/2);t.delay(c.animationSpeed/2).animate({top:e.scrollTop()+l+"px",opacity:1},c.animationSpeed,function(){t.trigger("reveal:opened")})}if(c.animation==="fade"){m.open.top=e.scrollTop()+l;m.open.opacity=0;t.css(m.open);i.fadeIn(c.animationSpeed/2);t.delay(c.animationSpeed/2).animate({opacity:1},c.animationSpeed,function(){t.trigger("reveal:opened")})}if(c.animation==="none"){m.open.top=e.scrollTop()+l;m.open.opacity=1;t.css(m.open);i.css({display:"block"});t.trigger("reveal:opened")}}}function f(){var w=t.find(".flex-video"),v=w.find("iframe");if(v.length>0){v.attr("src",v.data("src"));w.fadeIn(100)}}t.bind("reveal:open.reveal",q);t.bind("reveal:open.reveal",f);function k(){if(!n){u();t.removeClass("open");if(c.animation==="fadeAndPop"){t.animate({top:e.scrollTop()-o+"px",opacity:0},c.animationSpeed/2,function(){t.css(m.close)});if(!a){i.delay(c.animationSpeed).fadeOut(c.animationSpeed,function(){t.trigger("reveal:closed")})}else{t.trigger("reveal:closed")}}if(c.animation==="fade"){t.animate({opacity:0},c.animationSpeed,function(){t.css(m.close)});if(!a){i.delay(c.animationSpeed).fadeOut(c.animationSpeed,function(){t.trigger("reveal:closed")})}else{t.trigger("reveal:closed")}}if(c.animation==="none"){t.css(m.close);if(!a){i.css({display:"none"})}t.trigger("reveal:closed")}a=false}}function s(){t.unbind(".reveal");i.unbind(".reveal");h.unbind(".reveal");b("body").unbind(".reveal")}function g(){var w=t.find(".flex-video"),v=w.find("iframe");if(v.length>0){v.data("src",v.attr("src"));v.attr("src","");w.fadeOut(100)}}t.bind("reveal:close.reveal",k);t.bind("reveal:closed.reveal",g);t.bind("reveal:opened.reveal reveal:closed.reveal",p);t.bind("reveal:closed.reveal",s);t.bind("reveal:open.reveal",c.open);t.bind("reveal:opened.reveal",c.opened);t.bind("reveal:close.reveal",c.close);t.bind("reveal:closed.reveal",c.closed);t.trigger("reveal:open");h=b("."+c.dismissModalClass).bind("click.reveal",function(){t.trigger("reveal:close")});if(c.closeOnBackgroundClick){i.css({cursor:"pointer"});i.bind("click.reveal",function(){t.trigger("reveal:close")})}b("body").bind("keyup.reveal",function(v){if(v.which===27){t.trigger("reveal:close")}})})}}(jQuery));(function(e,d,a,f){var c={callback:e.noop,deep_linking:true,init:false},b={init:function(g){c=e.extend({},c,g);return this.each(function(){if(!c.init){b.events()}if(c.deep_linking){b.from_hash()}})},events:function(){e(a).on("click.fndtn",".tabs a",function(g){b.set_tab(e(this).parent("dd, li"),g)});c.init=true},set_tab:function(k,m){var i=k.closest("dl, ul").find(".active"),l=k.children("a").attr("href"),h=/^#/.test(l),g=e(l+"Tab");if(h&&g.length>0){if(m&&!c.deep_linking){m.preventDefault()}g.closest(".tabs-content").children("li").removeClass("active").hide();g.css("display","block").addClass("active")}i.removeClass("active");k.addClass("active");c.callback()},from_hash:function(){var h=d.location.hash,g=e('a[href="'+h+'"]');g.trigger("click.fndtn")}};e.fn.foundationTabs=function(g){if(b[g]){return b[g].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof g==="object"||!g){return b.init.apply(this,arguments)}else{e.error("Method "+g+" does not exist on jQuery.foundationTabs")}}}}(jQuery,this,this.document));(function(d,c,e){var b={bodyHeight:0,selector:".has-tip",additionalInheritableClasses:[],tooltipClass:".tooltip",tipTemplate:function(f,g){return'<span data-selector="'+f+'" class="'+b.tooltipClass.substring(1)+'">'+g+'<span class="nub"></span></span>'}},a={init:function(f){b=d.extend(b,f);b.selector=b.targetClass?b.targetClass:b.selector;return this.each(function(){var g=d("body");if(Modernizr.touch){g.on("click.tooltip touchstart.tooltip touchend.tooltip",b.selector,function(h){h.preventDefault();d(b.tooltipClass).hide();a.showOrCreateTip(d(this))});g.on("click.tooltip touchstart.tooltip touchend.tooltip",b.tooltipClass,function(h){h.preventDefault();d(this).fadeOut(150)})}else{g.on("mouseenter.tooltip mouseleave.tooltip",b.selector,function(i){var h=d(this);if(i.type==="mouseenter"){a.showOrCreateTip(h)}else{if(i.type==="mouseleave"){a.hide(h)}}})}d(this).data("tooltips",true)})},showOrCreateTip:function(f,g){var h=a.getTip(f);if(h&&h.length>0){a.show(f)}else{a.create(f,g)}},getTip:function(g){var f=a.selector(g),h=null;if(f){h=d("span[data-selector="+f+"]"+b.tooltipClass)}return(h.length>0)?h:false},selector:function(f){var h=f.attr("id"),g=f.data("selector");if(h===e&&g===e){g="tooltip"+Math.random().toString(36).substring(7);f.attr("data-selector",g)}return(h)?h:g},create:function(f,h){var i=d(b.tipTemplate(a.selector(f),d("<div>").html(h?h:f.attr("title")).html())),g=a.inheritable_classes(f);i.addClass(g).appendTo("body");if(Modernizr.touch){i.append('<span class="tap-to-close">tap to close </span>')}f.removeAttr("title");a.show(f)},reposition:function(k,n,h){var f,o,m,i,g,l;n.css("visibility","hidden").show();f=k.data("width");o=n.children(".nub");m=o.outerHeight();i=o.outerWidth();l=function(u,t,q,p,s,r){return u.css({top:t,bottom:p,left:s,right:q,"max-width":(r)?r:"auto"}).end()};l(n,(k.offset().top+k.outerHeight()+10),"auto","auto",k.offset().left,f);l(o,-m,"auto","auto",10);if(d(c).width()<767){g=k.closest(".columns");if(g.length<0){g=d("body")}n.width(g.outerWidth()-25).css("left",15).addClass("tip-override");l(o,-m,"auto","auto",k.offset().left)}else{if(h&&h.indexOf("tip-top")>-1){l(n,(k.offset().top-n.outerHeight()-m),"auto","auto",k.offset().left,f).removeClass("tip-override");l(o,"auto","auto",-m,"auto")}else{if(h&&h.indexOf("tip-left")>-1){l(n,(k.offset().top+(k.outerHeight()/2)-m),"auto","auto",(k.offset().left-n.outerWidth()-10),f).removeClass("tip-override");l(o,(n.outerHeight()/2)-(m/2),-m,"auto","auto")}else{if(h&&h.indexOf("tip-right")>-1){l(n,(k.offset().top+(k.outerHeight()/2)-m),"auto","auto",(k.offset().left+k.outerWidth()+10),f).removeClass("tip-override");l(o,(n.outerHeight()/2)-(m/2),"auto","auto",-m)}else{if(h&&h.indexOf("tip-centered-top")>-1){l(n,(k.offset().top-n.outerHeight()-m),"auto","auto",(k.offset().left+((k.outerWidth()-n.outerWidth())/2)),f).removeClass("tip-override");l(o,"auto",((n.outerWidth()/2)-(m/2)),-m,"auto")}else{if(h&&h.indexOf("tip-centered-bottom")>-1){l(n,(k.offset().top+k.outerHeight()+10),"auto","auto",(k.offset().left+((k.outerWidth()-n.outerWidth())/2)),f).removeClass("tip-override");l(o,-m,((n.outerWidth()/2)-(m/2)),"auto","auto")}}}}}}n.css("visibility","visible").hide()},inheritable_classes:function(i){var h=["tip-top","tip-left","tip-bottom","tip-right","tip-centered-top","tip-centered-bottom","noradius"].concat(b.additionalInheritableClasses),g=i.attr("class"),f=g?d.map(g.split(" "),function(l,k){if(d.inArray(l,h)!==-1){return l}}).join(" "):"";return d.trim(f)},show:function(f){var g=a.getTip(f);a.reposition(f,g,f.attr("class"));g.fadeIn(150)},hide:function(f){var g=a.getTip(f);g.fadeOut(150)},reload:function(){var f=d(this);return(f.data("tooltips"))?f.foundationTooltips("destroy").foundationTooltips("init"):f.foundationTooltips("init")},destroy:function(){return this.each(function(){d(c).off(".tooltip");d(b.selector).off(".tooltip");d(b.tooltipClass).each(function(f){d(d(b.selector).get(f)).attr("title",d(this).text())}).remove()})}};d.fn.foundationTooltips=function(f){if(a[f]){return a[f].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof f==="object"||!f){return a.init.apply(this,arguments)}else{d.error("Method "+f+" does not exist on jQuery.foundationTooltips")}}}}(jQuery,this));(function(d,c,f){var b={index:0,initialized:false},a={init:function(h){return this.each(function(){b=d.extend(b,h);b.$w=d(c),b.$topbar=d("nav.top-bar"),b.$section=b.$topbar.find("section"),b.$titlebar=b.$topbar.children("ul:first");var i=d("<div class='top-bar-js-breakpoint'/>").appendTo("body");b.breakPoint=i.width();i.remove();if(!b.initialized){a.assemble();b.initialized=true}if(!b.height){a.largestUL()}if(b.$topbar.parent().hasClass("fixed")){d("body").css("padding-top",b.$topbar.outerHeight())}d(".top-bar .toggle-topbar").die("click.fndtn").live("click.fndtn",function(k){k.preventDefault();if(a.breakpoint()){b.$topbar.toggleClass("expanded");b.$topbar.css("min-height","")}if(!b.$topbar.hasClass("expanded")){b.$section.css({left:"0%"});b.$section.find(">.name").css({left:"100%"});b.$section.find("li.moved").removeClass("moved");b.index=0}});d(".top-bar .has-dropdown>a").die("click.fndtn").live("click.fndtn",function(m){if(Modernizr.touch||a.breakpoint()){m.preventDefault()}if(a.breakpoint()){var l=d(this),k=l.closest("li");b.index+=1;k.addClass("moved");b.$section.css({left:-(100*b.index)+"%"});b.$section.find(">.name").css({left:100*b.index+"%"});l.siblings("ul").height(b.height+b.$titlebar.outerHeight(true));b.$topbar.css("min-height",b.height+b.$titlebar.outerHeight(true)*2)}});d(c).on("resize.fndtn.topbar",function(){if(!a.breakpoint()){b.$topbar.css("min-height","")}});d(".top-bar .has-dropdown .back").die("click.fndtn").live("click.fndtn",function(n){n.preventDefault();var m=d(this),l=m.closest("li.moved"),k=l.parent();b.index-=1;b.$section.css({left:-(100*b.index)+"%"});b.$section.find(">.name").css({left:100*b.index+"%"});if(b.index===0){b.$topbar.css("min-height",0)}setTimeout(function(){l.removeClass("moved")},300)})})},breakpoint:function(){return b.$w.width()<b.breakPoint},assemble:function(){b.$section.detach();b.$section.find(".has-dropdown>a").each(function(){var h=d(this),k=h.siblings(".dropdown"),i=d('<li class="title back js-generated"><h5><a href="#"></a></h5></li>');i.find("h5>a").html(h.html());k.prepend(i)});b.$section.appendTo(b.$topbar)},largestUL:function(){var i=b.$topbar.find("section ul ul"),k=i.first(),h=0;i.each(function(){if(d(this).children("li").length>k.children("li").length){k=d(this)}});k.children("li").each(function(){h+=d(this).outerHeight(true)});b.height=h}};d.fn.foundationTopBar=function(h){if(a[h]){return a[h].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof h==="object"||!h){return a.init.apply(this,arguments)}else{d.error("Method "+h+" does not exist on jQuery.foundationTopBar")}}};if(d(".sticky").length>0){var g=d(".sticky").length?d(".sticky").offset().top:0,e=d(c);e.scroll(function(){if(e.scrollTop()>=g){d(".sticky").addClass("fixed")}else{if(e.scrollTop()<g){d(".sticky").removeClass("fixed")}}})}}(jQuery,this)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment