').appendTo(this);
jQuery('
').appendTo(this);
jQuery(this).addClass('avada-skin-rev');
}
});
jQuery('.tparrows').each(function() {
if(jQuery(this).css('visibility') == 'hidden') {
jQuery(this).remove();
}
});
});
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,
});
}
});
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');
if(jQuery().prettyPhoto) {
var ppArgs = {
animation_speed: 'normal',
overlay_gallery: true,
autoplay_slideshow: false,
show_title: false,
show_desc: false,
social_tools: "", };
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';
}
});
}
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: false,
});
}
var retina = window.devicePixelRatio > 1 ? true : false;
/* wpml flag in center */
var wpml_flag = jQuery('ul#nav > li > a > .iclflag');
var wpml_h = wpml_flag.height();
wpml_flag.css('margin-top', +wpml_h / - 2 + "px");
var wpml_flag = jQuery('.top-menu > ul > li > a > .iclflag');
var wpml_h = wpml_flag.height();
wpml_flag.css('margin-top', +wpml_h / - 2 + "px");
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",
// selector for all items you'll retrieve
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');
});
var gridwidth = (jQuery('.grid-layout').width() / 2) - 22;
jQuery('.grid-layout .post').css('width', gridwidth);
var gridwidth = (jQuery('.grid-full-layout').width() / 3) - 30;
jQuery('.grid-full-layout .post').css('width', gridwidth);
jQuery('#posts-container-infinite').isotope('reLayout');
}
jQuery('.flexslider').flexslider({
slideshow: false,
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();
YT_ready(function() {
new YT.Player(slider.slides.eq(slider.currentSlide).find('iframe').attr('id'), {
events: {
'onStateChange': onPlayerStateChange(slider.slides.eq(slider.currentSlide).find('iframe').attr('id'), slider)
}
});
});
} else {
jQuery(slider).find('.flex-control-nav').show();
}
},
before: function(slider) {
if (slider.slides.eq(slider.currentSlide).find('iframe').length !== 0) {
$f(slider.slides.eq(slider.currentSlide).find('iframe').attr('id') ).api('pause');
YT_ready(function() {
new YT.Player(slider.slides.eq(slider.currentSlide).find('iframe').attr('id'), {
events: {
'onStateChange': onPlayerStateChange(slider.slides.eq(slider.currentSlide).find('iframe').attr('id'), slider)
}
});
});
/* ------------------ 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();
YT_ready(function() {
new YT.Player(slider.slides.eq(slider.currentSlide).find('iframe').attr('id'), {
events: {
'onStateChange': onPlayerStateChange(slider.slides.eq(slider.currentSlide).find('iframe').attr('id'), slider)
}
});
});
} else {
jQuery(slider).find('.flex-control-nav').show();
}
}
});
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');
}
});
});