‘);
}
if(jQuery(‘.faqs’).length >= 1) {
jQuery(‘#content’).append(‘
‘+js_local_vars.faqs_loading_text+’
‘);
}
var iframes = jQuery(‘iframe’);
jQuery.each(iframes, function(i, v) {
var src = jQuery(this).attr(‘src’);
if(src) {
}
});
});
// Define YT_ready function.
var YT_ready = (function() {
var onReady_funcs = [], api_isReady = false;
/* @param func function Function to execute on ready
* @param func Boolean If true, all qeued functions are executed
* @param b_before Boolean If true, the func will added to the first
position in the queue*/
return function(func, b_before) {
if (func === true) {
api_isReady = true;
while (onReady_funcs.length) {
// Removes the first func from the array, and execute func
onReady_funcs.shift()();
}
} else if (typeof func == “function”) {
if (api_isReady) func();
else onReady_funcs[b_before?”unshift”:”push”](func);
}
}
})();
// This function will be called when the API is fully loaded
function onYouTubePlayerAPIReady() {YT_ready(true)}
jQuery(window).load(function() {
if(jQuery(‘#sidebar’).is(‘:visible’)) {
jQuery(‘.post-content div.portfolio’).each(function() {
var columns = jQuery(this).data(‘columns’);
jQuery(this).addClass(‘portfolio-‘+columns+’-sidebar’);
});
}
if(jQuery().isotope) {
// modified Isotope methods for gutters in masonry
jQuery.Isotope.prototype._getMasonryGutterColumns = function() {
var gutter = this.options.masonry && this.options.masonry.gutterWidth || 0;
containerWidth = this.element.width();
this.masonry.columnWidth = this.options.masonry && this.options.masonry.columnWidth ||
// or use the size of the first item
this.$filteredAtoms.outerWidth(true) ||
// if there’s no items, use size of container
containerWidth;
this.masonry.columnWidth += gutter;
this.masonry.cols = Math.floor( ( containerWidth + gutter ) / this.masonry.columnWidth );
this.masonry.cols = Math.max( this.masonry.cols, 1 );
};
jQuery.Isotope.prototype._masonryReset = function() {
// layout-specific props
this.masonry = {};
// FIXME shouldn’t have to call this again
this._getMasonryGutterColumns();
var i = this.masonry.cols;
this.masonry.colYs = [];
while (i–) {
this.masonry.colYs.push( 0 );
}
};
jQuery.Isotope.prototype._masonryResizeChanged = function() {
var prevSegments = this.masonry.cols;
// update cols/rows
this._getMasonryGutterColumns();
// return if updated cols/rows is not equal to previous
return ( this.masonry.cols !== prevSegments );
};
imagesLoaded(jQuery(‘.portfolio-one .portfolio-wrapper’), function() {
jQuery(‘.portfolio-wrapper’).fadeIn();
jQuery(‘.portfolio-tabs’).fadeIn();
jQuery(‘.faq-tabs’).fadeIn();
jQuery(‘.loading-container’).fadeOut();
jQuery(‘.portfolio-one .portfolio-wrapper’).isotope({
// options
itemSelector: ‘.portfolio-item’,
layoutMode: ‘straightDown’,
transformsEnabled: false
});
jQuery(‘[data-spy=”scroll”]’).each(function () {
var $spy = jQuery(this).scrollspy(‘refresh’);
});
});
imagesLoaded(jQuery(‘.portfolio-two .portfolio-wrapper, .portfolio-three .portfolio-wrapper, .portfolio-four .portfolio-wrapper’),function() {
jQuery(‘.portfolio-wrapper’).fadeIn();
jQuery(‘.portfolio-tabs’).fadeIn();
jQuery(‘.loading-container’).fadeOut();
jQuery(‘.portfolio-two .portfolio-wrapper, .portfolio-three .portfolio-wrapper, .portfolio-four .portfolio-wrapper’).isotope({
// options
itemSelector: ‘.portfolio-item’,
layoutMode: ‘fitRows’,
transformsEnabled: false
});
jQuery(‘[data-spy=”scroll”]’).each(function () {
var $spy = jQuery(this).scrollspy(‘refresh’);
});
});
var masonryContainer = jQuery(‘.portfolio-masonry .portfolio-wrapper’);
imagesLoaded(masonryContainer, function() {
jQuery(‘.portfolio-wrapper’).fadeIn();
jQuery(‘.portfolio-tabs’).fadeIn();
jQuery(‘.loading-container’).fadeOut();
var gridTwo = masonryContainer.parent().hasClass(‘portfolio-grid-2’);
var columns;
if(gridTwo) {
columns = 2;
} else {
columns = 3;
}
masonryContainer.isotope({
// options
itemSelector: ‘.portfolio-item’,
layoutMode: ‘masonry’,
transformsEnabled: false,
masonry: { columnWidth: masonryContainer.width() / columns }
});
jQuery(‘[data-spy=”scroll”]’).each(function () {
var $spy = jQuery(this).scrollspy(‘refresh’);
});
});
}
if(jQuery().flexslider) {
var avada_ytplayer;
jQuery(‘.full-video, .video-shortcode, .wooslider .slide-content’).not(‘#bbpress-forums full-video, #bbpress-forums .video-shortcode, #bbpress-forums .wooslider .slide-content’).fitVids();
jQuery(‘#bbpress-forums’).fitVids();
if(jQuery(‘.tfs-slider’).length >= 1) {
//jQuery(‘.tfs-slider’).flexslider(‘destroy’);
jQuery(‘.tfs-slider’).flexslider({
animation: “fade”,
slideshow: true,
slideshowSpeed: 7000,
animationSpeed: 600,
smoothHeight: true,
pauseOnHover: false,
useCSS: false,
video: true,
start: function(slider) {
if(typeof(slider.slides) !== ‘undefined’ && slider.slides.eq(slider.currentSlide).find(‘iframe’).length !== 0) {
jQuery(slider).find(‘.flex-control-nav’).hide();
} else {
jQuery(slider).find(‘.flex-control-nav’).show();
}
},
before: function(slider) {
if(slider.slides.eq(slider.currentSlide).find(‘iframe’).length !== 0) {
/* —————— YOUTUBE FOR AUTOSLIDER —————— */
playVideoAndPauseOthers(slider);
}
},
after: function(slider) {
if(slider.slides.eq(slider.currentSlide).find(‘iframe’).length !== 0) {
jQuery(slider).find(‘.flex-control-nav’).hide();
} else {
jQuery(slider).find(‘.flex-control-nav’).show();
}
jQuery(‘[data-spy=”scroll”]’).each(function () {
var $spy = jQuery(this).scrollspy(‘refresh’);
});
}
});
}
if(js_local_vars.page_smoothHeight === ‘false’) {
page_smoothHeight = false;
} else {
page_smoothHeight = true;
}
jQuery(‘.grid-layout .flexslider’).flexslider({
slideshow: true,
slideshowSpeed: 7000,
video: true,
smoothHeight: page_smoothHeight,
pauseOnHover: false,
useCSS: false,
start: function(slider) {
if (typeof(slider.slides) !== ‘undefined’ && slider.slides.eq(slider.currentSlide).find(‘iframe’).length !== 0) {
jQuery(slider).find(‘.flex-control-nav’).hide();
} else {
jQuery(slider).find(‘.flex-control-nav’).show();
}
},
before: function(slider) {
if (slider.slides.eq(slider.currentSlide).find(‘iframe’).length !== 0) {
/* —————— YOUTUBE FOR AUTOSLIDER —————— */
playVideoAndPauseOthers(slider);
}
},
after: function(slider) {
if (slider.slides.eq(slider.currentSlide).find(‘iframe’).length !== 0) {
jQuery(slider).find(‘.flex-control-nav’).hide();
} else {
jQuery(slider).find(‘.flex-control-nav’).show();
}
jQuery(‘[data-spy=”scroll”]’).each(function () {
var $spy = jQuery(this).scrollspy(‘refresh’);
});
}
});
if(js_local_vars.flex_smoothHeight === ‘false’) {
flex_smoothHeight = false;
} else {
flex_smoothHeight = true;
}
jQuery(‘.flexslider’).flexslider({
slideshow: true,
slideshowSpeed: 7000,
video: true,
smoothHeight: flex_smoothHeight,
pauseOnHover: false,
useCSS: false,
start: function(slider) {
if (typeof(slider.slides) !== ‘undefined’ && slider.slides.eq(slider.currentSlide).find(‘iframe’).length !== 0) {
jQuery(slider).find(‘.flex-control-nav’).hide();
} else {
jQuery(slider).find(‘.flex-control-nav’).show();
}
},
before: function(slider) {
if(slider.slides.eq(slider.currentSlide).find(‘iframe’).length !== 0) {
/* —————— YOUTUBE FOR AUTOSLIDER —————— */
playVideoAndPauseOthers(slider);
}
},
after: function(slider) {
if (slider.slides.eq(slider.currentSlide).find(‘iframe’).length !== 0) {
jQuery(slider).find(‘.flex-control-nav’).hide();
} else {
jQuery(slider).find(‘.flex-control-nav’).show();
}
jQuery(‘[data-spy=”scroll”]’).each(function () {
var $spy = jQuery(this).scrollspy(‘refresh’);
});
}
});
function playVideoAndPauseOthers(slider) {
jQuery(slider).find(‘iframe’).each(function(i) {
var func = ‘stopVideo’;
this.contentWindow.postMessage(‘{“event”:”command”,”func”:”‘ + func + ‘”,”args”:””}’, ‘*’);
if(jQuery(this).is(‘:visible’) && jQuery(this).parents(‘li’).attr(‘data-autoplay’) == ‘yes’) {
this.contentWindow.postMessage(‘{“event”:”command”,”func”:”‘ + ‘playVideo’ + ‘”,”args”:””}’, ‘*’);
if(jQuery(this).parents(‘li’).attr(‘data-mute’) == ‘yes’) {
this.contentWindow.postMessage(‘{“event”:”command”,”func”:”‘ + ‘mute’ + ‘”,”args”:””}’, ‘*’);
}
}
});
}
/* —————— PREV & NEXT BUTTON FOR FLEXSLIDER (YOUTUBE) —————— */
jQuery(‘.flex-next, .flex-prev’).click(function() {
playVideoAndPauseOthers(jQuery(this).parents(‘.flexslider, .tfs-slider’));
});
function onPlayerStateChange(frame, slider) {
return function(event) {
if(event.data == YT.PlayerState.PLAYING) {
jQuery(slider).flexslider(“pause”);
}
if(event.data == YT.PlayerState.PAUSED) {
jQuery(slider).flexslider(“play”);
}
if(event.data == YT.PlayerState.BUFFERING) {
jQuery(slider).flexslider(“pause”);
}
}
}
}
if(jQuery().isotope) {
var gridwidth = (jQuery(‘.grid-layout’).width() / 2) – 22;
jQuery(‘.grid-layout .post’).css(‘width’, gridwidth);
jQuery(‘.grid-layout’).isotope({
layoutMode: ‘masonry’,
itemSelector: ‘.post’,
transformsEnabled: false,
masonry: {
columnWidth: gridwidth,
gutterWidth: 40
},
});
var gridwidth = (jQuery(‘.grid-full-layout-3’).width() / 3) – 30;
jQuery(‘.grid-full-layout-3 .post’).css(‘width’, gridwidth);
jQuery(‘.grid-full-layout-3’).isotope({
layoutMode: ‘masonry’,
itemSelector: ‘.post’,
transformsEnabled: false,
masonry: {
columnWidth: gridwidth,
gutterWidth: 40
},
});
var gridwidth = (jQuery(‘.grid-full-layout-4’).width() / 4) – 35;
jQuery(‘.grid-full-layout-4 .post’).css(‘width’, gridwidth);
jQuery(‘.grid-full-layout-4’).isotope({
layoutMode: ‘masonry’,
itemSelector: ‘.post’,
transformsEnabled: false,
masonry: {
columnWidth: gridwidth,
gutterWidth: 40
},
});
}
jQuery(‘.rev_slider_wrapper’).each(function() {
if(jQuery(this).length >=1 && jQuery(this).find(‘.tp-bannershadow’).length == 0) {
jQuery(‘
‘).appendTo(this);
jQuery(‘
‘).appendTo(this);
jQuery(this).addClass(‘avada-skin-rev’);
}
});
});
jQuery(document).ready(function() {
function onAfter(curr, next, opts, fwd) {
var $ht = jQuery(this).height();
//set the container’s height to that of the current slide
jQuery(this).parent().css(‘height’, $ht);
}
if(jQuery().cycle) {
jQuery(‘.reviews’).cycle({
fx: ‘fade’,
after: onAfter,
timeout: 4000 });
}
});
jQuery(window).load(function($) {
jQuery(‘.header-social .menu > li’).height(jQuery(‘.header-social’).height());
jQuery(‘.header-social .menu > li’).css(‘line-height’, jQuery(‘.header-social’).height()+’px’);
jQuery(‘.header-social .menu > li.cart’).css(‘line-height’, jQuery(‘.header-social’).height()+’px’);
if(jQuery(‘.top-menu .cart’).width() > 150) {
new_width = jQuery(‘.top-menu .cart’).width();
jQuery(‘.top-menu .cart-contents’).css(“width”, new_width+’px’);
new_width -= 26;
jQuery(‘.top-menu .cart-content a’).css(“width”, new_width+’px’);
new_width -= 56;
jQuery(‘.top-menu .cart-content a .cart-desc’).css(“width”, new_width+’px’);
};
/* wpml flag in center */
var wpml_flag = jQuery(‘ul#navigation > li > a > .iclflag’);
var wpml_h = wpml_flag.height();
wpml_flag.css(‘margin-top’, +wpml_h / – 2 + “px”);
if(jQuery().prettyPhoto) {
var ppArgs = {
animation_speed: ‘fast’,
overlay_gallery: false,
autoplay_slideshow: false,
slideshow: 5000,
opacity: 0.8,
show_title: true,
show_desc: true,
};
var ppArgsRelated = ppArgs;
jQuery(“a[rel^=’prettyPhoto’]”).prettyPhoto(ppArgs);
jQuery(‘.lightbox-enabled a’).has(‘img’).prettyPhoto(ppArgs);
var mediaQuery = ‘desk’;
if (Modernizr.mq(‘only screen and (max-width: 600px)’) || Modernizr.mq(‘only screen and (max-height: 520px)’)) {
mediaQuery = ‘mobile’;
jQuery(“a[rel^=’prettyPhoto’]”).unbind(‘click’);
jQuery(‘.lightbox-enabled a’).has(‘img’).unbind(‘click’);
}
// Disables prettyPhoto if screen small
jQuery(window).on(‘resize’, function() {
if ((Modernizr.mq(‘only screen and (max-width: 600px)’) || Modernizr.mq(‘only screen and (max-height: 520px)’)) && mediaQuery == ‘desk’) {
jQuery(“a[rel^=’prettyPhoto’]”).unbind(‘click.prettyphoto’);
jQuery(‘.lightbox-enabled a’).has(‘img’).unbind(‘click.prettyphoto’);
mediaQuery = ‘mobile’;
} else if (!Modernizr.mq(‘only screen and (max-width: 600px)’) && !Modernizr.mq(‘only screen and (max-height: 520px)’) && mediaQuery == ‘mobile’) {
jQuery(“a[rel^=’prettyPhoto’]”).prettyPhoto(ppArgs);
jQuery(‘.lightbox-enabled a’).has(‘img’).prettyPhoto(ppArgs);
mediaQuery = ‘desk’;
}
});
}
if( jQuery(‘.side-nav li’).length ) {
jQuery(‘.side-nav li’).hoverIntent({
over: function() {
if(jQuery(this).find(‘> .children’).length >= 1) {
jQuery(this).find(‘> .children’).stop(true, true).slideDown(‘slow’);
}
},
out: function() {
if(jQuery(this).find(‘.current_page_item’).length == 0 && jQuery(this).hasClass(‘current_page_item’) == false) {
jQuery(this).find(‘.children’).stop(true, true).slideUp(‘slow’);
}
},
timeout: 500
});
}
if(jQuery().eislideshow) {
jQuery(‘#ei-slider’).eislideshow({
animation: ‘sides’,
autoplay: true,
slideshow_interval: 3000,
speed: 800,
thumbMaxWidth: 150 });
}
var retina = window.devicePixelRatio > 1 ? true : false;
jQuery(‘#posts-container’).infinitescroll({
navSelector : “div.pagination”,
// selector for the paged navigation (it will be hidden)
nextSelector : “a.pagination-next”,
// selector for the NEXT link (to page 2)
itemSelector : “div.post, .timeline-date”,
// selector for all items you’ll retrieve
loading : {
finishedMsg: js_local_vars.infinite_blog_finished_msg,
msgText: js_local_vars.infinite_blog_text,
},
errorCallback: function() {
jQuery(‘#posts-container’).isotope(‘reLayout’);
}
}, function(posts) {
if(jQuery().isotope) {
//jQuery(posts).css(‘position’, ‘relative’).css(‘top’, ‘auto’).css(‘left’, ‘auto’);
jQuery(posts).hide();
imagesLoaded(posts, function() {
jQuery(posts).fadeIn();
jQuery(‘#posts-container’).isotope(‘appended’, jQuery(posts));
jQuery(‘#posts-container’).isotope(‘reLayout’);
jQuery(‘[data-spy=”scroll”]’).each(function () {
var $spy = jQuery(this).scrollspy(‘refresh’);
});
});
var gridwidth = (jQuery(‘.grid-layout’).width() / 2) – 22;
jQuery(‘.grid-layout .post’).css(‘width’, gridwidth);
var gridwidth = (jQuery(‘.grid-full-layout-3’).width() / 3) – 30;
jQuery(‘.grid-full-layout-3 .post’).css(‘width’, gridwidth);
var gridwidth = (jQuery(‘.grid-full-layout-4’).width() / 4) – 35;
jQuery(‘.grid-full-layout-4 .post’).css(‘width’, gridwidth);
jQuery(‘#posts-container’).isotope(‘reLayout’);
}
jQuery(‘.flexslider’).flexslider({
slideshow: true,
slideshowSpeed: 7000,
video: true,
pauseOnHover: false,
useCSS: false,
start: function(slider) {
if (typeof(slider.slides) !== ‘undefined’ && slider.slides.eq(slider.currentSlide).find(‘iframe’).length !== 0) {
jQuery(slider).find(‘.flex-control-nav’).hide();
} else {
jQuery(slider).find(‘.flex-control-nav’).show();
}
},
before: function(slider) {
if (slider.slides.eq(slider.currentSlide).find(‘iframe’).length !== 0) {
/* —————— YOUTUBE FOR AUTOSLIDER —————— */
playVideoAndPauseOthers(slider);
}
},
after: function(slider) {
if (slider.slides.eq(slider.currentSlide).find(‘iframe’).length !== 0) {
jQuery(slider).find(‘.flex-control-nav’).hide();
} else {
jQuery(slider).find(‘.flex-control-nav’).show();
}
jQuery(‘[data-spy=”scroll”]’).each(function () {
var $spy = jQuery(this).scrollspy(‘refresh’);
});
}
});
if(jQuery().prettyPhoto) { jQuery(“a[rel^=’prettyPhoto’]”).prettyPhoto(ppArgs); }
jQuery(posts).each(function() {
jQuery(this).find(‘.full-video, .video-shortcode, .wooslider .slide-content’).fitVids();
});
if(jQuery().isotope) {
jQuery(‘#posts-container’).isotope(‘reLayout’);
}
});
jQuery(‘#posts-container-infinite’).infinitescroll({
navSelector : “div.pagination”,
// selector for the paged navigation (it will be hidden)
nextSelector : “a.pagination-next”,
// selector for the NEXT link (to page 2)
itemSelector : “div.post, .timeline-date”,
// selector for all items you’ll retrieve
loading : {
finishedMsg: js_local_vars.infinite_blog_finished_msg,
msgText: js_local_vars.infinite_blog_text,
},
errorCallback: function() {
jQuery(‘#posts-container’).isotope(‘reLayout’);
}
}, function(posts) {
if(jQuery().isotope) {
//jQuery(posts).css(‘top’, ‘auto’).css(‘left’, ‘auto’);
jQuery(posts).hide();
imagesLoaded(posts, function() {
jQuery(posts).fadeIn();
jQuery(‘#posts-container-infinite’).isotope(‘appended’, jQuery(posts));
jQuery(‘#posts-container-infinite’).isotope(‘reLayout’);
jQuery(‘[data-spy=”scroll”]’).each(function () {
var $spy = jQuery(this).scrollspy(‘refresh’);
});
});
var gridwidth = (jQuery(‘.grid-layout’).width() / 2) – 22;
jQuery(‘.grid-layout .post’).css(‘width’, gridwidth);
var gridwidth = (jQuery(‘.grid-full-layout-3’).width() / 3) – 30;
jQuery(‘.grid-full-layout-3 .post’).css(‘width’, gridwidth);
var gridwidth = (jQuery(‘.grid-full-layout-4’).width() / 4) – 35;
jQuery(‘.grid-full-layout-4 .post’).css(‘width’, gridwidth);
jQuery(‘#posts-container-infinite’).isotope(‘reLayout’);
}
jQuery(‘.flexslider’).flexslider({
slideshow: true,
slideshowSpeed: 7000,
video: true,
pauseOnHover: false,
useCSS: false,
start: function(slider) {
if (typeof(slider.slides) !== ‘undefined’ && slider.slides.eq(slider.currentSlide).find(‘iframe’).length !== 0) {
jQuery(slider).find(‘.flex-control-nav’).hide();
} else {
jQuery(slider).find(‘.flex-control-nav’).show();
}
},
before: function(slider) {
if (slider.slides.eq(slider.currentSlide).find(‘iframe’).length !== 0) {
/* —————— YOUTUBE FOR AUTOSLIDER —————— */
playVideoAndPauseOthers(slider);
}
},
after: function(slider) {
if (slider.slides.eq(slider.currentSlide).find(‘iframe’).length !== 0) {
jQuery(slider).find(‘.flex-control-nav’).hide();
} else {
jQuery(slider).find(‘.flex-control-nav’).show();
}
jQuery(‘[data-spy=”scroll”]’).each(function () {
var $spy = jQuery(this).scrollspy(‘refresh’);
});
}
});
if(jQuery().prettyPhoto) { jQuery(“a[rel^=’prettyPhoto’]”).prettyPhoto(ppArgs); }
jQuery(posts).each(function() {
jQuery(this).find(‘.full-video, .video-shortcode, .wooslider .slide-content’).fitVids();
});
if(jQuery().isotope) {
jQuery(‘#posts-container-infinite’).isotope(‘reLayout’);
}
});
});
// ]]>