;var ThemifyBuilderModuleJs; (function($, window, document, undefined) { ThemifyBuilderModuleJs = { wow: null, init: function() { this.bindEvents(); if(tbLocalScript.isTouch) { $('body').addClass('builder-is-touch'); } }, bindEvents: function() { var self = ThemifyBuilderModuleJs; this.hackWOW(); $(document).ready(function(){ self.accordion(); self.tabs(); self.animationOnScroll(); self.wow = new WOW(); self.wow.init(); if(tbLocalScript.isTouch) return; // put code for mobile on }); $(window).load(function(){ self.carousel(); self.tabsDeepLink(); self.animatedBackground(); if ( tbLocalScript.isTouch ) { self.fullheight(); return; } self.fullwidthVideo(); self.backgroundScrolling(); self.charts(); }); $(window).bind( 'hashchange', function(){ self.tabsDeepLink(); } ); }, loadOnAjax: function() { ThemifyBuilderModuleJs.accordion(); ThemifyBuilderModuleJs.tabs(); ThemifyBuilderModuleJs.carousel(); ThemifyBuilderModuleJs.charts(); }, fullheight: function() { // Set full-height rows to viewport height if ( navigator.userAgent.match(/(iPad)/g) ) { var didResize = false, selector = '.themify_builder_row.fullheight'; $(window).resize(function() { didResize = true; }); setInterval(function() { if ( didResize ) { didResize = false; $(selector).each(function(){ $(this).css({ 'height': $(window).height() }); }); } }, 250); } }, // Animated Color Background animatedBackground: function(){ if ( 'undefined' !== typeof $.fn.animatedBG && 'object' === typeof themifyScript ) { if ( ( 'string' === typeof themifyScript.colorAnimationSet && 'string' === typeof themifyScript.colorAnimationSpeed ) && ( '' != themifyScript.colorAnimationSet && '' != themifyScript.colorAnimationSpeed ) ) { $('.themify_builder_row.animated-bg').animatedBG({ colorSet: themifyScript.colorAnimationSet.split(','), speed: parseInt( themifyScript.colorAnimationSpeed, 10 ) }); } } }, // Fullwidth video background fullwidthVideo: function(){ if ( typeof $.BigVideo !== 'undefined' ) { var $videos = $('.themify_builder_row[data-fullwidthvideo]'), fwvideos = []; $.each($videos, function (i, elm) { fwvideos[i] = new $.BigVideo({ useFlashForFirefox: true, container: $(elm).find('.row_inner'), id: i }); fwvideos[i].init(); fwvideos[i].show($(elm).data('fullwidthvideo'), { doLoop : true }); }); } }, accordion: function() { $('.module.module-accordion').themify_accordion(); }, charts: function() { $('.module-feature .chart').each(function(){ var $self = $(this), barColor = $self.data('color'), percent = $self.data('percent'); if( typeof barColor !== 'undefined' ) { $self.easyPieChart( { 'percent' : percent, 'barColor' : barColor, 'trackColor' : $self.data('trackcolor'), 'scaleColor' : $self.data('scalecolor'), 'lineCap' : $self.data('linecap'), 'rotate' : $self.data('rotate'), 'size' : $self.data('size'), 'lineWidth' : $self.data('linewidth'), 'animate' : $self.data('animate') } ); $self.data('easyPieChart').update(0); if( typeof $.waypoints !== 'undefined' && themifyScript.transitionEffect ) { $self.waypoint(function(direction){ $self.data('easyPieChart').update(percent); }, {offset: '80%'}); $self.waypoint(function(direction){ if(direction === 'up') { $self.data('easyPieChart').update(0); } }, {offset: '92%'}); } else { $self.data('easyPieChart').update(percent); } } }); }, tabs: function() { $(".module.module-tab").each(function(){ $height = $(".tab-nav", this).outerHeight(); if($height > 200) { $(".tab-content", this).css('min-height', $height); } }); $(".module.module-tab").tabify(); }, tabsDeepLink: function() { if( $( window.location.hash + '.tab-content' ).length > 0 ) { var cons = 100; $( 'a[href=' + window.location.hash + ']' ).click(); $( 'html, body' ).animate( { scrollTop: ( $( window.location.hash ).closest( '.module-tab' ).offset().top - cons ) }, 1000 ); } }, carousel: function() { $('.themify_builder_slider').each(function(){ var $this = $(this), $args = { responsive: true, circular: true, infinite: true, height: 'auto', items: { visible: { min: 1, max: $this.data('visible') }, width: 150 }, onCreate: function( items ) { var heights = []; $('.themify_builder_slider_wrap').css({'visibility':'visible', 'height':'auto'}); $.each( items, function() { heights.push( $(this).outerHeight() ); }); $( '.caroufredsel_wrapper, .themify_builder_slider, .themify_builder_slider li', $this ).outerHeight( Math.max.apply( Math, heights ) ); $('.themify_builder_slider_loader').remove(); } }; if($this.closest('.themify_builder_slider_wrap').find('.caroufredsel_wrapper').length > 0) { return; } // fix the one slide problem if($this.children().length < 2) { $('.themify_builder_slider_wrap').css({'visibility':'visible', 'height':'auto'}); $('.themify_builder_slider_loader').remove(); $(window).resize(); return; } // Auto if(parseInt($this.data('auto-scroll')) > 0) { $args.auto = { play: true, pauseDuration: parseInt($this.data('auto-scroll') * 1000) }; } else if($this.data('effect') !== 'continuously' && ( typeof $this.data('auto-scroll') !== 'undefined' || parseInt($this.data('auto-scroll')) == 0 ) ){ $args.auto = false; } // Scroll if($this.data('effect') == 'continuously'){ if(typeof $args.auto !== 'undefined'){ delete $args.auto; } var speed = $this.data('speed'), duration; if ( speed == .5 ) { duration = 0.10; } else if ( speed == 4 ) { duration = 0.04; } else { duration = 0.07; } $args.auto = { pauseDuration: 0 }; $args.align = false; $args.scroll = { delay: 1000, easing: 'linear', items: $this.data('scroll'), duration: duration, timeoutDuration: 0, pauseOnHover: $this.data('pause-on-hover') }; } else { $args.scroll = { items: $this.data('scroll'), wipe: true, pauseOnHover: $this.data('pause-on-hover'), duration: parseInt($this.data('speed') * 1000), fx: $this.data('effect') } } if($this.data('arrow') == 'yes') { $args.prev = '#' + $this.data('id') + ' .carousel-prev'; $args.next = '#' + $this.data('id') + ' .carousel-next'; } if($this.data('pagination') == 'yes') { $args.pagination = { container: '#' + $this.data('id') + ' .carousel-pager' }; } if($this.data('wrapper') == 'no') { $args.wrapper = { element: false } } $this.carouFredSel($args); }); }, request: 0, initialize: function(address, num, zoom, type, scroll, drag) { var delay = this.request++ * 500; setTimeout( function(){ var geo = new google.maps.Geocoder(), latlng = new google.maps.LatLng(-34.397, 150.644), mapOptions = { 'zoom': zoom, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP, scrollwheel: scroll, draggable: drag }; switch( type.toUpperCase() ) { case 'ROADMAP': mapOptions.mapTypeId = google.maps.MapTypeId.ROADMAP; break; case 'SATELLITE': mapOptions.mapTypeId = google.maps.MapTypeId.SATELLITE; break; case 'HYBRID': mapOptions.mapTypeId = google.maps.MapTypeId.HYBRID; break; case 'TERRAIN': mapOptions.mapTypeId = google.maps.MapTypeId.TERRAIN; break; } var map = new google.maps.Map( document.getElementById( 'themify_map_canvas_' + num ), mapOptions ); geo.geocode( { 'address': address}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { map.setCenter(results[0].geometry.location); var marker = new google.maps.Marker({ map: map, position: results[0].geometry.location }); } }); }, delay ); }, backgroundScrolling: function() { $('.builder-parallax-scrolling').each(function(){ $(this).builderParallax('50%', 0.1); }); }, animationOnScroll: function() { var self = ThemifyBuilderModuleJs; if(!self.supportTransition()) return; $('body').addClass('animation-on') .on('builder_toggle_frontend', function(event, is_edit){ self.doAnimation(); }); self.doAnimation(); }, doAnimation: function(){ // On scrolling animation var self = ThemifyBuilderModuleJs, selectors = tbLocalScript.animationInviewSelectors, iterate = 0, animateEnd, $body = $('body'), $overflow = $('body'); if(!self.supportTransition()) return; if ( $body.find(selectors).length > 0 ) { if( !$overflow.hasClass('animation-running')){ $overflow.addClass('animation-running'); } } else { if( $overflow.hasClass('animation-running')){ $overflow.removeClass('animation-running'); } } $.each(selectors, function(i,selector){ $(selector).addClass('wow'); }); }, supportTransition: function() { var b = document.body || document.documentElement, s = b.style, p = 'transition'; if (typeof s[p] == 'string') { return true; } // Tests for vendor specific prop var v = ['Moz', 'webkit', 'Webkit', 'Khtml', 'O', 'ms']; p = p.charAt(0).toUpperCase() + p.substr(1); for (var i=0; i', {class: 'wow'}).appendTo($('body')); } }; // Initialize ThemifyBuilderModuleJs.init(); }(jQuery, window, document)); /* playback timings (ms): LoadShardBlock: 177.939 (3) esindex: 0.01 captures_list: 207.003 CDXLines.iter: 11.903 (3) PetaboxLoader3.datanode: 200.133 (4) exclusion.robots.fetch: 0.261 (2) exclusion.robots: 1.139 exclusion.robots.policy: 0.332 RedisCDXSource: 12.194 PetaboxLoader3.resolve: 438.439 load_resource: 533.043 */