1(function($){ 2 "use strict"; 3 4 5 $(window).on('elementor/frontend/init', function () { 6 7 8 /* Menu Shrink */ 9 elementorFrontend.hooks.addAction('frontend/element_ready/ova_menu.default', function(){ 10 11 $( '.ova_menu_clasic .ova_openNav' ).on( 'click', function(){ 12 $( this ).closest('.ova_wrap_nav').find( '.ova_nav' ).removeClass( 'hide' ); 13 $( this ).closest('.ova_wrap_nav').find( '.ova_nav' ).addClass( 'show' ); 14 $( '.ova_menu_clasic .ova_closeCanvas' ).css( 'width', '100%' ); 15 16 17 $( 'body' ).css( 'background-color', 'rgba(0,0,0,0.4)' ); 18 19 }); 20 21 $( '.ova_menu_clasic .ova_closeNav' ).on( 'click', function(){ 22 $( this ).closest('.ova_wrap_nav').find( '.ova_nav' ).removeClass( 'show' ); 23 $( this ).closest('.ova_wrap_nav').find( '.ova_nav' ).addClass( 'hide' ); 24 $( '.ova_closeCanvas' ).css( 'width', '0' ); 25 26 27 28 $( 'body' ).css( 'background-color', 'transparent' ); 29 30 }); 31 32 // Display in mobile 33 $( '.ova_menu_clasic li.menu-item button.dropdown-toggle').off('click').on( 'click', function() { 34 $(this).parent().toggleClass('active_sub'); 35 }); 36 37 if( $('.ovamenu_shrink').length > 0 ){ 38 39 $( '<div class="mask_header_shrink" style="position: relative; height: 0;"></div>' ).insertAfter('.ovamenu_shrink'); 40 41 var header = $('.ovamenu_shrink'); 42 var header_shrink_height = header.height(); 43 44 45 $(window).scroll(function () { 46 47 var scroll = $(this).scrollTop(); 48 49 if (scroll >= header_shrink_height+100 ) { 50 header.addClass( 'active_fixed' ); 51 $('.mask_header_shrink').css('height',header_shrink_height); 52 } else { 53 header.removeClass('active_fixed'); 54 $('.mask_header_shrink').css('height','0'); 55 } 56 }); 57 } 58 59 60 61 }); 62 63 /* Search Popup */ 64 elementorFrontend.hooks.addAction('frontend/element_ready/ova_search.default', function(){ 65 $( '.wrap_search_charihope_popup i' ).on( 'click', function(){ 66 $( this ).closest( '.wrap_search_charihope_popup' ).addClass( 'show' ); 67 }); 68 69 $( '.btn_close' ).on( 'click', function(){ 70 $( this ).closest( '.wrap_search_charihope_popup' ).removeClass( 'show' ); 71 72 }); 73 }); 74 /* end Search Popup */ 75 76 /* Slide Show */ 77 elementorFrontend.hooks.addAction('frontend/element_ready/ova_banner_slideshow.default', function(){ 78 79 function fadeInReset(element) { 80 $(element).find('*[data-animation]').each(function(){ 81 var animation = $(this).data( 'animation' ); 82 $(this).removeClass( 'animated' ); 83 $(this).removeClass( animation ); 84 $(this).css({ opacity: 0 }); 85 }); 86 } 87 88 function fadeIn(element) { 89 90 // Sub Title 91 var $title = $(element).find( '.active .elementor-slide-subtitle' ) 92 var animation_title = $title.data( 'animation' ); 93 var duration_title = parseInt( $title.data( 'animation_dur' ) ); 94 95 96 setTimeout(function(){ 97 $title.addClass(animation_title).addClass('animated').css({ opacity: 1 }); 98 }, duration_title); 99 100 101 /* Title */ 102 var $sub_title = $(element).find( '.active .elementor-slide-title' ); 103 var animation_sub_title = $sub_title.data( 'animation' ); 104 var duration_sub_title = parseInt( $sub_title.data( 'animation_dur' ) ); 105 106 107 setTimeout(function(){ 108 $sub_title.addClass(animation_sub_title).addClass('animated').css({ opacity: 1 }); 109 }, duration_sub_title); 110 111 /* Description */ 112 var $desc = $(element).find( '.active .elementor-slide-description' ); 113 var animation_desc = $desc.data( 'animation' ); 114 var duration_desc = parseInt( $desc.data( 'animation_dur' ) ); 115 116 117 setTimeout(function(){ 118 $desc.addClass(animation_desc).addClass('animated').css({ opacity: 1 }); 119 }, duration_desc); 120 121 /* Button */ 122 var $button = $(element).find( '.active .elementor-slide-button' ); 123 var animation_button = $button.data( 'animation' ); 124 var duration_button = parseInt( $button.data( 'animation_dur' ) ); 125 126 setTimeout(function(){ 127 $button.addClass(animation_button).addClass('animated').css({ opacity: 1 }); 128 }, duration_button); 129 130 131 } 132 133 $(document).ready(function(){ 134 135 $('.elementor-slides').each(function(){ 136 137 var owl = $(this); 138 var data = owl.data("owl_carousel"); 139 140 owl.on('initialized.owl.carousel', function(event) { 141 142 fadeIn(event.target); 143 144 }); 145 146 owl.owlCarousel( 147 data 148 ); 149 150 owl.on('translate.owl.carousel', function(event){ 151 fadeInReset(event.target); 152 owl.trigger('stop.owl.autoplay'); 153 owl.trigger('play.owl.autoplay'); 154 }); 155 156 owl.on('translated.owl.carousel', function(event) { 157 fadeIn(event.target); 158 owl.trigger('stop.owl.autoplay'); 159 owl.trigger('play.owl.autoplay'); 160 }); 161 162 }); 163 164 }); 165 166 }); 167 /* End Slide Show */ 168 169 170 171 172 173 174 /* map campaign */ 175 elementorFrontend.hooks.addAction('frontend/element_ready/ova_map_campaign.default', function(){ 176 177 178 if( typeof address_data != 'undefined' ){ 179 180 var i = 0; 181 var zoom_map = 14; 182 var zoom_map, image_marker, image_icon; 183 184 var marker, loc, Clusterer; 185 var markers = []; 186 var mapIWcontent = ''; 187 var show_zoom = false;
188 189 if( typeof attr_map != 'undefined' ){ 190 attr_map = JSON.parse( attr_map ); 191 zoom_map = attr_map.zoom_map; 192 image_marker = attr_map.image_marker; 193 image_icon = attr_map.image_icon; 194 if (attr_map.show_zoom === 'yes') { 195 show_zoom = true; 196 } 197 } 198 199 200 // Get Data address 201 var obj_address = JSON.parse( address_data ); 202 var bounds = new google.maps.LatLngBounds(); 203 var mapOptionsFirst = { 204 zoom: zoom_map, 205 minZoom: 1, 206 center: new google.maps.LatLng(parseFloat(obj_address[0]['lat']), parseFloat(obj_address[0]['lng']) ), 207 // center: new google.maps.LatLng(0, 0), 208 mapTypeId: google.maps.MapTypeId.ROADMAP, 209 styles: [ 210 { 211 "elementType": "geometry", 212 "stylers": [ 213 { 214 "color": "#bababa" 215 } 216 ] 217 }, 218 { 219 "elementType": "labels.icon", 220 "stylers": [ 221 { 222 "visibility": "off" 223 } 224 ] 225 }, 226 { 227 "elementType": "labels.text.fill", 228 "stylers": [ 229 { 230 "color": "#616161" 231 } 232 ] 233 }, 234 { 235 "elementType": "labels.text.stroke", 236 "stylers": [ 237 { 238 "color": "#f5f5f5" 239 } 240 ] 241 }, 242 { 243 "featureType": "administrative.land_parcel", 244 "elementType": "labels.text.fill", 245 "stylers": [ 246 { 247 "color": "#bdbdbd" 248 } 249 ] 250 }, 251 { 252 "featureType": "poi", 253 "elementType": "geometry", 254 "stylers": [ 255 { 256 "color": "#eeeeee" 257 } 258 ] 259 }, 260 { 261 "featureType": "poi", 262 "elementType": "labels.text.fill", 263 "stylers": [ 264 { 265 "color": "#757575" 266 } 267 ] 268 }, 269 { 270 "featureType": "poi.park", 271 "elementType": "geometry", 272 "stylers": [ 273 { 274 "color": "#e5e5e5" 275 } 276 ] 277 }, 278 { 279 "featureType": "poi.park", 280 "elementType": "labels.text.fill", 281 "stylers": [ 282 { 283 "color": "#9e9e9e" 284 } 285 ] 286 }, 287 { 288 "featureType": "road", 289 "elementType": "geometry", 290 "stylers": [ 291 { 292 "color": "#ffffff" 293 } 294 ] 295 }, 296 { 297 "featureType": "road.arterial", 298 "elementType": "labels.text.fill", 299 "stylers": [ 300 { 301 "color": "#757575" 302 } 303 ] 304 }, 305 { 306 "featureType": "road.highway", 307 "elementType": "geometry", 308 "stylers": [ 309 { 310 "color": "#dadada" 311 } 312 ] 313 }, 314 { 315 "featureType": "road.highway", 316 "elementType": "labels.text.fill", 317 "stylers": [ 318 { 319 "color": "#616161" 320 } 321 ] 322 }, 323 { 324 "featureType": "road.local", 325 "elementType": "labels.text.fill", 326 "stylers": [ 327 { 328 "color": "#9e9e9e" 329 } 330 ] 331 }, 332 { 333 "featureType": "transit.line", 334 "elementType": "geometry", 335 "stylers": [ 336 { 337 "color": "#e5e5e5" 338 } 339 ] 340 }, 341 { 342 "featureType": "transit.station", 343 "elementType": "geometry", 344 "stylers": [ 345 { 346 "color": "#eeeeee" 347 } 348 ] 349 }, 350 { 351 "featureType": "water", 352 "elementType": "geometry", 353 "stylers": [ 354 { 355 "color": "#f2f2f2" 356 } 357 ] 358 }, 359 { 360 "featureType": "water", 361 "elementType": "labels.text.fill", 362 "stylers": [ 363 { 364 "color": "#9e9e9e" 365 } 366 ] 367 } 368 ], 369 scrollwheel: show_zoom, 370 371 }; 372 373 var mapObject = new google.maps.Map(document.getElementById('ova-map'), mapOptionsFirst); 374 375 google.maps.event.addListener(mapObject, 'domready', function () { 376 377 }); 378 google.maps.event.addListener(mapObject, 'click', function () { 379 closeInfoBox(); 380 }); 381 382 383 var contentString = mapIWcontent ; 384 385 var infowindow = new google.maps.InfoWindow({ 386 content: contentString, 387 maxWidth: 350 388 }); 389 390 obj_address.forEach(function (item) { 391 var iconBase = 'https://maps.google.com/mapfiles/kml/shapes/'; 392 marker = new google.maps.Marker({ 393 position: new google.maps.LatLng(item.lat, item.lng), 394 icon: image_marker, 395 map: mapObject 396 }); 397 loc = new google.maps.LatLng(item.lat, item.lng); 398 bounds.extend(loc); 399 400 401 if ('undefined' === typeof markers[i]) markers[i] = []; 402 markers[i].push(marker); 403 i++; 404 405 var map = google.maps.event.addListener(marker, 'click', (function () { 406 closeInfoBox(); 407 var mapIWcontent = 408 '<div class="ova-box">' + 409 '<div class="wp-content">' + 410 '<div class="wp-text-funded">' + 411 '<span class="funded ova-infl">' + 412 '<span class="number second_font">' + 413 item.number_funed + 414 '</span>' + 415 '<span class="text">' + 416 item.text_funed + 417 '</span>' + 418 '</span>' + 419 '<span class="goal ova-infl">' + 420 '<span class="number second_font">' + 421 item.number_goal + 422 '</span>' + 423 '<span class="text">' + 424 item.text_goal + 425 '</span>' + 426 '</span>' + 427 '<span class="day ova-infl">' + 428 '<span class="number second_font">' + 429 item.number_day + 430 '</span>' + 431 '<span class="text">' + 432 item.text_day + 433 '</span>' + 434 '</span>' + 435 '</div>' + 436 '<div class="wp-address">' + 437 '<i class="' + item.class_icon_address + '"></i>' + 438 '<span class="address">' + item.address + '</span>' + 439 '</div>' + 440 '</div>' + 441 '<div class="ova-media" style="background-image: url(' + item.image.url + ')">' + 442 '<a href="'+ item.link.url +'" class="second_font text-button">'+ item.text_button +'</a>' + 443 '</div>' + 444 '</div>'; 445 var contentString = mapIWcontent; 446 infowindow.close(); 447 infowindow = new google.maps.InfoWindow({ 448 content: contentString, 449 title: item.address 450 , maxWidth: 350 451 , maxHeight: 500 452 }); 453 454 infowindow.close(); 455 infowindow.open(map, this); 456 457 })); 458 459 }); 460 461 462 //options 463 var mcOptions = { 464 gridSize: 20, 465 maxZoom: 20, 466 styles: [{ 467 height: 53, 468 url:image_icon, 469 width: 52 470 }, 471 ]}; 472 473 // New markerCluster 474 Clusterer = new MarkerClusterer(mapObject, [], mcOptions); 475 476 for (var key in markers){ 477 Clusterer.addMarkers(markers[key], true); 478 } 479 480 function closeInfoBox() { 481 jQuery('div.infoBox').remove(); 482 }; 483 484 485 } 486 }); 487/* map campaign */ 488 489 490elementorFrontend.hooks.addAction('frontend/element_ready/ova_volunteer.default', function(){ 491 492 $(".view_volunteer").click(function () { 493 $(this).parent(".popup_volunteer").children(".content_popup").addClass("show"); 494 }); 495 $(".btn_close").click(function () { 496 $(".content_popup").removeClass("show"); 497 }); 498 499}); 500 501 502}); 503 504})(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.