',r.TagButton.prototype.callback.call(this,t,e,n)):r.TagButton.prototype.callback.call(this,t,e,n)):wpLink.open(n.id)},r.ImgButton=function(){var t={ariaLabel:quicktagsL10n.image};r.TagButton.call(this,"img","img","","","","","",t)},r.ImgButton.prototype=new r.TagButton,r.ImgButton.prototype.callback=function(t,e,n,o){o=o||"http://";var a=prompt(quicktagsL10n.enterImageURL,o);a&&(o=prompt(quicktagsL10n.enterImageDescription,""),this.tagStart='
',r.TagButton.prototype.callback.call(this,t,e,n))},r.DFWButton=function(){r.Button.call(this,"dfw","","f",quicktagsL10n.dfw)},r.DFWButton.prototype=new r.Button,r.DFWButton.prototype.callback=function(){var t;(t=window.wp)&&t.editor&&t.editor.dfw&&window.wp.editor.dfw.toggle()},r.TextDirectionButton=function(){r.Button.call(this,"textdirection",quicktagsL10n.textdirection,"",quicktagsL10n.toggleTextdirection)},r.TextDirectionButton.prototype=new r.Button,r.TextDirectionButton.prototype.callback=function(t,e){var n="rtl"===document.getElementsByTagName("html")[0].dir,o=(o=e.style.direction)||(n?"rtl":"ltr");e.style.direction="rtl"===o?"ltr":"rtl",e.focus()},edButtons[10]=new r.TagButton("strong","b","","","","","",{ariaLabel:quicktagsL10n.strong,ariaLabelClose:quicktagsL10n.strongClose}),edButtons[20]=new r.TagButton("em","i","","","","","",{ariaLabel:quicktagsL10n.em,ariaLabelClose:quicktagsL10n.emClose}),edButtons[30]=new r.LinkButton,edButtons[40]=new r.TagButton("block","b-quote","\n\n","
\n\n","","","",{ariaLabel:quicktagsL10n.blockquote,ariaLabelClose:quicktagsL10n.blockquoteClose}),edButtons[50]=new r.TagButton("del","del",'',"","","","",{ariaLabel:quicktagsL10n.del,ariaLabelClose:quicktagsL10n.delClose}),edButtons[60]=new r.TagButton("ins","ins",'',"","","","",{ariaLabel:quicktagsL10n.ins,ariaLabelClose:quicktagsL10n.insClose}),edButtons[70]=new r.ImgButton,edButtons[80]=new r.TagButton("ul","ul","\n\n","","","",{ariaLabel:quicktagsL10n.ul,ariaLabelClose:quicktagsL10n.ulClose}),edButtons[90]=new r.TagButton("ol","ol","\n","
\n\n","","","",{ariaLabel:quicktagsL10n.ol,ariaLabelClose:quicktagsL10n.olClose}),edButtons[100]=new r.TagButton("li","li","\t","\n","","","",{ariaLabel:quicktagsL10n.li,ariaLabelClose:quicktagsL10n.liClose}),edButtons[110]=new r.TagButton("code","code","","","","","",{ariaLabel:quicktagsL10n.code,ariaLabelClose:quicktagsL10n.codeClose}),edButtons[120]=new r.TagButton("more","more","\x3c!--more--\x3e\n\n","","","","",{ariaLabel:quicktagsL10n.more}),edButtons[140]=new r.CloseButton}(),window.quicktags=function(t){return new window.QTags(t)},window.edInsertContent=function(t,e){return window.QTags.insertContent(e)},window.edButton=function(t,e,n,o,a){return window.QTags.addButton(t,e,n,o,a,"",-1)};
// source --> https://www.articlemarketingitaliano.it/wp-content/themes/montezuma/javascript/smooth-menu.js?ver=5.6.1
/*
* SmoothMenu addon for jQuery UI
* https://github.com/madguy/jQuery.ui.smoothMenu
* Copyright 2011, madguy
* License MIT-style License.
* http://www.opensource.org/licenses/mit-license.php
*
* Depends:
* jquery.ui.core.js
* jquery.ui.widget.js
*
* Inspired by MenuMatic
* http://greengeckodesign.com/menumatic
*/
(function ($, undefined) {
var isNumber = function (value) {
return typeof value === "number" && isFinite(value);
};
$.widget('ui.smoothMenu', {
widgetEventPrefix: 'smoothMenu',
_wrapToWidgetEvent: function (type) {
return type + '.' + this.widgetEventPrefix;
},
options: {
childTag: 'li',
delay: 1000,
direction: 'horizontal',
dockId: 'ui_smooth_menu_container',
duration: 300,
easing: 'swing',
icon: true,
opacity: 0.97,
parentTag: 'ul',
zIndex: 1
},
_create: function () {
var self = this;
var options = self.options;
var $elm = self.element;
var $rootContainer = self._getOrCreateContainer();
var $parent = $elm.children(options.parentTag + ':first');
options.parentNode = $parent;
//
var childOption = $.extend({}, options, {
direction: 'vertical',
zIndex: options.zIndex + 1
});
//
var $childNodes = $parent.children(options.childTag).smoothMenu(childOption).bind({
smoothmenuonhide: function (event, $elm) {
self.hide();
}
});
options.childNodes = $childNodes;
options.defaultCss = {
marginLeft: $parent.css('marginLeft'),
marginTop: $parent.css('marginTop'),
opacity: $parent.css('opacity'),
visibility: $parent.css('visibility')
};
//$elm.addClass('ui-smoothMenu-item ui-widget ui-corner-all ui-state-default').bind(self._wrapToWidgetEvent('mouseenter'), function (event) {
$elm.bind(self._wrapToWidgetEvent('mouseenter'), function (event) {
/*if (options.disabled === false) {
$elm.addClass('ui-state-hover');
}
*/
self._mouseEnter(event);
$(this).smoothMenu('show');
}).bind(self._wrapToWidgetEvent('mouseleave'), function (event) {
// $elm.removeClass('ui-state-hover');
self._mouseLeave(event);
setTimeout(function () {
$elm.smoothMenu('hide');
}, options.delay);
});
if ($parent.length > 0) {
var $container = $('').css({
display: 'none',
overflow: 'hidden',
position: 'absolute',
zIndex: options.zIndex
}).bind(self._wrapToWidgetEvent('mouseenter'), function (event) {
self._mouseEnter(event);
}).bind(self._wrapToWidgetEvent('mouseleave'), function (event) {
self._mouseLeave(event);
}).append($parent).appendTo($rootContainer);
options.container = $container;
/* adding myself, along with for icons */
/*
if (options.icon) {
var iconClass = options.direction === 'horizontal' ? 'ui-icon-triangle-1-s' : 'ui-icon-triangle-1-e';
var $icon = $('').addClass(iconClass);
$elm.append($icon);
}
*/
} else {
options.container = $();
}
$elm.smoothMenu('hide', 200);
},
destroy: function () {
var self = this;
var options = self.options;
var $elm = self.element;
if (options.disabled) {
self.enable();
}
//$elm.removeClass('ui-smoothMenu-item ui-widget ui-corner-all ui-state-default').unbind('.' + self.widgetEventPrefix);
$elm.unbind('.' + self.widgetEventPrefix);
$elm.find('.ui-icon').remove();
var $container = options.container;
//
options.childNodes.smoothMenu('destroy');
var $parent = $container.children(options.parentTag);
$parent.stop(true, true).css(options.defaultCss);
$elm.append($parent);
$container.remove();
self._removeContainerIfEmpty();
return self;
},
enable: function () {
var $childNodes = this.options.childNodes;
$childNodes.smoothMenu('enable');
$.Widget.prototype.enable.call(this);
},
disable: function () {
var $childNodes = this.options.childNodes;
$childNodes.smoothMenu('disable');
this.hide();
$.Widget.prototype.disable.call(this);
},
rootContainer: function () {
return this._getOrCreateContainer();
},
content: function () {
return this.options.parentNode;
},
show: function (duration) {
var self = this;
var options = this.options;
var $elm = self.element;
var $container = options.container;
var $parent = $container.children(options.parentTag);
duration = isNumber(duration) ? duration : options.duration;
if (options.disabled) {
return;
}
$elm.siblings().smoothMenu('hide', 200);
if (options.visible) {
return;
}
var isContinue = self._trigger('beforeShow', null, $elm);
if (isContinue === false) {
return;
}
var offset = $elm.offset();
var extendWidth = options.direction !== 'horizontal' ? $elm.outerWidth(true) : 0;
var extendHeight = (function () {
if (options.direction === 'horizontal') {
// return $elm.outerHeight(true);
return $elm.parent().outerHeight(true);
} else {
var containerHeight = $container.outerHeight(true) || 0;
var documentHeight = $(document).height();
return Math.min(documentHeight - (offset.top + containerHeight), 0);
}
})();
//
$container.show();
//
// var height = $parent.outerHeight() || 0;
//var width = $parent.outerWidth() || 0;
var height = $parent.outerHeight() + 20;
var width = 180;
$container.css({
// left: String(offset.left + extendWidth) + 'px',
left: String(offset.left + extendWidth - 5) + 'px',
height: String(height) + 'px',
top: String(offset.top + extendHeight) + 'px',
width: String(width) + 'px',
});
$parent.stop(true).animate({
marginLeft: '0px',
marginTop: '0px',
opacity: options.opacity
}, {
duration: duration,
easing: options.easing
});
options.visible = true;
self._trigger('onShow', null, $elm);
},
hide: function (duration) {
var self = this;
var options = self.options;
var $elm = self.element;
var $container = options.container;
var $parent = $container.children(options.parentTag);
duration = isNumber(duration) ? duration : options.duration;
if (options.disabled) {
return;
}
if (options.visible === false) {
return;
}
if (self.isMouseOver(true)) {
return;
}
var isContinue = self._trigger('beforeHide', null, $elm);
if (isContinue === false) {
return;
}
var marginLeft = options.direction !== 'horizontal' ? -1 * $container.outerWidth() : 0;
var marginTop = options.direction === 'horizontal' ? -1 * $container.outerHeight() : 0;
$parent.stop(true).animate({
marginLeft: String(marginLeft) + 'px',
marginTop: String(marginTop) + 'px',
//opacity: 0
}, {
duration: duration,
easing: options.easing,
complete: function () {
$container.hide();
}
});
self._trigger('onHide', null, $elm);
options.visible = false;
//
options.childNodes.smoothMenu('hide');
},
isMouseOver: function (deepSearch) {
var isMouseOver = this.options.isMouseOver;
if (deepSearch) {
var hasMouseOverChild = this._hasMouseOverChild();
return isMouseOver || hasMouseOverChild;
} else {
return isMouseOver;
}
},
_hasMouseOverChild: function () {
var $childNodes = this.options.childNodes;
var hasMouseOverChild = $childNodes.filter(function () {
return $(this).smoothMenu('isMouseOver', true);
}).length > 0;
return hasMouseOverChild;
},
_mouseEnter: function (event) {
this.options.isMouseOver = true;
},
_mouseLeave: function (event) {
this.options.isMouseOver = false;
},
_getOrCreateContainer: function () {
var id = this.options.dockId;
var $container = $('#' + id);
if ($container.length === 0) {
$container = $('', {
id: id
// ,'class': 'ui-widget ui-smoothMenu'
}).appendTo(document.body);
}
return $container;
},
_removeContainerIfEmpty: function () {
var $container = this._getOrCreateContainer();
if ($container.is(':empty')) {
$container.remove();
}
}
});
$.extend($.ui.smoothMenu, {
version: '0.2.4'
});
})(jQuery);
// source --> https://www.articlemarketingitaliano.it/wp-content/uploads/montezuma/javascript.js?ver=5.6.1
var ua = jQuery.browser;
/*******************************
* Equal Height Columns Function
******************************/
function bfa_equal_columns() {
jQuery('.ehc').each( function() {
var row = jQuery(this);
if ( ua.msie && parseInt( ua.version, 10 ) < 8 ) {
var height = row.outerHeight(); // outerheight for IE < 8
} else {
// var height = row.height();
var height = row.outerHeight();
}
row.find('> div').each( function() {
jQuery(this).height( height );
});
});
}
function bfa_video_resize() {
jQuery('.row > div, .row5 > div, .lw').each( function() {
var col = jQuery(this),
p = col.find('.post').first(),
bc = p.find('.post-bodycopy'),
maxWidth = col.width()
- ( p.outerWidth() - p.width() )
- ( bc.outerWidth() - bc.width() );
col.find('embed, iframe').each( function() {
var video = jQuery(this),
videoWidth = video.attr('width');
if( videoWidth > maxWidth ) {
videoHeight = video.attr('height'),
videoMaxHeight = ( maxWidth / videoWidth * videoHeight );
video.attr({ width: maxWidth, height: videoMaxHeight });
}
});
});
}
function bfa_img_grayscale() {
jQuery('.post-thumb img').each(function(){
var el = jQuery(this);
el.css({'position':'absolute'})
.wrap("")
.clone().addClass('img_grayscale')
.css({'position':'absolute','z-index':'998','opacity':'1.0'})
.insertBefore(el)
.queue(function(){
var el = jQuery(this);
el.parent().css({'width':this.offsetWidth,'height':this.offsetHeight });
el.dequeue();
});
});
}
/*******************************
* Grayscale post thumbs
******************************/
jQuery(window).load(function() {
if( jQuery(window).width() > 959 ) {
bfa_img_grayscale();
}
});
/*******************************
* Run on resize
******************************/
jQuery(window).resize(function() {
bfa_video_resize();
bfa_equal_columns();
});
WebFontConfig = {
// google: { families: [ 'Yanone Kaffeesatz:400,300,200,700', 'Gruppo', 'Droid Sans:normal,bold' ] },
google: { families: ["Yanone+Kaffeesatz:400,200"] },
fontactive: function(fontFamily, fontDescription) {
// Avoids 'FOUC' - Flash of unstyled content in Firefox, Set 'body { opacity: 0 }' in CSS stylesheet
jQuery('body').css('opacity', 1);
bfa_equal_columns();
}
};
(function() {
var wf = document.createElement('script');
wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
'://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
wf.type = 'text/javascript';
wf.async = 'true';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(wf, s);
})();
jQuery(document).ready(function($) {
if( $('body').css('opacity') == 0 ) {
$('body').css('opacity', 1);
}
// A class for zebra-striped table rows
$('.hentry table tr:nth-child(even), .comment-text table tr:nth-child(even)').addClass('alternate');
if( jQuery().colorbox ) {
$('.gallery figure a span').colorbox({rel: 'gal', slideshow: true, slideshowSpeed: 3500, opacity: 0.7, href: function(){
var src = $(this).prev('img').attr('src').replace( /-\d+x\d+./, '.' ); // full src = remove '-150x150' from thumb src
return src;
}});
}
bfa_video_resize();
// Fade image
if( $(window).width() > 959 ) {
$('.hentry').hover(
function(){ $(this).find('.img_grayscale').stop().animate({opacity:0}, 1000).next().stop().animate({opacity:1}, 700); },
function(){ $(this).find('.img_grayscale').stop().animate({opacity:1}, 1000).next().stop().animate({opacity:0}, 700); }
);
} else {
$('.hentry .post-thumb img').css('opacity', 1);
}
/**
* jQuery Mobile Menu
* Turn unordered list menu into dropdown select menu
* version 1.0(31-OCT-2011)
*
* Built on top of the jQuery library
* http://jquery.com
*
* Documentation
* http://github.com/mambows/mobilemenu
*/
(function($){
$.fn.mobileMenu = function(options) {
var defaults = {
defaultText: 'Navigate to...',
className: 'select-menu',
subMenuClass: 'sub-menu',
subMenuDash: '–'
},
settings = $.extend( defaults, options ),
el = $(this);
this.each(function(){
// ad class to submenu list
el.find('ul').addClass(settings.subMenuClass);
// Create base menu
$('',{ 'class' : settings.className }).insertAfter( el );
// Create default option
$('', {
'value' : '#',
'text' : settings.defaultText
}).appendTo( '.' + settings.className );
// Create select option from menu
el.find('a').each(function(){
var $this = $(this),
optText = ' ' + $this.text(),
optSub = $this.parents( '.' + settings.subMenuClass ),
len = optSub.length,
dash;
// if menu has sub menu
if( $this.parents('ul').hasClass( settings.subMenuClass ) ) {
dash = Array( len+1 ).join( settings.subMenuDash );
optText = dash + optText;
}
// Now build menu and append it
$('', {
'value' : this.href,
'html' : optText,
'selected' : (this.href == window.location.href)
}).appendTo( '.' + settings.className );
}); // End el.find('a').each
// Change event on select element
$('.' + settings.className).change(function(){
var locations = $(this).val();
if( locations !== '#' ) {
window.location.href = $(this).val();
};
});
}); // End this.each
return this;
};
})(jQuery);
$('#menu1').mobileMenu({
defaultText: 'Navigate to...',
className: 'menu1-mobile',
subMenuDash: ' — '
});
/*******************************
* SPLIT TITLES
******************************/
/* Split titles: 2-color titles for site-, post- and widget titles */
$('#sitetitle a, .hentry h2 a[rel=bookmark], .hentry h1 a[rel=bookmark], .image-attachment h1, .widget h3 span').each( function() {
var str = $(this).text();
if( str.indexOf(' ') > 0 ) { var space = ' '; }
else { var space = ''; }
var strArray = str.split(space),
fullLength = strArray.length,
halfLength = Math.ceil( fullLength / 2 ),
restLength = fullLength - halfLength,
newstr = '';
for( var i = 0; i < halfLength; i++ ) {
newstr += strArray[i] + space;
}
newstr += '' + space;
for( var i = halfLength; i < fullLength; i++ ) {
newstr += strArray[i] + space;
}
$(this).html( newstr );
});
/*******************************
* ADD SOME MENU CLASSES
******************************/
// Add class to menu list items with children
$('ul.children, ul.sub-menu').parent('li').addClass('has-sub-menu');
// wp_list_categories does not provide 'ancestor' classes like wp_list_pages and wp_nav_menu:
$('ul.menu li.active').parents('li:not(.ancestor)').addClass('ancestor');
/*******************************
* INSERT for CSS SPRITE ICONS
******************************/
$('.widget ul li, .widget h3, .breadcrumbs ol li, .hentry ul li, .comment-text ul li, li.has-sub-menu a, .menu > li > a, .post-tags, .post-categories').prepend('');
/*******************************
* SMOOTH MENU
******************************/
$('#menu1 > li').smoothMenu({
zIndex: 10,
duration: 700,
easing: 'easeOutExpo',
dockId: 'menu1-smooth'
});
});