PageSourceSearch

https://primariacostinesti.ro/views/5224efb292/assets/js/script.js

js primariacostinesti.ro collected 2026-10-02 22:43:42 UTC 6,825 bytes, 223 lines download raw bytes

1(function($){
2	"use strict";
3	$(document).ready(function(){
4
5		/* Scroll to top */
6		egovt_scrollUp();
7		function egovt_scrollUp(options) {
8		           
9		    var defaults = {
10		        scrollName: 'scrollUp', 
11		        topDistance: 600, 
12		        topSpeed: 800, 
13		        animation: 'fade', 
14		        animationInSpeed: 200, 
15		        animationOutSpeed: 200, 
16		        scrollText: '<i class="fas fa-angle-up"></i>', 
17		        scrollImg: false, 
18		        activeOverlay: false 
19		    };
20
21		    var o = $.extend({}, defaults, options),
22		            scrollId = '#' + o.scrollName;
23
24
25		    $('<a/>', {
26		        id: o.scrollName,
27		        href: '#top',
28		        title: ScrollUpText.value
29		    }).appendTo('body');
30
31
32		    if (!o.scrollImg) {
33
34		        $(scrollId).html(o.scrollText);
35		    }
36
37
38		    $(scrollId).css({'display': 'none', 'position': 'fixed', 'z-index': '2147483647'});
39
40
41		    if (o.activeOverlay) {
42		        $("body").append("<div id='" + o.scrollName + "-active'></div>");
43		        $(scrollId + "-active").css({'position': 'absolute', 'top': o.topDistance + 'px', 'width': '100%', 'border-top': '1px dotted ' + o.activeOverlay, 'z-index': '2147483647'});
44		    }
45
46
47		    $(window).scroll(function () {
48		        switch (o.animation) {
49		            case "fade":
50		                $(($(window).scrollTop() > o.topDistance) ? $(scrollId).fadeIn(o.animationInSpeed) : $(scrollId).fadeOut(o.animationOutSpeed));
51		                break;
52		            case "slide":
53		                $(($(window).scrollTop() > o.topDistance) ? $(scrollId).slideDown(o.animationInSpeed) : $(scrollId).slideUp(o.animationOutSpeed));
54		                break;
55		            default:
56		                $(($(window).scrollTop() > o.topDistance) ? $(scrollId).show(0) : $(scrollId).hide(0));
57		        }
58		    });
59
60		    
61		    $(scrollId).on( "click", function (event) {
62		        $('html, body').animate({scrollTop: 0}, o.topSpeed);
63		        event.preventDefault();
64		    });
65
66		}
67
68		/* Fix empty menu in test_uni_data */
69		if( $( '.widget_nav_menu ul li' ).length > 0 ){
70			$( '.widget_nav_menu ul li a:empty' ).parent().css('display','none');
71		}
72
73		/* Select 2 */
74		$('select[name="ovaev_type"]').select2({ 
75			width: '100%'
76		});
77		
78		/* Popup Image - PrettyPhoto */
79		if( $("a[data-gal^='prettyPhoto']").length > 0 ){
80		 	$("a[data-gal^='prettyPhoto']").prettyPhoto({hook: 'data-gal', theme: 'facebook',slideshow:5000, autoplay_slideshow:true});
81	    }
82	    
83
84	    $( '.ovatheme_header_default li.menu-item button.dropdown-toggle').off('click').on( 'click', function() {
85		    $(this).parent().toggleClass('active_sub');
86		});
87
88
89	    // feather icon
90	    feather.replace({ role: 'img', 'aria-label': "Icon" });
91
92	    //add padding widget li list product
93	   
94	    $( ".woocommerce .ova-shop-wrap .woo-sidebar .widget_products ul.product_list_widget li" ).each(function( index ) {
95	    	var that = $(this);
96			if( that.find('.woocommerce-Price-amount').length == 0 ){
97				that.css('padding-bottom', '67px');
98			}
99			var title = that.find('.product-title').text();
100			var result = title.substr(0, 22);
101
102			that.find('.product-title').text(result);
103
104		});
105
106		if($('#woo-sidebar').length <=0 ){
107			$('.ova-shop-wrap .content-area').css({'flex':'0 0 100%', 'padding-left':'0px'});
108		}
109
110		/* Popup Image - PrettyPhoto */
111		if($().prettyPhoto) {
112			if( $("a[data-gal^='prettyPhoto']").length > 0 ){
113			 	$("a[data-gal^='prettyPhoto']").prettyPhoto({hook: 'data-gal', theme: 'facebook',slideshow:5000, autoplay_slideshow:true});
114		    }
115		}
116
117		$('.egovt-login-register-woo li a').on('click', function(){
118			var type = $(this).data('type');
119			$('.egovt-login-register-woo li').removeClass('active');
120			$(this).parent('li').addClass('active');
121			if( type === 'login' ){
122
123
124				$('.woocommerce #customer_login .woocommerce-form.woocommerce-form-login').css('display', 'block');
125				$('.woocommerce #customer_login .woocommerce-form.woocommerce-form-register').css('display', 'none');
126			} else if( type === 'register' ){
127				$('.woocommerce #customer_login .woocommerce-form.woocommerce-form-register').css('display', 'block');
128				$('.woocommerce #customer_login .woocommerce-form.woocommerce-form-login').css('display', 'none');
129			}
130		})
131
132		if( $('.col_equal .ovaev-event-element.version_1').length > 0 ){
133			var width_screen = window.screen.availWidth;
134			if( width_screen > 767 ){
135				var height_event_element = $('.ovaev-event-element.version_1').innerHeight();
136
137				if( $('.col_equal .blog-grid article.post-wrap .wrap-article').length > 0 ){
138					$('.col_equal .blog-grid article.post-wrap .wrap-article').css('height', height_event_element + 'px' )
139				}
140			}			
141		}
142		$('.dropdown-toggle').on('click', function(){
143			$(this).parent('li').parent('.dropdown-menu').css({'opacity':1,'visibility': 'visible', 'top': '100%', 'display': 'block', 'box-shadow': 'none'});
144		});
145
146		 $('.ova_single_give_form .give_form_info').tabs();
147
148
149		if($('.egovt_stretch_column_left').length != null ){
150			egovt_calculate_width( '.egovt_stretch_column_left' );
151		}
152		if($('.egovt_stretch_column_right').length != null ){
153			egovt_calculate_width( '.egovt_stretch_column_right' );
154		}
155		
156
157	});	
158
159
160	/* Archive Give Video */
161	if( $(".archive_give_donation .media .video").length > 0 ){
162	 $(".archive_give_donation .media .video").fancybox({
163	    iframe : {
164	       css : {
165	          maxWidth : '80%',
166	       }
167	    }
168	 });
169	}
170  
171  
172
173	
174
175	// Calculate width with special class
176	function egovt_calculate_width( directly ){
177
178		if( $(directly).length ){
179
180			var width_win = $(window).outerWidth();
181
182			if( directly == '.egovt_stretch_column_left' ){
183
184				var col_offset = $(directly).offset();
185				var myLeftLineWidth = col_offset.left;
186				var width_left = $(directly).outerWidth() + myLeftLineWidth ;	
187				
188				
189
190				$('.egovt_stretch_column_left .elementor-column-wrap').css('width', width_left);
191				$('.egovt_stretch_column_left .elementor-column-wrap').css('margin-left', -myLeftLineWidth);
192			}
193
194			if( directly == '.egovt_stretch_column_right' ){
195
196				var $whatever        = $('.egovt_stretch_column_right');
197				var ending_right     = ($(window).width() - ($whatever.offset().left + $whatever.outerWidth()));
198				
199				var myrightLineWidth = window.innerWidth - ending_right;
200				var width_right = $(directly).outerWidth() + myrightLineWidth;
201
202
203				$('.egovt_stretch_column_right .elementor-column-wrap').css('width', width_right);
204				$('.egovt_stretch_column_right .elementor-column-wrap').css('margin-right', -ending_right);
205			}
206		}
207
208	}
209
210
211	$(window).resize(function () {
212		if($('.egovt_stretch_column_left').length != null ){
213	    	egovt_calculate_width('.egovt_stretch_column_left');
214		}
215		if($('.egovt_stretch_column_right').length != null ){
216	    	egovt_calculate_width('.egovt_stretch_column_right');
217		}
218	});
219
220	
221	
222
223})(jQuery);

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.