!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t("object"==typeof module&&module.exports?require("jquery"):jQuery)}(function(t){function e(t){return t.replace(/(:|\.|\/)/g,"\\$1")}var o={},l=function(e){var o=[],l=!1,s=e.dir&&"left"===e.dir?"scrollLeft":"scrollTop";return this.each(function(){var e=t(this);if(this!==document&&this!==window)return!document.scrollingElement||this!==document.documentElement&&this!==document.body?void(e[s]()>0?o.push(this):(e[s](1),l=e[s]()>0,l&&o.push(this),e[s](0))):(o.push(document.scrollingElement),!1)}),o.length||this.each(function(){"BODY"===this.nodeName&&(o=[this])}),"first"===e.el&&o.length>1&&(o=[o[0]]),o};t.fn.extend({scrollable:function(t){var e=l.call(this,{dir:t});return this.pushStack(e)},firstScrollable:function(t){var e=l.call(this,{el:"first",dir:t});return this.pushStack(e)},smoothScroll:function(o,l){if("options"===(o=o||{}))return l?this.each(function(){var e=t(this),o=t.extend(e.data("ssOpts")||{},l);t(this).data("ssOpts",o)}):this.first().data("ssOpts");var s=t.extend({},t.fn.smoothScroll.defaults,o),n=function(o){var l=this,n=t(this),i=t.extend({},s,n.data("ssOpts")||{}),c=s.exclude,a=i.excludeWithin,r=0,h=0,u=!0,d={},p=t.smoothScroll.filterPath(location.pathname),f=t.smoothScroll.filterPath(l.pathname),m=location.hostname===l.hostname||!l.hostname,g=i.scrollTarget||f===p,_=e(l.hash);if(i.scrollTarget||m&&g&&_){for(;u&&r<c.length;)n.is(e(c[r++]))&&(u=!1);for(;u&&h<a.length;)n.closest(a[h++]).length&&(u=!1)}else u=!1;u&&(i.preventDefault&&o.preventDefault(),t.extend(d,i,{scrollTarget:i.scrollTarget||_,link:l}),t.smoothScroll(d))};return null!==o.delegateSelector?this.undelegate(o.delegateSelector,"click.smoothscroll").delegate(o.delegateSelector,"click.smoothscroll",n):this.unbind("click.smoothscroll").bind("click.smoothscroll",n),this}}),t.smoothScroll=function(e,l){if("options"===e&&"object"==typeof l)return t.extend(o,l);var s,n,i,c,a=0,r="offset",h="scrollTop",u={},d={};"number"==typeof e?(s=t.extend({link:null},t.fn.smoothScroll.defaults,o),i=e):(s=t.extend({link:null},t.fn.smoothScroll.defaults,e||{},o)).scrollElement&&(r="position","static"===s.scrollElement.css("position")&&s.scrollElement.css("position","relative")),h="left"===s.direction?"scrollLeft":h,s.scrollElement?(n=s.scrollElement,/^(?:HTML|BODY)$/.test(n[0].nodeName)||(a=n[h]())):n=t("html, body").firstScrollable(s.direction),s.beforeScroll.call(n,s),i="number"==typeof e?e:l||t(s.scrollTarget)[r]()&&t(s.scrollTarget)[r]()[s.direction]||0,u[h]=i+a+s.offset,"auto"===(c=s.speed)&&(c=Math.abs(u[h]-n[h]())/s.autoCoefficient),d={duration:c,easing:s.easing,complete:function(){s.afterScroll.call(s.link,s)}},s.step&&(d.step=s.step),n.length?n.stop().animate(u,d):s.afterScroll.call(s.link,s)},t.smoothScroll.version="1.6.0",t.smoothScroll.filterPath=function(t){return(t=t||"").replace(/^\//,"").replace(/(?:index|default).[a-zA-Z]{3,4}$/,"").replace(/\/$/,"")},t.fn.smoothScroll.defaults={exclude:[],excludeWithin:[],offset:0,direction:"top",delegateSelector:null,scrollElement:null,scrollTarget:null,beforeScroll:function(){},afterScroll:function(){},easing:"swing",speed:400,autoCoefficient:2,preventDefault:!0}}),jQuery.cookie=function(t,e,o){if(arguments.length>1&&"[object Object]"!==String(e)){if(o=jQuery.extend({},o),null==e&&(o.expires=-1),"number"==typeof o.expires){var l=o.expires,s=o.expires=new Date;s.setDate(s.getDate()+l)}return e=String(e),document.cookie=[encodeURIComponent(t),"=",o.raw?e:encodeURIComponent(e),o.expires?"; expires="+o.expires.toUTCString():"",o.path?"; path="+o.path:"",o.domain?"; domain="+o.domain:"",o.secure?"; secure":""].join("")}var n,i=(o=e||{}).raw?function(t){return t}:decodeURIComponent;return(n=new RegExp("(?:^|;)"+encodeURIComponent(t)+"=([^;]*)").exec(document.cookie))?i(n[1]):null},jQuery(document).ready(function(t){if("undefined"!=typeof tocplus){if(t.fn.shrinkTOCWidth=function(){t(this).css({width:"auto",display:"table"}),/MSIE 7\./.test(navigator.userAgent)&&t(this).css("width","")},1==tocplus.smooth_scroll){var e=hostname=pathname=qs=hash=null;t(document).on("click","#toc_container a, ul.toc_widget_list a",function(o){if(hostname=t(this).prop("hostname"),pathname=t(this).prop("pathname"),qs=t(this).prop("search"),hash=t(this).prop("hash"),pathname.length>0&&"/"!=pathname.charAt(0)&&(pathname="/"+pathname),window.location.hostname==hostname&&window.location.pathname==pathname&&window.location.search==qs&&""!==hash){var l=hash.replace(/([ !"$%&'()*+,.\/:;<=>?@[\]^`{|}~])/g,"\\$1");t(l).length>0?e=hash:(anchor=hash,anchor=anchor.replace("#",""),e='a[name="'+anchor+'"]',0==t(e).length&&(e="")),void 0!==tocplus.smooth_scroll_offset?offset=-1*tocplus.smooth_scroll_offset:t("#wpadminbar").length>0&&t("#wpadminbar").is(":visible")?offset=-30:offset=0,e&&t.smoothScroll({scrollTarget:e,offset:offset})}})}if(void 0!==tocplus.visibility_show){var o,l=void 0!==tocplus.visibility_hide_by_default,s=!!t.cookie&&!!t.cookie("tocplus_hidetoc"),n=l?!s:s,i=void 0!==tocplus.toggle_style?tocplus.toggle_style:"brackets",c=n?tocplus.visibility_show:tocplus.visibility_hide;o="brackets"===i?' <span class="toc_toggle toc_toggle_brackets"><span class="toc_brackets">[</span><a href="#">'+c+'</a><span class="toc_brackets">]</span></span>':' <span class="toc_toggle toc_toggle_icon toc_toggle_'+i+'"><a href="#" role="button" aria-label="'+c+'"><span class="toc_toggle_indicator" aria-hidden="true"></span></a></span>',t("#toc_container .toc_title").append(o),n&&(t("ul.toc_list").hide(),t("#toc_container").addClass("contracted").shrinkTOCWidth()),t("span.toc_toggle a").click(function(e){e.preventDefault();var o,s=!t("#toc_container").hasClass("contracted"),n=s?tocplus.visibility_show:tocplus.visibility_hide;"brackets"===i?t(this).html(n):t(this).attr("aria-label",n),o=s,t.cookie&&(t.cookie("tocplus_hidetoc",null,{path:"/"}),o!=l?t.cookie("tocplus_hidetoc","1",{expires:30,path:window.location.pathname}):t.cookie("tocplus_hidetoc",null,{path:window.location.pathname})),s?(t("ul.toc_list").hide("fast"),t("#toc_container").addClass("contracted").shrinkTOCWidth()):(t("#toc_container").css("width",tocplus.width).removeClass("contracted"),t("ul.toc_list").show("fast"))})}}});
jQuery.fn.exists=function(callback){
var args=[].slice.call(arguments, 1);
if(this.length){
callback.call(this, args);
}
return this;
};
jQuery(document).ready(function($){
var scrollToAnchor=function(id, event){
var elem=$("a[name='"+ id +"']");
if(typeof(elem.offset())==="undefined"){
elem=$("#"+id);
}
if(typeof(elem.offset())!=="undefined"){
event.preventDefault();
var scroll_to=elem.offset().top;
$('html, body').removeClass('mobile-menu-active').animate({
scrollTop: scroll_to
}, 600, 'swing', function(){ if(scroll_to > 46) window.location.hash=id; });
}};
$("a").click(function(event){
var href=$(this).attr("href");
if(href&&href.match("#")&&href!=='#'){
var parts=href.split('#'),
url=parts[0],
target=parts[1];
if((!url||url==window.location.href.split('#')[0])&&target)
scrollToAnchor(target, event);
}});
});
if(mts_customscript.responsive&&mts_customscript.nav_menu!='none'){
jQuery(document).ready(function($){
$('#primary-navigation').append('<div id="mobile-menu-overlay" />');
if(mts_customscript.nav_menu=='both'&&!$('.navigation.mobile-only').length){
$('.navigation').not('.mobile-menu-wrapper').find('.menu').clone().appendTo('.mobile-menu-wrapper').hide();
}
$('.toggle-mobile-menu').click(function(e){
e.preventDefault();
e.stopPropagation();
$('body').toggleClass('mobile-menu-active');
if($('body').hasClass('mobile-menu-active')){
if($(document).height() > $(window).height()){
var scrollTop=($('html').scrollTop()) ? $('html').scrollTop():$('body').scrollTop();
$('html').addClass('noscroll').css('top', -scrollTop);
}
$('#mobile-menu-overlay').fadeIn();
}else{
var scrollTop=parseInt($('html').css('top'));
$('html').removeClass('noscroll');
$('html,body').scrollTop(-scrollTop);
$('#mobile-menu-overlay').fadeOut();
}});
}).on('click', function(event){
var $target=jQuery(event.target);
if(( $target.hasClass("fa")&&$target.parent().hasClass("toggle-caret"))||$target.hasClass("toggle-caret")){
return;
}
jQuery('body').removeClass('mobile-menu-active');
jQuery('html').removeClass('noscroll');
jQuery('#mobile-menu-overlay').fadeOut();
});
}
jQuery(document).ready(function($){
function mtsDropdownMenu(){
var wWidth=$(window).width();
if(wWidth > 865){
$('.navigation ul.sub-menu, .navigation ul.children').hide();
var timer;
var delay=100;
$('.navigation li').hover(function(){
var $this=$(this);
timer=setTimeout(function(){
$this.children('ul.sub-menu, ul.children').slideDown('fast');
}, delay);
},
function(){
$(this).children('ul.sub-menu, ul.children').hide();
clearTimeout(timer);
}
);
}else{
$('.navigation li').unbind('hover');
$('.navigation li.active > ul.sub-menu, .navigation li.active > ul.children').show();
}}
mtsDropdownMenu();
$(window).resize(function(){
mtsDropdownMenu();
});
});
jQuery(document).ready(function($){
$('.widget_nav_menu, .navigation .menu').addClass('toggle-menu');
$('.toggle-menu ul.sub-menu, .toggle-menu ul.children').addClass('toggle-submenu');
$('.toggle-menu ul.sub-menu').parent().addClass('toggle-menu-item-parent');
$('.toggle-menu .toggle-menu-item-parent').append('<span class="toggle-caret"><i class="fa fa-plus"></i></span>');
$('.toggle-caret').click(function(e){
e.preventDefault();
$(this).parent().toggleClass('active').children('.toggle-submenu').slideToggle('fast');
});
});
jQuery(document).ready(function($){
var lazyloadAvatar=function(){
$('.comment-author .avatar').each(function(){
var distanceToTop=$(this).offset().top;
var scroll=$(window).scrollTop();
var windowHeight=$(window).height();
var isVisible=distanceToTop - scroll < windowHeight;
if(isVisible){
var hashedUrl=$(this).attr('data-src');
if(hashedUrl){
$(this).attr('src',hashedUrl).removeClass('loading');
}}
});
};
if($('.comment-author .avatar').length > 0){
$('.comment-author .avatar').each(function(i,el){
$(el).attr('data-src', el.src).removeAttr('src').addClass('loading');
});
$(function(){
$(window).scroll(function(){
lazyloadAvatar();
});
});
lazyloadAvatar();
}});
jQuery(document).ready(function($){
(function(d, s){
var js, fjs=d.getElementsByTagName(s)[0], load=function(url, id){
if(d.getElementById(id)){return;}
js=d.createElement(s); js.src=url; js.id=id;
fjs.parentNode.insertBefore(js, fjs);
};
jQuery('.facebook_like').exists(function(){
load('//connect.facebook.net/en_US/all.js#xfbml=1&version=v2.8', 'fbjssdk');
});
}(document, 'script'));
});
!function(t,i){"function"==typeof define&&define.amd?define([],i):"object"==typeof exports?module.exports=i():t.Layzr=i()}(this,function(){"use strict";function t(t){this._lastScroll=0,this._ticking=!1,t=t||{},this._optionsContainer=document.querySelector(t.container)||window,this._optionsSelector=t.selector||"[data-layzr]",this._optionsAttr=t.attr||"data-layzr",this._optionsAttrRetina=t.retinaAttr||"data-layzr-retina",this._optionsAttrBg=t.bgAttr||"data-layzr-bg",this._optionsAttrHidden=t.hiddenAttr||"data-layzr-hidden",this._optionsThreshold=t.threshold||0,this._optionsCallback=t.callback||null,this._retina=window.devicePixelRatio>1,this._srcAttr=this._retina?this._optionsAttrRetina:this._optionsAttr,this._nodes=document.querySelectorAll(this._optionsSelector),this._handlerBind=this._requestScroll.bind(this),this._create()}return t.prototype._requestScroll=function(){this._lastScroll=this._optionsContainer===window?window.pageYOffset:this._optionsContainer.scrollTop+this._getOffset(this._optionsContainer),this._requestTick()},t.prototype._requestTick=function(){this._ticking||(requestAnimationFrame(this.update.bind(this)),this._ticking=!0)},t.prototype._getOffset=function(t){return t.getBoundingClientRect().top+window.pageYOffset},t.prototype._getContainerHeight=function(){return this._optionsContainer.innerHeight||this._optionsContainer.offsetHeight},t.prototype._create=function(){this._handlerBind(),this._optionsContainer.addEventListener("scroll",this._handlerBind,!1),this._optionsContainer.addEventListener("resize",this._handlerBind,!1)},t.prototype._destroy=function(){this._optionsContainer.removeEventListener("scroll",this._handlerBind,!1),this._optionsContainer.removeEventListener("resize",this._handlerBind,!1)},t.prototype._inViewport=function(t){var i=this._lastScroll,e=i+this._getContainerHeight(),o=this._getOffset(t),n=o+this._getContainerHeight(),s=this._optionsThreshold/100*window.innerHeight;return n>=i-s&&e+s>=o&&!t.hasAttribute(this._optionsAttrHidden)},t.prototype._reveal=function(t){var i=t.getAttribute(this._srcAttr)||t.getAttribute(this._optionsAttr);t.hasAttribute(this._optionsAttrBg)?t.style.backgroundImage="url("+i+")":t.setAttribute("src",i),"function"==typeof this._optionsCallback&&this._optionsCallback.call(t),t.removeAttribute(this._optionsAttr),t.removeAttribute(this._optionsAttrRetina),t.removeAttribute(this._optionsAttrBg),t.removeAttribute(this._optionsAttrHidden)},t.prototype.updateSelector=function(){this._nodes=document.querySelectorAll(this._optionsSelector)},t.prototype.update=function(){for(var t=this._nodes.length,i=0;t>i;i++){var e=this._nodes[i];e.hasAttribute(this._optionsAttr)&&this._inViewport(e)&&this._reveal(e)}this._ticking=!1},t});
function initLayzr(){
var layzr=new Layzr({
selector: '[data-layzr]',
attr: 'data-layzr',
});
}
jQuery(document).ready(function($){
initLayzr();
});
jQuery(document).ajaxComplete(function(){
initLayzr();
});
var advanced_ads_adblocker_test=true;
var _gaq=_gaq||[];var stFailbackDefaults={trackScrolling:true,stLogInterval:10,docTitle:window.document.title,cutOffTime:900,trackNoEvents:false,trackNoMaxTime:false};window.total_time=0;var stIntervalObj=null;var EventNONInteraction=false;var Frequency=null;var Repentance=null;function TrackingLogTime(a){return a[0]==50?(parseInt(a[1])+1)+":00":(a[1]||"0")+":"+(parseInt(a[0])+10)}function stInitializeControlVars(){if(typeof window.trackScrolling=="undefined"){window.trackScrolling=window.stFailbackDefaults.trackScrolling}if(typeof window.stLogInterval=="undefined"){window.stLogInterval=window.stFailbackDefaults.stLogInterval*1000}if(typeof window.docTitle=="undefined"){window.docTitle=window.stFailbackDefaults.docTitle}if(typeof window.cutOffTime=="undefined"){window.cutOffTime=window.stFailbackDefaults.cutOffTime}if(typeof window.trackNoEvents=="undefined"){window.trackNoEvents=window.stFailbackDefaults.trackNoEvents}if(typeof window.trackNoMaxTime=="undefined"){window.trackNoMaxTime=window.stFailbackDefaults.trackNoMaxTime}if(window.trackScrolling===true){setTimeout(function(){window.onscroll=function(){window.onscroll=null;ga("send","event","Scroll",window.docTitle,"scrolled")}},2000)}}if(window.trackNoEvents===false){function startTimeTracking(a){stInitializeControlVars();window.stIntervalObj=window.setInterval(function(){total_time+=10;if(window.trackNoMaxTime===true){total_time=1}if(window.total_time<=window.cutOffTime){a=TrackingLogTime(a.split(":").reverse());ga("send","event","Time","Log",a)}else{window.clearInterval(window.stIntervalObj)}},(window.stLogInterval))}jQuery(document).ready(function(){startTimeTracking("00")})}if(window.trackScrollingPercentage===true){Frequency=ScrollingPercentageNumber;Repentance=100/ScrollingPercentageNumber;var ScrollMatrix=new Array();for(ix=0;ix<Repentance;ix++){ScrollMatrix[ix]=[Frequency,"false"];Frequency=ScrollingPercentageNumber+Frequency}$(document).scroll(function(a){for(iz=0;iz<ScrollMatrix.length;iz++){if(($(window).scrollTop()+$(window).height()>=$(document).height()*ScrollMatrix[iz][0]/100)&&(ScrollMatrix[iz][1]=="false")){ScrollMatrix[iz][1]="true";ga("send","event","Percentage Page Scroll",window.docTitle,ScrollMatrix[iz][0]+"%",{nonInteraction:EventNONInteraction})}}})};
!function(d,l){"use strict";l.querySelector&&d.addEventListener&&"undefined"!=typeof URL&&(d.wp=d.wp||{},d.wp.receiveEmbedMessage||(d.wp.receiveEmbedMessage=function(e){var t=e.data;if((t||t.secret||t.message||t.value)&&!/[^a-zA-Z0-9]/.test(t.secret)){for(var s,r,n,a=l.querySelectorAll('iframe[data-secret="'+t.secret+'"]'),o=l.querySelectorAll('blockquote[data-secret="'+t.secret+'"]'),c=new RegExp("^https?:$","i"),i=0;i<o.length;i++)o[i].style.display="none";for(i=0;i<a.length;i++)s=a[i],e.source===s.contentWindow&&(s.removeAttribute("style"),"height"===t.message?(1e3<(r=parseInt(t.value,10))?r=1e3:~~r<200&&(r=200),s.height=r):"link"===t.message&&(r=new URL(s.getAttribute("src")),n=new URL(t.value),c.test(n.protocol))&&n.host===r.host&&l.activeElement===s&&(d.top.location.href=t.value))}},d.addEventListener("message",d.wp.receiveEmbedMessage,!1),l.addEventListener("DOMContentLoaded",function(){for(var e,t,s=l.querySelectorAll("iframe.wp-embedded-content"),r=0;r<s.length;r++)(t=(e=s[r]).getAttribute("data-secret"))||(t=Math.random().toString(36).substring(2,12),e.src+="#?secret="+t,e.setAttribute("data-secret",t)),e.contentWindow.postMessage({message:"ready",secret:t},"*")},!1)))}(window,document);