var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } { let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opener = _____WB$wombat$assign$function_____("opener"); function preload_images( images, complete_callback ) { var id = '_img_loading_'+( new Date().getTime() ); jQuery( 'body').append( '
' ); jQuery.each( images, function( index, src ){ var img = jQuery( '' ); img.attr( 'alt', '' ); img.attr( 'class', 'image__preload' ); img.css( 'display', 'none' ); img.attr( 'src', src ); jQuery( '#'+id ).append( img ); } ); jQuery( '#'+id ).imagesLoaded( function() { if ( complete_callback ) { complete_callback(); } setTimeout( function(){ jQuery( '#'+id ).remove(); }, 5000 ); }); } function _to_number( string ) { if ( typeof string === 'number' ) { return string; } var n = string.match(/\d+$/); if ( n ) { return parseFloat( n[0] ); } else { return 0; } } function _to_bool( v ) { if ( typeof v === 'boolean' ){ return v; } if ( typeof v === 'number' ){ return v === 0 ? false : true; } if ( typeof v === 'string' ) { if ( v === 'true' || v === '1' ) { return true; } else { return false; } } return false; } /** * skip-link-focus-fix.js * * Helps with accessibility for keyboard only users. * * Learn more: https://github.com/Automattic/OnePress/pull/136 */ ( function() { var is_webkit = navigator.userAgent.toLowerCase().indexOf( 'webkit' ) > -1, is_opera = navigator.userAgent.toLowerCase().indexOf( 'opera' ) > -1, is_ie = navigator.userAgent.toLowerCase().indexOf( 'msie' ) > -1; if ( ( is_webkit || is_opera || is_ie ) && document.getElementById && window.addEventListener ) { window.addEventListener( 'hashchange', function() { var id = location.hash.substring( 1 ), element; if ( ! ( /^[A-z0-9_-]+$/.test( id ) ) ) { return; } element = document.getElementById( id ); if ( element ) { if ( ! ( /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) ) { element.tabIndex = -1; } element.focus(); } }, false ); } })(); /** * Sticky header when scroll. */ jQuery( document ).ready( function( $ ) { var isMobile = { Android: function() { return navigator.userAgent.match(/Android/i); }, BlackBerry: function() { return navigator.userAgent.match(/BlackBerry/i); }, iOS: function() { return navigator.userAgent.match(/iPhone|iPad|iPod/i); }, Opera: function() { return navigator.userAgent.match(/Opera Mini/i); }, Windows: function() { return navigator.userAgent.match(/IEMobile/i); }, any: function() { return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows()); } }; if ( onepress_js_settings.onepress_disable_sticky_header != '1' ) { var is_top_header = $( '#page > .site-header').length ? true : false; $('.site-header').eq(0).wrap( '