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 jQuery(function ($) { 228 $(document.body).off('click.preview', 'a') 229 }); 230 var $call = $tab || jQuery('.wpb_tabs, .wpb_tour'), 231 ver = jQuery.ui && jQuery.ui.version ? jQuery.ui.version.split('.') : '1.10', 232 old_version = parseInt(ver[0]) == 1 && parseInt(ver[1]) < 9; 233 // if($call.hasClass('ui-widget')) $call.tabs('destroy'); 234 $call.each(function (index) { 235 var $tabs, 236 interval = jQuery(this).attr("data-interval"), 237 tabs_array = []; 238 // 239 $tabs = jQuery(this).find('.wpb_tour_tabs_wrapper').tabs({ 240 show:function (event, ui) { 241 wpb_prepare_tab_content(event, ui); 242 }, 243 beforeActivate: function(event, ui) { 244 ui.newPanel.index() !== 1 && ui.newPanel.find('.vc_pie_chart:not(.vc_ready)'); 245 }, 246 activate:function (event, ui) { 247 wpb_prepare_tab_content(event, ui); 248 } 249 }); // .tabs('rotate', interval * 1000); 250 251 jQuery(this).find('.wpb_tab').each(function () { 252 tabs_array.push(this.id); 253 }); 254 255 jQuery(this).find('.wpb_tabs_nav li').click(function (e) { 256 e.preventDefault(); 257 /*if (jQuery.inArray(jQuery(this).attr('href'), tabs_array)) { 258 if (old_version) { 259 $tabs.tabs("select", jQuery(this).attr('href')); 260 } else { 261 $tabs.tabs("option", "active", jQuery(jQuery(this).attr('href')).index() - 1); 262 } 263 return false; 264 }*/ 265 if (old_version) { 266 $tabs.tabs("select", jQuery('a',this).attr('href')); 267 } else { 268 $tabs.tabs("option", "active", jQuery(this).index()); 269 } 270 return false; 271 }); 272 273 jQuery(this).find('.wpb_prev_slide a, .wpb_next_slide a').click(function (e) { 274 e.preventDefault(); 275 if (old_version) { 276 var index = $tabs.tabs('option', 'selected'); 277 if (jQuery(this).parent().hasClass('wpb_next_slide')) { 278 index++; 279 } 280 else { 281 index--; 282 } 283 if (index < 0) { 284 index = $tabs.tabs("length") - 1; 285 } 286 else if (index >= $tabs.tabs("length")) { 287 index = 0; 288 } 289 $tabs.tabs("select", index); 290 } else { 291 var index = $tabs.tabs("option", "active"), 292 length = $tabs.find('.wpb_tab').length; 293 294 if (jQuery(this).parent().hasClass('wpb_next_slide')) { 295 index = (index + 1) >= length ? 0 : index + 1; 296 } else { 297 index = index - 1 < 0 ? length - 1 : index - 1; 298 } 299 300 $tabs.tabs("option", "active", index); 301 } 302 303 }); 304 305 }); 306 } 307} 308 309/* Tabs + Tours 310 ---------------------------------------------------------- */ 311if (typeof window['vc_accordionBehaviour'] !== 'function') { 312 window.vc_accordionBehaviour = function() { 313 jQuery('.wpb_accordion').each(function (index) { 314 var $this = jQuery(this); 315 var $tabs, 316 interval = $this.attr("data-interval"), 317 active_tab = !isNaN(jQuery(this).data('active-tab')) && parseInt($this.data('active-tab')) > 0 ? parseInt($this.data('active-tab')) - 1 : false, 318 collapsible = active_tab === false || $this.data('collapsible') === 'yes'; 319 // 320 $tabs = $this.find('.wpb_accordion_wrapper').accordion({ 321 header:"> div > h3", 322 autoHeight:false, 323 heightStyle:"content", 324 active:active_tab, 325 collapsible:collapsible, 326 navigation:true, 327 328 activate: vc_accordionActivate, 329 change:function (event, ui) { 330 if (jQuery.fn.isotope != undefined) { 331 ui.newContent.find('.isotope').isotope("layout"); 332 } 333 vc_carouselBehaviour(ui.newPanel); 334 } 335 }); 336 if(true === $this.data('vcDisableKeydown')) { 337 $tabs.data('uiAccordion')._keydown = function() {}; 338 } 339 //.tabs().tabs('rotate', interval*1000, true); 340 }); 341 } 342} 343 344/* Teaser grid: isotope 345 ---------------------------------------------------------- */ 346if (typeof window['vc_teaserGrid'] !== 'function') { 347 window.vc_teaserGrid = function() { 348 var layout_modes = { 349 fitrows:'fitRows', 350 masonry:'masonry' 351 }; 352 jQuery('.wpb_grid .teaser_grid_container:not(.wpb_carousel), .wpb_filtered_grid .teaser_grid_container:not(.wpb_carousel)').each(function () { 353 var $container = jQuery(this); 354 var $thumbs = $container.find('.wpb_thumbnails'); 355 var layout_mode = $thumbs.attr('data-layout-mode'); 356 $thumbs.isotope({ 357 // options 358 itemSelector:'.isotope-item', 359 layoutMode:(layout_modes[layout_mode] == undefined ? 'fitRows' : layout_modes[layout_mode]) 360 }); 361 $container.find('.categories_filter a').data('isotope', $thumbs).click(function (e) { 362 e.preventDefault(); 363 var $thumbs = jQuery(this).data('isotope'); 364 jQuery(this).parent().parent().find('.active').removeClass('active'); 365 jQuery(this).parent().addClass('active'); 366 $thumbs.isotope({filter:jQuery(this).attr('data-filter')}); 367 }); 368 jQuery(window).bind('load resize', function () { 369 $thumbs.isotope("layout"); 370 }); 371 }); 372 373 /* 374 var isotope = jQuery('.wpb_grid ul.thumbnails'); 375 if ( isotope.length > 0 ) { 376 isotope.isotope({ 377 // options 378 itemSelector : '.isotope-item', 379 layoutMode : 'fitRows' 380 }); 381 jQuery(window).load(function() { 382 isotope.isotope("layout"); 383 }); 384 } 385 */ 386 } 387} 388 389if (typeof window['vc_carouselBehaviour'] !== 'function') { 390 window.vc_carouselBehaviour = function($parent) { 391 var $carousel = $parent ? $parent.find(".wpb_carousel") : jQuery(".wpb_carousel"); 392 $carousel.each(function () { 393 var $this = jQuery(this); 394 if ($this.data('carousel_enabled') !== true && $this.is(':visible')) { 395 $this.data('carousel_enabled', true); 396 var carousel_width = jQuery(this).width(), 397 visible_count = getColumnsCount(jQuery(this)), 398 carousel_speed = 500; 399 if (jQuery(this).hasClass('columns_count_1')) { 400 carousel_speed = 900; 401 } 402 /* Get margin-left value from the css grid and apply it to the carousele li items (margin-right), before carousele initialization */ 403 var carousele_li = jQuery(this).find('.wpb_thumbnails-fluid li'); 404 carousele_li.css({"margin-right":carousele_li.css("margin-left"), "margin-left":0 }); 405 406 jQuery(this).find('.wpb_wrapper:eq(0)').jCarouselLite({ 407 btnNext:jQuery(this).find('.next'), 408 btnPrev:jQuery(this).find('.prev'), 409 visible:visible_count, 410 speed:carousel_speed 411 }) 412 .width('100%');
412//carousel_width 413 414 var fluid_ul = jQuery(this).find('ul.wpb_thumbnails-fluid'); 415 fluid_ul.width(fluid_ul.width() + 300); 416 417 jQuery(window).resize(function () { 418 var before_resize = screen_size; 419 screen_size = getSizeName(); 420 if (before_resize != screen_size) { 421 window.setTimeout('location.reload()', 20); 422 } 423 }); 424 } 425 426 }); 427 /* 428 if(jQuery.fn.bxSlider !== undefined ) { 429 jQuery('.bxslider').each(function(){ 430 var $slider = jQuery(this); 431 $slider.bxSlider($slider.data('settings')); 432 }); 433 } 434 */ 435 if (window.Swiper !== undefined) { 436 437 jQuery('.swiper-container').each(function () { 438 var $this = jQuery(this), 439 my_swiper, 440 max_slide_size = 0, 441 options = jQuery(this).data('settings'); 442 443 if (options.mode === 'vertical') { 444 $this.find('.swiper-slide').each(function () { 445 var height = jQuery(this).outerHeight(true); 446 if (height > max_slide_size) max_slide_size = height; 447 }); 448 $this.height(max_slide_size); 449 $this.css('overflow', 'hidden'); 450 } 451 jQuery(window).resize(function () { 452 $this.find('.swiper-slide').each(function () { 453 var height = jQuery(this).outerHeight(true); 454 if (height > max_slide_size) max_slide_size = height; 455 }); 456 $this.height(max_slide_size); 457 }); 458 my_swiper = jQuery(this).swiper(jQuery.extend(options, { 459 onFirstInit:function (swiper) { 460 if (swiper.slides.length < 2) { 461 $this.find('.vc_arrow-left,.vc_arrow-right').hide(); 462 } else if (swiper.activeIndex === 0 && swiper.params.loop !== true) { 463 $this.find('.vc_arrow-left').hide(); 464 } else { 465 $this.find('.vc_arrow-left').show(); 466 } 467 }, 468 onSlideChangeStart:function (swiper) { 469 if (swiper.slides.length > 1 && swiper.params.loop !== true) { 470 if (swiper.activeIndex === 0) { 471 $this.find('.vc_arrow-left').hide(); 472 } else { 473 $this.find('.vc_arrow-left').show(); 474 } 475 if (swiper.slides.length - 1 === swiper.activeIndex) { 476 $this.find('.vc_arrow-right').hide(); 477 } else { 478 $this.find('.vc_arrow-right').show(); 479 } 480 } 481 } 482 })); 483 $this.find('.vc_arrow-left').click(function (e) { 484 e.preventDefault(); 485 my_swiper.swipePrev(); 486 }); 487 $this.find('.vc_arrow-right').click(function (e) { 488 e.preventDefault(); 489 my_swiper.swipeNext(); 490 }); 491 my_swiper.reInit(); 492 }); 493 494 } 495 496 } 497} 498 499if (typeof window['vc_slidersBehaviour'] !== 'function') { 500 window.vc_slidersBehaviour = function() { 501 //var sliders_count = 0; 502 jQuery('.wpb_gallery_slides').each(function (index) { 503 var this_element = jQuery(this); 504 var ss_count = 0; 505 506 /*if ( this_element.hasClass('wpb_slider_fading') ) { 507 var sliderSpeed = 500, sliderTimeout = this_element.attr('data-interval')*1000, slider_fx = 'fade'; 508 var current_ss; 509 510 function slideshowOnBefore(currSlideElement, nextSlideElement, options) { 511 jQuery(nextSlideElement).css({"position" : "absolute" }); 512 jQuery(nextSlideElement).find("div.description").animate({"opacity": 0}, 0); 513 } 514 515 function slideshowOnAfter(currSlideElement, nextSlideElement, options) { 516 jQuery(nextSlideElement).find("div.description").animate({"opacity": 1}, 2000); 517 518 jQuery(nextSlideElement).css({"position" : "static" }); 519 var new_h = jQuery(nextSlideElement).find('img').height(); 520 if ( jQuery.isNumeric(new_h) ) { 521 //this_element.animate({ "height" : new_h }, sliderSpeed ); 522 } 523 } 524 525 this_element.find('ul') 526 .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>') 527 .cycle({ 528 fx: slider_fx, // choose your transition type, ex: fade, scrollUp, shuffle, etc... 529 pause: 1, 530 speed: sliderSpeed, 531 timeout: sliderTimeout, 532 delay: -ss_count * 1000, 533 before: slideshowOnBefore, 534 after:slideshowOnAfter, 535 pager: '.ss_nav_'+ss_count 536 }); 537 //.find('.description').width(jQuery(this).width() - 20); 538 ss_count++; 539 } 540 else*/ 541 if (this_element.hasClass('wpb_slider_nivo')) { 542 var sliderSpeed = 800, 543 sliderTimeout = this_element.attr('data-interval') * 1000; 544 545 if (sliderTimeout == 0) sliderTimeout = 9999999999; 546 547 this_element.find('.nivoSlider').nivoSlider({ 548 effect:'boxRainGrow,boxRain,boxRainReverse,boxRainGrowReverse', // Specify sets like: 'fold,fade,sliceDown' 549 slices:15, // For slice animations 550 boxCols:8, // For box animations 551 boxRows:4, // For box animations 552 animSpeed:sliderSpeed, // Slide transition speed 553 pauseTime:sliderTimeout, // How long each slide will show 554 startSlide:0, // Set starting Slide (0 index) 555 directionNav:true, // Next & Prev navigation 556 directionNavHide:true, // Only show on hover 557 controlNav:true, // 1,2,3... navigation 558 keyboardNav:false, // Use left & right arrows 559 pauseOnHover:true, // Stop animation while hovering 560 manualAdvance:false, // Force manual transitions 561 prevText:'Prev', // Prev directionNav text 562 nextText:'Next' // Next directionNav text 563 }); 564 } 565 else if (this_element.hasClass('wpb_image_grid')) { 566 var isotope = this_element.find('.wpb_image_grid_ul'); 567 isotope.isotope({ 568 // options 569 itemSelector:'.isotope-item', 570 layoutMode:'fitRows' 571 }); 572 jQuery(window).load(function () { 573 isotope.isotope("layout"); 574 }); 575 } 576 }); 577 } 578} 579 580if (typeof window['vc_prettyPhoto'] !== 'function') { 581 window.vc_prettyPhoto = function() { 582 try { 583 // just in case. maybe prettyphoto isnt loaded on this site 584 jQuery('a.prettyphoto, .gallery-icon a[href*=".jpg"]').prettyPhoto({ 585 animationSpeed:'normal', /* fast/slow/normal */ 586 padding:15, /* padding for each side of the picture */ 587 opacity:0.7, /* Value betwee 0 and 1 */ 588 showTitle:true, /* true/false */ 589 allowresize:true, /* true/false */ 590 counter_separator_label:'/', /* The separator for the gallery counter 1 "of" 2 */ 591 //theme: 'light_square', /* light_rounded / dark_rounded / light_square / dark_square */ 592 hideflash:false, /* Hides all the flash object on a page, set to TRUE if flash appears over prettyPhoto */ 593 deeplinking:false, /* Allow prettyPhoto to update the url to enable deeplinking. */ 594 modal:false, /* If set to true, only the close button will close the window */ 595 callback:function () { 596 var url = location.href; 597 var hashtag = (url.indexOf('#!prettyPhoto')) ? true : false;
598 if (hashtag) location.hash = "!"; 599 } /* Called when prettyPhoto is closed */, 600 social_tools:'' 601 }); 602 } catch (err) { 603 } 604 } 605} 606 607if ( typeof window['vc_google_fonts'] !== 'function' ) { 608 window.vc_google_fonts = function() { 609 return false; // @todo check this for what this is needed 610 } 611} 612 613if (typeof window['vc_rowBehaviour'] !== 'function') { 614 window.vc_rowBehaviour = function () { 615 var $ = window.jQuery; 616 var local_function = function () { 617 var $elements = $('[data-vc-full-width="true"]'); 618 $.each($elements, function (key, item) { 619 var $el = $(this); 620 var $el_full = $el.next('.vc_row-full-width'); 621 var offset = 0 - $el_full.offset().left - parseInt($el.css('margin-left')); 622 $el.css({ 623 'position': 'relative', 624 'left': offset, 625 'box-sizing': 'border-box', 626 'width': $(window).width() 627 }); 628 if (!$el.data('vcStretchContent')) { 629 var padding = (-1 * offset); 630 if(padding < 0) { padding = 0; } 631 $el.css({'padding-left': padding+'px', 'padding-right': padding+'px'}); 632 } 633 }); 634 }; 635 $(window).unbind('resize.vcRowBehaviour').bind('resize.vcRowBehaviour',local_function); 636 local_function(); 637 } 638} 639 640if ( typeof window['vc_gridBehaviour'] !== 'function' ) { 641 window.vc_gridBehaviour = function() { 642 jQuery.fn.vcGrid && jQuery('[data-vc-grid]').vcGrid(); 643 } 644} 645/* Helper 646 ---------------------------------------------------------- */ 647if (typeof window['getColumnsCount'] !== 'function') { 648 window.getColumnsCount = function(el) { 649 var find = false, 650 i = 1; 651 652 while (find == false) { 653 if (el.hasClass('columns_count_' + i)) { 654 find = true; 655 return i; 656 } 657 i++; 658 } 659 } 660} 661 662var screen_size = getSizeName(); 663function getSizeName() { 664 var screen_size = '', 665 screen_w = jQuery(window).width(); 666 667 if (screen_w > 1170) { 668 screen_size = "desktop_wide"; 669 } 670 else if (screen_w > 960 && screen_w < 1169) { 671 screen_size = "desktop"; 672 } 673 else if (screen_w > 768 && screen_w < 959) { 674 screen_size = "tablet"; 675 } 676 else if (screen_w > 300 && screen_w < 767) { 677 screen_size = "mobile"; 678 } 679 else if (screen_w < 300) { 680 screen_size = "mobile_portrait"; 681 } 682 return screen_size; 683} 684 685 686function loadScript(url, $obj, callback) { 687 688 var script = document.createElement("script") 689 script.type = "text/javascript"; 690 691 if (script.readyState) { //IE 692 script.onreadystatechange = function () { 693 if (script.readyState == "loaded" || 694 script.readyState == "complete") { 695 script.onreadystatechange = null; 696 callback(); 697 } 698 }; 699 } else { //Others 700 /* 701 script.onload = function(){ 702 703 callback(); 704 }; 705 */ 706 } 707 708 script.src = url; 709 $obj.get(0).appendChild(script); 710} 711 712 713if (typeof window['wpb_prepare_tab_content'] !== 'function') { 714 /** 715 * Prepare html to correctly display inside tab container 716 * 717 * @param event - ui tab event 'show' 718 * @param ui - jquery ui tabs object 719 */ 720 window.wpb_prepare_tab_content = function(event, ui) { 721 var panel = ui.panel || ui.newPanel, 722 $pie_charts = panel.find('.vc_pie_chart:not(.vc_ready)'), 723 $carousel = panel.find('[data-ride="vc_carousel"]'), 724 $ui_panel, $google_maps; 725 vc_carouselBehaviour(); 726 vc_plugin_flexslider(panel); 727 if(ui.newPanel.find('.vc_masonry_media_grid, .vc_masonry_grid').length) { 728 ui.newPanel.find('.vc_masonry_media_grid, .vc_masonry_grid').each(function(){ 729 var grid = jQuery(this).data('vcGrid'); 730 grid && grid.gridBuilder && grid.gridBuilder.setMasonry && grid.gridBuilder.setMasonry(); 731 }); 732 } 733 if(panel.find('.vc_masonry_media_grid, .vc_masonry_grid').length) { 734 panel.find('.vc_masonry_media_grid, .vc_masonry_grid').each(function(){ 735 var grid = jQuery(this).data('vcGrid'); 736 grid && grid.gridBuilder && grid.gridBuilder.setMasonry && grid.gridBuilder.setMasonry(); 737 }); 738 } 739 $pie_charts.length && jQuery.fn.vcChat && $pie_charts.vcChat(); 740 $carousel.length && jQuery.fn.carousel && $carousel.carousel('resizeAction'); 741 $ui_panel = panel.find('.isotope'); 742 $google_maps = panel.find('.wpb_gmaps_widget'); 743 if ($ui_panel.length > 0) { 744 $ui_panel.isotope("layout"); 745 } 746 if ($google_maps.length && !$google_maps.is('.map_ready')) { 747 var $frame = $google_maps.find('iframe'); 748 $frame.attr('src', $frame.attr('src')); 749 $google_maps.addClass('map_ready'); 750 } 751 if (panel.parents('.isotope').length) { 752 panel.parents('.isotope').each(function () { 753 jQuery(this).isotope("layout"); 754 }); 755 } 756 } 757} 758 759var vc_accordionActivate = function (event, ui) { 760 if (ui.newPanel.length && ui.newHeader.length) { 761 var $pie_charts = ui.newPanel.find('.vc_pie_chart:not(.vc_ready)'), 762 $carousel = ui.newPanel.find('[data-ride="vc_carousel"]'); 763 if (jQuery.fn.isotope != undefined) { 764 ui.newPanel.find('.isotope').isotope("layout"); 765 } 766 if(ui.newPanel.find('.vc_masonry_media_grid, .vc_masonry_grid').length) { 767 ui.newPanel.find('.vc_masonry_media_grid, .vc_masonry_grid').each(function(){ 768 var grid = jQuery(this).data('vcGrid'); 769 grid && grid.gridBuilder && grid.gridBuilder.setMasonry && grid.gridBuilder.setMasonry(); 770 }); 771 } 772 jQuery('html, body').animate({scrollTop: ui.newHeader.offset().top - 100}, 1000); 773 vc_carouselBehaviour(ui.newPanel); 774 vc_plugin_flexslider(ui.newPanel); 775 $pie_charts.length && jQuery.fn.vcChat && $pie_charts.vcChat(); 776 $carousel.length && jQuery.fn.carousel && $carousel.carousel('resizeAction'); 777 if (ui.newPanel.parents('.isotope').length) { 778 ui.newPanel.parents('.isotope').each(function () { 779 jQuery(this).isotope("layout"); 780 }); 781 } 782 } 783};
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.