1(function($){ 2 "use strict"; 3/* GLOBAL VARIABLES - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 4 var $window = $(window), tlg_nav_fixed = false, tlg_nav, tlg_nav_height, tlg_first_section_height, tlg_top_offset = 0; 5/* EQUAL HEIGHT - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 6 var tlg_content_heights = function() { 7 var w = jQuery(window).width(); 8 jQuery('.row.equal-height, .vc_row.equal-height').each(function() { 9 if ( w > 768 ) { 10 jQuery(this).find( '.row >.wpb_column >.vc_column-inner' ).equalHeights(); 11 } else { 12 jQuery(this).find( '.row >.wpb_column >.vc_column-inner' ).equalHeightsRemove(); 13 } 14 }); 15 jQuery('.metro-grid .products').each(function() { 16 if ( w > 768 ) { 17 jQuery(this).find( '.product' ).equalHeights(); 18 } else { 19 jQuery(this).find( '.product' ).equalHeightsRemove(); 20 } 21 }); 22 }; 23 $window.on( 'load resize', tlg_content_heights ); 24 $window.one( 'scroll', tlg_content_heights ); 25 jQuery(window).resize(function() { 26 tlg_vc_spacer(); 27 tlg_megamenu(); 28 tlg_content_heights(); 29 }); 30 jQuery(window).load(function() { 31/* PRELOADER - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 32 if ( jQuery( '#tlg_preloader' ).length ) { 33 jQuery( 'body' ).removeClass( 'loading' ); 34 tlg_preloader(); 35 } 36/* MANSORY - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 37 if ( jQuery( '.masonry' ).length ) { 38 var mans = document.querySelectorAll('.masonry'), i; 39 for (i = 0; i < mans.length; ++i) { 40 var container = mans[i]; 41 var masonry_init = new Masonry(container, { itemSelector: '.masonry-item', isResizable : true }); 42 masonry_init.on( 'layoutComplete', function() { 43 jQuery( '.masonry' ).addClass( 'fadeIn' ); 44 jQuery( '.masonry-loader' ).addClass( 'fadeOut' ); 45 if (jQuery( '.masonry-show' ).length) { 46 tlg_masonry_show(); 47 } 48 }); 49 masonry_init.layout(); 50 } 51 } 52/* PROJECT FILTER - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 53 jQuery('.project-content').each(function() { 54 var $grid = jQuery(this); 55 var $gridID = jQuery(this).attr('id'); 56 $grid.isotope({ 57 itemSelector: '.project', 58 percentPosition: true, 59 masonry: {columnWidth : '.grid-sizer'} 60 }); 61 jQuery(document).on('click', "ul[data-project-id='"+$gridID+"'] li", function(e) { 62 e.preventDefault(); 63 $grid.addClass('is_fillter'); 64 jQuery("ul[data-project-id='"+$gridID+"'] li").removeClass('active'); 65 jQuery(this).addClass('active'); 66 $grid.isotope({ 67 filter: jQuery(this).attr('data-group'), 68 itemSelector: '.project', 69 percentPosition: true, 70 masonry: {columnWidth : '.grid-sizer'} 71 }); 72 }); 73 }); 74 }); 75 jQuery(document).ready(function() { 76/* NAVIGATION - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 77 tlg_nav = jQuery('body .nav-container nav:first'); 78 jQuery('.nav-container').addClass('visible'); 79 jQuery('.mega-menu ul').removeClass('menu').unwrap().unwrap().unwrap().wrap('<li />'); 80 if (!jQuery('nav').hasClass('fixed') && !jQuery('nav').hasClass('absolute')) { 81 jQuery('.nav-container').css('min-height', jQuery('nav').outerHeight(true)); 82 jQuery(window).resize(function() { 83 84 jQuery('.nav-container').css('min-height', jQuery('nav').outerHeight(true)); 85 }); 86 if (jQuery(window).width() > 768) { 87 jQuery('.parallax:nth-of-type(1) .background-content').css('top', -(jQuery('nav').outerHeight(true)*2)); 88 jQuery('.fullscreen.parallax.header-single:nth-of-type(1) .background-content').css('top', -jQuery('nav').outerHeight(true)); 89 jQuery('section.fullscreen:nth-of-type(1)').css('height', (jQuery(window).height() - jQuery('nav').outerHeight(true))); 90 } 91 } else { 92 jQuery('body').addClass('menu-overlay'); 93 var firstProjectParallax = jQuery('section.image-bg.parallax.project-parallax:nth-of-type(1) .background-content'); 94 if (firstProjectParallax.length == 1) { 95 var firstProjectOffset = firstProjectParallax.offset(); 96 firstProjectParallax.css('top', -(firstProjectOffset.top/2 + jQuery('nav').outerHeight(true)*2)); 97 } 98 } 99 if (jQuery(window).width() > 768) { 100 jQuery('#home + .vc_row.parallax .background-content').css('top', -(jQuery('nav').outerHeight(true)*2)); 101 jQuery('.wpb_wrapper').each(function() { 102 var backgroundContent = jQuery(this).find('section.fullscreen.parallax .background-content'); 103 if (backgroundContent.length == 1) { 104 var parallaxOffset = backgroundContent.offset(); 105 backgroundContent.css('top', -parallaxOffset.top/2); 106 } 107 }); 108 jQuery( '.mega-menu, .subnav' ).mouseover(function() { 109 jQuery( this ).parents( '.menu > .menu-item' ).addClass( 'current-hover' ); 110 }).mouseout(function() { 111 jQuery( '.menu-item' ).removeClass( 'current-hover' ); 112 }); 113 } 114 tlg_megamenu(); 115 if (jQuery(window).width() > 990) { 116 var didScroll = false;
117 $(window).scroll(function() { 118 didScroll = true; 119 }); 120 setInterval(function() { 121 if ( didScroll ) { 122 didScroll = false; 123 tlg_update_nav(); 124 } 125 }, 250); 126 window.addEventListener( "scroll", tlg_update_nav, false ); 127 } 128 jQuery('.nav-container:not(.full-menu) .menu > li > ul').each(function() { 129 var menu = jQuery(this).offset(); 130 var menuright = menu.left + jQuery(this).outerWidth(true); 131 if (menuright > jQuery(window).width() && !jQuery(this).hasClass('mega-menu')) { 132 jQuery(this).addClass('right-0'); 133 } else if (menuright > jQuery(window).width() && jQuery(this).hasClass('mega-menu')) { 134 if (jQuery(window).width() > 990 && jQuery('body').hasClass('frame-layout')) { 135 jQuery(this).css('margin-left', -(jQuery(this).outerWidth(true) - jQuery(window).width() + menu.left + 82)); 136 } else { 137 jQuery(this).css('margin-left', -(jQuery(this).outerWidth(true) - jQuery(window).width() + menu.left + 44)); 138 } 139 } 140 }); 141 if (jQuery('nav .menu-item').hasClass('menu-item-btn')) { 142 jQuery( '.nav-bar' ).addClass( 'nav-full' ); 143 } 144/* MOBILE NAVIGATION - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 145 jQuery(document).on('click', '.mobile-toggle', function(e) { 146 jQuery('.nav-bar').toggleClass('nav-open'); 147 jQuery(this).toggleClass('active'); 148 if (!tlg_nav_fixed) { 149 tlg_nav_fixed = true; tlg_nav.addClass('fixed'); 150 } else { 151 tlg_nav_fixed = false; tlg_nav.removeClass('fixed'); 152 } 153 }); 154 jQuery(document).on('click', '.module.widget-wrap:not(.no-toggle)', function(e) { 155 jQuery(this).toggleClass('toggle-widget-wrap'); 156 }); 157 jQuery(document).on('click', '.module.widget-wrap .search a', function(e) { 158 e.preventDefault(); 159 }); 160 jQuery(document).on('click', '.search-widget-wrap .search-form input', function(e) { 161 if (!e) e = window.event; e.stopPropagation(); 162 }); 163/* OFFCANVAS NAVIGATION - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 164 if(jQuery('.offcanvas-toggle').length) jQuery('body').addClass('has-offcanvas-nav'); 165 else jQuery('body').removeClass('has-offcanvas-nav'); 166 jQuery(document).on('click', '.offcanvas-toggle', function(e) { 167 jQuery('.main-container').toggleClass('offcanvas-show'); 168 jQuery('nav').toggleClass('offcanvas-show'); 169 jQuery('.offcanvas-container').toggleClass('offcanvas-show'); 170 }); 171 jQuery(document).on('click', '.main-container', function(e) { 172 if(jQuery(this).hasClass('offcanvas-show')) { 173 jQuery(this).removeClass('offcanvas-show'); 174 jQuery('.offcanvas-container').removeClass('offcanvas-show'); 175 jQuery('nav').removeClass('offcanvas-show'); 176 } 177 }); 178 jQuery(document).on('click', '.offcanvas-container .close-nav a', function(e) { 179 e.preventDefault(); 180 jQuery('.offcanvas-container').removeClass('offcanvas-show'); 181 jQuery('.main-container').removeClass('offcanvas-show'); 182 jQuery('nav').removeClass('offcanvas-show'); 183 }); 184/* VERTICAL NAVIGATION - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 185 jQuery('.vertical-menu .menu-item.has-dropdown > a').after('<i class="ti-angle-right"></i>'); 186 jQuery('.vertical-menu').on('click', '.menu-item a[href="#"], .menu-item i', function(e) { 187 e.preventDefault(); 188 jQuery(this).parent( '.menu-item' ).toggleClass( 'subnav-show' ).find( '.subnav:first' ).slideToggle( "slow" ); 189 }); 190 if(jQuery('.side-menu').length) { 191 jQuery('.side-menu').mCustomScrollbar({ theme:"minimal-dark", mouseWheelPixels: 250 }); 192 } 193 if(jQuery('.offcanvas-container').length) { 194 jQuery('.offcanvas-container').mCustomScrollbar({ theme:"minimal-dark", mouseWheelPixels: 250 }); 195 } 196/* ONEPAGE NAVIGATION - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 197 jQuery(document).on('click', '.menu-item a[href*="#"]:not([href="#"])', function(e) { 198 if ( jQuery("section[id*=" + this.hash.substring(1) + "]").length > 0 || jQuery("div[id*=" + this.hash.substring(1) + "]").length > 0 ) { 199 jQuery('.current-menu').removeClass('current-menu'); 200 jQuery(this).parent('li').addClass('current-menu'); 201 }else{ 202 jQuery('.current-menu').removeClass('.current-menu'); 203 } 204 }); 205/* HEADER SLIDE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 206 setTimeout(function() { 207 jQuery('.header-single > .container, .header-slider > .container').each(function() { 208 jQuery(this).addClass('visible'); 209 }); 210 jQuery('.shop-carousel, .shop-carousel-rtl, .blog-carousel, .blog-carousel-rtl, .post-slider, .carousel-padding-item, .carousel-padding-item-rtl, .carousel-padding, .carousel-padding-rtl').each(function() { 211 jQuery(this).addClass('visible'); 212 }); 213 }, 200); 214/* BACKGROUND IMAGE CONTENT - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 215 jQuery('.background-content').each(function() { 216 var imgSrc = jQuery(this).children('img').attr('src'); 217 jQuery(this).css({ 218 'background-image': 'url("' + imgSrc + '")', 219 'background-position': '50% 50%', 220 'background-size': 'cover' 221 }); 222 jQuery(this).children('img').hide(); 223 }); 224 setTimeout(function() { 225 jQuery('.background-content').each(function() { 226 jQuery(this).addClass('visible'); 227 }); 228 }, 200); 229/* VC ROW DEVIDER COLOR - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 230 jQuery('.row, .vc_row, .vc_column-inner').each(function() { 231 if( jQuery(this).is('[class*="vc_custom_"]') ) { 232 jQuery(this).find( '.divider-wrap, .legend' ).addClass( ' ' + jQuery(this).attr("class").match(/bg-[\w-]*\b/) + ' ' + jQuery(this).attr("class").match(/vc_custom_[\w-]*\b/) + ' ' ); 233 } else { 234 if( jQuery(this).hasClass('bg-light') ) jQuery(this).find( '.divider-wrap, .legend' ).addClass( 'bg-light' ); 235 if( jQuery(this).hasClass('bg-secondary') ) jQuery(this).find( '.divider-wrap, .legend' ).addClass( 'bg-secondary' ); 236 if( jQuery(this).hasClass('bg-dark') ) jQuery(this).find( '.divider-wrap, .legend' ).addClass( 'bg-dark' ); 237 if( jQuery(this).hasClass('bg-primary') ) jQuery(this).find( '.divider-wrap, .legend' ).addClass( 'bg-primary' ); 238 } 239 }); 240/* SCROLLER - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 241 var $to_top = jQuery('.back-to-top'); 242 $window.on('scroll', function() { 243 if ( $to_top.length > 0 ) { 244 if( jQuery(window).scrollTop() > 80 ) $to_top.stop().animate({bottom: 17, opacity: 1}, 700); 245 else $to_top.stop().animate({bottom: -17, opacity: 0}, 700); 246 } 247 if( jQuery(window).scrollTop() > (jQuery(window).height() / 8 ) ) { 248 jQuery('body').addClass('site-scrolled'); 249 } else { 250 jQuery('body').removeClass('site-scrolled'); 251 } 252 }); 253 jQuery(document).on('click', '.back-to-top', function(e) { 254 e.preventDefault(); 255 jQuery('html, body').animate({scrollTop: 0}, 800); 256 return false;
257 }); 258 jQuery('a[href*="#"]').not('.comment-reply-link,#cancel-comment-reply-link').smoothScroll({ speed: 800 }); 259 jQuery(document).on('click', 'li.vc_tta-tab a,li.vc_tta-tab,.vc_tta-panel-title', function(e) { 260 $('html, body').stop(); 261 }); 262 addEventListener('scroll', function() { 263 tlg_top_offset = window.pageYOffset; 264 }, false); 265/* SOCIAL SHARE TOGGLE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 266 jQuery('body').on('click touchend', '.ssc-share-group a', function(e) { 267 e.preventDefault(); 268 var popup = window.open($(this).prop('href'), '', 'height=340,width=800'); 269 if (window.focus) popup.focus(); return false; 270 }); 271/* FLICKR - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 272 if(jQuery('.flickr-feed').length) { 273 jQuery('.flickr-feed').each(function() { 274 var userID = jQuery(this).attr('data-user-id'), number = jQuery(this).attr('data-number'); 275 jQuery(this).flickrPhotoStream({ id: userID, max: number,
275container: '<li/>' }); 276 }); 277 } 278/* LIKE ACTION - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 279 jQuery('body').on('click', '.tlg-likes', function(e) { 280 var link = jQuery(this); 281 var id = link.attr('id'); 282 if( link.hasClass('active') ) return false; 283 jQuery.post(wp_data.navian_ajax_url, { action:'tlg-likes', likes_id:id }, function(data) { 284 link.html(data).addClass('active'); 285 }); 286 return false; 287 }); 288 if( jQuery('body.ajax-tlg-likes').length ) { 289 jQuery('.tlg-likes').each(function() { 290 var id = jQuery(this).attr('id'); 291 jQuery(this).load(wp_data.navian_ajax_url, { action:'tlg-likes', post_id:id }); 292 }); 293 } 294/* ACCORDION - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 295 jQuery('.accordion:not(.closed-all)').each(function(){ 296 jQuery('li', this).eq(0).addClass('active'); 297 }); 298 jQuery(document).on('click', '.accordion li', function(e) { 299 var active_accordion = jQuery(this); 300 if (active_accordion.closest('.accordion').hasClass('accordion-auto-close')) { 301 active_accordion.closest('.accordion').find('li').removeClass('active'); 302 active_accordion.addClass('active'); 303 } else { 304 active_accordion.toggleClass('active'); 305 } 306 }); 307/* TABBED CONTENT - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 308 jQuery('.tabs-content').each(function() { 309 jQuery('li', this).eq(0).addClass('active'); 310 jQuery(this).append('<ul class="tabs-content-text"></ul>'); 311 }); 312 setTimeout(function() { 313 jQuery('.tabs-content').each(function() { 314 jQuery(this).addClass('visible'); 315 }); 316 }, 200); 317 jQuery('.tabs li').each(function() { 318 var active_tab = jQuery(this), active_tab_class = ''; 319 if (active_tab.is('.tabs > li:first-child')) active_tab_class = ' class="active"'; 320 var content_tab = active_tab.find('.tab-content').detach().wrap('<li' + active_tab_class + '></li>').parent(); 321 active_tab.closest('.tabs-content').find('.tabs-content-text').append(content_tab); 322 }); 323 jQuery(document).on('click', '.tabs li', function(e) { 324 var active_tab = jQuery(this); 325 active_tab.closest('.tabs').find('li').removeClass('active'); 326 active_tab.addClass('active'); 327 active_tab.closest('.tabs-content').find('.tabs-content-text>li').removeClass('active'); 328 active_tab.closest('.tabs-content').find('.tabs-content-text>li:nth-of-type(' + (active_tab.index() + 1) + ')').addClass('active'); 329 }); 330/* PROGRESS BARS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 331 if( $(window).width() >= 768 ) { 332 $('.progress-bars .meter > span').each(function() { 333 $(this).waypoint(function() { 334 if (!$(this).hasClass('progress-showed')) { 335 $(this).data('origWidth', $(this).width()).width(0).animate({ 336 width: $(this).data("origWidth") 337 }, 1200); 338 $(this).addClass('progress-showed'); 339 } else return false; 340 }, { offset: '100%' }); 341 }); 342 } 343/* COUNTER - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 344 if(jQuery('.counter-number').length){ 345 jQuery('.counter-number').counterUp(); 346 } 347/* CAROUSEL - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 348 jQuery('.blog-carousel.four-columns').owlCarousel({nav: false, dots: false, loop: true, responsive:{ 0:{items:1}, 700:{items:2}, 1100:{items:3}, 1600:{items:4} }}); 349 jQuery('.blog-carousel.three-columns').owlCarousel({nav: false, dots: false, loop: true, responsive:{ 0:{items:1}, 700:{items:2}, 1100:{items:3}, 1600:{items:3} }}); 350 jQuery('.blog-carousel.two-columns').owlCarousel({nav: false, dots: false, loop: true, responsive:{ 0:{items:1}, 700:{items:2}, 1100:{items:2}, 1600:{items:2} }}); 351 jQuery('.blog-carousel-rtl.four-columns').owlCarousel({rtl: true, nav: false, dots: false, loop: true, responsive:{ 0:{items:1}, 700:{items:2}, 1100:{items:3}, 1600:{items:4} }}); 352 jQuery('.blog-carousel-rtl.three-columns').owlCarousel({rtl: true, nav: false, dots: false, loop: true, responsive:{ 0:{items:1}, 700:{items:2}, 1100:{items:3}, 1600:{items:3} }}); 353 jQuery('.blog-carousel-rtl.two-columns').owlCarousel({rtl: true, nav: false, dots: false, loop: true, responsive:{ 0:{items:1}, 700:{items:2}, 1100:{items:2}, 1600:{items:2} }}); 354 jQuery('.shop-carousel.four-columns').owlCarousel({nav: false, dots: false, loop: true, responsive:{ 0:{items:1}, 700:{items:2}, 1100:{items:3}, 1600:{items:4} }}); 355 jQuery('.shop-carousel.three-columns').owlCarousel({nav: false, dots: false, loop: true, responsive:{ 0:{items:1}, 700:{items:2}, 1100:{items:3}, 1600:{items:3} }}); 356 jQuery('.shop-carousel-rtl.four-columns').owlCarousel({rtl: true, nav: false, dots: false, loop: true, responsive:{ 0:{items:1}, 700:{items:2}, 1100:{items:3}, 1600:{items:4} }}); 357 jQuery('.shop-carousel-rtl.three-columns').owlCarousel({rtl: true, nav: false, dots: false, loop: true, responsive:{ 0:{items:1}, 700:{items:2}, 1100:{items:3}, 1600:{items:3} }}); 358 jQuery('.carousel-one-item').owlCarousel({ nav: true, navigation : false, singleItem : true, loop: true, addClassActive: true, responsive:{ 0:{items:1}, 700:{items:1}, 1100:{items:1}, 1600:{items:1} },onInitialized: function() { jQuery('.owl-item').find('video').each(function() { this.play();}); },}); 359 jQuery('.carousel-one-item-rtl').owlCarousel({ rtl: true, nav: true, navigation : false, singleItem : true, loop: true, addClassActive: true, responsive:{ 0:{items:1}, 700:{items:1}, 1100:{items:1}, 1600:{items:1} },onInitialized: function() { jQuery('.owl-item').find('video').each(function() { this.play();}); },}); 360 jQuery('.carousel-one-item-fade').owlCarousel({ nav: true, navigation : false, singleItem : true, loop: true, addClassActive: true, animateOut: 'fadeOut', animateIn: 'fadeIn', mouseDrag: false, touchDrag: false, responsive:{ 0:{items:1}, 700:{items:1}, 1100:{items:1}, 1600:{items:1} },onInitialized: function() { jQuery('.owl-item').find('video').each(function() { this.play();}); },}); 361 jQuery('.carousel-one-item-fade-rtl').owlCarousel({ rtl: true, nav: true, navigation : false, singleItem : true, loop: true, addClassActive: true, animateOut: 'fadeOut', animateIn: 'fadeIn', mouseDrag: false, touchDrag: false, responsive:{ 0:{items:1}, 700:{items:1}, 1100:{items:1}, 1600:{items:1} },onInitialized: function() { jQuery('.owl-item').find('video').each(function() { this.play();}); },}); 362 jQuery('.carousel-one-item-autoplay').owlCarousel({ autoplay:true, autoplayTimeout:3000, autoplayHoverPause:true, nav: true, navigation : false, singleItem : true, loop: true, addClassActive: true, animateOut: 'fadeOut', animateIn: 'fadeIn', mouseDrag: false, touchDrag: false, responsive:{ 0:{items:1}, 700:{items:1}, 1100:{items:1}, 1600:{items:1} },onInitialized: function() { jQuery('.owl-item').find('video').each(function() { this.play();}); },}); 363 jQuery('.carousel-one-item-autoplay-rtl').owlCarousel({ rtl: true, autoplay:true, autoplayTimeout:3000, autoplayHoverPause:true, nav: true, navigation : false, singleItem : true, loop: true, addClassActive: true, animateOut: 'fadeOut', animateIn: 'fadeIn', mouseDrag: false, touchDrag: false, responsive:{ 0:{items:1}, 700:{items:1}, 1100:{items:1}, 1600:{items:1} },onInitialized: function() { jQuery('.owl-item').find('video').each(function() { this.play();}); },}); 364 jQuery('.carousel-one-item-auto').owlCarousel({ autoplay: true, autoplayTimeout: 1100, stopOnHover: false, nav: true, navigation : false, singleItem : true, loop: true, addClassActive: true, transitionStyle: 'fade', animateOut: 'fadeOut', animateIn: 'fadeIn', mouseDrag: false, touchDrag: false, responsive:{ 0:{items:1}, 700:{items:1}, 1100:{items:1}, 1600:{items:1} },}); 365 jQuery('.carousel-one-item-auto-rtl').owlCarousel({ rtl: true, autoplay: true, autoplayTimeout: 1100, stopOnHover: false, nav: true, navigation : false, singleItem : true, loop: true, addClassActive: true, transitionStyle: 'fade', animateOut: 'fadeOut', animateIn: 'fadeIn', mouseDrag: false, touchDrag: false, responsive:{ 0:{items:1}, 700:{items:1}, 1100:{items:1}, 1600:{items:1} },}); 366 jQuery('.carousel-padding-item').owlCarousel({ stagePadding: 200, loop:true, margin:20, nav: false, navigation : false, singleItem : false, responsive:{ 0:{ items:1, stagePadding: 60 }, 600:{ items:1, stagePadding: 100 }, 1000:{ items:1, stagePadding: 200 }, 1200:{ items:1, stagePadding: 250 }, 1400:{ items:1, stagePadding: 300 }, 1600:{ items:1, stagePadding: 350 }, 1800:{ items:1, stagePadding: 400 } }}) 367 jQuery('.carousel-padding-item-rtl').owlCarousel({ rtl: true, stagePadding: 200, loop:true, margin:20, nav: false, navigation : false, singleItem : false, responsive:{ 0:{ items:1, stagePadding: 60 }, 600:{ items:1, stagePadding: 100 }, 1000:{ items:1, stagePadding: 200 }, 1200:{ items:1, stagePadding: 250 }, 1400:{ items:1, stagePadding: 300 }, 1600:{ items:1, stagePadding: 350 }, 1800:{ items:1, stagePadding: 400 } }}) 368 jQuery('.carousel-padding').owlCarousel({ autoplay: 3000, autoplaySpeed: 500, stagePadding: 200, loop:true, margin:40, nav: false, navigation : false, singleItem : false, responsive:{ 0:{items:1, stagePadding: 15, margin: 10}, 600:{items:1, stagePadding: 100}, 1000:{items:2}, 1600:{items:3} }}); 369 jQuery('.carousel-padding-rtl').owlCarousel({ rtl: true, autoplay: 3000, autoplaySpeed: 500, stagePadding: 200, loop:true, margin:40, nav: false, navigation : false, singleItem : false, responsive:{ 0:{items:1, stagePadding: 15, margin: 10}, 600:{items:1, stagePadding: 100}, 1000:{items:2}, 1600:{items:3} }}); 370 jQuery('.logo-carousel-owl').owlCarousel({ nav: true, navigation : false, singleItem : false, loop: true, addClassActive: true, responsive:{ 0:{items:1}, 700:{items:3}, 1100:{items:5}, 1600:{items:5} }}); 371 jQuery('.logo-carousel-owl-rtl').owlCarousel({ rtl: true, nav: true, navigation : false, singleItem : false, loop: true, addClassActive: true, responsive:{ 0:{items:1}, 700:{items:3}, 1100:{items:5}, 1600:{items:5} }}); 372 jQuery('.logo-carousel .slides').owlCarousel({autoplay:true, autoplayTimeout:3000, autoplayHoverPause:true, nav: false, dots: false, loop: true, responsive:{ 0:{items:1}, 700:{items:3}, 1100:{items:5}, 1600:{items:5} }}); 373 jQuery('.logo-carousel-rtl .slides').owlCarousel({rtl: true, autoplay:true, autoplayTimeout:3000, autoplayHoverPause:true, nav: false, dots: false, loop: true, responsive:{ 0:{items:1}, 700:{items:3}, 1100:{items:5}, 1600:{items:5} }}); 374 jQuery('.slider-rotator').flexslider({ animation: "slide", directionNav: false, controlNav: false }); 375 jQuery('.slider-rotator-rtl').flexslider({ rtl:true, animation: "slide", directionNav: false, controlNav: false }); 376 jQuery('.slider-thumb .slides li').each(function() { jQuery(this).attr('data-thumb', jQuery(this).find('img').attr('src')); }); 377 jQuery('.slider-thumb-rtl .slides li').each(function() { jQuery(this).attr('data-thumb', jQuery(this).find('img').attr('src')); }); 378 jQuery('.slider-thumb').flexslider({ animation: 'slide', controlNav: 'thumbnails', directionNav: true }); 379 jQuery('.slider-thumb-rtl').flexslider({ rtl:true, animation: 'slide', controlNav: 'thumbnails', directionNav: true }); 380/* VIDEO PLAYER - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 381 if(jQuery('.player').length){ 382 jQuery('section').closest('body').find('.player').each(function() { 383 jQuery(this).closest('section').find('.container').addClass('fadeOut'); 384 jQuery(this).attr('data-property', "{videoURL:'//youtu.be/" + jQuery(this).attr('data-video-id') + "',containment:'self',autoPlay:true, mute:true, startAt:" + jQuery(this).attr('data-start-at') + ", opacity:1, showControls:false}"); 385 }); 386 jQuery('.player').each(function(){ 387 var section = jQuery(this).closest( 'section' ); 388 var player = section.find( '.player' ); 389 player.YTPlayer(); 390 player.on('YTPStart',function(e){ 391 section.find('.container').removeClass('fadeOut'); 392 section.find('.masonry-loader').addClass('fadeOut'); 393 }); 394 }); 395 } 396/* LIGHTBOX - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 397 if (jQuery('.lightbox-gallery').length) { 398 jQuery('.lightbox-gallery li a').each(function(){ 399 jQuery(this).attr('data-lightbox', jQuery(this).closest('.lightbox-gallery').attr('data-gallery-title')); 400 }); 401 } 402/* MODALS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 403 if (jQuery('.md-trigger').length) { 404 jQuery('.md-trigger').each(function(i) { 405 var modal = jQuery( '#' + jQuery(this).data( 'modal' ) ), 406 close = modal.find( '.md-close' ),
407 overlay = jQuery( '.md-overlay' ), 408 src = modal.find('iframe').attr('src'), 409 param = '?'; 410 if ( src && src.indexOf("?") >= 0 ) { 411 param = '&'; 412 } 413 function removeModal() { 414 jQuery(this).closest( '.image-bg' ).addClass( 'z-index' ); 415 modal.removeClass( 'md-show' ); 416 modal.find('iframe').attr('src', src); 417 } 418 jQuery(this).on('click touchend', function(e) { 419 e.preventDefault(); 420 jQuery(this).closest( '.image-bg' ).removeClass( 'z-index' ); 421 modal.addClass( 'md-show' ); 422 modal.find('iframe').attr('src', src + param + "autoplay=1&showinfo=0"); 423 overlay.on('click touchend', removeModal); 424 }); 425 close.on('click touchend', function(e) { 426 jQuery(this).closest( '.image-bg' ).addClass( 'z-index' ); 427 e.preventDefault(); 428 removeModal(); 429 }); 430 } ); 431 jQuery(document).keyup(function(e) { 432 if ( e.keyCode == 27 ) { // ESCAPE KEY 433 jQuery('.md-modal').removeClass( 'md-show' ); 434 } 435 }); 436 } 437 if (jQuery(window).width() >= 991) { 438 jQuery('.modal-fixed').css('height', jQuery(window).height()); 439 jQuery(document).on('click', '.modal-fixed-action', function(e) { 440 e.preventDefault(); 441 var modalID = jQuery(this).attr('data-modal'); 442 jQuery('#' + modalID).addClass('active'); 443 jQuery('body').addClass('modal-show'); 444 setTimeout(function() { jQuery('.modal-fixed .search-form input[type="text"]').focus(); }, 1200); 445 }); 446 jQuery(document).on('click', '.modal-fixed-close', function(e) { 447 e.preventDefault(); 448 jQuery('.modal-fixed').removeClass('active'); 449 jQuery('.modal-fixed .search-form input[type="text"]').val(''); 450 setTimeout(function() { jQuery('body').removeClass('modal-show'); }, 350); 451 }); 452 } 453/* COUNTDOWN - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 454 if (jQuery('.countdown').length) { 455 jQuery('.countdown').each(function() { 456 var date = jQuery(this).attr('data-date'); 457 var day = jQuery(this).attr('data-day'); 458 jQuery(this).countdown(date, function(event) { 459 jQuery(this).text( event.strftime('%D '+day+' %H:%M:%S') ); 460 }); 461 }); 462 } 463 if (jQuery('.countdown-legacy').length) { 464 jQuery('.countdown-legacy').each(function() { 465 var date = jQuery(this).attr('data-date'); 466 var week = jQuery(this).attr('data-week'); 467 var day = jQuery(this).attr('data-day'); 468 var hour = jQuery(this).attr('data-hour'); 469 var minute = jQuery(this).attr('data-minute'); 470 var second = jQuery(this).attr('data-second'); 471 jQuery(this).countdown(date, function(event) { 472 jQuery(this).html(event.strftime('' 473 + '<div class="countdown-part">%w <span>'+week+'</span></div>' 474 + '<div class="countdown-part">%d <span>'+day+'</span></div>' 475 + '<div class="countdown-part">%H <span>'+hour+'</span></div>' 476 + '<div class="countdown-part">%M <span>'+minute+'</span></div>' 477 + '<div class="countdown-part">%S <span>'+second+'</span></div>')); 478 }); 479 }); 480 } 481/* OTHER SCRIPTS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 482 /* Spacer */ 483 tlg_vc_spacer(); 484 /* Responsive iframe */ 485 fluidvids.init({selector: ['iframe', 'object']}); 486 /* Tooltip */ 487 jQuery('[data-toggle="tooltip"]').tooltip(); 488 /* Enable parallax */ 489 jsparallax_init('.parallax > .background-content'); 490 /* Disable parallax on mobile */
491 if ((/Android|iPhone|iPad|iPod|BlackBerry|Windows Phone/i).test(navigator.userAgent || navigator.vendor || window.opera)) { jQuery('section').removeClass('parallax'); } 492 /* Set global variable */ 493 tlg_nav_height = jQuery('body .nav-container nav:first').outerHeight(); 494 tlg_first_section_height = jQuery('.main-container section:nth-of-type(1)').outerHeight(true); 495 if ( jQuery('.wpb_content_element').hasClass('wpb_layerslider_element') ) { 496 tlg_first_section_height = jQuery('.wpb_layerslider_element:nth-of-type(1)').outerHeight(true); 497 } 498 if( jQuery('.wpb_content_element').hasClass('wpb_revslider_element') ) { 499 tlg_first_section_height = jQuery('.wpb_revslider_element:nth-of-type(1)').outerHeight(true); 500 } 501 if( jQuery('[id*="rev_slider"]').hasClass('rev_slider_wrapper') ) { 502 tlg_first_section_height = jQuery('.rev_slider_wrapper:nth-of-type(1)').outerHeight(true); 503 } 504 if( jQuery('rs-slides').length ) { 505 tlg_first_section_height = jQuery('rs-slides:nth-of-type(1)').outerHeight(true); 506 } 507 if(jQuery('.masonry-flip').length) { 508 new AnimOnScroll( document.getElementById( 'masonry-flip' ), { 509 minDuration : 0.4, 510 maxDuration : 0.7, 511 viewportFactor : 0.2 512 } ); 513 } 514 if(jQuery('.masonry-flip-photoswipe').length) { 515 var initPhotoSwipeFromDOM = function(gallerySelector) { 516 var parseThumbnailElements = function(el) { 517 var thumbElements = el.childNodes, 518 numNodes = thumbElements.length, 519 items = [], 520 figureEl, 521 linkEl, 522 size, 523 item; 524 for(var i = 0; i < numNodes; i++) { 525 figureEl = thumbElements[i]; 526 if(figureEl.nodeType !== 1) { 527 continue; 528 } 529 linkEl = figureEl.children[0]; 530 size = linkEl.getAttribute('data-size').split('x'); 531 item = { 532 src: linkEl.getAttribute('href'), 533 w: parseInt(size[0], 10), 534 h: parseInt(size[1], 10) 535 }; 536 if(figureEl.children.length > 1) { 537 item.title = figureEl.children[1].innerHTML; 538 } 539 if(linkEl.children.length > 0) { 540 item.msrc = linkEl.children[0].getAttribute('src'); 541 } 542 item.el = figureEl; 543 items.push(item); 544 } 545 return items; 546 }; 547 var closest = function closest(el, fn) { 548 return el && ( fn(el) ? el : closest(el.parentNode, fn) ); 549 }; 550 var onThumbnailsClick = function(e) { 551 e = e || window.event; 552 e.preventDefault ? e.preventDefault() : e.returnValue = false; 553 var eTarget = e.target || e.srcElement; 554 var clickedListItem = closest(eTarget, function(el) { 555 556 return (el.tagName && el.tagName.toUpperCase() === 'LI'); 557 }); 558 if(!clickedListItem) { 559 return; 560 } 561 var clickedGallery = clickedListItem.parentNode, 562 childNodes = clickedListItem.parentNode.childNodes, 563 numChildNodes = childNodes.length, 564 nodeIndex = 0, 565 index; 566 for (var i = 0; i < numChildNodes; i++) { 567 if(childNodes[i].nodeType !== 1) { 568 continue; 569 } 570 if(childNodes[i] === clickedListItem) { 571 index = nodeIndex; 572 break; 573 } 574 nodeIndex++; 575 } 576 if(index >= 0) { 577 openPhotoSwipe( index, clickedGallery ); 578 } 579 return false;
580 }; 581 var photoswipeParseHash = function() { 582 var hash = window.location.hash.substring(1), params = {}; 583 if(hash.length < 5) { 584 return params; 585 } 586 var vars = hash.split('&'); 587 for (var i = 0; i < vars.length; i++) { 588 if(!vars[i]) { 589 continue; 590 } 591 var pair = vars[i].split('='); 592 if(pair.length < 2) { 593 continue; 594 } 595 params[pair[0]] = pair[1]; 596 } 597 if(params.gid) { 598 params.gid = parseInt(params.gid, 10); 599 } 600 return params; 601 }; 602 var openPhotoSwipe = function(index, galleryElement, disableAnimation, fromURL) { 603 var pswpElement = document.querySelectorAll('.pswp')[0], gallery, options, items; 604 items = parseThumbnailElements(galleryElement); 605 options = { 606 galleryUID: galleryElement.getAttribute('data-pswp-uid'), 607 getThumbBoundsFn: function(index) { 608 var thumbnail = items[index].el.getElementsByTagName('img')[0], 609 pageYScroll = window.pageYOffset || document.documentElement.scrollTop, 610 rect = thumbnail.getBoundingClientRect(); 611 return {x:rect.left, y:rect.top + pageYScroll, w:rect.width}; 612 } 613 }; 614 if(fromURL) { 615 if(options.galleryPIDs) { 616 for(var j = 0; j < items.length; j++) { 617 if(items[j].pid == index) { 618 options.index = j; 619 break; 620 } 621 } 622 } else { 623 options.index = parseInt(index, 10) - 1; 624 } 625 } else { 626 options.index = parseInt(index, 10); 627 } 628 if( isNaN(options.index) ) { 629 return; 630 } 631 if(disableAnimation) { 632 options.showAnimationDuration = 0; 633 } 634 gallery = new PhotoSwipe( pswpElement, PhotoSwipeUI_Default, items, options); 635 gallery.init(); 636 }; 637 var galleryElements = document.querySelectorAll( gallerySelector ); 638 for(var i = 0, l = galleryElements.length; i < l; i++) { 639 galleryElements[i].setAttribute('data-pswp-uid', i+1); 640 galleryElements[i].onclick = onThumbnailsClick; 641 } 642 var hashData = photoswipeParseHash(); 643 if(hashData.pid && hashData.gid) { 644 openPhotoSwipe( hashData.pid , galleryElements[ hashData.gid - 1 ], true, true ); 645 } 646 }; 647 initPhotoSwipeFromDOM('.masonry-flip-photoswipe'); 648 } 649 650 }); // END READY 651 function tlg_preloader() { 652 jQuery('#tlg_preloader').css('opacity', 0); 653 setTimeout(function() { jQuery('#tlg_preloader').hide(); }, 500); 654 } 655 function tlg_masonry_show() { 656 var $items = jQuery('.masonry-show .masonry-item'); 657 var time = 0; 658 $items.each(function() { 659 660 var item = jQuery(this); 661 setTimeout(function() { 662 663 item.addClass('fadeIn'); 664 }, time); 665 time += 200; 666 }); 667 } 668 function tlg_update_nav() { 669 if (jQuery(window).width() > 990) { 670 tlg_first_section_height = jQuery('.main-container section:nth-of-type(1)').outerHeight(true); 671 if ( jQuery('.wpb_content_element').hasClass('wpb_layerslider_element') ) { 672 tlg_first_section_height = jQuery('.wpb_layerslider_element:nth-of-type(1)').outerHeight(true); 673 } 674 if( jQuery('.wpb_content_element').hasClass('wpb_revslider_element') ) { 675 tlg_first_section_height = jQuery('.wpb_revslider_element:nth-of-type(1)').outerHeight(true); 676 } 677 if( jQuery('[id*="rev_slider"]').hasClass('rev_slider_wrapper') ) { 678 tlg_first_section_height = jQuery('.rev_slider_wrapper:nth-of-type(1)').outerHeight(true); 679 } 680 if( jQuery('rs-slides').length ) { 681 tlg_first_section_height = jQuery('rs-slides:nth-of-type(1)').outerHeight(true); 682 } 683 var tlg_section = tlg_nav.hasClass('transparent') ? parseInt(tlg_first_section_height) - parseInt(wp_data.navian_menu_height) : parseInt(tlg_first_section_height) + parseInt(wp_data.navian_menu_height); 684 if (tlg_top_offset <= 0) { 685 if (tlg_nav_fixed) { tlg_nav_fixed = false; tlg_nav.removeClass('fixed nav-show'); } 686 return; 687 } 688 if (tlg_top_offset > tlg_section) { 689 // do nothing 690 } else { 691 if (tlg_top_offset > tlg_nav_height) { 692 if (!tlg_nav_fixed) { tlg_nav_fixed = true; tlg_nav.addClass('fixed nav-show'); } 693 } else { 694 if (tlg_nav_fixed) { tlg_nav_fixed = false; tlg_nav.removeClass('fixed nav-show'); } 695 } 696 } 697 } 698 if (jQuery(window).width() <= 990) { 699 if (!tlg_nav_fixed) { tlg_nav_fixed = true; tlg_nav.addClass('fixed nav-show'); } 700 } 701 } 702 function tlg_vc_spacer() { 703 jQuery('.tlg-spacer').each(function(i,e){ 704 var body_width = jQuery(window).width(); 705 var height_mobible = jQuery(e).data('height-mobile'); 706 var height_tablet = jQuery(e).data('height-tablet'); 707 var height = jQuery(e).data('height'); 708 if(body_width <= 768){ 709 jQuery(this).height(height_mobible); 710 } else if (body_width >= 768 && body_width <= 1024){ 711 jQuery(this).height(height_tablet); 712 } else if (body_width >= 1024){ 713 jQuery(this).height(height); 714 } 715 }); 716 } 717 function tlg_megamenu() { 718 var body_width = jQuery(window).width(); 719 if (body_width > 990) { 720 if (!jQuery('.nav-container').hasClass('vertical-menu')) { 721 jQuery('nav .megamenu-item > ul').removeClass('subnav').addClass('mega-menu'); 722 } 723 } else { 724 if (!jQuery('.nav-container').hasClass('vertical-menu')) { 725 jQuery('nav .megamenu-item > ul').removeClass('mega-menu').addClass('subnav'); 726 } 727 jQuery(document).on('click', '.menu li', function(e) { 728 if (!e) e = window.event; e.stopPropagation(); 729 if (jQuery(this).find(">a").is('[href*="#"]') || ('yes' == wp_data.navian_menu_open && jQuery(this).hasClass("menu-item-has-children"))) { 730 e.preventDefault(); 731 } 732 if (jQuery(this).find('ul').length) jQuery(this).toggleClass('toggle-sub'); 733 else jQuery(this).parents('.toggle-sub').removeClass('toggle-sub'); 734 }); 735 } 736 } 737})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.