1(function($) { 2 "use strict"; 3 4 5 var jws_dropdown_text = function($scope, $) { 6 $scope.find('.jws_dropdown_text').eq(0).each(function() { 7 8 }); 9 }; 10 11 var hotel_rates = function($scope, $) { 12 $scope.find('.jws-hotel-rates').eq(0).each(function() { 13 $(this).find('a').magnificPopup({ 14 type: 'inline', 15 removalDelay: 360, 16 mainClass: 'mfp-zoom-in mfp-img-mobile', 17 midClick: true // Allow opening popup on middle mouse click. Always set it to true if you don't provide alternative source in href. 18 }); 19 }); 20 }; 21 22 23 24 25 var product_tabs_filter = function($scope, $) { 26 $scope.find('.jws-wrap').eq(0).each(function() { 27 var wrap = $(this); 28 if(wrap.hasClass('jws-carousel')) { 29 30 jws_carousel($scope, $); 31 32 } 33 if(wrap.hasClass('metro')){ 34 wrap.find('.products-tab').isotope({ 35 itemSelector: ".product-item", 36 layoutMode: 'masonry', 37 transitionDuration: "0.3s", 38 masonry: { 39 // use outer width of grid-sizer for columnWidth 40 columnWidth: '.grid-sizer', 41 } 42 }); 43 } 44 wrap.find('.jws-ajax-load a.ajax-load').on('click', function(e) { 45 e.preventDefault(); 46 var $this = $(this) , intervalID; 47 var key = $this.data('value'); 48 if($this.hasClass('active')) { 49 return; 50 } 51 clearInterval(intervalID); 52 wrap.addClass('jws-animated-products'); 53 $this.parents('.jws-ajax-load').find('a').removeClass('active'); 54 $this.addClass('active'); 55 if($this.hasClass('opened')) { 56 wrap.find('.products-tab').html(wrap.find('.products-tab').data(key)); 57 if(wrap.hasClass('jws-carousel')) { 58 jws_carousel($scope, $); 59 } 60 var iter = 0; 61 intervalID = setInterval(function() { 62 wrap.find('.product-item').eq(iter).addClass('jws-animated'); 63 iter++; 64 }, 100); 65 return; 66 } 67 $this.addClass('opened'); 68 wrap.addClass('loading'); 69 if(!wrap.find('.loader').length) { 70 wrap.append('<div class="loader"><svg class="circular" viewBox="25 25 50 50"><circle class="path" cx="50" cy="50" r="20" fill="none" stroke-width="2" stroke-miterlimit="10"/></svg></div>'); 71 } 72 var data = wrap.data('args'); 73 data.action = 'jws_ajax_product_filter'; 74 if($this.data('type') == 'product_cat') { 75 data.filter_categories = $this.data('value'); 76 } 77 if($this.data('type') == 'asset_type') { 78 data.asset_type = $this.data('value'); 79 } 80 $.ajax({
81 url: wrap.data('url'), 82 data: data, 83 type: 'POST', 84 dataType: 'json', 85 }).success(function(response) { 86 wrap.removeClass('loading'); 87 let content = response.items; 88 wrap.find('.products-tab').html(content); 89 wrap.find('.products-tab').data(key, content); 90 if(wrap.hasClass('jws-carousel')) { 91 jws_carousel($scope, $); 92 } 93 var iter = 0; 94 intervalID = setInterval(function() { 95 wrap.find('.product-item').eq(iter).addClass('jws-animated'); 96 iter++; 97 }, 100); 98 }).error(function(ex) { 99 console.log(ex); 100 }); 101 }); 102 103 wrap.find('.jws-products-load-more').off('click').on('click', function(e) { 104 e.preventDefault(); 105 var $this = $(this), 106 data = wrap.data('args'), 107 paged = wrap.data('paged'); 108 paged++; 109 loadProducts2(data, paged, wrap, $this) 110 }); 111 112 var loadProducts2 = function(data, paged, wrap, btn) { 113 var intervalID, 114 total = wrap.find('.product-item').length, 115 iter = total; 116 clearInterval(intervalID); 117 data.action = 'jws_ajax_product_filter'; 118 data.paged = paged; 119 btn.addClass('loading'); 120 wrap.find('.product-item').addClass('jws-animated'); 121 wrap.addClass('jws-animated-products'); 122 123 btn.append('<div class="loader"><svg class="circular" viewBox="25 25 50 50"><circle class="path" cx="50" cy="50" r="20" fill="none" stroke-width="2" stroke-miterlimit="10"/></svg></div>'); 124 $.ajax({
125 url: wrap.data('url'), 126 data: data, 127 method: 'POST', 128 dataType: 'json', 129 success: function(response) { 130 131 if (response.items) { 132 wrap.find('.products-tab').append(response.items); 133 intervalID = setInterval(function() { 134 wrap.find('.product-item').eq(iter).addClass('jws-animated'); 135 iter++; 136 }, 100); 137 wrap.data('paged', paged); 138 } 139 140 if (response.status == 'no-more-posts') { 141 btn.hide(); 142 } 143 144 145 }, 146 error: function(data) { 147 console.log('ajax error'); 148 console.log(data); 149 }, 150 complete: function() { 151 btn.removeClass('loading'); 152 $('.loader').remove(); 153 154 }, 155 }); 156 }; 157 }); 158 }; 159 160 161 var jws_carousel = function($scope, $) { 162 163 $scope.find('.jws-carousel').eq(0).each(function() { 164 165 var $this = $(this); 166 167 jwsThemeModule.owl_caousel_init($(this).find('.carousel')); 168 169 170 }); 171 172 }; 173 174 /** 175 *------------------------------------------------------------------------------------------------------------------------------------------- 176 * Image Carousel 177 *------------------------------------------------------------------------------------------------------------------------------------------- 178 */ 179 var images_carousel = function($scope, $) { 180 $scope.find('.jws-image_carousel-element').eq(0).each(function() { 181 let $this = $(this); 182 if($this.find('.jws-image_carousel').hasClass('slider')) { 183 jwsThemeModule.owl_caousel_init($this.find('.jws-image_carousel')); 184 } 185 }); 186 }; 187 188 /** 189 *------------------------------------------------------------------------------------------------------------------------------------------- 190 * Banner Carousel 191 *------------------------------------------------------------------------------------------------------------------------------------------- 192 */ 193 var banner_carousel = function($scope, $) { 194 $scope.find('.jws-banner-element').eq(0).each(function() { 195 let $this = $(this); 196 if($this.find('.jws-banner').hasClass('slider')) { 197 jwsThemeModule.owl_caousel_init($this.find('.jws-banner')); 198 } 199 jwsThemeModule.animation_scroll($this.find('.jws-banner'),$this.find('.jws-banner-inner')); 200 }); 201 }; 202 203 /** 204 *------------------------------------------------------------------------------------------------------------------------------------------- 205 * Room widget 206 *------------------------------------------------------------------------------------------------------------------------------------------- 207 */ 208 var accommodation_advanced = function($scope, $) { 209 $scope.find('.jws-accommodation-advanced-element').eq(0).each(function() { 210 let $this = $(this); 211 212 let container = $this.find('.accommodation-advanced-content'); 213 if(container.hasClass('jws-accommodation-advanced-slider')) { 214 jwsThemeModule.owl_caousel_init(container); 215 216 var intervalID; 217 $this.find('.post_nav_container a').click(function(e){ 218 e.preventDefault(); 219 220 if(!container.hasClass('jws-animated-room')) { 221 container.addClass('jws-animated-room'); 222 } 223 224 container.removeClass('jws-post-animation'); 225 container.find('.jws-post-item').removeClass('animated fadeInUp'); 226 227 var $item = $(this); 228 var filter = $item.data( 'filter' ); 229 if ($item.hasClass("filter-active")) return false; 230
231 $this.find('.post_nav_container a').removeClass("filter-active"); 232 $item.addClass("filter-active"); 233 234 clearInterval(intervalID); 235 owlcarousel2_filter( filter ); 236 237 }); 238 239 240 function owlcarousel2_filter(o) { 241 var t = container.data("owl.carousel").options; 242 container.trigger("destroy.owl.carousel"), container.oc2_filter_clone || (container.oc2_filter_clone = container.clone()); 243 var l = container.oc2_filter_clone.children(o).clone(); 244 container.empty().append(l).owlCarousel(t); 245 246 247 var iter = 0; 248 intervalID = setInterval(function() { 249 l.eq(iter).addClass('jws-animated'); 250 iter++; 251 }, 100); 252 253 } 254 } 255 256 if(!container.hasClass('jws-accommodation-advanced-slider') && !container.hasClass('slider-center')) { 257 if($this.find('.post_nav_container').length) { 258 container.imagesLoaded(function() { 259 container.isotope({ 260 itemSelector: ".jws-post-item", 261 layoutMode: 'fitRows', 262 transitionDuration: "0.7s", 263 }); 264 }); 265 } 266 267 $this.find('.post_nav_container a').on("click touchstart", function (e) { 268 var $t = $(this), 269 selector = $t.data("filter"); 270 271 $this.removeClass('jws-animated-post'); 272 // Don't proceed if already selected 273 if ($t.hasClass("filter-active")) 274 return false; 275 276 $this.find('.post_nav_container a').removeClass("filter-active"); 277 $t.addClass("filter-active"); 278 container.isotope({filter: selector}); 279 280 e.stopPropagation(); 281 e.preventDefault(); 282 283 }); 284 } 285 286 287 if(container.hasClass('slider-center')) { 288 var current,current_side_item,current_side,current_index; 289 container.on("initialized.owl.carousel", function(event) { 290 291 current = event.item.index; 292 current_side_item = $this.find('.owl-item').eq(current); 293 current_side = current_side_item.find('.slider-item'); 294 current_index = current_side.data('index'); 295 296 container.append('<div class="owl-number"><span class="current">'+parseInt(current_index)+'</span>/<span class="total">'+event.item.count+'</span></div>') 297 298 current_side_item.prev().removeClass('nextdiv').addClass('prevdiv'); 299 current_side_item.next().removeClass('prevdiv').addClass('nextdiv'); 300 }); 301 302 container.owlCarousel({ 303 center: true, 304 items:3, 305 loop:true, 306 margin:10, 307 autoWidth:true, 308 smartSpeed:1000, 309 nav:true, 310 dots:false, 311 responsive:{ 312 600:{ 313 314 } 315 } 316 }); 317 318 container.on('translate.owl.carousel', function(event) { 319 320 current = event.item.index; 321 current_side_item = $this.find('.owl-item').eq(current); 322 current_side = current_side_item.find('.slider-item'); 323 current_index = current_side.data('index'); 324 325 current_side_item.prev().removeClass('nextdiv').addClass('prevdiv'); 326 current_side_item.next().removeClass('prevdiv').addClass('nextdiv'); 327 328 329 $this.find(".owl-number .current").text(current_index); 330 331 332 if (current_index % 2 == 0) { 333 334 $('body').addClass('even'); 335 336 } else { 337 338 $('body').removeClass('even'); 339 340 } 341 342 343 344 }); 345 346 347 }; 348 349 jwsThemeModule.animation_scroll(container,container.find('.jws-post-item')); 350 351 352 353 /** 354 *------------------------------------------------------------------------------------------------------------------------------------------- 355 * filter ajax 356 *------------------------------------------------------------------------------------------------------------------------------------------- 357 */ 358 var form = $this.find('.filter-nav form'); 359 360 var intervalID; 361 var paged = 1; 362 var loadmore = false; 363 var pagination = false; 364 clearInterval(intervalID); 365 366 367 $this.data('args',$this.find('.data-ajax').data('args')); 368 var data = $this.data('args'); 369 370 $this.data('query',$this.find('.data-ajax').data('query')); 371 var data_query = $this.data('query'); 372 373 $this.find('.data-ajax').removeAttr("data-args"); 374 $this.find('.data-ajax').removeAttr("data-query"); 375 376 form.find('select').on('change', function() { 377 form.submit(); 378 }); 379 380 $(document).on('click', '.room-pagination .jws-load-more' , function(e) { 381 e.preventDefault(); 382 383 $(this).addClass('loading'); 384 if(!$(this).find('.loader').length) { 385 $(this).append('<div class="loader"><svg class="circular" viewBox="25 25 50 50"><circle class="path" cx="50" cy="50" r="20" fill="none" stroke-width="2" stroke-miterlimit="10"/></svg></div>'); 386 } 387 388 paged++; 389 loadmore = true; 390 391 data_query.paged = paged; 392 filter_action(); 393 394 395 }); 396 397 $(document).on('click', '.room-pagination .page-numbers a' , function(e) { 398 399 e.preventDefault(); 400 401 402 if($(this).hasClass('next')) { 403 404 paged++; 405 406 } else if($(this).hasClass('prev')) { 407 paged = paged-1; 408 } else { 409 paged = $(this).text(); 410 } 411 pagination = true; 412 data_query.paged = paged; 413 filter_action(); 414 415 416 }); 417 418 form.on('submit', function(e) { 419 420 e.preventDefault(); 421 filter_action(); 422 423 }); 424 425 426 function filter_action() { 427 428 var total = 0; 429
430 data.action = 'jws_ajax_room_filter'; 431 data.room_order = form.find('[name="room_order"]').val(); 432 data.room_size = form.find('[name="room_size"]').val(); 433 data.room_cat = form.find('[name="room_cat"]').val(); 434 data.room_location = form.find('[name="room_location"]').val(); 435 data.default_query = data_query; 436 console.log(data); 437 438 if(!loadmore && !pagination) { 439 paged = 1; 440 data.default_query.paged = 1; 441 } 442 443 if(!loadmore) { 444 container.addClass('loading'); 445 if(!container.find('.loader').length) { 446 container.append('<div class="loader"><svg class="circular" viewBox="25 25 50 50"><circle class="path" cx="50" cy="50" r="20" fill="none" stroke-width="2" stroke-miterlimit="10"/></svg></div>'); 447 } 448 $('html,body').animate({ 449 scrollTop:$('.data-ajax').offset().top - 120 450 }, 600); 451 }else { 452 container.find('.jws-post-item').addClass('jws-animated'); 453 total = container.find('.jws-post-item').length; 454 } 455 456 $this.addClass('jws-animated-post'); 457 458 $.ajax({ 459 url: jws_script.ajax_url, 460 data: data, 461 type: 'POST', 462 dataType: 'json', 463 }).success(function(response) { 464 console.log(response); 465 if(loadmore) { 466 467 let $newElements = $(response.data.output); 468 container.append($newElements); 469 470 if($this.find('.post_nav_container').length) { 471 472 $newElements.imagesLoaded(function() { 473 474 container.isotope( 'appended', $newElements ); 475 476 }); 477 478 479 } 480 481 }else { 482 container.html(response.data.output); 483 } 484 485 $('.room-pagination').html(response.data.pagination_output); 486 if(response.data.pagination_output == '') { 487 $('.room-pagination').addClass('hidden'); 488 }else { 489 $('.room-pagination').removeClass('hidden'); 490 } 491 492 var iter = total; 493 494 intervalID = setInterval(function() { 495 container.find('.jws-post-item').eq(iter).addClass('jws-animated'); 496 iter++; 497 }, 100); 498 499 500 }).error(function(ex) { 501 console.log(ex); 502 }).complete(function() { 503 loadmore = false; 504 pagination = false; 505 container.removeClass('loading'); 506 }); 507 508 } 509 510 511 }); 512 }; 513 514 /** 515 *------------------------------------------------------------------------------------------------------------------------------------------- 516 * video popup 517 *------------------------------------------------------------------------------------------------------------------------------------------- 518 */ 519 var demo_filter = function($scope, $) { 520 $scope.find('.jws_demo_element').eq(0).each(function() { 521 jwsThemeModule.animation_scroll($(this).find('.jws_demo'),$(this).find('.jws_column_content')); 522 }); 523 }; 524 /** 525 *------------------------------------------------------------------------------------------------------------------------------------------- 526 * video popup 527 *------------------------------------------------------------------------------------------------------------------------------------------- 528 */ 529 var video_popup = function($scope, $) { 530 var isYoutubeVideo = function(url) { 531 return url.includes("youtube.com"); 532 }; 533 var isVimeoVideo = function(url) { 534 return url.includes("vimeo.com"); 535 }; 536 var getYouTubeID = function(url) { 537 var regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??(v=)?([^#\&\?]*).*/; 538 var match = url.match(regExp); 539 if (match && match[8].length == 11) { 540 return match[8]; 541 } else { 542 return null; 543 } 544 } 545 $scope.find('.jws_video_popup').eq(0).each(function() { 546 547 548 549 $(this).find('a').on('click' , function(e) { 550 e.preventDefault(); 551 var $trailer = $(this).attr('href'); 552 var html = 'no_video'; 553 if(isYoutubeVideo($trailer) || isVimeoVideo($trailer)) { 554 html = '<div class="mfp-iframe-holder"><div class="mfp-iframe-scaler"><iframe src="//www.youtube.com/embed/'+getYouTubeID($trailer)+'?autoplay=1&mute=0"></iframe></div></div>'; 555 }else {
556 html = '<video autoplay playsinline controls><source src="'+$trailer+'" type="video/mp4"></video>'; 557 558 } 559 560 $.magnificPopup.open({ 561 items: { 562 src: '<div class="video-popup-content html_inline">'+html+'</div>', // can be a HTML string, jQuery object, or CSS selector 563 type: 'inline' 564 }, 565 tClose: 'close', 566 removalDelay: 360, 567 callbacks: { 568 beforeOpen: function() { 569 this.st.mainClass = 'mfp-zoom-in'; 570 }, 571 open: function() { 572 573 574 } 575 }, 576 }); 577 578 }); 579 580 }); 581 }; 582 583 584 585 /** 586 *------------------------------------------------------------------------------------------------------------------------------------------- 587 * testimonials_slider 588 *------------------------------------------------------------------------------------------------------------------------------------------- 589 */ 590 var testimonials_slider = function($scope, $) { 591 $scope.find('.jws_testimonials_slider_wrap').eq(0).each(function() { 592 593 594 let centerMode = true; 595 let slider = $(this).find('.testimonials_slider'); 596 let thumbnail = $(this).find('.testimonials_slider_thumbnail'); 597 598 599 jwsThemeModule.owl_caousel_init(slider); 600 601 602 if(thumbnail.length) { 603 slider.on('changed.owl.carousel', function(event) { 604 syncPosition(event , thumbnail); 605 }); 606 var options = thumbnail.data('owl-option'); 607 thumbnail.owlCarousel(options); 608 609 thumbnail.on("click", ".owl-item", function(e){ 610 611 e.preventDefault(); 612 var number = $(this).find('.slider-item').data('index'); 613 var clone = slider.find('.cloned').length; 614 var change_nav = slider.find('.owl-item').not( ".cloned" ).find('.slider-item[data-index="'+number+'"]'); 615 slider.trigger("to.owl.carousel", change_nav.parent().index() - clone / 2 ) 616 617 618 }); 619 620 } 621 }); 622 }; 623 624 625 /** 626 *------------------------------------------------------------------------------------------------------------------------------------------- 627 * Blog Filter 628 *------------------------------------------------------------------------------------------------------------------------------------------- 629 */ 630 var blog_filter = function($scope, $) { 631 $scope.find('.jws-blog-element').eq(0).each(function() { 632 var $this = $(this); 633 var $container = $this.find('.blog_content'); 634 if($container.hasClass('jws_blog_slider')) { 635 jwsThemeModule.owl_caousel_init($container); 636 } 637 }); 638 }; 639 640 641 642 /** 643 *------------------------------------------------------------------------------------------------------------------------------------------- 644 * team_slider 645 *------------------------------------------------------------------------------------------------------------------------------------------- 646 */ 647 var team_slider = function($scope, $) { 648 $scope.find('.jws_team_element').eq(0).each(function() { 649 650 jwsThemeModule.owl_caousel_init($(this).find('.jws_team_slider')); 651 652 }); 653 654 }; 655 656 657 /** 658 *------------------------------------------------------------------------------------------------------------------------------------------- 659 * gallery Filter 660 *------------------------------------------------------------------------------------------------------------------------------------------- 661 */ 662 var jws_gallery = function($scope, $) { 663 664 $scope.find('.jws_gallery_element').eq(0).each(function() { 665 var $this = $(this), 666 $container = $this.find('.jws_gallery'); 667 668 //init flickity 669 var pageDots = false; 670 if($container.hasClass('has-dots')) { 671 pageDots = true; 672 } 673 jwsThemeModule.animation_scroll($container,$container.find('.jws_gallery_item')); 674 675 $container.magnificPopup({ 676 delegate: '.jws-popup-global', 677 type: 'image', 678 tLoading: 'Loading image #%curr%...', 679 mainClass: 'mfp-img-mobile', 680 gallery: { 681 enabled: true, 682 navigateByImgClick: true, 683 preload: [0,1] // Will preload 0 - before current, and 1 after the current image 684 }, 685 image: { 686 tError: '<a href="%url%">The image #%curr%</a> could not be loaded.', 687 688 } 689 });
690 691 if($container.hasClass('metro')) { 692 693 $container.isotope({ 694 itemSelector: ".jws_gallery_item", 695 layoutMode: 'masonry', 696 transitionDuration: "0.3s", 697 masonry: { 698 // use outer width of grid-sizer for columnWidth 699 columnWidth: '.grid-sizer', 700 } 701 }); 702 703 } 704 705 if($container.hasClass('slider')) { 706 var current,current_side_item,current_side,current_index; 707 $container.on("initialized.owl.carousel", function(event) { 708 709 current = event.item.index; 710 current_side_item = $this.find('.owl-item').eq(current); 711 current_side = current_side_item.find('.slider-item'); 712 current_index = current_side.data('index'); 713 714 current_side_item.prev().removeClass('nextdiv').addClass('prevdiv'); 715 current_side_item.next().removeClass('prevdiv').addClass('nextdiv'); 716 if($container.hasClass('nav-with_number')) { 717 $container.append('<div class="owl-number"><span class="current">'+parseInt(current_index)+'</span>/<span class="total">'+event.item.count+'</span></div>') 718 } 719 720 }); 721 722 jwsThemeModule.owl_caousel_init($container); 723 724 $container.on('translate.owl.carousel', function(event) { 725 726 current = event.item.index; 727 current_side_item = $this.find('.owl-item').eq(current); 728 current_side = current_side_item.find('.slider-item'); 729 current_index = current_side.data('index'); 730 731 current_side_item.prev().removeClass('nextdiv').addClass('prevdiv'); 732 current_side_item.next().removeClass('prevdiv').addClass('nextdiv'); 733 734 $this.find(".owl-number .current").text(current_index); 735 736 }); 737 738 739 } 740 741 }); 742 }; 743 744 745 /** 746 *------------------------------------------------------------------------------------------------------------------------------------------- 747 * Tabs 748 *------------------------------------------------------------------------------------------------------------------------------------------- 749 */ 750 var jws_tabs = function($scope, $) { 751 $scope.find('.jws_tab_wrap').eq(0).each(function() { 752 var $this = $(this); 753 /** Line magic tabs filter **/ 754 if($this.find('.tab_nav').length) { 755 756 $this.find('.tab_nav li a').click(function(e) { 757 e.preventDefault(); 758 var tab_id = $(this).attr('data-tab'); 759 $this.find('.tab_nav li a').parent().removeClass('current'); 760 $this.find('.jws_tab_item').removeClass('current'); 761 $(this).parent().addClass('current'); 762 $this.find("#" + tab_id).addClass('current'); 763 }); 764 }; 765 }); 766 }; 767 768 var blogLoadMore = function($scope, $) { 769 $scope.find('.jws-blog-element').eq(0).each(function() { 770 loadmore_btn($(this)); 771 }); 772 }; 773 /** 774 *------------------------------------------------------------------------------------------------------------------------------------------- 775 * Load more button for blog 776 *------------------------------------------------------------------------------------------------------------------------------------------- 777 */ 778 779 var loadmore_btn = function($scope) { 780 var $element = $scope.find('[data-ajaxify=true]'); 781 var options = $element.data('ajaxify-options'); 782 if($element.length < 1) return false; 783 var wap = options.wrapper; 784 var page = 1; 785 $(document.body).on('click', '.jws-load-more' , function(e) { 786 e.preventDefault(); 787 var $this = $(this); 788 if($this.hasClass('all-items-loaded')) return false; 789 page++; 790 $(this).append('<div class="loader"><svg class="circular" viewBox="25 25 50 50"><circle class="path" cx="50" cy="50" r="20" fill="none" stroke-width="2" stroke-miterlimit="10"/></svg></div>'); 791 $(this).addClass('loading'); 792 var url = $this.attr('href'); 793 794 if ('?' == url.slice(-1)) { 795 url = url.slice(0, -1); 796 } 797 798 url = url.replace(/%2C/g, ','); 799 800 801 $.get(url, function(res) { 802 803 var $newItemsWrapper = $(res).find(options.wrapper); 804 var $newItems = $newItemsWrapper.find(options.items); 805 var $total = options.total; 806 $this.removeClass('loading'); 807 808 if($total == page) { 809 810 $this.addClass('all-items-loaded'); 811 812 } else { 813 814 $this.parents('.jws_pagination').html($(res).find('.jws_pagination').html()); 815 816 } 817 $newItemsWrapper.find(options.items).addClass('fadeInUp animated'); 818 819 $(wap).append($newItems); 820 821 $this.find('.loader').remove(); 822 823 824 825 826 }, 'html'); 827 }); 828 829 }; 830 831 /** 832 *------------------------------------------------------------------------------------------------------------------------------------------- 833 * Google Map 834 *------------------------------------------------------------------------------------------------------------------------------------------- 835 */ 836 var WidgetjwsGoogleMapHandler = function($scope) { 837 if('undefined' == typeof $scope) return; 838 var selector = $scope.find('.jws-google-map').eq(0), 839 locations = selector.data('locations'), 840 map_style = (selector.data('custom-style') != '') ? selector.data('custom-style') : '', 841 predefined_style = (selector.data('predefined-style') != '') ? selector.data('predefined-style') : '', 842 info_window_size = (selector.data('max-width') != '') ? selector.data('max-width') : '', 843 animate = selector.data('animate'), 844 auto_center = selector.data('auto-center'), 845 maker_offset = selector.data('offset'), 846 map_options = selector.data('map_options'), 847 i = '', 848 bounds = new google.maps.LatLngBounds(), 849 marker_cluster = [],
850 className = 'map_pin_jws'; 851 var animation; 852 if('drop' == animate) { 853 animation = google.maps.Animation.DROP; 854 } else if('bounce' == animate) { 855 animation = google.maps.Animation.BOUNCE; 856 } 857 858 function _typeof(obj) { 859 var _typeof; 860 if(typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { 861 _typeof = function _typeof(obj) { 862 return typeof obj; 863 }; 864 } else { 865 _typeof = function _typeof(obj) { 866 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; 867 }; 868 } 869 return _typeof(obj); 870 } 871 872 function CustomMarker(latlng, map, className) { 873 this.latlng_ = latlng; 874 this.className = className; // Once the LatLng and text are set, add the overlay to the map. This will 875 // trigger a call to panes_changed which should in turn call draw. 876 this.setMap(map); 877 } 878 if((typeof google === "undefined" ? "undefined" : _typeof(google)) !== _typeof(undefined) && _typeof(google.maps) !== _typeof(undefined)) { 879 CustomMarker.prototype = new google.maps.OverlayView(); 880 CustomMarker.prototype.draw = function() { 881 var me = this; // Check if the div has been created. 882 var div = this.div_, 883 divChild, 884 divChild2; 885 if(!div) { 886 // Create a overlay text DIV 887 div = this.div_ = document.createElement('DIV'); 888 div.className = this.className; 889 divChild = document.createElement("div"); 890 div.appendChild(divChild); 891 divChild2 = document.createElement("div"); 892 div.appendChild(divChild2); 893 google.maps.event.addDomListener(div, "click", function() { 894 google.maps.event.trigger(me, "click"); 895 }); // Then add the overlay to the DOM 896 var panes = this.getPanes(); 897 panes.overlayImage.appendChild(div); 898 } // Position the overlay 899 var point = this.getProjection().fromLatLngToDivPixel(this.latlng_); 900 if(point) { 901 div.style.left = point.x + 'px'; 902 div.style.top = point.y + 'px'; 903 } 904 }; 905 CustomMarker.prototype.remove = function() { 906 // Check if the overlay was on the map and needs to be removed. 907 if(this.div_) { 908 this.div_.parentNode.removeChild(this.div_); 909 this.div_ = null; 910 } 911 }; 912 CustomMarker.prototype.getPosition = function() { 913 return this.latlng_; 914 }; 915 } 916 var skins = { 917 "silver": "[{\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#f5f5f5\"}]},{\"elementType\":\"labels.icon\",\"stylers\":[{\"visibility\":\"off\"}]},{\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#616161\"}]},{\"elementType\":\"labels.text.stroke\",\"stylers\":[{\"color\":\"#f5f5f5\"}]},{\"featureType\":\"administrative.land_parcel\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#bdbdbd\"}]},{\"featureType\":\"poi\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#eeeeee\"}]},{\"featureType\":\"poi\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#757575\"}]},{\"featureType\":\"poi.park\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#e5e5e5\"}]},{\"featureType\":\"poi.park\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#9e9e9e\"}]},{\"featureType\":\"road\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#ffffff\"}]},{\"featureType\":\"road.arterial\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#757575\"}]},{\"featureType\":\"road.highway\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#dadada\"}]},{\"featureType\":\"road.highway\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#616161\"}]},{\"featureType\":\"road.local\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#9e9e9e\"}]},{\"featureType\":\"transit.line\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#e5e5e5\"}]},{\"featureType\":\"transit.station\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#eeeeee\"}]},{\"featureType\":\"water\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#c9c9c9\"}]},{\"featureType\":\"water\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#9e9e9e\"}]}]", 918 "retro": "[{\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#ebe3cd\"}]},{\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#523735\"}]},{\"elementType\":\"labels.text.stroke\",\"stylers\":[{\"color\":\"#f5f1e6\"}]},{\"featureType\":\"administrative\",\"elementType\":\"geometry.stroke\",\"stylers\":[{\"color\":\"#c9b2a6\"}]},{\"featureType\":\"administrative.land_parcel\",\"elementType\":\"geometry.stroke\",\"stylers\":[{\"color\":\"#dcd2be\"}]},{\"featureType\":\"administrative.land_parcel\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#ae9e90\"}]},{\"featureType\":\"landscape.natural\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#dfd2ae\"}]},{\"featureType\":\"poi\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#dfd2ae\"}]},{\"featureType\":\"poi\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#93817c\"}]},{\"featureType\":\"poi.park\",\"elementType\":\"geometry.fill\",\"stylers\":[{\"color\":\"#a5b076\"}]},{\"featureType\":\"poi.park\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#447530\"}]},{\"featureType\":\"road\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#f5f1e6\"}]},{\"featureType\":\"road.arterial\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#fdfcf8\"}]},{\"featureType\":\"road.highway\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#f8c967\"}]},{\"featureType\":\"road.highway\",\"elementType\":\"geometry.stroke\",\"stylers\":[{\"color\":\"#e9bc62\"}]},{\"featureType\":\"road.highway.controlled_access\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#e98d58\"}]},{\"featureType\":\"road.highway.controlled_access\",\"elementType\":\"geometry.stroke\",\"stylers\":[{\"color\":\"#db8555\"}]},{\"featureType\":\"road.local\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#806b63\"}]},{\"featureType\":\"transit.line\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#dfd2ae\"}]},{\"featureType\":\"transit.line\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#8f7d77\"}]},{\"featureType\":\"transit.line\",\"elementType\":\"labels.text.stroke\",\"stylers\":[{\"color\":\"#ebe3cd\"}]},{\"featureType\":\"transit.station\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#dfd2ae\"}]},{\"featureType\":\"water\",\"elementType\":\"geometry.fill\",\"stylers\":[{\"color\":\"#b9d3c2\"}]},{\"featureType\":\"water\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#92998d\"}]}]", 919 "dark": "[{\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#212121\"}]},{\"elementType\":\"labels.icon\",\"stylers\":[{\"visibility\":\"off\"}]},{\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#757575\"}]},{\"elementType\":\"labels.text.stroke\",\"stylers\":[{\"color\":\"#212121\"}]},{\"featureType\":\"administrative\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#757575\"}]},{\"featureType\":\"administrative.country\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#9e9e9e\"}]},{\"featureType\":\"administrative.land_parcel\",\"stylers\":[{\"visibility\":\"off\"}]},{\"featureType\":\"administrative.locality\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#bdbdbd\"}]},{\"featureType\":\"poi\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#757575\"}]},{\"featureType\":\"poi.park\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#181818\"}]},{\"featureType\":\"poi.park\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#616161\"}]},{\"featureType\":\"poi.park\",\"elementType\":\"labels.text.stroke\",\"stylers\":[{\"color\":\"#1b1b1b\"}]},{\"featureType\":\"road\",\"elementType\":\"geometry.fill\",\"stylers\":[{\"color\":\"#2c2c2c\"}]},{\"featureType\":\"road\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#8a8a8a\"}]},{\"featureType\":\"road.arterial\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#373737\"}]},{\"featureType\":\"road.highway\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#3c3c3c\"}]},{\"featureType\":\"road.highway.controlled_access\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#4e4e4e\"}]},{\"featureType\":\"road.local\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#616161\"}]},{\"featureType\":\"transit\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#757575\"}]},{\"featureType\":\"water\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#000000\"}]},{\"featureType\":\"water\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#3d3d3d\"}]}]", 920 "night": "[{\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#242f3e\"}]},{\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#746855\"}]},{\"elementType\":\"labels.text.stroke\",\"stylers\":[{\"color\":\"#242f3e\"}]},{\"featureType\":\"administrative.locality\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#d59563\"}]},{\"featureType\":\"poi\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#d59563\"}]},{\"featureType\":\"poi.park\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#263c3f\"}]},{\"featureType\":\"poi.park\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#6b9a76\"}]},{\"featureType\":\"road\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#38414e\"}]},{\"featureType\":\"road\",\"elementType\":\"geometry.stroke\",\"stylers\":[{\"color\":\"#212a37\"}]},{\"featureType\":\"road\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#9ca5b3\"}]},{\"featureType\":\"road.highway\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#746855\"}]},{\"featureType\":\"road.highway\",\"elementType\":\"geometry.stroke\",\"stylers\":[{\"color\":\"#1f2835\"}]},{\"featureType\":\"road.highway\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#f3d19c\"}]},{\"featureType\":\"transit\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#2f3948\"}]},{\"featureType\":\"transit.station\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#d59563\"}]},{\"featureType\":\"water\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#17263c\"}]},{\"featureType\":\"water\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#515c6d\"}]},{\"featureType\":\"water\",\"elementType\":\"labels.text.stroke\",\"stylers\":[{\"color\":\"#17263c\"}]}]", 921 "aubergine": "[{\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#1d2
921c4d\"}]},{\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#8ec3b9\"}]},{\"elementType\":\"labels.text.stroke\",\"stylers\":[{\"color\":\"#1a3646\"}]},{\"featureType\":\"administrative.country\",\"elementType\":\"geometry.stroke\",\"stylers\":[{\"color\":\"#4b6878\"}]},{\"featureType\":\"administrative.land_parcel\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#64779e\"}]},{\"featureType\":\"administrative.province\",\"elementType\":\"geometry.stroke\",\"stylers\":[{\"color\":\"#4b6878\"}]},{\"featureType\":\"landscape.man_made\",\"elementType\":\"geometry.stroke\",\"stylers\":[{\"color\":\"#334e87\"}]},{\"featureType\":\"landscape.natural\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#023e58\"}]},{\"featureType\":\"poi\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#283d6a\"}]},{\"featureType\":\"poi\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#6f9ba5\"}]},{\"featureType\":\"poi\",\"elementType\":\"labels.text.stroke\",\"stylers\":[{\"color\":\"#1d2c4d\"}]},{\"featureType\":\"poi.park\",\"elementType\":\"geometry.fill\",\"stylers\":[{\"color\":\"#023e58\"}]},{\"featureType\":\"poi.park\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#3C7680\"}]},{\"featureType\":\"road\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#304a7d\"}]},{\"featureType\":\"road\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#98a5be\"}]},{\"featureType\":\"road\",\"elementType\":\"labels.text.stroke\",\"stylers\":[{\"color\":\"#1d2c4d\"}]},{\"featureType\":\"road.highway\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#2c6675\"}]},{\"featureType\":\"road.highway\",\"elementType\":\"geometry.stroke\",\"stylers\":[{\"color\":\"#255763\"}]},{\"featureType\":\"road.highway\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#b0d5ce\"}]},{\"featureType\":\"road.highway\",\"elementType\":\"labels.text.stroke\",\"stylers\":[{\"color\":\"#023e58\"}]},{\"featureType\":\"transit\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#98a5be\"}]},{\"featureType\":\"transit\",\"elementType\":\"labels.text.stroke\",\"stylers\":[{\"color\":\"#1d2c4d\"}]},{\"featureType\":\"transit.line\",\"elementType\":\"geometry.fill\",\"stylers\":[{\"color\":\"#283d6a\"}]},{\"featureType\":\"transit.station\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#3a4762\"}]},{\"featureType\":\"water\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#0e1626\"}]},{\"featureType\":\"water\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#4e6d70\"}]}]", 922 "magnesium": "[{\"featureType\":\"all\",\"stylers\":[{\"saturation\":0},{\"hue\":\"#e7ecf0\"}]},{\"featureType\":\"road\",\"stylers\":[{\"saturation\":-70}]},{\"featureType\":\"transit\",\"stylers\":[{\"visibility\":\"off\"}]},{\"featureType\":\"poi\",\"stylers\":[{\"visibility\":\"off\"}]},{\"featureType\":\"water\",\"stylers\":[{\"visibility\":\"simplified\"},{\"saturation\":-60}]}]", 923 "classic_blue": "[{\"featureType\":\"all\",\"elementType\":\"labels\",\"stylers\":[{\"visibility\":\"on\"}]},{\"featureType\":\"administrative.country\",\"elementType\":\"labels\",\"stylers\":[{\"visibility\":\"on\"}]},{\"featureType\":\"administrative.country\",\"elementType\":\"labels.text\",\"stylers\":[{\"visibility\":\"on\"}]},{\"featureType\":\"administrative.province\",\"elementType\":\"labels\",\"stylers\":[{\"visibility\":\"on\"}]},{\"featureType\":\"administrative.province\",\"elementType\":\"labels.text\",\"stylers\":[{\"visibility\":\"on\"}]},{\"featureType\":\"administrative.locality\",\"elementType\":\"labels\",\"stylers\":[{\"visibility\":\"on\"}]},{\"featureType\":\"administrative.neighborhood\",\"elementType\":\"labels\",\"stylers\":[{\"visibility\":\"off\"}]},{\"featureType\":\"administrative.land_parcel\",\"elementType\":\"labels\",\"stylers\":[{\"visibility\":\"off\"}]},{\"featureType\":\"landscape\",\"elementType\":\"all\",\"stylers\":[{\"hue\":\"#FFBB00\"},{\"saturation\":43.400000000000006},{\"lightness\":37.599999999999994},{\"gamma\":1}]},{\"featureType\":\"landscape\",\"elementType\":\"geometry.fill\",\"stylers\":[{\"saturation\":\"-40\"},{\"lightness\":\"36\"}]},{\"featureType\":\"landscape.man_made\",\"elementType\":\"geometry\",\"stylers\":[{\"visibility\":\"off\"}]},{\"featureType\":\"landscape.natural\",\"elementType\":\"geometry.fill\",\"stylers\":[{\"saturation\":\"-77\"},{\"lightness\":\"28\"}]},{\"featureType\":\"landscape.natural\",\"elementType\":\"labels\",\"stylers\":[{\"visibility\":\"off\"}]},{\"featureType\":\"poi\",\"elementType\":\"all\",\"stylers\":[{\"hue\":\"#00FF6A\"}
923,{\"saturation\":-1.0989010989011234},{\"lightness\":11.200000000000017},{\"gamma\":1}]},{\"featureType\":\"poi\",\"elementType\":\"labels\",\"stylers\":[{\"visibility\":\"off\"}]},{\"featureType\":\"poi.attraction\",\"elementType\":\"labels\",\"stylers\":[{\"visibility\":\"off\"}]},{\"featureType\":\"poi.park\",\"elementType\":\"geometry.fill\",\"stylers\":[{\"saturation\":\"-24\"},{\"lightness\":\"61\"}]},{\"featureType\":\"road\",\"elementType\":\"labels\",\"stylers\":[{\"visibility\":\"on\"}]},{\"featureType\":\"road\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"visibility\":\"on\"}]},{\"featureType\":\"road\",\"elementType\":\"labels.icon\",\"stylers\":[{\"visibility\":\"off\"}]},{\"featureType\":\"road.highway\",\"elementType\":\"all\",\"stylers\":[{\"hue\":\"#FFC200\"},{\"saturation\":-61.8},{\"lightness\":45.599999999999994},{\"gamma\":1}]},{\"featureType\":\"road.highway\",\"elementType\":\"labels.icon\",\"stylers\":[{\"visibility\":\"off\"}]},{\"featureType\":\"road.highway.controlled_access\",\"elementType\":\"labels.icon\",\"stylers\":[{\"visibility\":\"off\"}]},{\"featureType\":\"road.arterial\",\"elementType\":\"all\",\"stylers\":[{\"hue\":\"#FF0300\"},{\"saturation\":-100},{\"lightness\":51.19999999999999},{\"gamma\":1}]},{\"featureType\":\"road.local\",\"elementType\":\"all\",\"stylers\":[{\"hue\":\"#ff0300\"},{\"saturation\":-100},{\"lightness\":52},{\"gamma\":1}]},{\"featureType\":\"road.local\",\"elementType\":\"labels.icon\",\"stylers\":[{\"visibility\":\"off\"}]},{\"featureType\":\"transit\",\"elementType\":\"geometry\",\"stylers\":[{\"visibility\":\"off\"}]},{\"featureType\":\"transit\",\"elementType\":\"geometry.stroke\",\"stylers\":[{\"visibility\":\"off\"}]},{\"featureType\":\"transit\",\"elementType\":\"labels\",\"stylers\":[{\"visibility\":\"off\"}]},{\"featureType\":\"transit\",\"elementType\":\"labels.icon\",\"stylers\":[{\"visibility\":\"off\"}]},{\"featureType\":\"transit.line\",\"elementType\":\"labels\",\"stylers\":[{\"visibility\":\"off\"}]},{\"featureType\":\"transit.station\",\"elementType\":\"labels.icon\",\"stylers\":[{\"visibility\":\"off\"}]},{\"featureType\":\"water\",\"elementType\":\"all\",\"stylers\":[{\"hue\":\"#0078FF\"},{\"saturation\":-13.200000000000003},{\"lightness\":2.4000000000000057},{\"gamma\":1}]},{\"featureType\":\"water\",\"elementType\":\"labels\",\"stylers\":[{\"visibility\":\"off\"}]}]", 924 "aqua": "[{\"featureType\":\"administrative\",\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#444444\"}]},{\"featureType\":\"landscape\",\"elementType\":\"all\",\"stylers\":[{\"color\":\"#f2f2f2\"}]},{\"featureType\":\"poi\",\"elementType\":\"all\",\"stylers\":[{\"visibility\":\"off\"}]},{\"featureType\":\"road\",\"elementType\":\"all\",\"stylers\":[{\"saturation\":-100},{\"lightness\":45}]},{\"featureType\":\"road.highway\",\"elementType\":\"all\",\"stylers\":[{\"visibility\":\"simplified\"}]},{\"featureType\":\"road.arterial\",\"elementType\":\"labels.icon\",\"stylers\":[{\"visibility\":\"off\"}]},{\"featureType\":\"transit\",\"elementType\":\"all\",\"stylers\":[{\"visibility\":\"off\"}]},{\"featureType\":\"water\",\"elementType\":\"all\",\"stylers\":[{\"color\":\"#46bcec\"},{\"visibility\":\"on\"}]}]", 925 "earth": "[{\"featureType\":\"landscape.man_made\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#f7f1df\"}]},{\"featureType\":\"landscape.natural\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#d0e3b4\"}]},{\"featureType\":\"landscape.natural.terrain\",\"elementType\":\"geometry\",\"stylers\":[{\"visibility\":\"off\"}]},{\"featureType\":\"poi\",\"elementType\":\"labels\",\"stylers\":[{\"visibility\":\"off\"}]},{\"featureType\":\"poi.business\",\"elementType\":\"all\",\"stylers\":[{\"visibility\":\"off\"}]},{\"featureType\":\"poi.medical\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#fbd3da\"}]},{\"featureType\":\"poi.park\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#bde6ab\"}]},{\"featureType\":\"road\",\"elementType\":\"geometry.stroke\",\"stylers\":[{\"visibility\":\"off\"}]},{\"featureType\":\"road\",\"elementType\":\"labels\",\"stylers\":[{\"visibility\":\"off\"}]},{\"featureType\":\"road.highway\",\"elementType\":\"geometry.fill\",\"stylers\":[{\"color\":\"#ffe15f\"}]},{\"featureType\":\"road.highway\",\"elementType\":\"geometry.stroke\",\"stylers\":[{\"color\":\"#efd1
92551\"}]},{\"featureType\":\"road.arterial\",\"elementType\":\"geometry.fill\",\"stylers\":[{\"color\":\"#ffffff\"}]},{\"featureType\":\"road.local\",\"elementType\":\"geometry.fill\",\"stylers\":[{\"color\":\"black\"}]},{\"featureType\":\"transit.station.airport\",\"elementType\":\"geometry.fill\",\"stylers\":[{\"color\":\"#cfb2db\"}]},{\"featureType\":\"water\",\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#a2daf2\"}]}]" 926 }; 927 if('undefined' != typeof skins[predefined_style]) { 928 map_style = JSON.parse(skins[predefined_style]); 929 } 930 (function initMap() { 931 var latlng = new google.maps.LatLng(locations[0][0], locations[0][1]); 932 map_options.center = latlng; 933 map_options.styles = map_style; 934 if(false == map_options.gestureHandling) { 935 map_options.gestureHandling = 'none'; 936 } 937 var map = new google.maps.Map($scope.find('.jws-google-map')[0], map_options); 938 var infowindow = new google.maps.InfoWindow(); 939 var marker; 940 for(i = 0; i < locations.length; i++) { 941 var title = locations[i][3]; 942 var description = locations[i][4]; 943 var images_info = locations[i][5]; 944 var icon_size = parseInt(locations[i][8]); 945 var icon_type = locations[i][6]; 946 var icon = ''; 947 var icon_url = locations[i][7]; 948 var enable_iw = locations[i][2]; 949 var click_open = locations[i][9]; 950 var lat = locations[i][0]; 951 var lng = locations[i][1]; 952 var infoWindow_opened = false; 953 if('undefined' === typeof locations[i]) { 954 return; 955 } 956 if('' != lat.length && '' != lng.length) { 957 if('custom' == icon_type) { 958 icon = { 959 url: icon_url, 960 }; 961 if(!isNaN(icon_size)) { 962 icon.scaledSize = new google.maps.Size(icon_size, icon_size); 963 icon.origin = new google.maps.Point(0, 0); 964 icon.anchor = new google.maps.Point(icon_size / 2, icon_size); 965 } 966 marker = new google.maps.Marker({ 967 position: new google.maps.LatLng(lat, lng), 968 map: map, 969 title: title, 970 icon: icon, 971 animation: animation 972 }); 973 } else if('html' == icon_type) { 974 marker = new CustomMarker(new google.maps.LatLng(lat, lng), map, className); 975 } else { 976 marker = new google.maps.Marker({ 977 position: new google.maps.LatLng(lat, lng), 978 map: map, 979 title: title, 980 icon: icon, 981 animation: animation 982 }); 983 } 984 if('undefined' !== typeof maker_offset) { 985 map.panBy(0, maker_offset); 986 } 987 if(locations.length > 1) { 988 // Extend the bounds to include each marker's position 989 bounds.extend(marker.position); 990 } 991 marker_cluster[i] = marker; 992 if(enable_iw && 'iw_open' == click_open) { 993 infoWindow_opened = true; 994 var has_image = ''; 995 if(images_info != '') { 996 has_image = ' has-image'; 997 } 998 999 var content_string = '<div class="jws-infowindow-content'+has_image+'">'; 1000 1001 1002 if(images_info != '') { 1003 content_string += '<div class="info-left"><img src="' + images_info + '"></div>'; 1004 } 1005 if('' != description.length) { 1006 content_string += ' <div class="content-right"><div class="jws-infowindow-title">' + title + '</div><div class="jws-infowindow-description">' + description + '</div></div>'; 1007 } 1008 1009 content_string += '</div>'; 1010 if('' != info_window_size) { 1011 var width_val = parseInt(info_window_size); 1012 infowindow = new google.maps.InfoWindow({ 1013 content: content_string, 1014 maxWidth: width_val 1015 }); 1016 } else { 1017 infowindow = new google.maps.InfoWindow({ 1018 content: content_string, 1019 }); 1020 } 1021 infowindow.open(map, marker); 1022 } 1023 // Adding close event for info window 1024 infowindow.addListener('closeclick', ()=>{ 1025 infoWindow_opened = false; 1026 }); 1027 if(enable_iw && '' != locations[i][3]) { 1028 google.maps.event.addListener(marker, 'click', (function(marker, i) { 1029 var infowindow = new google.maps.InfoWindow(); 1030 var has_image = ''; 1031 if(locations[i][5] != '') { 1032 has_image = ' has-image'; 1033 } 1034 var content_string = '<div class="jws-infowindow-content'+has_image+'">'; 1035 1036 1037 if('' != locations[i][5]) { 1038 1039 content_string += '<div class="info-left"><img src="' + locations[i][5] + '"></div>'; 1040 1041 } 1042 1043 content_string += '<div class="content-right"><div class="jws-infowindow-title">' + locations[i][3] + '</div>'; 1044 if('' != locations[i][4].length) { 1045 content_string += '<div class="jws-infowindow-description">' + locations[i][4] + '</div></div>'; 1046 } 1047 1048 content_string += '</div>'; 1049 1050 return function() { 1051 1052 infowindow.setContent(content_string); 1053 if('' != info_window_size) { 1054 var width_val = parseInt(info_window_size); 1055 var InfoWindowOptions = { 1056 maxWidth: width_val 1057 }; 1058 infowindow.setOptions({ 1059 options: InfoWindowOptions 1060 });
1061 } 1062 1063 if(!infoWindow_opened) { 1064 infowindow.open(map, marker); 1065 } 1066 1067 1068 }; 1069 1070 })(marker, i)); 1071 } 1072 } 1073 } 1074 if(locations.length > 1) { 1075 if('center' == auto_center) { 1076 // Now fit the map to the newly inclusive bounds. 1077 map.fitBounds(bounds); 1078 } 1079 // Restore the zoom level after the map is done scaling. 1080 var listener = google.maps.event.addListener(map, "idle", function() { 1081 map.setZoom(map_options.zoom); 1082 google.maps.event.removeListener(listener); 1083 }); 1084 } 1085 })(); 1086 }; 1087 1088 /** 1089 * Menu Style. 1090 * 1091 */ 1092 var jws_menu_style = function($scope, $) { 1093 if('undefined' == typeof $scope) { 1094 return; 1095 } 1096 $scope.find('.jws_main_menu').eq(0).each(function() { 1097 var $this = $(this); 1098 $(this).find('.elementor-icon-list-item.active').parents('.nav > li').addClass('current-menu-item'); 1099 if($this.closest('.elementor-widget-jws_menu_nav').hasClass('elementor-before-menu-skin-animation-line')) { 1100 var main = $this.find(".jws_main_menu_inner"), 1101 curent_item = main.find('> ul > li.current-menu-item , > ul > li.current-menu-ancestor'), 1102 curent_item_sub = main.find('ul li.current-menu-item , .elementor-icon-list-item.active'); 1103 if(main.find('> ul > li.current-menu-item').length == 0) { 1104 if(curent_item_sub.length > 0) { 1105 curent_item = curent_item_sub.parents('.nav > li'); 1106 } else { 1107 curent_item = main.find('> ul > li:first-child'); 1108 } 1109 } 1110 } 1111 /** Menu toggle **/ 1112 $this.find('.click-show-menu-v').on('click', function() { 1113 $this.find('.menu-toggle').toggleClass('open'); 1114 }); 1115 }); 1116 //mega menu 1117 var mainMenu = $('.elementor_jws_menu_layout_menu_horizontal').find('.nav'); 1118 var mega_item = mainMenu.find(' > li.menu-item-design-mega_menu_full_width'); 1119 1120 if (mega_item.length > 0) { 1121 $('.jws_header').addClass('has-mega-full'); 1122 } 1123 1124 mega_item.mouseenter(function() { 1125 $('.jws_header.has-mega-full').addClass('mega-has-hover'); 1126 }); 1127 1128 mega_item.mouseleave(function() { 1129 $('.jws_header.has-mega-full').removeClass('mega-has-hover'); 1130 }); 1131 1132 }; 1133 1134 var tooltip = function($scope, $) { 1135 $scope.find('.jws-tooltip-list').eq(0).each(function() { 1136 $(this).find('button').on("click", function() { 1137 var item = $(this).parents('li'); 1138 item.toggleClass('active').siblings().removeClass('active'); 1139 }); 1140 }); 1141 }; 1142 var instagram = function($scope, $) { 1143 $scope.find('.jws-instagram').eq(0).each(function() { 1144 var $this = $(this); 1145 var height_start = $this.find('.jws-instagram-item.col-xl-4').height(); 1146 $this.find('.instagram-wap').css('height',height_start); 1147 1148 jwsThemeModule.animation_scroll($this.find('.instagram-wap'),$this.find('.jws-instagram-item')); 1149 1150 if($(this).hasClass('metro')){ 1151 setTimeout(function() { 1152 $this.find('.loader').remove(); 1153 $this.find('.instagram-wap').removeClass('loading').isotope({ 1154 itemSelector: ".jws-instagram-item", 1155 layoutMode: 'masonry', 1156 transitionDuration: "0.3s", 1157 masonry: { 1158 // use outer width of grid-sizer for columnWidth 1159 columnWidth: '.grid-sizer', 1160 } 1161 }); 1162 }, 2000); 1163 } 1164 }); 1165 }; 1166 1167 1168 var syncPosition = function(el,thumbnail_nav) { 1169 var count = el.item.count - 1; 1170 var current = Math.round(el.item.index - el.item.count / 2 - 0.5); 1171 1172 var clone_lenght = el.relatedTarget._clones.length; 1173 1174 if (current < 0) { 1175 current = count; 1176 } 1177 if (current > count) { 1178 current = 0; 1179 } 1180 1181 1182 var change_nav = thumbnail_nav 1183 .find(".owl-item").not( ".cloned" ).find('.slider-item[data-index="'+current+'"]'); 1184 var change = change_nav.parent().index(); 1185 1186 //to this 1187 thumbnail_nav 1188 .find(".owl-item") 1189 .removeClass("current") 1190 .eq(change) 1191 .addClass("current"); 1192 1193 var end = thumbnail_nav 1194 .find(".owl-item.active") 1195 .last() 1196 .index(); 1197 1198 if (change >
1198 end) { 1199 thumbnail_nav.data("owl.carousel").to(change - 1, 100, true); 1200 }else { 1201 thumbnail_nav.data("owl.carousel").to(change, 100, true); 1202 } 1203 1204 }; 1205 1206 var promotions_advanced = function($scope, $) { 1207 $scope.find('.jws-promotions-advanced-element').eq(0).each(function() { 1208 var $this = $(this); 1209 1210 var $container = $this.find('.promotions-advanced-content'); 1211 1212 jwsThemeModule.animation_scroll($container,$container.find('.jws-post-item')); 1213 1214 if($container.hasClass('jws-promotions-advanced-slider')) { 1215 1216 jwsThemeModule.owl_caousel_init($container); 1217 1218 } 1219 }); 1220 1221 1222 1223 }; 1224 1225 var slider_elementor = function($scope, $) { 1226 var $events, 1227 prev_side, 1228 current_side, 1229 current, 1230 current_index, 1231 current_side_item; 1232 1233 $scope.find('.jws_slider_element').eq(0).each(function() { 1234 var $container = $(this).find('.jws_slider'); 1235 var $this = $(this); 1236 var verticalSwiping = false; 1237 var window_offset = 0; 1238 var thumbnail_nav = $container.next('.thumbnail-nav'); 1239 1240 1241 1242 1243 $container.on("initialized.owl.carousel", function(event) { 1244 current = event.item.index; 1245 current_side_item = $this.find('.owl-item').eq(current); 1246 current_side = current_side_item.find('.slider-item'); 1247 current_index = current_side.data('index') + 1; 1248 $this.find(".jws-button-prev").text(parseInt(current_index)); 1249 $this.find(".jws-button-next").text(parseInt(current_index + 1)); 1250 $this.find(".jws-nav-pre span").css('width',parseInt(current_index) / event.item.count * 100+'%'); 1251 1252 current_side_item.prev().removeClass('nextdiv').addClass('prevdiv'); 1253 current_side_item.next().removeClass('prevdiv').addClass('nextdiv'); 1254 }); 1255 1256 1257 jwsThemeModule.owl_caousel_init($container); 1258 1259 $container.on('translate.owl.carousel', function(event) { 1260 1261 current = event.item.index; 1262 current_side_item = $this.find('.owl-item').eq(current); 1263 current_side = current_side_item.find('.slider-item'); 1264 current_index = current_side.data('index') + 1; 1265 1266 $events = 'no'; 1267 section_change(current_side,$events); 1268 1269 current_side_item.prev().removeClass('nextdiv').addClass('prevdiv'); 1270 current_side_item.next().removeClass('prevdiv').addClass('nextdiv'); 1271 1272 1273 $this.find(".jws-button-prev").text(current_index); 1274 console.log(parseInt(current)); 1275 console.log(event.item.count); 1276 if(parseInt(current_index + 1) > event.item.count) { 1277 $this.find(".jws-button-next").text(current_index); 1278 }else{ 1279 $this.find(".jws-button-next").text(parseInt(current_index + 1)); 1280 } 1281 $this.find(".jws-nav-pre span").css('width',parseInt(current_index) / event.item.count * 100+'%'); 1282 }); 1283 1284 1285 $container.on('translated.owl.carousel', function(event) { 1286 1287 current = event.item.index; 1288 current_side = $this.find('.owl-item').eq(current).find('.slider-item'); 1289 1290 1291 $events = 'next'; 1292 section_change(current_side,$events); 1293 1294 1295 1296 }); 1297 1298 $this.find(".jws-button-next").click(function() { 1299 $container.trigger('next.owl.carousel'); 1300 }); 1301 $this.find(".jws-button-prev").click(function() { 1302 $container.trigger('prev.owl.carousel'); 1303 }); 1304 1305 if(thumbnail_nav.length) { 1306 1307 $container.on('changed.owl.carousel', function(event) { 1308 syncPosition(event , thumbnail_nav); 1309 }); 1310 1311 var options_nav = thumbnail_nav.data('owl-option'); 1312 thumbnail_nav.on("initialized.owl.carousel", function() { 1313 thumbnail_nav 1314 .find(".owl-item") 1315 .eq(0) 1316 .addClass("current"); 1317 }); 1318 thumbnail_nav.owlCarousel(options_nav); 1319 1320 1321 thumbnail_nav.on("click", ".owl-item", function(e){
1322 e.preventDefault(); 1323 var number = $(this).find('.slider-item').data('index'); 1324 var clone = $container.find('.cloned').length; 1325 var change_nav = $container.find('.owl-item').not( ".cloned" ).find('.slider-item[data-index="'+number+'"]'); 1326 $container.trigger("to.owl.carousel", change_nav.parent().index() - clone / 2 ) 1327 1328 1329 }); 1330 } 1331 1332 }); 1333 function section_change($slick,$events) { 1334 $slick.find('[data-element_type="widget"] , [data-element_type="section"] > [data-element_type="section"] , [data-element_type="column"]').each(function() { 1335 var data = $(this).data('settings'); 1336 var $this = $(this); 1337 var $animation; 1338 var $animation_delay; 1339 if(data !== undefined ) { 1340 1341 if($this.hasClass('elementor-section') || $this.hasClass('elementor-column')) { 1342 $animation = data.animation; 1343 $animation_delay = data.animation_delay; 1344 }else { 1345 $animation = data._animation 1346 $animation_delay = data._animation_delay; 1347 } 1348 1349 if($animation !== undefined) { 1350 $this.addClass('has_animated'); 1351 } 1352 if($animation_delay !== undefined) { 1353 1354 if($events == 'next') { 1355 setTimeout(function(){ 1356 $this.addClass('animated'); 1357 $this.addClass($animation); 1358 },$animation_delay); ; 1359 }else { 1360 $this.removeClass('animated'); 1361 $this.removeClass($animation); 1362 } 1363 }else if(data !== undefined) { 1364 if($events == 'next') { 1365 setTimeout(function(){ 1366 $this.addClass('animated'); 1367 $this.addClass($animation); 1368 },0); 1369 }else { 1370 $this.removeClass('animated'); 1371 $this.removeClass($animation); 1372 } 1373 } 1374 } 1375 }); 1376 1377 } 1378 1379 }; 1380 1381 1382 1383 var countdown = function($scope, $) { 1384 $scope.find('.countdown-container').eq(0).each(function() { 1385 var $coundown = $(this).find('.countdown'); 1386 $().jws_countdown($coundown); 1387 }); 1388 }; 1389 1390 var category_list = function($scope, $) { 1391 1392 $scope.find('.jws-category-list').eq(0).each(function() { 1393 jwsThemeModule.owl_caousel_init($(this).find('.jws-slider')); 1394 }); 1395 }; 1396 1397 1398 1399 $(window).on('elementor/frontend/init', function() { 1400 1401 1402 elementorFrontend.hooks.addAction('refresh_page_css', function (css) { 1403 var $obj = $('style#jws_elementor_custom_css'); 1404 if (!$obj.length) { 1405 $obj = $('<style id="jws_elementor_custom_css"></style>').appendTo('head'); 1406 } 1407 css = css.replace('/<script.*?\/script>/s', ''); 1408 $obj.html(css).appendTo('head'); 1409 }); 1410 1411 var widgets = { 1412 'jws_video_popup.default': video_popup, 1413 'jws_testimonial_slider.default': testimonials_slider, 1414 'jws_blog.default': [blogLoadMore, blog_filter], 1415 'jws_tab.default': jws_tabs, 1416 'jws_map.default': WidgetjwsGoogleMapHandler, 1417 'jws_team.default': [team_slider], 1418 'jws_menu_nav.default': jws_menu_style, 1419 'jws_gallery.default': jws_gallery, 1420 'jws_demo.default': [demo_filter], 1421 'jws-product-advanced.default': [product_tabs_filter], 1422 'tooltip.default': tooltip, 1423 'jws_instagram.default': instagram, 1424 'jws_slider.default': slider_elementor, 1425 'jws-category-list.default': category_list, 1426 'jws_widget_countdown.default': countdown, 1427 'jws_dropdown_text.default': jws_dropdown_text, 1428 'jws_image_carousel.default': images_carousel, 1429 'jws_banner.default': banner_carousel, 1430 'jws_promotions_advanced.default': promotions_advanced, 1431 'jws_accommodation-types.default': accommodation_advanced, 1432 'jws_hotel_rates.default': hotel_rates, 1433 1434 }; 1435 1436 $.each(widgets, function(widget, callback) { 1437 if('object' === typeof callback) { 1438 $.each(callback, function(index, cb) { 1439 elementorFrontend.hooks.addAction('frontend/element_ready/' + widget, cb); 1440 }); 1441 } else { 1442 elementorFrontend.hooks.addAction('frontend/element_ready/' + widget, callback); 1443 } 1444 }); 1445 }); 1446 1447 1448 1449})(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.