OwlCyberSecurity - MANAGER
Edit File: js_composer_front.js
document.documentElement.className += ' js_active '; document.documentElement.className += 'ontouchstart' in document.documentElement ? ' vc_mobile ' : ' vc_desktop '; (function(){ var prefix = ['-webkit-','-o-','-moz-','-ms-',""]; for (var i in prefix) { if(prefix[i]+'transform' in document.documentElement.style) document.documentElement.className += " vc_transform "; } })(); /* On document ready jQuery will fire set of functions. If you want to override function behavior then copy it to your theme js file with the same name. */ jQuery(window).load(function() { }); jQuery(document).ready(function($) { }); // END jQuery(document).ready /* Twitter ---------------------------------------------------------- */ if ( typeof window['vc_twitterBehaviour'] !== 'function' ) { function vc_twitterBehaviour() { jQuery('.wpb_twitter_widget .tweets').each(function(index) { var this_element = jQuery(this), tw_name = this_element.attr('data-tw_name'); tw_count = this_element.attr('data-tw_count'); this_element.tweet({ username: tw_name, join_text: "auto", avatar_size: 0, count: tw_count, template: "{avatar}{join}{text}{time}", auto_join_text_default: "", auto_join_text_ed: "", auto_join_text_ing: "", auto_join_text_reply: "", auto_join_text_url: "", loading_text: '<span class="loading_tweets">loading tweets...</span>' }); }); } } /* Google plus ---------------------------------------------------------- */ if ( typeof window['vc_googleplus'] !== 'function' ) { function vc_googleplus() { if ( jQuery('.wpb_googleplus').length > 0 ) { (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })(); } } } /* Pinterest ---------------------------------------------------------- */ if ( typeof window['vc_pinterest'] !== 'function' ) { function vc_pinterest() { if ( jQuery('.wpb_pinterest').length > 0 ) { (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'http://assets.pinterest.com/js/pinit.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); //<script type="text/javascript" src="//assets.pinterest.com/js/pinit.js"></script> })(); } } } /* Progress bar ---------------------------------------------------------- */ if ( typeof window['vc_progress_bar'] !== 'function' ) { function vc_progress_bar() { if (typeof jQuery.fn.waypoint !== 'undefined') { jQuery('.vc_progress_bar').waypoint(function() { jQuery(this).find('.vc_single_bar').each(function(index) { var $this = jQuery(this), bar = $this.find('.vc_bar'), val = bar.data('percentage-value'); setTimeout(function(){ bar.css({"width" : val+'%'}); }, index*200); }); }, { offset: '85%' }); } } } /* Waypoints magic ---------------------------------------------------------- */ if ( typeof window['vc_waypoints'] !== 'function' ) { function vc_waypoints() { if (typeof jQuery.fn.waypoint !== 'undefined') { jQuery('.wpb_animate_when_almost_visible').waypoint(function() { jQuery(this).addClass('wpb_start_animation'); }, { offset: '85%' }); } } } /* Toggle ---------------------------------------------------------- */ if ( typeof window['vc_toggleBehaviour'] !== 'function' ) { function vc_toggleBehaviour() { jQuery(".wpb_toggle").click(function(e) { if ( jQuery(this).hasClass('wpb_toggle_title_active') ) { jQuery(this).removeClass('wpb_toggle_title_active').next().slideUp(500); } else { jQuery(this).addClass('wpb_toggle_title_active').next().slideDown(500); } }); jQuery('.wpb_toggle_content').each(function(index) { if ( jQuery(this).next().is('h4.wpb_toggle') == false ) { jQuery('<div class="last_toggle_el_margin"></div>').insertAfter(this); } }); } } /* Tabs + Tours ---------------------------------------------------------- */ if ( typeof window['vc_tabsBehaviour'] !== 'function' ) { function vc_tabsBehaviour() { jQuery(function($){$(document.body).off('click.preview', 'a')}); jQuery('.wpb_tabs, .wpb_tour').each(function(index) { var $tabs, interval = jQuery(this).attr("data-interval"), tabs_array = []; // $tabs = jQuery(this).find('.wpb_tour_tabs_wrapper').tabs({ show: function(event, ui) {}, beforeActivate: function(event, ui) { var panel = ui.panel || ui.newPanel; jQuery(panel).parent().find('li.ui-state-default').not('li.ui-state-hover').stop().animate({ backgroundColor:theme_options.background_color, },200); }, activate: function(event, ui) { var panel = ui.panel || ui.newPanel; jQuery(panel).parent().find('li.ui-state-default').not('li.ui-state-active,li.ui-state-hover').stop().animate({ backgroundColor:theme_options.background_color, },200); } }); jQuery(this).find('.wpb_tab').each(function(){ tabs_array.push(this.id); }); }); } } /* Tabs + Tours ---------------------------------------------------------- */ if ( typeof window['vc_accordionBehaviour'] !== 'function' ) { function vc_accordionBehaviour() { jQuery('.wpb_accordion').each(function(index) { var $tabs, interval = jQuery(this).attr("data-interval"), active_tab = !isNaN(jQuery(this).data('active-tab')) && parseInt(jQuery(this).data('active-tab')) > 0 ? parseInt(jQuery(this).data('active-tab'))-1 : false, collapsible = active_tab === false || jQuery(this).data('collapsible') === 'yes'; // var ac_icons = { header: "icon-plus-3", activeHeader: "icon-minus-1" }; $tabs = jQuery(this).find('.wpb_accordion_wrapper').accordion({ header: "> div > h3", icons: ac_icons, autoHeight: false, heightStyle: "content", active: 'none', collapsible: true, navigation: true, activate: function(event, ui){ jQuery(window).trigger("debouncedresize"); jQuery(window).trigger( "smartresize"); if(jQuery.fn.isotope!=undefined) { ui.newPanel.find('.isotope').isotope("reLayout"); } setTimeout(function(){ jQuery(window).trigger("debouncedresize"); jQuery(window).trigger( "smartresize"); },150); vc_carouselBehaviour(); } }); //.tabs().tabs('rotate', interval*1000, true); }); } } /* Teaser grid: isotope ---------------------------------------------------------- */ if ( typeof window['vc_teaserGrid'] !== 'function' ) { function vc_teaserGrid() { var layout_modes = { fitrows: 'fitRows', masonry: 'masonry' } jQuery('.wpb_grid .teaser_grid_container:not(.wpb_carousel), .wpb_filtered_grid .teaser_grid_container:not(.wpb_carousel)').each(function(){ var $container = jQuery(this); var $thumbs = $container.find('.wpb_thumbnails'); var layout_mode = $thumbs.attr('data-layout-mode'); $thumbs.isotope({ // options itemSelector : '.isotope-item', layoutMode : (layout_modes[layout_mode]==undefined ? 'fitRows' : layout_modes[layout_mode]) }); $container.find('.categories_filter a').data('isotope', $thumbs).click(function(e){ e.preventDefault(); var $thumbs = jQuery(this).data('isotope'); jQuery(this).parent().parent().find('.active').removeClass('active'); jQuery(this).parent().addClass('active'); $thumbs.isotope({filter: jQuery(this).attr('data-filter')}); }); jQuery(window).load(function() { $thumbs.isotope("reLayout"); }); }); /* var isotope = jQuery('.wpb_grid ul.thumbnails'); if ( isotope.length > 0 ) { isotope.isotope({ // options itemSelector : '.isotope-item', layoutMode : 'fitRows' }); jQuery(window).load(function() { isotope.isotope("reLayout"); }); } */ } } if ( typeof window['vc_carouselBehaviour'] !== 'function' ) { function vc_carouselBehaviour() { jQuery(".wpb_carousel").each(function() { var $this = jQuery(this); if($this.data('carousel_enabled') !== true && $this.is(':visible')) { $this.data('carousel_enabled', true); var carousel_width = jQuery(this).width(), visible_count = getColumnsCount(jQuery(this)), carousel_speed = 500; if ( jQuery(this).hasClass('columns_count_1') ) { carousel_speed = 900; } /* Get margin-left value from the css grid and apply it to the carousele li items (margin-right), before carousele initialization */ var carousele_li = jQuery(this).find('.wpb_thumbnails-fluid li'); carousele_li.css({"margin-right": carousele_li.css("margin-left"), "margin-left" : 0 }); jQuery(this).find('.wpb_wrapper:eq(0)').jCarouselLite({ btnNext: jQuery(this).find('.next'), btnPrev: jQuery(this).find('.prev'), visible: visible_count, speed: carousel_speed }) .width('100%');//carousel_width var fluid_ul = jQuery(this).find('ul.wpb_thumbnails-fluid'); fluid_ul.width(fluid_ul.width()+300); jQuery(window).resize(function() { var before_resize = screen_size; screen_size = getSizeName(); if ( before_resize != screen_size ) { window.setTimeout('location.reload()', 20); } }); } }); if(jQuery.fn.bxSlider !== undefined ) { jQuery('.bxslider').each(function(){ var $slider = jQuery(this); $slider.bxSlider($slider.data('settings')); }); } } } if ( typeof window['vc_slidersBehaviour'] !== 'function' ) { function vc_slidersBehaviour() { //var sliders_count = 0; } } if ( typeof window['vc_prettyPhoto'] !== 'function' ) { function vc_prettyPhoto() { try { // just in case. maybe prettyphoto isnt loaded on this site jQuery('a.prettyphoto, .gallery-icon a[href*=".jpg"]').prettyPhoto({ animationSpeed: 'normal', /* fast/slow/normal */ padding: 15, /* padding for each side of the picture */ opacity: 0.7, /* Value betwee 0 and 1 */ showTitle: true, /* true/false */ allowresize: true, /* true/false */ counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */ //theme: 'light_square', /* light_rounded / dark_rounded / light_square / dark_square */ hideflash: false, /* Hides all the flash object on a page, set to TRUE if flash appears over prettyPhoto */ modal: false, /* If set to true, only the close button will close the window */ callback: function() { var url = location.href; var hashtag = (url.indexOf('#!prettyPhoto')) ? true : false; if (hashtag) location.hash = "!"; } /* Called when prettyPhoto is closed */, social_tools : '' }); } catch (err) { } } } /* Helper ---------------------------------------------------------- */ function getColumnsCount(el) { var find = false, i = 1; while ( find == false ) { if ( el.hasClass('columns_count_'+i) ) { find = true; return i; } i++; } } var screen_size = getSizeName(); function getSizeName() { var screen_size = '', screen_w = jQuery(window).width(); if ( screen_w > 1170 ) { screen_size = "desktop_wide"; } else if ( screen_w > 960 && screen_w < 1169 ) { screen_size = "desktop"; } else if ( screen_w > 768 && screen_w < 959 ) { screen_size = "tablet"; } else if ( screen_w > 300 && screen_w < 767 ) { screen_size = "mobile"; } else if ( screen_w < 300 ) { screen_size = "mobile_portrait"; } return screen_size; } function loadScript(url, $obj, callback){ var script = document.createElement("script") script.type = "text/javascript"; if (script.readyState){ //IE script.onreadystatechange = function(){ if (script.readyState == "loaded" || script.readyState == "complete"){ script.onreadystatechange = null; callback(); } }; } else { //Others /* script.onload = function(){ callback(); }; */ } script.src = url; $obj.get(0).appendChild(script); } /** * Prepare html to correctly display inside tab container * * @param event - ui tab event 'show' * @param ui - jquery ui tabs object */ function wpb_prepare_tab_content(event, ui) { var panel = ui.panel || ui.newPanel; jQuery(panel).parent().find('li.ui-state-default').not('li.ui-state-active').animate({ backgroundColor:theme_options.background_color, duration:0 }); }