(function(c,g,w,y){c(w).ready(function(){function k(a,b,x,d,f){a.o=null;a.height=0;a.fixed=0;a.default_offset={top:0,left:0};a.margin_top=0;a.margin_left=0;a.width=0;a.absolute_adjustment_top=0;a.absolute_adjustment_left=0;a.percent_width=0;a.disable_iflt=0;a.float_attr_check_mode=parseInt(f,10);a.mode=0;a.previoustop=0;b&&(a.id="#"+b,a.id&&0<c(a.id).length&&(a.o=c(a.id),a.parent=a.o.parent(),a.margin_top=parseInt(a.o.css("margin-top"),10),a.percent_width=parseFloat(x),a.disable_iflt=parseInt(d,10)))}
var l=null,m="#"+swe.maincol_id,n=parseInt(swe.slide_duration,10),b={content_height:0,content_top:0,content_margin_top:0,window_height:0,mode:parseInt(swe.scroll_mode,10),header_space:0,direction:0,prevscrolltop:-1},d={},f={};swe.sidebar1=d;swe.sidebar2=f;swe.condition=b;k(d,swe.sidebar_id,swe.proportional_sidebar,swe.disable_iflt,swe.float_attr_check_mode);k(f,swe.sidebar_id2,swe.proportional_sidebar2,swe.disable_iflt2,swe.float_attr_check_mode2);if(swe.accordion_widget){var q=function(){"undefined"!==typeof JSON&&(c.cookie.json=!0,l=c.cookie("hm_swe"));var a;for(a=0;a<swe.custom_selectors.length;a++){c("body").off("mouseenter",swe.custom_selectors[a]+" "+swe.heading_string).off("mouseleave",swe.custom_selectors[a]+" "+swe.heading_string);c("body").on("mouseenter",swe.custom_selectors[a]+" "+swe.heading_string,function(){c(this).css("cursor","pointer")}).on("mouseleave",swe.custom_selectors[a]+" "+swe.heading_string,function(){c(this).css("cursor","default")});var b=c(swe.custom_selectors[a]+" "+
swe.heading_string).addClass("hm-swe-accordion-head");c(swe.custom_selectors[a]).each(function(){var a=c(this).children(swe.heading_string);l&&"t"==l[c(this).attr("id")]||!l&&!swe.initially_collapsed&&"none"!==a.next().css("display")?a.hasClass("hm-swe-expanded")||a.hasClass("hm-swe-collapsed")||a.addClass("hm-swe-expanded"):a.addClass("hm-swe-collapsed")});b.filter(".hm-swe-expanded").next().show();b.filter(".hm-swe-collapsed").next().hide();c("body").off("click",swe.custom_selectors[a]+" "+swe.heading_string);
c("body").on("click",swe.custom_selectors[a]+" "+swe.heading_string,function(){var a=c(this).next();a&&(a.is(":hidden")?(swe.single_expansion&&(c(".hm-swe-accordion-head").not(this).removeClass("hm-swe-expanded").addClass("hm-swe-collapsed"),c(".hm-swe-accordion-head").not(this).next().slideUp(n)),c(this).removeClass("hm-swe-collapsed").addClass("hm-swe-expanded"),a.slideDown(n,p)):(c(this).removeClass("hm-swe-expanded").addClass("hm-swe-collapsed"),a.slideUp(n,p)))})}},p=function(){if("undefined"!==typeof JSON){var a={},b;for(b=0;b<swe.custom_selectors.length;b++)c(swe.custom_selectors[b]+" "+swe.heading_string).each(function(){c(this).next().is(":visible")&&(a[c(this).parent().attr("id")]="t")}),c.cookie("hm_swe",a,{path:"/"})}"function"===typeof h&&h()};q()}if(swe.scroll_stop&&0<c(m).length){var s=function(){var a=c(g).scrollTop();d.o&&r(d,a);f.o&&r(f,a);b.direction=a-b.prevscrolltop;b.prevscrolltop=a},r=function(a,e){if(0===a.mode)a.o.css("position","relative"),a.o.css("top","0"),a.o.css("left",
"0"),a.o.css("width",""),a.o.css("margin-left","");else{var d=a.o.offset().top,d=d-a.margin_top;!swe.ignore_footer&&(1==a.mode&&e>=b.content_top+b.content_height-b.window_height||2==a.mode&&e>=b.content_top+b.content_height-a.height-b.header_space)?(a.o.css("position","absolute"),a.o.css("top",b.content_top+b.content_height-a.height-a.absolute_adjustment_top),a.o.css("left",a.default_offset.left-a.absolute_adjustment_left),a.o.css("width",a.width),a.o.css("margin-left",a.margin_left),a.fixed=0):(2==b.mode||2==a.mode)&&e<a.default_offset.top-b.header_space?(a.o.css("position","relative"),a.o.css("top","0"),a.o.css("left","0"),a.o.css("width",""),a.o.css("margin-left",""),a.fixed=0):2==b.mode&&1==a.mode&&e<b.prevscrolltop&&e<d-b.header_space?(a.o.css("position","fixed"),a.o.css("top",b.header_space),a.o.css("left",a.default_offset.left-c(g).scrollLeft()),a.o.css("width",a.width),a.o.css("margin-left",a.margin_left),a.fixed=1):2==b.mode&&1==a.mode&&e>=d+a.height-b.window_height&&e>b.prevscrolltop||
2!=b.mode&&1==a.mode&&e>=a.default_offset.top+a.height-b.window_height?(a.o.css("position","fixed"),a.o.css("top",b.window_height-a.height),a.o.css("left",a.default_offset.left-c(g).scrollLeft()),a.o.css("width",a.width),a.o.css("margin-left",a.margin_left),a.fixed=1):2==b.mode&&1==a.mode&&0>(e-b.prevscrolltop)*b.direction&&a.fixed?(a.o.css("position","absolute"),a.o.css("top",d-a.absolute_adjustment_top),a.o.css("left",a.default_offset.left-a.absolute_adjustment_left),a.o.css("width",a.width),a.o.css("margin-left",
a.margin_left),a.fixed=0):2==a.mode?(a.o.css("position","fixed"),a.o.css("top",b.header_space),a.o.css("left",a.default_offset.left-c(g).scrollLeft()),a.o.css("width",a.width),a.o.css("margin-left",a.margin_left),a.fixed=1):2!=b.mode&&(a.o.css("position","relative"),a.o.css("top","0"),a.o.css("left","0"),a.o.css("width",""),a.o.css("margin-left",""),a.fixed=0);a.previoustop=d}},h=function(a){var e=c(m);b.content_top=e.offset().top;b.content_margin_top=parseInt(e.css("margin-top"),10);b.content_top-=
b.content_margin_top;b.content_height=e.outerHeight(!0);b.window_height=c(g).height();b.prevscrolltop=-1;b.direction=0;b.header_space=parseInt(swe.header_space,10);e=c("#wpadminbar");0<e.length&&(b.header_space+=e.height());d.o&&t(d);f.o&&t(f);d.o&&(0!=d.mode&&f.o&&0!=f.mode)&&(b.content_height=Math.max(b.content_height,d.height+d.default_offset.top-b.content_top,f.height+f.default_offset.top-b.content_top));d.o&&u(d);f.o&&u(f);s();!0===a&&(0<swe.recalc_after&&0<swe.recalc_count)&&(1E4>swe.recalc_count&&
swe.recalc_count--,setTimeout(h,1E3*swe.recalc_after,!0))},v=function(a){var b=a.o.css("float");return c(g).width()>=a.disable_iflt&&(!a.float_attr_check_mode||"left"==b||"right"==b)},t=function(a){a.height=a.o.outerHeight(!0);a.fixed=0;a.previoustop=0;a.o.css("position","relative");a.o.css("top","0");a.o.css("left","0");a.o.css("width","");a.width=parseFloat(a.o.css("width"));a.o.css("margin-left","");a.margin_left=parseFloat(a.o.css("margin-left"),10);a.default_offset=a.o.offset();if(a.default_offset){a.default_offset.top-=
a.margin_top;a.default_offset.left-=a.margin_left;var b=a.o.offsetParent();a.absolute_adjustment_top=b.offset().top;a.absolute_adjustment_left=b.offset().left;v(a)?a.mode=1:a.mode=0}},u=function(a){a.default_offset.top+a.height>=b.content_top+b.content_height||!v(a)?a.mode=0:a.mode=a.height+b.header_space<=b.window_height?2:1};swe.resizeHandler=h;c(g).scroll(s);c(g).resize(h);swe.recalc_after=parseInt(swe.recalc_after,10);swe.recalc_count=parseInt(swe.recalc_count,10);h(!0)}swe.reloadHandler=function(){swe.accordion_widget&&
q();swe.scroll_stop&&c(m).length&&(k(d,swe.sidebar_id,swe.proportional_sidebar,swe.disable_iflt,swe.float_attr_check_mode),k(f,swe.sidebar_id2,swe.proportional_sidebar2,swe.disable_iflt2,swe.float_attr_check_mode2),swe.resizeHandler())}})})(jQuery,window,document);
(function(){
var supportsPassive=false;
try {
var opts=Object.defineProperty({}, 'passive', {
get:function(){
supportsPassive=true;
}});
window.addEventListener('testPassive', null, opts);
window.removeEventListener('testPassive', null, opts);
} catch(e){}
function init(){
var input_begin='';
var keydowns={};
var lastKeyup=null;
var lastKeydown=null;
var keypresses=[];
var modifierKeys=[];
var correctionKeys=[];
var lastMouseup=null;
var lastMousedown=null;
var mouseclicks=[];
var mousemoveTimer=null;
var lastMousemoveX=null;
var lastMousemoveY=null;
var mousemoveStart=null;
var mousemoves=[];
var touchmoveCountTimer=null;
var touchmoveCount=0;
var lastTouchEnd=null;
var lastTouchStart=null;
var touchEvents=[];
var scrollCountTimer=null;
var scrollCount=0;
var correctionKeyCodes=[ 'Backspace', 'Delete', 'ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'Home', 'End', 'PageUp', 'PageDown' ];
var modifierKeyCodes=[ 'Shift', 'CapsLock' ];
var forms=document.querySelectorAll('form[method=post]');
for(var i=0; i < forms.length; i++){
var form=forms[i];
var formAction=form.getAttribute('action');
if(formAction){
if(formAction.indexOf('http://')==0||formAction.indexOf('https://')==0){
if(formAction.indexOf('http://' + window.location.hostname + '/')!=0&&formAction.indexOf('https://' + window.location.hostname + '/')!=0){
continue;
}}
}
form.addEventListener('submit', function (){
var ak_bkp=prepare_timestamp_array_for_request(keypresses);
var ak_bmc=prepare_timestamp_array_for_request(mouseclicks);
var ak_bte=prepare_timestamp_array_for_request(touchEvents);
var ak_bmm=prepare_timestamp_array_for_request(mousemoves);
var input_fields={
'bib': input_begin,
'bfs': Date.now(),
'bkpc': keypresses.length,
'bkp': ak_bkp,
'bmc': ak_bmc,
'bmcc': mouseclicks.length,
'bmk': modifierKeys.join(';'),
'bck': correctionKeys.join(';'),
'bmmc': mousemoves.length,
'btmc': touchmoveCount,
'bsc': scrollCount,
'bte': ak_bte,
'btec':touchEvents.length,
'bmm':ak_bmm
};
var akismet_field_prefix='ak_';
if(this.getElementsByClassName){
var possible_akismet_containers=this.getElementsByClassName('akismet-fields-container');
for(var containerIndex=0; containerIndex < possible_akismet_containers.length; containerIndex++){
var container=possible_akismet_containers.item(containerIndex);
if(container.getAttribute('data-prefix') ){
akismet_field_prefix=container.getAttribute('data-prefix');
break;
}}
}
for(var field_name in input_fields){
var field=document.createElement('input');
field.setAttribute('type', 'hidden');
field.setAttribute('name', akismet_field_prefix + field_name);
field.setAttribute('value', input_fields[ field_name ]);
this.appendChild(field);
}}, supportsPassive ? { passive: true }:false);
form.addEventListener('keydown', function(e){
if(e.key in keydowns){
return;
}
var keydownTime=(new Date()).getTime();
keydowns[ e.key ]=[ keydownTime ];
if(! input_begin){
input_begin=keydownTime;
}
var lastKeyEvent=Math.max(lastKeydown, lastKeyup);
if(lastKeyEvent){
keydowns[ e.key ].push(keydownTime - lastKeyEvent);
}
lastKeydown=keydownTime;
}, supportsPassive ? { passive: true }:false);
form.addEventListener('keyup', function(e){
if(!(e.key in keydowns) ){
return;
}
var keyupTime=(new Date()).getTime();
if('TEXTAREA'===e.target.nodeName||'INPUT'===e.target.nodeName){
if(-1!==modifierKeyCodes.indexOf(e.key) ){
modifierKeys.push(keypresses.length - 1);
}else if(-1!==correctionKeyCodes.indexOf(e.key) ){
correctionKeys.push(keypresses.length - 1);
}else{
var keydownTime=keydowns[ e.key ][0];
var keypress=[];
keypress.push(keyupTime - keydownTime);
if(keydowns[ e.key ].length > 1){
keypress.push(keydowns[ e.key ][1]);
}
keypresses.push(keypress);
}}
delete keydowns[ e.key ];
lastKeyup=keyupTime;
}, supportsPassive ? { passive: true }:false);
form.addEventListener("focusin", function(e){
lastKeydown=null;
lastKeyup=null;
keydowns={};}, supportsPassive ? { passive: true }:false);
form.addEventListener("focusout", function(e){
lastKeydown=null;
lastKeyup=null;
keydowns={};}, supportsPassive ? { passive: true }:false);
}
document.addEventListener('mousedown', function(e){
lastMousedown=(new Date()).getTime();
}, supportsPassive ? { passive: true }:false);
document.addEventListener('mouseup', function(e){
if(! lastMousedown){
return;
}
var now=(new Date()).getTime();
var mouseclick=[];
mouseclick.push(now - lastMousedown);
if(lastMouseup){
mouseclick.push(lastMousedown - lastMouseup);
}
mouseclicks.push(mouseclick);
lastMouseup=now;
lastKeydown=null;
lastKeyup=null;
keydowns={};}, supportsPassive ? { passive: true }:false);
document.addEventListener('mousemove', function(e){
if(mousemoveTimer){
clearTimeout(mousemoveTimer);
mousemoveTimer=null;
}else{
mousemoveStart=(new Date()).getTime();
lastMousemoveX=e.offsetX;
lastMousemoveY=e.offsetY;
}
mousemoveTimer=setTimeout(function(theEvent, originalMousemoveStart){
var now=(new Date()).getTime() - 500;
var mousemove=[];
mousemove.push(now - originalMousemoveStart);
mousemove.push(Math.round(Math.sqrt(Math.pow(theEvent.offsetX - lastMousemoveX, 2) +
Math.pow(theEvent.offsetY - lastMousemoveY, 2)
)
)
);
if(mousemove[1] > 0){
mousemoves.push(mousemove);
}
mousemoveStart=null;
mousemoveTimer=null;
}, 500, e, mousemoveStart);
}, supportsPassive ? { passive: true }:false);
document.addEventListener('touchmove', function(e){
if(touchmoveCountTimer){
clearTimeout(touchmoveCountTimer);
}
touchmoveCountTimer=setTimeout(function (){
touchmoveCount++;
}, 500);
}, supportsPassive ? { passive: true }:false);
document.addEventListener('touchstart', function(e){
lastTouchStart=(new Date()).getTime();
}, supportsPassive ? { passive: true }:false);
document.addEventListener('touchend', function(e){
if(! lastTouchStart){
return;
}
var now=(new Date()).getTime();
var touchEvent=[];
touchEvent.push(now - lastTouchStart);
if(lastTouchEnd){
touchEvent.push(lastTouchStart - lastTouchEnd);
}
touchEvents.push(touchEvent);
lastTouchEnd=now;
lastKeydown=null;
lastKeyup=null;
keydowns={};}, supportsPassive ? { passive: true }:false);
document.addEventListener('scroll', function(e){
if(scrollCountTimer){
clearTimeout(scrollCountTimer);
}
scrollCountTimer=setTimeout(function (){
scrollCount++;
}, 500);
}, supportsPassive ? { passive: true }:false);
}
function prepare_timestamp_array_for_request(a, limit){
if(! limit){
limit=100;
}
var rv='';
if(a.length > 0){
var random_starting_point=Math.max(0, Math.floor(Math.random() * a.length - limit) );
for(var i=0; i < limit&&i < a.length; i++){
rv +=a[ random_starting_point + i ][0];
if(a[ random_starting_point + i ].length >=2){
rv +="," + a[ random_starting_point + i ][1];
}
rv +=";";
}}
return rv;
}
if(document.readyState!=='loading'){
init();
}else{
document.addEventListener('DOMContentLoaded', init);
}})();
jQuery(function($){
$(function(){
var nav=$("nav");
var nav_pos=nav.position().top;
$(window).scroll(function (){
if($(this).scrollTop() > nav_pos){
nav.css("position", "fixed");
nav.css("top", "0");
nav.css("opacity", "0.8");
$(".nav-inner ul li a").css("padding", "3px 15px");
$(".menu-mobile").css("padding", "3px 0 1px");
}else{
nav.css("position", "static");
nav.css("opacity", "1");
$(".nav-inner ul li a").css("padding", "7px 15px");
$(".menu-mobile").css("padding", "7px 0 4px");
}});
});
});