function insertParam(url, parameterName, parameterValue, atStart){ replaceDuplicates = true; if(url.indexOf('#') > 0){ var cl = url.indexOf('#'); urlhash = url.substring(url.indexOf('#'),url.length); } else { urlhash = ''; cl = url.length; } sourceUrl = url.substring(0,cl); var urlParts = sourceUrl.split("?"); var newQueryString = ""; if (urlParts.length > 1) { var parameters = urlParts[1].split("&"); for (var i=0; (i < parameters.length); i++) { var parameterParts = parameters[i].split("="); if (!(replaceDuplicates && parameterParts[0] == parameterName)) { if (newQueryString == "") { newQueryString = "?" + parameterParts[0] + "=" + (parameterParts[1]?parameterParts[1]:''); } else { newQueryString += "&"; newQueryString += parameterParts[0] + "=" + (parameterParts[1]?parameterParts[1]:''); } } } } if (newQueryString == "") newQueryString = "?"; if(atStart){ newQueryString = '?'+ parameterName + "=" + parameterValue + (newQueryString.length>1?'&'+newQueryString.substring(1):''); } else { if (newQueryString !== "" && newQueryString != '?') newQueryString += "&"; newQueryString += parameterName + "=" + (parameterValue?parameterValue:''); } return urlParts[0] + newQueryString + urlhash; }; function ytVidId(url) { var p = /^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/; return (url.match(p)) ? RegExp.$1 : false; //return (url.match(p)) ? true : false; } jQuery(document).ready(function() { jQuery('.portfolio-wrapper').hide(); jQuery('.portfolio-tabs ').hide(); jQuery('.faq-tabs ').hide(); if(jQuery('.portfolio').length >= 1) { jQuery('#content').append('
Loading...
'+js_local_vars.portfolio_loading_text+'
'); } if(jQuery('.faqs').length >= 1) { jQuery('#content').append('
Loading...
'+js_local_vars.faqs_loading_text+'
'); } var iframes = jQuery('iframe'); jQuery.each(iframes, function(i, v) { var src = jQuery(this).attr('src'); if(src) { if(src.indexOf('vimeo') >= 1) { jQuery(this).attr('id', 'player_'+(i+1)); var new_src = insertParam(src, 'api', '1', false); var new_src_2 = insertParam(new_src, 'player_id', 'player_'+(i+1), false); jQuery(this).attr('src', new_src_2); } if(ytVidId(src)) { jQuery(this).parent().wrap(''); window.yt_vid_exists = 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 }); }); 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 }); }); 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 } }); }); } if(jQuery().flexslider) { var avada_ytplayer; if(window.yt_vid_exists == true) { var tag = document.createElement('script'); tag.src = "https://www.youtube.com/iframe_api"; var firstScriptTag = document.getElementsByTagName('script')[0]; firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); function getFrameID(id){ var elem = document.getElementById(id); if (elem) { if(/^iframe$/i.test(elem.tagName)) return id; //Frame, OK // else: Look for frame var elems = elem.getElementsByTagName("iframe"); if (!elems.length) return null; //No iframe found, FAILURE for (var i=0; i= 1) { //jQuery('.tfs-slider').flexslider('destroy'); jQuery('.tfs-slider').flexslider({ animation: "fade", slideshow: false, 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(); if(window.yt_vid_exists == true) { 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')[0] ).api('pause'); if(window.yt_vid_exists == true) { 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(); if(window.yt_vid_exists == true) { 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(js_local_vars.page_smoothHeight === 'false') { page_smoothHeight = false; } else { page_smoothHeight = true; } jQuery('.grid-layout .flexslider').flexslider({ slideshow: false, 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(); if(window.yt_vid_exists == true) { 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')[0] ).api('pause'); if(window.yt_vid_exists == true) { 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(); if(window.yt_vid_exists == true) { 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(js_local_vars.flex_smoothHeight === 'false') { flex_smoothHeight = false; } else { flex_smoothHeight = true; } jQuery('.flexslider').flexslider({ slideshow: false, 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(); if(window.yt_vid_exists == true) { 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')[0] ).api('pause'); if(window.yt_vid_exists == true) { 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(); if(window.yt_vid_exists == true) { 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(); } } }); function playVideoAndPauseOthers(slider) { jQuery(slider).find('iframe').each(function(i) { var func = 'stopVideo'; this.contentWindow.postMessage('{"event":"command","func":"' + func + '","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(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('.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'); 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'); }; if(jQuery().prettyPhoto) { var ppArgs = { overlay_gallery: false, 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({ autoplay: false, }); } var retina = window.devicePixelRatio > 1 ? true : false; /* 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"); 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");
Fatal error: Call to undefined function is_page_template() in /home/oessuppl/public_html/wp-content/themes/Avada/framework/dynamic_js.php on line 773