"function"==typeof jQuery&&jQuery(document).ready(function(a){a("body").on("post-load",function(){window.a2a&&a2a.init_all()})});
jQuery(function($){
$("header .genesis-nav-menu, .nav-primary .genesis-nav-menu").addClass("responsive-menu").before('<div class="responsive-menu-icon"></div>');
$(".responsive-menu-icon").click(function(){
$(this).next("header .genesis-nav-menu, .nav-primary .genesis-nav-menu").slideToggle();
});
$(window).resize(function(){
if(window.innerWidth > 768){
$("header .genesis-nav-menu, .nav-primary .genesis-nav-menu, nav .sub-menu").removeAttr("style");
$(".responsive-menu > .menu-item").removeClass("menu-open");
}});
$(".responsive-menu > .menu-item").click(function(event){
if(event.target!==this)
return;
$(this).find(".sub-menu:first").slideToggle(function(){
$(this).parent().toggleClass("menu-open");
});
});
});
(function (){
'use strict';
if(window&&window.addEventListener){
var cache=Object.create(null);
var checkUseElems;
var tid;
var debouncedCheck=function (){
clearTimeout(tid);
tid=setTimeout(checkUseElems, 100);
};
var unobserveChanges=function (){
return;
};
var observeChanges=function (){
var observer;
window.addEventListener('resize', debouncedCheck, false);
window.addEventListener('orientationchange', debouncedCheck, false);
if(window.MutationObserver){
observer=new MutationObserver(debouncedCheck);
observer.observe(document.documentElement, {
childList: true,
subtree: true,
attributes: true
});
unobserveChanges=function (){
try {
observer.disconnect();
window.removeEventListener('resize', debouncedCheck, false);
window.removeEventListener('orientationchange', debouncedCheck, false);
} catch (ignore){}};}else{
document.documentElement.addEventListener('DOMSubtreeModified', debouncedCheck, false);
unobserveChanges=function (){
document.documentElement.removeEventListener('DOMSubtreeModified', debouncedCheck, false);
window.removeEventListener('resize', debouncedCheck, false);
window.removeEventListener('orientationchange', debouncedCheck, false);
};}};
var createRequest=function (url){
function getHostname(href){
var a=document.createElement('a');
a.href=href;
return a.hostname;
}
var Request;
var hname=location.hostname;
var hname2;
if(window.XMLHttpRequest){
Request=new XMLHttpRequest();
hname2=getHostname(url);
if(Request.withCredentials===undefined&&hname2!==''&&hname2!==hname){
Request=XDomainRequest||undefined;
}else{
Request=XMLHttpRequest;
}}
return Request;
};
var xlinkNS='http://www.w3.org/1999/xlink';
checkUseElems=function (){
var base;
var bcr;
var fallback='';
var hash;
var href;
var i;
var inProgressCount=0;
var isHidden;
var Request;
var url;
var uses;
var xhr;
function observeIfDone(){
inProgressCount -=1;
if(inProgressCount===0){
unobserveChanges();
observeChanges();
}}
function attrUpdateFunc(spec){
return function (){
if(cache[spec.base]!==true){
spec.useEl.setAttributeNS(xlinkNS, 'xlink:href', '#' + spec.hash);
}};}
function onloadFunc(xhr){
return function (){
var body=document.body;
var x=document.createElement('x');
var svg;
xhr.onload=null;
x.innerHTML=xhr.responseText;
svg=x.getElementsByTagName('svg')[0];
if(svg){
svg.setAttribute('aria-hidden', 'true');
svg.style.position='absolute';
svg.style.width=0;
svg.style.height=0;
svg.style.overflow='hidden';
body.insertBefore(svg, body.firstChild);
}
observeIfDone();
};}
function onErrorTimeout(xhr){
return function (){
xhr.onerror=null;
xhr.ontimeout=null;
observeIfDone();
};}
unobserveChanges();
uses=document.getElementsByTagName('use');
for (i=0; i < uses.length; i +=1){
try {
bcr=uses[i].getBoundingClientRect();
} catch (ignore){
bcr=false;
}
href=uses[i].getAttributeNS(xlinkNS, 'href');
if(href&&href.split){
url=href.split('#');
}else{
url=["", ""];
}
base=url[0];
hash=url[1];
isHidden=bcr&&bcr.left===0&&bcr.right===0&&bcr.top===0&&bcr.bottom===0;
if(bcr&&bcr.width===0&&bcr.height===0&&!isHidden){
if(fallback&&!base.length&&hash&&!document.getElementById(hash)){
base=fallback;
}
if(base.length){
xhr=cache[base];
if(xhr!==true){
setTimeout(attrUpdateFunc({
useEl: uses[i],
base: base,
hash: hash
}), 0);
}
if(xhr===undefined){
Request=createRequest(base);
if(Request!==undefined){
xhr=new Request();
cache[base]=xhr;
xhr.onload=onloadFunc(xhr);
xhr.onerror=onErrorTimeout(xhr);
xhr.ontimeout=onErrorTimeout(xhr);
xhr.open('GET', base);
xhr.send();
inProgressCount +=1;
}}
}}else{
if(!isHidden){
if(cache[base]===undefined){
cache[base]=true;
}else if(cache[base].onload){
cache[base].abort();
delete cache[base].onload;
cache[base]=true;
}}else if(base.length&&cache[base]){
attrUpdateFunc({
useEl: uses[i],
base: base,
hash: hash
})();
}}
}
uses='';
inProgressCount +=1;
observeIfDone();
};
window.addEventListener('load', function winLoad(){
window.removeEventListener('load', winLoad, false);
tid=setTimeout(checkUseElems, 0);
}, false);
}}());
(function(a,d,p){a.fn.backstretch=function(c,b){(c===p||0===c.length)&&a.error("No images were supplied for Backstretch");0===a(d).scrollTop()&&d.scrollTo(0,0);return this.each(function(){var d=a(this),g=d.data("backstretch");if(g){if("string"==typeof c&&"function"==typeof g[c]){g[c](b);return}b=a.extend(g.options,b);g.destroy(!0)}g=new q(this,c,b);d.data("backstretch",g)})};a.backstretch=function(c,b){return a("body").backstretch(c,b).data("backstretch")};a.expr[":"].backstretch=function(c){return a(c).data("backstretch")!==p};a.fn.backstretch.defaults={centeredX:!0,centeredY:!0,duration:5E3,fade:0};var r={left:0,top:0,overflow:"hidden",margin:0,padding:0,height:"100%",width:"100%",zIndex:-999999},s={position:"absolute",display:"none",margin:0,padding:0,border:"none",width:"auto",height:"auto",maxHeight:"none",maxWidth:"none",zIndex:-999999},q=function(c,b,e){this.options=a.extend({},a.fn.backstretch.defaults,e||{});this.images=a.isArray(b)?b:[b];a.each(this.images,function(){a("<img />")[0].src=this});this.isBody=c===document.body;this.$container=a(c);this.$root=this.isBody?l?a(d):a(document):this.$container;c=this.$container.children(".backstretch").first();this.$wrap=c.length?c:a('<div class="backstretch"></div>').css(r).appendTo(this.$container);this.isBody||(c=this.$container.css("position"),b=this.$container.css("zIndex"),this.$container.css({position:"static"===c?"relative":c,zIndex:"auto"===b?0:b,background:"none"}),this.$wrap.css({zIndex:-999998}));this.$wrap.css({position:this.isBody&&l?"fixed":"absolute"});this.index=0;this.show(this.index);a(d).on("resize.backstretch",a.proxy(this.resize,this)).on("orientationchange.backstretch",a.proxy(function(){this.isBody&&0===d.pageYOffset&&(d.scrollTo(0,1),this.resize())},this))};q.prototype={resize:function(){try{var a={left:0,top:0},b=this.isBody?this.$root.width():this.$root.innerWidth(),e=b,g=this.isBody?d.innerHeight?d.innerHeight:this.$root.height():this.$root.innerHeight(),j=e/this.$img.data("ratio"),f;j>=g?(f=(j-g)/2,this.options.centeredY&&(a.top="-"+f+"px")):(j=g,e=j*this.$img.data("ratio"),f=(e-b)/2,this.options.centeredX&&(a.left="-"+f+"px"));this.$wrap.css({width:b,height:g}).find("img:not(.deleteable)").css({width:e,height:j}).css(a)}catch(h){}return this},show:function(c){if(!(Math.abs(c)>this.images.length-1)){var b=this,e=b.$wrap.find("img").addClass("deleteable"),d={relatedTarget:b.$container[0]};b.$container.trigger(a.Event("backstretch.before",d),[b,c]);this.index=c;clearInterval(b.interval);b.$img=a("<img />").css(s).bind("load",function(f){var h=this.width||a(f.target).width();f=this.height||a(f.target).height();a(this).data("ratio",h/f);a(this).fadeIn(b.options.speed||b.options.fade,function(){e.remove();b.paused||b.cycle();a(["after","show"]).each(function(){b.$container.trigger(a.Event("backstretch."+this,d),[b,c])})});b.resize()}).appendTo(b.$wrap);b.$img.attr("src",b.images[c]);return b}},next:function(){return this.show(this.index<this.images.length-1?this.index+1:0)},prev:function(){return this.show(0===this.index?this.images.length-1:this.index-1)},pause:function(){this.paused=!0;return this},resume:function(){this.paused=!1;this.next();return this},cycle:function(){1<this.images.length&&(clearInterval(this.interval),this.interval=setInterval(a.proxy(function(){this.paused||this.next()},this),this.options.duration));return this},destroy:function(c){a(d).off("resize.backstretch orientationchange.backstretch");clearInterval(this.interval);c||this.$wrap.remove();this.$container.removeData("backstretch")}};var l,f=navigator.userAgent,m=navigator.platform,e=f.match(/AppleWebKit\/([0-9]+)/),e=!!e&&e[1],h=f.match(/Fennec\/([0-9]+)/),h=!!h&&h[1],n=f.match(/Opera Mobi\/([0-9]+)/),t=!!n&&n[1],k=f.match(/MSIE ([0-9]+)/),k=!!k&&k[1];l=!((-1<m.indexOf("iPhone")||-1<m.indexOf("iPad")||-1<m.indexOf("iPod"))&&e&&534>e||d.operamini&&"[object OperaMini]"==={}.toString.call(d.operamini)||n&&7458>t||-1<f.indexOf("Android")&&e&&533>e||h&&6>h||"palmGetResource"in d&&e&&534>e||-1<f.indexOf("MeeGo")&&-1<f.indexOf("NokiaBrowser/8.5.0")||k&&6>=k)})(jQuery,window);
jQuery(document).ready(function($){
$("body").backstretch([BackStretchImg.src],{duration:3000,fade:750});
});