1document.documentElement.className += ' js_active '; 2document.documentElement.className += 'ontouchstart' in document.documentElement ? ' vc_mobile ' : ' vc_desktop '; 3(function () { 4 var prefix = ['-webkit-', '-o-', '-moz-', '-ms-', ""]; 5 for (var i in prefix) { 6 if (prefix[i] + 'transform' in document.documentElement.style) document.documentElement.className += " vc_transform "; 7 } 8})(); 9/* 10 On document ready jQuery will fire set of functions. 11 If you want to override function behavior then copy it to your theme js file 12 with the same name. 13 */ 14 15jQuery(window).load(function () { 16 17 18}); 19var vc_js = function () { 20 vc_twitterBehaviour(); 21 vc_toggleBehaviour(); 22 vc_toggleBehaviourOld(); // todo remove on next release 23 vc_tabsBehaviour(); 24 vc_accordionBehaviour(); 25 vc_teaserGrid(); 26 vc_carouselBehaviour(); 27 vc_slidersBehaviour(); 28 vc_prettyPhoto(); 29 vc_googleplus(); 30 vc_pinterest(); 31 vc_progress_bar(); 32 vc_plugin_flexslider(); 33 vc_google_fonts(); 34 vc_gridBehaviour(); 35 vc_rowBehaviour(); 36 jQuery(document).trigger('vc_js'); 37 window.setTimeout(vc_waypoints, 1500); 38}; 39jQuery(document).ready(function ($) { 40 window.vc_js(); 41}); // END jQuery(document).ready 42 43if (typeof window['vc_plugin_flexslider'] !== 'function') { 44 window.vc_plugin_flexslider = function($parent) { 45 var $slider = $parent ? $parent.find('.wpb_flexslider') : jQuery('.wpb_flexslider'); 46 $slider.each(function () { 47 var this_element = jQuery(this); 48 var sliderSpeed = 800, 49 sliderTimeout = parseInt(this_element.attr('data-interval')) * 1000, 50 sliderFx = this_element.attr('data-flex_fx'), 51 slideshow = true; 52 if (sliderTimeout == 0) slideshow = false; 53 54 this_element.is(':visible') && this_element.flexslider({ 55 animation:sliderFx, 56 slideshow:slideshow, 57 slideshowSpeed:sliderTimeout, 58 sliderSpeed:sliderSpeed, 59 smoothHeight:true 60 }); 61 }); 62 } 63} 64 65/* Twitter 66 ---------------------------------------------------------- */ 67if (typeof window['vc_twitterBehaviour'] !== 'function') { 68 window.vc_twitterBehaviour = function() { 69 jQuery('.wpb_twitter_widget .tweets').each(function (index) { 70 var this_element = jQuery(this), 71 tw_name = this_element.attr('data-tw_name'), 72 tw_count = this_element.attr('data-tw_count'); 73 74 this_element.tweet({ 75 username:tw_name, 76 join_text:"auto", 77 avatar_size:0, 78 count:tw_count, 79 template:"{avatar}{join}{text}{time}", 80 auto_join_text_default:"", 81 auto_join_text_ed:"", 82 auto_join_text_ing:"", 83 auto_join_text_reply:"", 84 auto_join_text_url:"", 85 loading_text:'<span class="loading_tweets">loading tweets...</span>' 86 }); 87 }); 88 } 89} 90 91/* Google plus 92 ---------------------------------------------------------- */ 93if (typeof window['vc_googleplus'] !== 'function') { 94 window.vc_googleplus = function() { 95 if (jQuery('.wpb_googleplus').length > 0) { 96 (function () { 97 var po = document.createElement('script'); 98 po.type = 'text/javascript'; 99 po.async = true; 100 po.src = 'https://apis.google.com/js/plusone.js'; 101 var s = document.getElementsByTagName('script')[0]; 102 s.parentNode.insertBefore(po, s); 103 })(); 104 } 105 } 106} 107 108/* Pinterest 109 ---------------------------------------------------------- */ 110if (typeof window['vc_pinterest'] !== 'function') { 111 window.vc_pinterest = function() { 112 if (jQuery('.wpb_pinterest').length > 0) { 113 (function () { 114 var po = document.createElement('script'); 115 po.type = 'text/javascript'; 116 po.async = true; 117 po.src = 'http://assets.pinterest.com/js/pinit.js'; 118 var s = document.getElementsByTagName('script')[0]; 119 s.parentNode.insertBefore(po, s); 120 //<script type="text/javascript" src="//assets.pinterest.com/js/pinit.js"></script> 121 })(); 122 } 123 } 124} 125 126/* Progress bar 127 ---------------------------------------------------------- */ 128if (typeof window['vc_progress_bar'] !== 'function') { 129 window.vc_progress_bar = function() { 130 if (typeof jQuery.fn.waypoint !== 'undefined') { 131 132 jQuery('.vc_progress_bar').waypoint(function () { 133 jQuery(this).find('.vc_single_bar').each(function (index) { 134 var $this = jQuery(this), 135 bar = $this.find('.vc_bar'), 136 val = bar.data('percentage-value'); 137 138 setTimeout(function () { 139 bar.css({"width":val + '%'}); 140 }, index * 200); 141 }); 142 }, { offset:'85%' }); 143 } 144 } 145} 146 147/* Waypoints magic 148 ---------------------------------------------------------- */ 149if (typeof window['vc_waypoints'] !== 'function') { 150 window.vc_waypoints = function() { 151 if (typeof jQuery.fn.waypoint !== 'undefined') { 152 jQuery('.wpb_animate_when_almost_visible:not(.wpb_start_animation)').waypoint(function () { 153 jQuery(this).addClass('wpb_start_animation'); 154 }, { offset:'85%' }); 155 } 156 } 157} 158 159/* Toggle 160 * @deprecated since 4.4 161 ---------------------------------------------------------- */ 162// @todo remove on next release 163if (typeof window['vc_toggleBehaviourOld'] !== 'function') { 164 /** 165 * @deprecated will be removed in next release 166 */ 167 window.vc_toggleBehaviourOld = function() { 168 jQuery(".wpb_toggle").unbind('click').click(function (e) { 169 if (jQuery(this).next().is(':animated')) { 170 return false;
171 } 172 if (jQuery(this).hasClass('wpb_toggle_title_active')) { 173 jQuery(this).removeClass('wpb_toggle_title_active').next().slideUp(500); 174 } else { 175 jQuery(this).addClass('wpb_toggle_title_active').next().slideDown(500); 176 } 177 }); 178 jQuery('.wpb_toggle_content').each(function (index) { 179 if (jQuery(this).next().is('h4.wpb_toggle') == false) { 180 jQuery('<div class="last_toggle_el_margin"></div>').insertAfter(this); 181 } 182 }); 183 } 184} 185 186/* Toggle/FAQ 187 ---------------------------------------------------------- */ 188if (typeof window['vc_toggleBehaviour'] !== 'function') { 189 window.vc_toggleBehaviour = function($el) { 190 var event = function(e) { 191 e && e.preventDefault && e.preventDefault(); 192 var title = jQuery(this); 193 var element = title.closest('.vc_toggle'); 194 var content = element.find('.vc_toggle_content'); 195 if (element.hasClass('vc_toggle_active')) { 196 content.slideUp({ 197 duration: 300, 198 complete: function () { 199 element.removeClass('vc_toggle_active'); 200 } 201 }); 202 } else { 203 content.slideDown({ 204 duration: 300, 205 complete: function () { 206 element.addClass('vc_toggle_active'); 207 } 208 }); 209 } 210 }; 211 if($el) { 212 if($el.hasClass('vc_toggle_title')) { 213 $el.unbind('click').click(event); 214 } else { 215 $el.find(".vc_toggle_title").unbind('click').click(event); 216 } 217 } else { 218 jQuery(".vc_toggle_title").unbind('click').on('click', event); 219 } 220 } 221} 222 223/* Tabs + Tours 224 ---------------------------------------------------------- */ 225if (typeof window['vc_tabsBehaviour'] !== 'function') { 226 window.vc_tabsBehaviour = function($tab) { 227 if (jQuery.ui) { 228 /* jQuery(function ($) { 229 $(document.body).off('click.preview', 'a') 230 }); */ // this causes wp-customizer bug 231 var $call = $tab || jQuery('.wpb_tabs, .wpb_tour'), 232 ver = jQuery.ui && jQuery.ui.version ? jQuery.ui.version.split('.') : '1.10', 233 old_version = parseInt(ver[0]) == 1 && parseInt(ver[1]) < 9; 234 // if($call.hasClass('ui-widget')) $call.tabs('destroy'); 235 $call.each(function (index) { 236 var $tabs, 237 interval = jQuery(this).attr("data-interval"), 238 tabs_array = []; 239 // 240 $tabs = jQuery(this).find('.wpb_tour_tabs_wrapper').tabs({ 241 show: function (event, ui) { 242 wpb_prepare_tab_content(event, ui); 243 }, 244 beforeActivate: function (event, ui) { 245 ui.newPanel.index() !== 1 && ui.newPanel.find('.vc_pie_chart:not(.vc_ready)'); 246 }, 247 activate: function (event, ui) { 248 wpb_prepare_tab_content(event, ui); 249 } 250 }); // .tabs('rotate', interval * 1000); 251 252 jQuery(this).find('.wpb_tab').each(function () { 253 tabs_array.push(this.id); 254 }); 255 256 jQuery(this).find('.wpb_tabs_nav li').click(function (e) { 257 e.preventDefault(); 258 /*if (jQuery.inArray(jQuery(this).attr('href'), tabs_array)) { 259 if (old_version) { 260 $tabs.tabs("select", jQuery(this).attr('href')); 261 } else { 262 $tabs.tabs("option", "active", jQuery(jQuery(this).attr('href')).index() - 1); 263 } 264 return false; 265 }*/ 266 if (old_version) { 267 $tabs.tabs("select", jQuery('a', this).attr('href')); 268 } else { 269 $tabs.tabs("option", "active", jQuery(this).index()); 270 } 271 return false; 272 }); 273 274 jQuery(this).find('.wpb_prev_slide a, .wpb_next_slide a').click(function (e) { 275 e.preventDefault(); 276 if (old_version) { 277 var index = $tabs.tabs('option', 'selected'); 278 if (jQuery(this).parent().hasClass('wpb_next_slide')) { 279 index++; 280 } 281 else { 282 index--; 283 } 284 if (index < 0) { 285 index = $tabs.tabs("length") - 1; 286 } 287 else if (index >= $tabs.tabs("length")) { 288 index = 0; 289 } 290 $tabs.tabs("select", index); 291 } else { 292 var index = $tabs.tabs("option", "active"), 293 length = $tabs.find('.wpb_tab').length; 294 295 if (jQuery(this).parent().hasClass('wpb_next_slide')) { 296 index = (index + 1) >= length ? 0 : index + 1; 297 } else { 298 index = index - 1 < 0 ? length - 1 : index - 1; 299 } 300 301 $tabs.tabs("option", "active", index); 302 } 303 304 }); 305 306 }); 307 } 308 } 309}; 310 311/* Tabs + Tours 312 ---------------------------------------------------------- */ 313if (typeof window['vc_accordionBehaviour'] !== 'function') { 314 window.vc_accordionBehaviour = function() { 315 jQuery('.wpb_accordion').each(function (index) { 316 var $this = jQuery(this); 317 var $tabs, 318 interval = $this.attr("data-interval"), 319 active_tab = !isNaN(jQuery(this).data('active-tab')) && parseInt($this.data('active-tab')) > 0 ? parseInt($this.data('active-tab')) - 1 : false, 320 collapsible = active_tab === false || $this.data('collapsible') === 'yes'; 321 // 322 $tabs = $this.find('.wpb_accordion_wrapper').accordion({ 323 header:"> div > h3", 324 autoHeight:false, 325 heightStyle:"content", 326 active:active_tab, 327 collapsible:collapsible, 328 navigation:true, 329 330 activate: vc_accordionActivate, 331 change:function (event, ui) { 332 if (jQuery.fn.isotope != undefined) { 333 ui.newContent.find('.isotope').isotope("layout"); 334 } 335 vc_carouselBehaviour(ui.newPanel); 336 } 337 }); 338 if(true === $this.data('vcDisableKeydown')) { 339 $tabs.data('uiAccordion')._keydown = function() {}; 340 } 341 //.tabs().tabs('rotate', interval*1000, true); 342 }); 343 } 344} 345 346/* Teaser grid: isotope 347 ---------------------------------------------------------- */ 348if (typeof window['vc_teaserGrid'] !== 'function') { 349 window.vc_teaserGrid = function() { 350 var layout_modes = { 351 fitrows:'fitRows', 352 masonry:'masonry' 353 }; 354 jQuery('.wpb_grid .teaser_grid_container:not(.wpb_carousel), .wpb_filtered_grid .teaser_grid_container:not(.wpb_carousel)').each(function () { 355 var $container = jQuery(this); 356 var $thumbs = $container.find('.wpb_thumbnails'); 357 var layout_mode = $thumbs.attr('data-layout-mode'); 358 $thumbs.isotope({ 359 // options 360 itemSelector:'.isotope-item', 361 layoutMode:(layout_modes[layout_mode] == undefined ? 'fitRows' : layout_modes[layout_mode]) 362 }); 363 $container.find('.categories_filter a').data('isotope', $thumbs).click(function (e) { 364 e.preventDefault(); 365 var $thumbs = jQuery(this).data('isotope'); 366 jQuery(this).parent().parent().find('.active').removeClass('active'); 367 jQuery(this).parent().addClass('active'); 368 $thumbs.isotope({filter:jQuery(this).attr('data-filter')}); 369 }); 370 jQuery(window).bind('load resize', function () { 371 $thumbs.isotope("layout"); 372 }); 373 }); 374 375 /* 376 var isotope = jQuery('.wpb_grid ul.thumbnails'); 377 if ( isotope.length > 0 ) { 378 isotope.isotope({ 379 // options 380 itemSelector : '.isotope-item', 381 layoutMode : 'fitRows' 382 }); 383 jQuery(window).load(function() { 384 isotope.isotope("layout"); 385 }); 386 } 387 */ 388 } 389} 390 391if (typeof window['vc_carouselBehaviour'] !== 'function') { 392 window.vc_carouselBehaviour = function($parent) { 393 var $carousel = $parent ? $parent.find(".wpb_carousel") : jQuery(".wpb_carousel"); 394 $carousel.each(function () { 395 var $this = jQuery(this); 396 if ($this.data('carousel_enabled') !== true && $this.is(':visible')) { 397 $this.data('carousel_enabled', true); 398 var carousel_width = jQuery(this).width(), 399 visible_count = getColumnsCount(jQuery(this)), 400 carousel_speed = 500; 401 if (jQuery(this).hasClass('columns_count_1')) { 402 carousel_speed = 900; 403 } 404 /* Get margin-left value from the css grid and apply it to the carousele li items (margin-right), before carousele initialization */ 405 var carousele_li = jQuery(this).find('.wpb_thumbnails-fluid li'); 406 carousele_li.css({"margin-right":carousele_li.css("margin-left"), "margin-left":0 }); 407 408 jQuery(this).find('.wpb_wrapper:eq(0)').jCarouselLite({ 409 btnNext:jQuery(this).find('.next'), 410 btnPrev:jQuery(this).find('.prev'), 411 visible:visible_count, 412 speed:carousel_speed 413 }) 414 .width('100%');
414//carousel_width 415 416 var fluid_ul = jQuery(this).find('ul.wpb_thumbnails-fluid'); 417 fluid_ul.width(fluid_ul.width() + 300); 418 419 jQuery(window).resize(function () { 420 var before_resize = screen_size; 421 screen_size = getSizeName(); 422 if (before_resize != screen_size) { 423 window.setTimeout('location.reload()', 20); 424 } 425 }); 426 } 427 428 }); 429 /* 430 if(jQuery.fn.bxSlider !== undefined ) { 431 jQuery('.bxslider').each(function(){ 432 var $slider = jQuery(this); 433 $slider.bxSlider($slider.data('settings')); 434 }); 435 } 436 */ 437 if (window.Swiper !== undefined) { 438 439 jQuery('.swiper-container').each(function () { 440 var $this = jQuery(this), 441 my_swiper, 442 max_slide_size = 0, 443 options = jQuery(this).data('settings'); 444 445 if (options.mode === 'vertical') { 446 $this.find('.swiper-slide').each(function () { 447 var height = jQuery(this).outerHeight(true); 448 if (height > max_slide_size) max_slide_size = height; 449 }); 450 $this.height(max_slide_size); 451 $this.css('overflow', 'hidden'); 452 } 453 jQuery(window).resize(function () { 454 $this.find('.swiper-slide').each(function () { 455 var height = jQuery(this).outerHeight(true); 456 if (height > max_slide_size) max_slide_size = height; 457 }); 458 $this.height(max_slide_size); 459 }); 460 my_swiper = jQuery(this).swiper(jQuery.extend(options, { 461 onFirstInit:function (swiper) { 462 if (swiper.slides.length < 2) { 463 $this.find('.vc_arrow-left,.vc_arrow-right').hide(); 464 } else if (swiper.activeIndex === 0 && swiper.params.loop !== true) { 465 $this.find('.vc_arrow-left').hide(); 466 } else { 467 $this.find('.vc_arrow-left').show(); 468 } 469 }, 470 onSlideChangeStart:function (swiper) { 471 if (swiper.slides.length > 1 && swiper.params.loop !== true) { 472 if (swiper.activeIndex === 0) { 473 $this.find('.vc_arrow-left').hide(); 474 } else { 475 $this.find('.vc_arrow-left').show(); 476 } 477 if (swiper.slides.length - 1 === swiper.activeIndex) { 478 $this.find('.vc_arrow-right').hide(); 479 } else { 480 $this.find('.vc_arrow-right').show(); 481 } 482 } 483 } 484 })); 485 $this.find('.vc_arrow-left').click(function (e) { 486 e.preventDefault(); 487 my_swiper.swipePrev(); 488 }); 489 $this.find('.vc_arrow-right').click(function (e) { 490 e.preventDefault(); 491 my_swiper.swipeNext(); 492 }); 493 my_swiper.reInit(); 494 }); 495 496 } 497 498 } 499} 500 501if (typeof window['vc_slidersBehaviour'] !== 'function') { 502 window.vc_slidersBehaviour = function() { 503 //var sliders_count = 0; 504 jQuery('.wpb_gallery_slides').each(function (index) { 505 var this_element = jQuery(this); 506 var ss_count = 0; 507 508 /*if ( this_element.hasClass('wpb_slider_fading') ) { 509 var sliderSpeed = 500, sliderTimeout = this_element.attr('data-interval')*1000, slider_fx = 'fade'; 510 var current_ss; 511 512 function slideshowOnBefore(currSlideElement, nextSlideElement, options) { 513 jQuery(nextSlideElement).css({"position" : "absolute" }); 514 jQuery(nextSlideElement).find("div.description").animate({"opacity": 0}, 0); 515 } 516 517 function slideshowOnAfter(currSlideElement, nextSlideElement, options) { 518 jQuery(nextSlideElement).find("div.description").animate({"opacity": 1}, 2000); 519 520 jQuery(nextSlideElement).css({"position" : "static" }); 521 var new_h = jQuery(nextSlideElement).find('img').height(); 522 if ( jQuery.isNumeric(new_h) ) { 523 //this_element.animate({ "height" : new_h }, sliderSpeed ); 524 } 525 } 526 527 this_element.find('ul') 528 .before('<div class="ss_nav ss_nav_'+ss_count+'"></div><div class="wpb_fading_nav"><a id="next_'+ss_count+'" href="#next"></a> <a id="prev_'+ss_count+'" href="#prev"></a></div>') 529 .cycle({ 530 fx: slider_fx, // choose your transition type, ex: fade, scrollUp, shuffle, etc... 531 pause: 1, 532 speed: sliderSpeed, 533 timeout: sliderTimeout, 534 delay: -ss_count * 1000, 535 before: slideshowOnBefore, 536 after:slideshowOnAfter, 537 pager: '.ss_nav_'+ss_count 538 }); 539 //.find('.description').width(jQuery(this).width() - 20); 540 ss_count++; 541 } 542 else*/ 543 if (this_element.hasClass('wpb_slider_nivo')) { 544 var sliderSpeed = 800, 545 sliderTimeout = this_element.attr('data-interval') * 1000; 546 547 if (sliderTimeout == 0) sliderTimeout = 9999999999; 548 549 this_element.find('.nivoSlider').nivoSlider({ 550 effect:'boxRainGrow,boxRain,boxRainReverse,boxRainGrowReverse', // Specify sets like: 'fold,fade,sliceDown' 551 slices:15, // For slice animations 552 boxCols:8, // For box animations 553 boxRows:4, // For box animations 554 animSpeed:sliderSpeed, // Slide transition speed 555 pauseTime:sliderTimeout, // How long each slide will show 556 startSlide:0, // Set starting Slide (0 index) 557 directionNav:true, // Next & Prev navigation 558 directionNavHide:true, // Only show on hover 559 controlNav:true, // 1,2,3... navigation 560 keyboardNav:false, // Use left & right arrows 561 pauseOnHover:true, // Stop animation while hovering 562 manualAdvance:false, // Force manual transitions 563 prevText:'Prev', // Prev directionNav text 564 nextText:'Next' // Next directionNav text 565 }); 566 } 567 else if (this_element.hasClass('wpb_image_grid')) { 568 var isotope = this_element.find('.wpb_image_grid_ul'); 569 isotope.isotope({ 570 // options 571 itemSelector:'.isotope-item', 572 layoutMode:'fitRows' 573 }); 574 jQuery(window).load(function () { 575 // isotope.isotope("layout"); 576 }); 577 jQuery(window).resize(function () { 578 isotope.isotope("layout"); 579 }); 580 } 581 }); 582 } 583} 584 585if (typeof window['vc_prettyPhoto'] !== 'function') { 586 window.vc_prettyPhoto = function() { 587 try { 588 // just in case. maybe prettyphoto isnt loaded on this site 589 jQuery('a.prettyphoto, .gallery-icon a[href*=".jpg"]').prettyPhoto({ 590 animationSpeed:'normal', /* fast/slow/normal */ 591 padding:15, /* padding for each side of the picture */ 592 opacity:0.7, /* Value betwee 0 and 1 */ 593 showTitle:true, /* true/false */ 594 allowresize:true, /* true/false */ 595 counter_separator_label:'/', /* The separator for the gallery counter 1 "of" 2 */ 596 //theme: 'light_square', /* light_rounded / dark_rounded / light_square / dark_square */ 597 hideflash:false, /* Hides all the flash object on a page, set to TRUE if flash appears over prettyPhoto */ 598 deeplinking:false, /* Allow prettyPhoto to update the url to enable deeplinking. */ 599 modal:false, /* If set to true, only the close button will close the window */ 600 callback:function () { 601 var url = location.href; 602 var hashtag = (url.indexOf('#!prettyPhoto')) ? true : false;
603 if (hashtag) location.hash = "!"; 604 } /* Called when prettyPhoto is closed */, 605 social_tools:'' 606 }); 607 } catch (err) { 608 } 609 } 610} 611 612if ( typeof window['vc_google_fonts'] !== 'function' ) { 613 window.vc_google_fonts = function() { 614 return false; // @todo check this for what this is needed 615 } 616} 617 618if (typeof window['vc_rowBehaviour'] !== 'function') { 619 window.vc_rowBehaviour = function () { 620 var $ = window.jQuery; 621 var local_function = function () { 622 var $elements = $('[data-vc-full-width="true"]'); 623 $.each($elements, function (key, item) { 624 var $el = $(this); 625 var $el_full = $el.next('.vc_row-full-width'); 626 var offset = 0 - $el_full.offset().left - parseInt($el.css('margin-left')); 627 $el.css({ 628 'position': 'relative', 629 'left': offset, 630 'box-sizing': 'border-box', 631 'width': $(window).width() 632 }); 633 if (!$el.data('vcStretchContent')) { 634 var padding = (-1 * offset); 635 if(padding < 0) { padding = 0; } 636 $el.css({'padding-left': padding+'px', 'padding-right': padding+'px'}); 637 } 638 }); 639 }; 640 $(window).unbind('resize.vcRowBehaviour').bind('resize.vcRowBehaviour',local_function); 641 local_function(); 642 } 643} 644 645if ( typeof window['vc_gridBehaviour'] !== 'function' ) { 646 window.vc_gridBehaviour = function() { 647 jQuery.fn.vcGrid && jQuery('[data-vc-grid]').vcGrid(); 648 } 649} 650/* Helper 651 ---------------------------------------------------------- */ 652if (typeof window['getColumnsCount'] !== 'function') { 653 window.getColumnsCount = function(el) { 654 var find = false, 655 i = 1; 656 657 while (find == false) { 658 if (el.hasClass('columns_count_' + i)) { 659 find = true; 660 return i; 661 } 662 i++; 663 } 664 } 665} 666 667var screen_size = getSizeName(); 668function getSizeName() { 669 var screen_size = '', 670 screen_w = jQuery(window).width(); 671 672 if (screen_w > 1170) { 673 screen_size = "desktop_wide"; 674 } 675 else if (screen_w > 960 && screen_w < 1169) { 676 screen_size = "desktop"; 677 } 678 else if (screen_w > 768 && screen_w < 959) { 679 screen_size = "tablet"; 680 } 681 else if (screen_w > 300 && screen_w < 767) { 682 screen_size = "mobile"; 683 } 684 else if (screen_w < 300) { 685 screen_size = "mobile_portrait"; 686 } 687 return screen_size; 688} 689 690 691function loadScript(url, $obj, callback) { 692 693 var script = document.createElement("script") 694 script.type = "text/javascript"; 695 696 if (script.readyState) { //IE 697 script.onreadystatechange = function () { 698 if (script.readyState == "loaded" || 699 script.readyState == "complete") { 700 script.onreadystatechange = null; 701 callback(); 702 } 703 }; 704 } else { //Others 705 /* 706 script.onload = function(){ 707 708 callback(); 709 }; 710 */ 711 } 712 713 script.src = url; 714 $obj.get(0).appendChild(script); 715} 716 717 718if (typeof window['wpb_prepare_tab_content'] !== 'function') { 719 /** 720 * Prepare html to correctly display inside tab container 721 * 722 * @param event - ui tab event 'show' 723 * @param ui - jquery ui tabs object 724 */ 725 window.wpb_prepare_tab_content = function(event, ui) { 726 var panel = ui.panel || ui.newPanel, 727 $pie_charts = panel.find('.vc_pie_chart:not(.vc_ready)'), 728 $carousel = panel.find('[data-ride="vc_carousel"]'), 729 $ui_panel, $google_maps; 730 vc_carouselBehaviour(); 731 vc_plugin_flexslider(panel); 732 if(ui.newPanel.find('.vc_masonry_media_grid, .vc_masonry_grid').length) { 733 ui.newPanel.find('.vc_masonry_media_grid, .vc_masonry_grid').each(function(){ 734 var grid = jQuery(this).data('vcGrid'); 735 grid && grid.gridBuilder && grid.gridBuilder.setMasonry && grid.gridBuilder.setMasonry(); 736 }); 737 } 738 if(panel.find('.vc_masonry_media_grid, .vc_masonry_grid').length) { 739 panel.find('.vc_masonry_media_grid, .vc_masonry_grid').each(function(){ 740 var grid = jQuery(this).data('vcGrid'); 741 grid && grid.gridBuilder && grid.gridBuilder.setMasonry && grid.gridBuilder.setMasonry(); 742 }); 743 } 744 $pie_charts.length && jQuery.fn.vcChat && $pie_charts.vcChat(); 745 $carousel.length && jQuery.fn.carousel && $carousel.carousel('resizeAction'); 746 $ui_panel = panel.find('.isotope'); 747 $google_maps = panel.find('.wpb_gmaps_widget'); 748 if ($ui_panel.length > 0) { 749 $ui_panel.isotope("layout"); 750 } 751 if ($google_maps.length && !$google_maps.is('.map_ready')) { 752 var $frame = $google_maps.find('iframe'); 753 $frame.attr('src', $frame.attr('src')); 754 $google_maps.addClass('map_ready'); 755 } 756 if (panel.parents('.isotope').length) { 757 panel.parents('.isotope').each(function () { 758 jQuery(this).isotope("layout"); 759 }); 760 } 761 } 762} 763 764var vc_accordionActivate = function (event, ui) { 765 if (ui.newPanel.length && ui.newHeader.length) { 766 var $pie_charts = ui.newPanel.find('.vc_pie_chart:not(.vc_ready)'), 767 $carousel = ui.newPanel.find('[data-ride="vc_carousel"]'); 768 if (jQuery.fn.isotope != undefined) { 769 ui.newPanel.find('.isotope').isotope("layout"); 770 } 771 if(ui.newPanel.find('.vc_masonry_media_grid, .vc_masonry_grid').length) { 772 ui.newPanel.find('.vc_masonry_media_grid, .vc_masonry_grid').each(function(){ 773 var grid = jQuery(this).data('vcGrid'); 774 grid && grid.gridBuilder && grid.gridBuilder.setMasonry && grid.gridBuilder.setMasonry(); 775 }); 776 } 777 jQuery('html, body').animate({scrollTop: ui.newHeader.offset().top - 100}, 1000); 778 vc_carouselBehaviour(ui.newPanel); 779 vc_plugin_flexslider(ui.newPanel); 780 $pie_charts.length && jQuery.fn.vcChat && $pie_charts.vcChat(); 781 $carousel.length && jQuery.fn.carousel && $carousel.carousel('resizeAction'); 782 if (ui.newPanel.parents('.isotope').length) { 783 ui.newPanel.parents('.isotope').each(function () { 784 jQuery(this).isotope("layout"); 785 }); 786 } 787 } 788};
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.