PageSourceSearch

https://www.lm-magazine.com/wp-content/themes/Magazinly/wpbakery/j…/assets/js/js_composer_front.js?ver=3.6.8

js lm-magazine.com collected 2026-10-02 08:32:42 UTC 18,970 bytes, 540 lines download raw bytes

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) { if(prefix[i]+'transform' in document.documentElement.style) document.documentElement.className += " vc_transform "; }
6})();
7/*
8   On document ready jQuery will fire set of functions.
9   If you want to override function behavior then copy it to your theme js file
10   with the same name.
11*/
12
13jQuery(window).load(function() {
14    jQuery('.wpb_flexslider').each(function() {
15        var this_element = jQuery(this);
16        var sliderSpeed = 800,
17            sliderTimeout = parseInt(this_element.attr('data-interval'))*1000,
18            sliderFx = this_element.attr('data-flex_fx'),
19            slideshow = true;
20        if ( sliderTimeout == 0 ) slideshow = false;
21
22        this_element.flexslider({
23            animation: sliderFx,
24            slideshow: slideshow,
25            slideshowSpeed: sliderTimeout,
26            sliderSpeed: sliderSpeed,
27            smoothHeight: true
28        });
29    });
30
31});
32jQuery(document).ready(function($) {
33	vc_twitterBehaviour();
34	vc_toggleBehaviour();
35	vc_tabsBehaviour();
36	vc_accordionBehaviour();
37	vc_teaserGrid();
38	vc_carouselBehaviour();
39	vc_slidersBehaviour();
40	vc_prettyPhoto();
41	vc_googleplus();
42	vc_pinterest();
43	vc_progress_bar();
44	vc_waypoints();
45}); // END jQuery(document).ready
46
47/* Twitter
48---------------------------------------------------------- */
49if ( typeof window['vc_twitterBehaviour'] !== 'function' ) {
50	function vc_twitterBehaviour() {
51		jQuery('.wpb_twitter_widget .tweets').each(function(index) {
52			var this_element = jQuery(this),
53				tw_name = this_element.attr('data-tw_name');
54				tw_count = this_element.attr('data-tw_count');
55
56			this_element.tweet({
57				username: tw_name,
58				join_text: "auto",
59				avatar_size: 0,
60				count: tw_count,
61				template: "{avatar}{join}{text}{time}",
62				auto_join_text_default: "",
63				auto_join_text_ed: "",
64				auto_join_text_ing: "",
65				auto_join_text_reply: "",
66				auto_join_text_url: "",
67				loading_text: '<span class="loading_tweets">loading tweets...</span>'
68	        });
69		});
70	}
71}
72
73/* Google plus
74---------------------------------------------------------- */
75if ( typeof window['vc_googleplus'] !== 'function' ) {
76	function vc_googleplus() {
77		if ( jQuery('.wpb_googleplus').length > 0 ) {
78			(function() {
79				var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
80				po.src = 'https://apis.google.com/js/plusone.js';
81				var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
82			})();
83		}
84	}
85}
86
87/* Pinterest
88---------------------------------------------------------- */
89if ( typeof window['vc_pinterest'] !== 'function' ) {
90	function vc_pinterest() {
91		if ( jQuery('.wpb_pinterest').length > 0 ) {
92			(function() {
93				var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
94				po.src = 'http://assets.pinterest.com/js/pinit.js';
95				var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
96				//<script type="text/javascript" src="//assets.pinterest.com/js/pinit.js"></script>
97			})();
98		}
99	}
100}
101
102/* Progress bar
103---------------------------------------------------------- */
104if ( typeof window['vc_progress_bar'] !== 'function' ) {
105  function vc_progress_bar() { 
106    if (typeof jQuery.fn.waypoint !== 'undefined') {
107    	jQuery('.vc_progress_bar').waypoint(function() {
108	  		jQuery(this).find('.vc_single_bar').each(function(index) {
109	        var $this = jQuery(this),
110	            bar = $this.find('.vc_bar'),
111	            val = bar.attr('data-value');
112
113	  		  setTimeout(function(){ bar.css({"width" : val+'%'}); }, index*200);
114	    	});
115		}, { offset: '85%' });
116    }
117  }
118}
119
120/* Waypoints magic
121---------------------------------------------------------- */
122if ( typeof window['vc_waypoints'] !== 'function' ) {
123  function vc_waypoints() {
124	if (typeof jQuery.fn.waypoint !== 'undefined') {
125	    jQuery('.wpb_animate_when_almost_visible').waypoint(function() {
126			jQuery(this).addClass('wpb_start_animation');
127		}, { offset: '85%' });
128	}
129  }
130}
131
132/* Toggle
133---------------------------------------------------------- */
134if ( typeof window['vc_toggleBehaviour'] !== 'function' ) {
135	function vc_toggleBehaviour() {
136		jQuery(".wpb_toggle").click(function(e) {
137			if ( jQuery(this).hasClass('wpb_toggle_title_active') ) {
138				jQuery(this).removeClass('wpb_toggle_title_active').next().slideUp(500);
139			} else {
140				jQuery(this).addClass('wpb_toggle_title_active').next().slideDown(500);
141			}
142		});
143		jQuery('.wpb_toggle_content').each(function(index) {
144			if ( jQuery(this).next().is('h4.wpb_toggle') == false ) {
145				jQuery('<div class="last_toggle_el_margin"></div>').insertAfter(this);
146			}
147		});
148	}
149}
150
151/* Tabs + Tours
152---------------------------------------------------------- */
153if ( typeof window['vc_tabsBehaviour'] !== 'function' ) {
154	function vc_tabsBehaviour() {
155            jQuery(function($){$(document.body).off('click.preview', 'a')});
156            jQuery('.wpb_tabs, .wpb_tour').each(function(index) {
157                var $tabs,
158                    interval = jQuery(this).attr("data-interval"),
159                    tabs_array = [];
160                //
161                $tabs = jQuery(this).find('.wpb_tour_tabs_wrapper').tabs({show: function(event, ui) {wpb_prepare_tab_content(event, ui);}}).tabs('rotate', interval*1000);
162
163                jQuery(this).find('.wpb_tab').each(function(){ tabs_array.push(this.id); });
164
165                jQuery(this).find('.wpb_tab a[href^="#"]').click(function(e) {
166                    e.preventDefault();
167                    if ( jQuery.inArray( jQuery(this).attr('href'), tabs_array) ) {
168                        $tabs.tabs("select", jQuery(this).attr('href'));
169                        return false;
170                    }
171                });
172
173                jQuery(this).find('.wpb_prev_slide a, .wpb_next_slide a').click(function(e) {
174                    e.preventDefault();
175                    var index = $tabs.tabs('option', 'selected');
176
177                    if ( jQuery(this).parent().hasClass('wpb_next_slide') ) { 		index++; }
178                    else 													{	 	index--; }
179
180                    if ( index < 0 ) { 									index = $tabs.tabs("length") - 1; }
181                    else if ( index >= $tabs.tabs("length") ) {			index = 0; }
182
183                    $tabs.tabs("select", index);
184                });
185
186            });
187	}
188}
189
190/* Tabs + Tours
191---------------------------------------------------------- */
192if ( typeof window['vc_accordionBehaviour'] !== 'function' ) {
193	function vc_accordionBehaviour() {
194		jQuery('.wpb_accordion').each(function(index) {
195			var $tabs,
196				interval = jQuery(this).attr("data-interval"),
197                active_tab = !isNaN(jQuery(this).data('active-tab')) && parseInt(j
197Query(this).data('active-tab')) >  0 ? parseInt(jQuery(this).data('active-tab'))-1 : false,
198                collapsible =  active_tab === false || jQuery(this).data('collapsible') === 'yes';
199			//
200			$tabs = jQuery(this).find('.wpb_accordion_wrapper').accordion({
201				header: "> div > h3",
202				autoHeight: false,
203                active: active_tab,
204                collapsible: collapsible,
205                navigation: true,
206                change: function(event, ui){
207                    if(jQuery.fn.isotope!=undefined) {
208                        ui.newContent.find('.isotope').isotope("reLayout");
209                    }
210                    vc_carouselBehaviour();
211                }
212			});
213			//.tabs().tabs('rotate', interval*1000, true);
214		});
215	}
216}
217
218/* Teaser grid: isotope
219---------------------------------------------------------- */
220if ( typeof window['vc_teaserGrid'] !== 'function' ) {
221	function vc_teaserGrid() {
222        var layout_modes = {
223            fitrows: 'fitRows',
224            masonry: 'masonry'
225        }
226        jQuery('.wpb_grid .teaser_grid_container:not(.wpb_carousel), .wpb_filtered_grid .teaser_grid_container:not(.wpb_carousel)').each(function(){
227            var $container = jQuery(this);
228            var $thumbs = $container.find('.wpb_thumbnails');
229            var layout_mode = $thumbs.attr('data-layout-mode');
230            $thumbs.isotope({
231                // options
232                itemSelector : '.isotope-item',
233                layoutMode : (layout_modes[layout_mode]==undefined ? 'fitRows' : layout_modes[layout_mode])
234            });
235            $container.find('.categories_filter a').data('isotope', $thumbs).click(function(e){
236                e.preventDefault();
237                var $thumbs = jQuery(this).data('isotope');
238                jQuery(this).parent().parent().find('.active').removeClass('active');
239                jQuery(this).parent().addClass('active');
240                $thumbs.isotope({filter: jQuery(this).attr('data-filter')});
241            });
242            jQuery(window).load(function() {
243                $thumbs.isotope("reLayout");
244            });
245        });
246
247        /*
248		var isotope = jQuery('.wpb_grid ul.thumbnails');
249		if ( isotope.length > 0 ) {
250			isotope.isotope({
251				// options
252				itemSelector : '.isotope-item',
253				layoutMode : 'fitRows'
254			});
255			jQuery(window).load(function() {
256				isotope.isotope("reLayout");
257			});
258		}
259		*/
260	}
261}
262
263if ( typeof window['vc_carouselBehaviour'] !== 'function' ) {
264	function vc_carouselBehaviour() {
265		jQuery(".wpb_carousel").each(function() {
266            var $this = jQuery(this);
267            if($this.data('carousel_enabled') !== true && $this.is(':visible')) {
268                $this.data('carousel_enabled', true);
269                var carousel_width = jQuery(this).width(),
270                    visible_count = getColumnsCount(jQuery(this)),
271                    carousel_speed = 500;
272                if ( jQuery(this).hasClass('columns_count_1') ) {
273                    carousel_speed = 900;
274                }
275                /* Get margin-left value from the css grid and apply it to the carousele li items (margin-right), before carousele initialization */
276                var carousele_li = jQuery(this).find('.wpb_thumbnails-fluid li');
277                carousele_li.css({"margin-right": carousele_li.css("margin-left"), "margin-left" : 0 });
278
279                jQuery(this).find('.wpb_wrapper:eq(0)').jCarouselLite({
280                    btnNext: jQuery(this).find('.next'),
281                    btnPrev: jQuery(this).find('.prev'),
282                    visible: visible_count,
283                    speed: carousel_speed
284                })
285                    .width('100%');//carousel_width
286
287                var fluid_ul = jQuery(this).find('ul.wpb_thumbnails-fluid');
288                fluid_ul.width(fluid_ul.width()+300);
289
290                jQuery(window).resize(function() {
291                    var before_resize = screen_size;
292                    screen_size = getSizeName();
293                    if ( before_resize != screen_size ) {
294                        window.setTimeout('location.reload()', 20);
295                    }
296                });
297            }
298
299		});
300	}
301}
302
303if ( typeof window['vc_slidersBehaviour'] !== 'function' ) {
304	function vc_slidersBehaviour() {
305		//var sliders_count = 0;
306		jQuery('.wpb_gallery_slides').each(function(index) {
307			var this_element = jQuery(this);
308			var ss_count = 0;
309
310			/*if ( this_element.hasClass('wpb_slider_fading') ) {
311				var sliderSpeed = 500, sliderTimeout = this_element.attr('data-interval')*1000, slider_fx = 'fade';
312				var current_ss;
313
314				function slideshowOnBefore(currSlideElement, nextSlideElement, options) {
315					jQuery(nextSlideElement).css({"position" : "absolute" });
316					jQuery(nextSlideElement).find("div.description").animate({"opacity": 0}, 0);
317				}
318
319				function slideshowOnAfter(currSlideElement, nextSlideElement, options) {
320					jQuery(nextSlideElement).find("div.description").animate({"opacity": 1}, 2000);
321
322					jQuery(nextSlideElement).css({"position" : "static" });
323					var new_h = jQuery(nextSlideElement).find('img').height();
324					if ( jQuery.isNumeric(new_h) ) {
325						//this_element.animate({ "height" : new_h }, sliderSpeed );
326					}
327				}
328
329				this_element.find('ul')
330				.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>')
331				.cycle({
332					fx: slider_fx, // choose your transition type, ex: fade, scrollUp, shuffle, etc...
333					pause: 1,
334					speed: sliderSpeed,
335					timeout: sliderTimeout,
336					delay: -ss_count * 1000,
337					before: slideshowOnBefore,
338					after:slideshowOnAfter,
339					pager:  '.ss_nav_'+ss_count
340				});
341				//.find('.description').width(jQuery(this).width() - 20);
342				ss_count++;
343			}
344			else*/
345			if ( this_element.hasClass('wpb_slider_nivo') ) {
346				var sliderSpeed = 800,
347					sliderTimeout = this_element.attr('data-interval')*1000;
348
349				if ( sliderTimeout == 0 ) sliderTimeout = 9999999999;
350
351				this_element.find('.nivoSlider').nivoSlider({
352					effect: 'boxRainGrow,boxRain,boxRainReverse,boxRainGrowReverse', // Specify sets like: 'fold,fade,sliceDown'
353					slices: 15, // For slice animations
354					boxCols: 8, // For box animations
355					boxRows: 4, // For box animations
356					animSpeed: sliderSpeed, // Slide transition speed
357					pauseTime: sliderTimeout, // How long each slide will show
358					startSlide: 0, // Set starting Slide (0 index)
359					directionNav: true, // Next & Prev navigation
360					directionNavHide: true, // Only show on hover
361					controlNav: true, // 1,2,3... navigation
362					keyboardNav: false, // Use left & right arrows
363					pauseOnHover: true, // Stop animation while hovering
364					manualAdvance: false, // Force manual transitions
365					prevText: 'Prev', // Prev directionNav text
366					nextText: 'Next' // Next directionNav text
367				});
368			}
369			else if ( this_element.hasClass('wpb_flexslider') && 1==2) { /* TODO: remove this */
370                /*
371				var sliderSpeed = 800,
372					sliderTimeout = this_element.attr('data-interval')*1000,
373					sliderFx = this_element.attr('data-flex_fx'),
374					slideshow = true;
375				if ( sliderTimeout == 0 ) slideshow = false;
376
377				this_element.flexslider({
378					animation: sliderFx,
379					slideshow: slideshow,
380					slideshowSpeed: sliderTimeout,
381					sliderSpeed: sliderSpeed,
382					smoothHeight: true
383
384				});
385                */
386
387                /*
388                var $first_object = this_element.find('li:first').show().find('*:not(a)');
389
390                $first_object.bind('load', function() {
391                    if(!this_element.find('.flex-control-nav').is('ol')) {
392                        this_element.flexslider({
393                            animation: sliderFx,
394                            slideshow: slideshow,
395                            slideshowSpeed: sliderTimeout,
396                            sliderSpeed: sliderSpeed,
397                            smoothHeight: true
398                        });
399                    }
400                });
401
402                window.setTimeout(function(){
403                    if(!this_element.find('.flex-control-nav').is('ol')) {
404                        this_element.flexslider({
405                            animation: sliderFx,
406                            slideshow: slideshow,
407                            slideshowSpeed: sliderTimeout,
408                            sliderSpeed: sliderSpeed,
409                            smoothHeight: true
410                        });
411                    }
412                }, 5000);
413                */
414			}
415			else if ( this_element.hasClass('wpb_image_grid') ) {
416				var isotope = this_element.find('.wpb_image_grid_ul');
417				isotope.isotope({
418					// options
419					itemSelector : '.isotope-item',
420					layoutMode : 'fitRows'
421				});
422				jQuery(window).load(function() {
423					isotope.isotope("reLayout");
424				});
425			}
426		});
427	}
428}
429
430if ( typeof window['vc_prettyPhoto'] !== 'function' ) {
431	function vc_prettyPhoto() {
432		try {
433			// just in case. maybe prettyphoto isnt loaded on this site
434			jQuery('a.prettyphoto, .gallery-icon a[href*=".jpg"]').prettyPhoto({
435				animationSpeed: 'normal', /* fast/slow/normal */
436				padding: 15, /* padding for each side of the picture */
437				opacity: 0.7, /* Value betwee 0 and 1 */
438				showTitle: true, /* true/false */
439				allowresize: true, /* true/false */
440				counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
441				//theme: 'light_square', /* light_rounded / dark_rounded / light_square / dark_square */
442				hideflash: false, /* Hides all the flash object on a page, set to TRUE if flash appears over prettyPhoto */
443				modal: false, /* If set to true, only the close button will close the window */
444				callback: function() {
445					var url = location.href;
446					var hashtag = (url.indexOf('#!prettyPhoto')) ? true : false;
447					if (hashtag) location.hash = "!";
448				} /* Called when prettyPhoto is closed */,
449				social_tools : ''
450			});
451		} catch (err) { }
452	}
453}
454
455/* Helper
456---------------------------------------------------------- */
457function getColumnsCount(el) {
458	var find = false,
459		i = 1;
460
461	while ( find == false ) {
462		if ( el.hasClass('columns_count_'+i) ) {
463			find = true;
464			return i;
465		}
466		i++;
467	}
468}
469
470var screen_size = getSizeName();
471function getSizeName() {
472	var screen_size = '',
473		screen_w = jQuery(window).width();
474
475	if ( screen_w > 1170 ) {
476		screen_size = "desktop_wide";
477	}
478	else if ( screen_w > 960 && screen_w < 1169 ) {
479		screen_size = "desktop";
480	}
481	else if ( screen_w > 768 && screen_w < 959 ) {
482		screen_size = "tablet";
483	}
484	else if ( screen_w > 300 && screen_w < 767 ) {
485		screen_size = "mobile";
486	}
487	else if ( screen_w < 300 ) {
488		screen_size = "mobile_portrait";
489	}
490	return screen_size;
491}
492
493
494function loadScript(url, $obj, callback){
495
496    var script = document.createElement("script")
497    script.type = "text/javascript";
498
499    if (script.readyState){  //IE
500        script.onreadystatechange = function(){
501            if (script.readyState == "loaded" ||
502                script.readyState == "complete"){
503                script.onreadystatechange = null;
504                callback();
505            }
506        };
507    } else {  //Others
508        /*
509        script.onload = function(){
510
511            callback();
512        };
513         */
514    }
515
516    script.src = url;
517    $obj.get(0).appendChild(script);
518}
519
520/**
521 * Prepare html to correctly display inside tab container
522 *
523 * @param event - ui tab event 'show'
524 * @param ui - jquery ui tabs object
525 */
526
527function wpb_prepare_tab_content(event, ui) {
528    vc_carouselBehaviour();
529    var $ui_panel = jQuery(ui.panel).find('.isotope'),
530        $google_maps = jQuery(ui.panel).find('.wpb_gmaps_widget');
531    if ($ui_panel.length > 0) {
532	    $ui_panel.isotope("reLayout");
533    }
534
535    if($google_maps.length && !$google_maps.is('.map_ready')) {
536        var $frame = $google_maps.find('iframe');
537        $frame.attr('src', $frame.attr('src'));
538        $google_maps.addClass('map_ready');
539    }
540}

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.