PageSourceSearch

https://edicionessemergen.com/js/wp.app.js

js edicionessemergen.com collected 2026-10-02 00:29:56 UTC 16,208 bytes, 617 lines download raw bytes

1$(document).ready(function() {
2
3	// WP Mobile Nav (Second method besides Bootstrap standrd menu) - Populating mobile nav list
4	var navbarContainer = $('.navbar-nav');
5	var linkTextLevel1;
6	var linkTextLevel2;
7	var linkTextLevel3;
8	var navList;
9	var navListEnd = '</ul>';
10
11	// Get first level items
12	$('.navbar-nav > li.dropdown').each(function(index) {
13		// Meganav list items
14		if($(this).hasClass('dropdown-meganav')){
15			linkTextLevel1 = $(this).find('a:first').text();
16			linkUrlLevel1 = $(this).find('a:first').attr('href');
17			navList = '<li><a href="'+ linkUrlLevel1 +'">'+ linkTextLevel1 +'</a>';
18
19			// Get second level items
20			if($(this).find('.mega-nav-section').length > 0){
21				navList = navList + '<ul class="dl-submenu">';
22
23				$(this).find('.mega-nav-section').each(function(index){
24					linkTextLevel2 = $(this).find('.mega-nav-section-title').text();
25					linkUrlLevel2 = $(this).find('a:first').attr('href');
26					navList = navList + '<li><a href="'+ linkUrlLevel2 +'">'+ linkTextLevel2 +'</a>';
27
28					// Get third level items
29					if($(this).find('.mega-nav-ul').length > 0){
30						navList = navList + '<ul class="dl-submenu">';
31						
32						$(this).find('.mega-nav-ul > li').each(function(index){
33							linkTextLevel3 = $(this).find('a').text();
34							linkUrlLevel3 = $(this).find('a:first').attr('href');
35							navList = navList + '<li><a href="'+ linkUrlLevel3 +'">
35'+ linkTextLevel3 +'</a></li>';
36						});
37
38						navList = navList + navListEnd;
39						navList = navList + '</li>';
40					} 
41				});
42			}
43
44		}
45
46		// Normal nav list items
47		if(!$(this).hasClass('dropdown-search') && !$(this).hasClass('dropdown-meganav')){
48			linkTextLevel1 = $(this).find('a:first').text();
49			linkUrlLevel1 = $(this).find('a:first').attr('href');
50			navList = '<li><a href="'+ linkUrlLevel1 +'">'+ linkTextLevel1 +'</a>';
51
52			// Get second level items
53			if($(this).find('ul > li').length > 0){
54				navList = navList + '<ul class="dl-submenu">';
55
56				$(this).children().children().each(function(index){
57					linkTextLevel2 = $(this).find('a:first').text();
58					linkUrlLevel2 = $(this).find('a:first').attr('href');
59					navList = navList + '<li><a href="'+ linkUrlLevel2 +'">'+ linkTextLevel2 +'</a>';
60
61					// Get third level items
62					if($(this).find('ul > li').length > 0){
63						navList = navList + '<ul class="dl-submenu">';
64						
65						$(this).children().children().each(function(index){
66							linkTextLevel3 = $(this).find('a').text();
67							linkUrlLevel3 = $(this).find('a:first').attr('href');
68							navList = navList + '<li><a href="'+ linkUrlLevel3 +'">
68'+ linkTextLevel3 +'</a></li>';
69						});
70
71						navList = navList + navListEnd;
72						navList = navList + '</li>';
73					} 
74				});
75			} 		
76		}
77
78		navList = navList + navListEnd;
79		navList = navList + '</li>';
80
81		// Append and create list menu
82		$('#dl-menu > ul.dl-menu').append(navList + '</ul>');		
83	});
84	// Initializing mobile menu
85	$('#dl-menu').dlmenu({
86        animationClasses:{
87        	classin: 'dl-animate-in-2', 
88        	classout: 'dl-animate-out-2' 
89        }
90    });
91    // Bootstrap - Dropdown Hover
92   	function allowDropdownHover() {
93   		if($(window).width() > 767){
94	    	$('.dropdown-toggle').dropdownHover();
95	    }	
96    }
97    allowDropdownHover();
98    window.onresize = allowDropdownHover; // Call the function on resize
99
100	//Carousels
101	$('.carousel').carousel({
102		interval: 5000,
103		pause	: 'hover'
104	});
105	// Owl carousel
106	if($(".owl-carousel-single").length > 0){
107		$(".owl-carousel-single").owlCarousel({
108			//items : 4,
109			lazyLoad : true,
110			pagination : false,
111			autoPlay: 10000,
112			singleItem: true,
113			stopOnHover: true
114		}); 
115	}
116	if($(".owl-carousel-2").length > 0){
117		// Owl Carousel
118		$(".owl-carousel-2").owlCarousel({
119			items : 2,
120			lazyLoad : true,
121			pagination : false,
122			autoPlay: 10000,
123			stopOnHover: true
124		}); 
125	}
126	if($(".owl-carousel-3").length > 0){
127		// Owl Carousel
128		$(".owl-carousel-3").owlCarousel({
129			items : 3,
130			lazyLoad : true,
131			pagination : false,
132			autoPlay: 10000,
133			stopOnHover: true
134		}); 
135	}
136	if($(".owl-carousel-4").length > 0){
137		// Owl Carousel
138		$(".owl-carousel-4").owlCarousel({
139			items : 4,
140			lazyLoad : true,
141			pagination: false,			
142			autoPlay: 10000,
143			stopOnHover: true
144		}); 
145	}
146	if($(".owl-carousel-5").length > 0){
147		// Owl Carousel
148		$(".owl-carousel-5").owlCarousel({
149			items : 5,
150			lazyLoad : true,
151			pagination : false,
152			autoPlay: 10000,
153			stopOnHover: true
154		}); 
155	}
156	// Sortable list
157	$('#ulSorList').mixitup();
158	// Fancybox
159	$(".theater").fancybox();
160	// Fancybox	
161	$(".ext-source").fancybox({
162		'transitionIn'		: 'none',
163		'transitionOut'		: 'none',
164		'autoScale'     	: false,
165		'type'				: 'iframe',
166		'width'				: '50%',
167		'height'			: '60%',
168		'scrolling'   		: 'no'
169	});
170	// Stellar JS
171	$(".prlx-bg").stellar();
172	// Isotope Masonry
173	if($('.wp-masonry-wrapper').length > 0){
174		$('.wp-masonry-wrapper').isotope({
175		    itemSelector: '.wp-masonry-block',
176		    masonry: {
177		      columnWidth: '.wp-masonry-block',
178		      gutter: '.wp-masonry-gutter'
179		    }
180		  });
181	}
182	// Milestone counter
183	$('.milestone-count').countTo({
184        //from: 50,
185        //to: 250,
186        //speed: 1000,
187        //refreshInterval: 50,
188        formatter: function (value, options) {
189            return value.toFixed(options.decimals);
190        },
191        onUpdate: function (value) {
192            console.debug(this);
193        },
194        onComplete: function (value) {
195            console.debug(this);
196        }
197    });
198    // Range sliders
199    if($('.range-slider-wrapper').length > 0){
200    	var customToolTip = $.Link({
201			target: '-tooltip-<div class="tooltip"></div>',
202			method: function(value){
203				$(this).html(
204					'<span>' + parseFloat(value) + '</span>'
205				);
206			}
207		});
208		
209    	// Range slider 1 - With fixed intervals
210        $(".range-slider-1").noUiSlider({
211			start: [300, 5000],
212			snap: true,
213			range: {
214				'min': 0,
215				'10%': 100,
216				'20%': 500,
217				'30%': 1000,
218				'40%': 1500,
219				'60%': 3000,
220				'70%': 3500,
221				'80%': 4000,
222				'90%': 4500,
223				'max': 5000
224			}
225		});
226        // Range slider with connect option
227        $(".range-slider-connect-1").noUiSlider({
228			start: [300, 5000],
229			connect: true,
230			snap: true,
231			range: {
232				'min': 0,
233				'10%': 100,
234				'20%': 500,
235				'30%': 1000,
236				'40%': 1500,
237				'60%': 3000,
238				'70%': 3500,
239				'80%': 4000,
240				'90%': 4500,
241				'max': 5000
242			}
243		});
244		// Range slider with connect option + tooltip
245        $(".range-slider-connect-2").noUiSlider({
246			start: [500, 4000],
247			connect: true,
248			snap: true,
249			range: {
250				'min': 0,
251				'10%': 100,
252				'20%': 500,
253				'30%': 1000,
254				'40%': 1500,
255				'60%': 3000,
256				'70%': 3500,
257				'80%': 4000,
258				'90%': 4500,
259				'max': 5000
260			},
261			// Add tooltip
262			serialization: {
263				lower: [ customToolTip ],
264				upper: [ customToolTip ]
265			}
266		});
267
268        $(".range-slider-2").noUiSlider({
269			start: [300, 5000],
270			snap: true,
271			range: {
272				'min': 0,
273				'10%': 100,
274				'20%': 500,
275				'30%': 1000,
276				'40%': 1500,
277				'60%': 3000,
278				'70%': 3500,
279				'80%': 4000,
280				'90%': 4500,
281				'max': 5000
282			},
283			// Add tooltip
284			serialization: {
285				lower: [ customToolTip ],
286				upper: [ customToolTip ]
287			}
288		});
289
290		// Simple slider - With fixed intervals
291		$('.simple-slider-1').noUiSlider({
292			start: [ 500 ],
293			range: {
294				'min': [     0 ],
295				'10%': [   500,  500 ],
296				'50%': [  4000, 1000 ],
297				'max': [ 10000 ]
298			}
299		});
300
301		$('.simple-slider-2').noUiSlider({
302			start: [ 500 ],
303			range: {
304				'min': [     0 ],
305				'10%': [   500,  500 ],
306				'50%': [  4000, 1000 ],
307				'max': [ 10000 ]
308			},
309			// Add tooltip
310			serialization: {
311				lower: [ customToolTip ]
312			}
313		});
314
315		// Simple slider - Connect lower
316		$('.simple-slider-connect-1').noUiSlider({
317			start: [ 2500 ],
318			connect: "lower",
319			range: {
320				'min': [     0 ],
321				'10%': [   500,  500 ],
322				'50%': [  4000, 1000 ],
323				'max': [ 10000 ]
324			}
325		});
326		// Simple slider - Connect lower + tooltip
327		$('.simple-slider-connect-2').noUiSlider({
328			start: [ 2500 ],
329			connect: "lower",
330			range: {
331				'min': [     0 ],
332				'10%': [   500,  500 ],
333				'50%': [  4000, 1000 ],
334				'max': [ 10000 ]
335			},
336			// Add tooltip
337			serialization: {
338				lower: [ customToolTip ]
339			}
340		});
341    }
342	// Scroll to top
343	$().UItoTop({ easingType: 'easeOutQuart' });
344	// Inview animations
345	$.fn.waypoint.defaults = {
346		context: window,
347		continuous: true,
348		enabled: true,
349		horizontal: false,
350		offset: 300,
351		triggerOnce: false
352	}	
353	$('.animate-in-view, .pie-chart').waypoint(function(direction) {
354		// Easy Pie Chart
355		$(".pie-chart").easyPieChart({
356			size:150,
357			easing: 'easeOutBounce',
358			onStep: function(from, to, percent) {
359				$(this.el).find('.percent').text(Math.round(percent));
360			},
361			barColor: '#FFF',
362			delay: 3000,
363			trackColor:'rgba(255,255,255,0.2)',
364			scaleColor:false,
365			lineWidth:16,
366			lineCap:'butt'
367		});
368	});
369	// Search
370	if($('#btnSearch').length > 0){
371		// Search function
372		$("#btnSearch").click(function(){
373			if($("#divSearch").is(":visible")){
374				$("#divSearch").removeClass('animated slideInDown');
375				$("#divSearch").addClass('animated slideOutUp');
376				$('#divSearch').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() {
377					$(this).hide();
378					$("#divSearch").removeClass('animated slideOutUp');
379				});
380			} else {
381				$("#divSearch").show().addClass('animated slideInDown');
382			}
383			return false;	
384		});
385		$("#cmdCloseSearch").click(function(){
386			if($("#divSearch").is(":visible")){
387				$("#divSearch").removeClass('animated slideInDown');
388				$("#divSearch").addClass('animated slideOutUp');
389				$('#divSearch').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() {
390					$(this).hide();
391					$("#divSearch").removeClass('animated slideOutUp');
392				});
393			}
394		});
395		
396		// Keyboard shortcuts
397		$('html').keyup(function(e){
398			if(e.keyCode == 27){
399				if($("#divSearch").is(":visible")){
400					$("#divSearch").removeClass('animated slideInDown');
401					$("#divSearch").addClass('animated slideOutUp');
402					$('#divSearch').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() {
403						$(this).hide();
404						$("#divSearch").removeClass('animated slideOutUp');
405					});
406				}
407			}
408		});
409	}
410	// Hover direction animation	
411	$(".animate-hover-slide-4 .figure").each( function(){ 
412		$(this).hoverdir({
413			hoverDelay: 50,
414			inverse: 	false
415		}); 
416	});
417	// Custom animations
418	$(".animate-click").click(function(){
419		var animateIn = $(this).data("animate-in");
420		var animateOut = $(this).data("animate-out");
421		var animatedElement = $(this).find(".animate-wr");
422
423		console.log(animateIn+'-'+animateOut);
424
425		if(animateIn != undefined){
426			console.log('incepem animatia');
427			if(animatedElement.is(":hidden")){
428				console.log('start IN');
429				animatedElement.addClass(animateIn);
430				animatedElement.one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() {
431					animatedElement.removeClass(animateIn);
432				});
433			}
434		}
435	});
436	
437	$(".animate-hover").hover(function(){
438		var animation = $(this).data("animate-in");
439		if(animation != undefined || animation != ""){
440			$(this).find(".animate-wr").addClass(animation);
441		}
442	});
443
444	$(".animate-click").click(function(){
445		var animation = $(this).data("animate-in");
446		if(animation != undefined || animation != ""){
447			$(this).find(".animate-wr").addClass(animation);
448		}
449	});
450
451	// Main nav for mobiles - left
452	$(".navbar-toggle-mobile-nav, #btnHideMobileNav").click(function(){
453		if($("#navMobile").is(":visible")){
454			$("#navMobile").removeClass('animated bounceInLeft');
455			$("#navMobile").addClass('animated bounceOutLeft');
456			$('#navMobile').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() {
457				$(this).hide();
458				$("#navMobile").removeClass('animated bounceOutLeft');
459			});
460			$("body").removeClass("nav-menu-in");
461		}
462		else{
463			$("#navMobile").show().addClass('animated bounceInLeft');
464			$("body").addClass("nav-menu-in");
465		}
466		return false;	
467	});	
468 
469	// Slide bar - right
470	$("#cmdAsideMenu, #btnHideAsideMenu, .navbar-toggle-aside-menu").click(function(){
471		if($("#asideMenu").is(":visible")){
472			$("#asideMenu").removeClass('animated bounceInRight');
473			$("#asideMenu").addClass('animated bounceOutRight');
474			$('#asideMenu').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() {
475				$(this).hide();
476				$("#asideMenu").removeClass('animated bounceOutRight');			
477			});
478		}
479		else{
480			$("#asideMenu").show().addClass('animated bounceInRight');
481		}
482		return false;	
483	});	
484
485	// Close opened element when body is clicked
486	// $(document).mouseup(function(e){
487 //    	var container = $(".aside-menu");
488
489 //    	if(!container.is(e.target) && container.has(e.target).length === 0){
490 //        	if(container.is(":visible")){
491	// 			container.hide();
492	// 			$("body").removeClass("nav-menu-in");
493	// 		}
494 //    	}
495	// });
496
497	// Calendar
498	$("#filter_date_in, #filter_date_out").datepicker({
499        dateFormat: 'MM dd, yy',
500        minDate: 0,
501        showOtherMonths: true
502    });
503
504    // Step process
505    $("ol.progtrckr").each(function(){
506        $(this).attr("data-progtrckr-steps", $(this).children("li").length);
507    });
508
509    // Optional filters
510    $("#btnToggleOptionalFIlters").click(function(){
511    	var animateIn = $(this).data("animate-in");
512	    var animateOut = $(this).data("animate-out");
513
514    	if($(this).hasClass("opened")){
515    		$(".hidden-form-filters").addClass('hide');
516    		$(this).removeClass("opened");
517    	} else{
518	    	$(this).addClass("opened");
519	    	$(".hidden-form-filters").removeClass("hide");
520	    }
521	    return false;
522    });
523
524    // Layer Slider Dynamic- Set height to fit navbar
525    if($(".layer-slider-dynamic").length > 0){
526    	layerSliderDynamic();
527    }
528
529    // Layer Slider Fullsize
530    if($(".layer-slider-fullsize").length > 0){
531    	layerSliderFullsize();
532    }
533
534    // Window resize events
535    $(window).resize(function() {
536    	if($(".layer-slider-dynamic").length > 0){
537	    	layerSliderDynamic();
538	    }
539		if($(".layer-slider-fullsize").length > 0){
540	    	layerSliderFullsize();
541	    }
542	});
543    
544    // Functions
545    function layerSliderDynamic(){
546    	var windowHeight = $(window).height();
547    	var headerHight = $("#divHeaderWrapper").height();
548    	var newSliderHeight = windowHeight - headerHight;
549    	$("#layerslider").css({"height": newSliderHeight + "px"});
550    }
551    function layerSliderFullsize(){
552    	var windowHeight = $(window).height();
553    	$("#layerslider").css({"height": windowHeight + "px"});
554    }
555
556
557    var screenRes = $(window).width(),
558        screenHeight = $(window).height(),
559        html = $('html');
560
561    // IE<8 Warning
562    if (html.hasClass("ie8")) {
563        $("body").empty().html('Please, Update your Browser to at least IE9');
564    }
565
566    // Disable Empty Links
567    $("[href=#]").click(function(event){
568        event.preventDefault();
569    });
570
571    // Body Wrap
572    $(".body-wrap").css("min-height", screenHeight);
573    $(window).resize(function() {
574        screenHeight = $(window).height();
575        $(".body-wrap").css("min-height", screenHeight);
576    });
577
578    // styled Select, Radio, Checkbox
579    if ($("select").hasClass("select_styled")) {
580        cuSel({changedEl: ".select_styled", visRows: 8, scrollArrows: true});
581    }
582
583    // Rating Stars
584    var star = $(".rating span.star");
585
586    star.hover(
587        function() {
588            $(this).addClass("over");
589            $(this).prevAll().addClass("over");
590        }
591        , function() {
592            $(this).removeClass("over");
593            $(this).prevAll().removeClass("over");
594        }
595    );
596    star.click( function() {
597        $(this).parent().children(".star").removeClass("voted");
598        $(this).prevAll().addClass("voted");
599        $(this).addClass("voted");
600    });
601
602    // Tooltip & Popover
603    $('.ttip').tooltip({
604    	placement: $(this).data('toggle'),
605    	html: true
606    });
607
608    $('.pop').popover({
609    	placement: 'right',
610    	html: true
611    });
612
613    // Hover animations
614    $('.hov').hoverup({
615		// You could set options in here too.
616	});
617});

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.