1jQuery(document).ready(function ($) { 2 "use strict"; 3 4 5 var header_top = 0; 6 if (jQuery('body').hasClass('admin-bar')) { 7 header_top = jQuery('#wpadminbar').height(); 8 } 9 if (jQuery('body').hasClass('frame-enabled')) { 10 header_top = header_top + 30; 11 } 12 13 14 /* ============================================== 15 //Page Preloader 16 =============================================== */ 17 18 $(document).ready(function () { 19 $("#intro").delay(300).fadeOut(); 20 $(".animationload").delay(600).fadeOut("slow"); 21 }); 22 23 /* ============================================== 24 Social share buttons--> 25 =============================================== */ 26 27 jQuery('.social-share').each(function () { 28 jQuery(this).sharrre({ 29 share: { 30 twitter: true 31 }, 32 template: '<div class="post_date"><a data-placement="bottom" data-toggle="tooltip" data-original-title="Share on Facebook" title="" href="#" class="facebookIcon"><i class="fa fa-facebook"></i></a></div> <div class="post_date"><a class="twitterIcon" data-placement="bottom" data-toggle="tooltip" data-original-title="Share on Twitter" title="" href="#"><i class="fa fa-twitter"></i></a></div> <div class="post_date"><a class="googleIcon" data-placement="bottom" data-toggle="tooltip" data-original-title="Share on Google Plus" title="" href="#"><i class="fa fa-google-plus"></i></a></div>', 33 enableHover: false, 34 enableTracking: false, 35 render: function (api, options) { 36 jQuery(api.element).on('click', '.twitterIcon', function () { 37 38 api.openPopup('twitter'); 39 }); 40 jQuery(api.element).on('click', '.facebookIcon', function () { 41 42 api.openPopup('facebook'); 43 }); 44 jQuery(api.element).on('click', '.googleIcon', function () { 45 46 api.openPopup('googlePlus'); 47 }); 48 } 49 }); 50 }); 51 52 jQuery(document).ready(function () { 53 "use strict"; 54 var serviceHeight = jQuery('#services-are .wpb_column').height()+2; 55 jQuery('.service-content').css('height', serviceHeight); 56 }); 57 58 jQuery('.service-content .wpb_wrapper').html(jQuery(this).find('.show-first .vc_cta3-content-box').clone().show()); 59 jQuery('#services-are .vc_cta3-container').on('click', function() { 60 jQuery('.service-content .wpb_wrapper').html(jQuery(this).find('.vc_cta3-content-box').clone().show('slow')); 61 }); 62 63 64 65 66 /* ============================================== 67 OWL SLIDERS --> 68 =============================================== */ 69 70 71 var sliders = document.querySelectorAll('.crum-single-slider'); 72 imagesLoaded(sliders, function () { 73 jQuery('.crum-single-slider').each(function () { 74 75 var $items, $items_responsive; 76 77 $items = $items_responsive = jQuery(this).data('items'); 78 79 if ($items > 2) { 80 $items_responsive = $items - 1; 81 } 82 83 jQuery(this).owlCarousel({ 84 loop: jQuery(this).data('loop'), 85 items: jQuery(this).data('items'), 86 nav: jQuery(this).data('nav'), 87 dots: jQuery(this).data('dots'), 88 autoplay: jQuery(this).data('autoplay'), 89 navText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"], 90 autoplayTimeout: jQuery(this).data('autoplayTimeout'), 91 autoplayHoverPause: true, 92 responsive: { 93 0: { 94 items: 1 95 }, 96 500: { 97 items: $items_responsive 98 }, 99 968: { 100 items: $items 101 } 102 } 103 }); 104 105 }); 106 }); 107 108 109 jQuery('#owl-portfolio-related').owlCarousel({ 110 loop: true, 111 margin: 0, 112 navText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"], 113 nav: true, 114 dots: false, 115 responsive: { 116 0: { 117 items: 1 118 }, 119 600: { 120 items: 2 121 }, 122 1000: { 123 items: 4 124 } 125 } 126 });
127 128 jQuery('.content-slider').owlCarousel({ 129 loop: true, 130 margin: 0, 131 navText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"], 132 nav: true, 133 dots: false, 134 responsive: { 135 0: { 136 items: 1 137 }, 138 600: { 139 items: 2 140 }, 141 1000: { 142 items: 4 143 } 144 } 145 }); 146 147 148 /* ============================================== 149 ANIMATION --> 150 =============================================== */ 151 /* 152 ** Counter from zero to defined number 153 */ 154 155 156 if (typeof jQuery.fn.waypoint !== 'undefined') { 157 jQuery('.odometer').each(function () { 158 jQuery(this).waypoint(function () { 159 if (!jQuery(this).hasClass('animated')) { 160 161 var odometer = new Odometer({el: jQuery(this)[0], value: 0}); 162 odometer.render(); 163 odometer.update(jQuery(this).data('max')); 164 jQuery(this).addClass('animated'); 165 166 } 167 }, {offset: '95%'}); 168 }); 169 } 170 171 172 /* ============================================== 173 bootstrap Select modification 174 =============================================== */ 175 176 $('.woocommerce-ordering').find('select').selectpicker(); 177 $('.variations').find('select').selectpicker(); 178 179 180 /* ============================================== 181 WPML HELPERS --> 182 =============================================== */ 183 if (jQuery("#defaultmenu").find('.sub-menu').length > 0) { 184 jQuery("#defaultmenu").find('.sub-menu').each( function() { 185 jQuery(this).addClass('dropdown-menu').parents('li').addClass('dropdown'); 186 }); 187 188 } 189 190 /* ============================================== 191 MENU HOVER --> 192 =============================================== */ 193 jQuery().jetmenu(); 194 195 /* ============================================== 196 SEARCH --> 197 =============================================== */ 198 199 var $ctsearch = $('#dmsearch'), 200 $ctsearchinput = $ctsearch.find('input.dmsearch-input'), 201 $body = $('html,body'), 202 openSearch = function () { 203 $ctsearch.data('open', true).addClass('dmsearch-open'); 204 $ctsearchinput.focus(); 205 return false; 206 }, 207 closeSearch = function () { 208 $ctsearch.data('open', false).removeClass('dmsearch-open'); 209 }; 210 211 $ctsearchinput.on('click', function (e) { 212 e.stopPropagation(); 213 $ctsearch.data('open', true); 214 }); 215 216 $ctsearch.on('click', function (e) { 217 e.stopPropagation(); 218 if (!$ctsearch.data('open')) { 219 220 openSearch(); 221 222 $body.off('click').on('click', function (e) { 223 closeSearch(); 224 }); 225 226 } 227 else { 228 if ($ctsearchinput.val() === '') { 229 closeSearch(); 230 return false; 231 } 232 } 233 }); 234 235 /* ============================================== 236 STICKY HEADER --> 237 =============================================== */ 238 239 jQuery(document).ready(function ($) { 240 241 jQuery('.insidepage-menu').scrollToFixed({ 242 243 minWidth: '0', 244 offsets: false, 245 marginTop: $('#header').height(), 246 limit: function () { 247 return jQuery('#footer').offset().top + 50; 248 } 249 }); 250 }); 251 252 253 254 /* ============================================== 255 Tooltip 256 =============================================== */ 257 258 $('[data-toggle="tooltip"]').tooltip(); 259 260 $('[data-toggle="popover"]').popover(); 261 262 /* --------------------------------------------- 263 Smooth scroll to in page anchors --> 264 --------------------------------------------- */ 265 266 // bind click event to all internal page anchors 267 268 $(function() { 269 $('a[href*=#]:not([href=#])').click(function() { 270 if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { 271 var target = $(this.hash), 272 hederH = jQuery('#header').height(); 273 target = target.length ? target : $('[id=' + this.hash.slice(1) +']'); 274 if (target.length) { 275 $('html,body').animate({ 276 scrollTop: target.offset().top - hederH 277 }, 1500); 278 return false; 279 } 280 } 281 }); 282 }); 283 284 /* ============================================== 285 // Map switcher 286 =============================================== */ 287 288 jQuery(window).bind("load resize",function(){ 289 290 var icoHeight, 291 titleHeight, 292 infoboxHeight; 293 294 $('.style_1 .aio-icon-box').each(function() { 295 296 icoHeight = jQuery('.aio-icon-top').height(), 297 titleHeight = jQuery('.aio-icon-header').height(), 298 infoboxHeight = icoHeight + titleHeight; 299 300 jQuery(this).css('height', infoboxHeight); 301 302 }) 303 304 }); 305 306 307 jQuery(window).bind("load resize",function(){ 308 var icoImgHeight = jQuery('.style_1 .aio-icon-top').height(); 309 310 $('.style_1 .aio-icon-box-link').hover(function(){ 311 $('.aio-icon-box.top-icon .info-box-inner', this).css('margin-top', '-' + icoImgHeight + 'px'); 312 }, 313 function(){ 314 $('.aio-icon-box.top-icon .info-box-inner', this).removeAttr('style'); 315 }); 316 317 }); 318 319 /* --------------------------------------------- 320 Language Switcher --> 321 --------------------------------------------- */ 322 323 $(window).load(function () { 324 325 $('.close-block .lang-area .ico').live('click', function(){ 326 $('.language-switcher').removeClass('close-block'); 327 $('.language-switcher').addClass('open-block'); 328 }); 329 330 $('.open-block .lang-area .ico').live('click', function(){ 331 $('.language-switcher').removeClass('open-block'); 332 $('.language-switcher').addClass('close-block'); 333 }); 334 335 }); 336 337 /* --------------------------------------------- 338 Book button --> 339 --------------------------------------------- */ 340 341 $(window).load(function () { 342 $('#wis2-panel').addClass('close-block'); 343 344 $('#wis2-panel.close-block .wis2-title').live('click', function(){ 345 $('#wis2-panel').removeClass('close-block'); 346 $('#wis2-panel').addClass('open-block'); 347 $('.wis2-el.wis2-input-group').fadeIn(700); 348 $('.wis2-el.wis2-button-hld').fadeIn(700); 349 $('.wis2-el.wis2-promocode-hld').fadeIn(700); 350 }); 351 352 $('#wis2-panel.open-block .wis2-title').live('click', function(){ 353 $('#wis2-panel').removeClass('open-block'); 354 $('#wis2-panel').addClass('close-block'); 355 $('.wis2-el.wis2-input-group').fadeOut(400); 356 $('.wis2-el.wis2-button-hld').fadeOut(400); 357 $('.wis2-el.wis2-promocode-hld').fadeOut(400); 358 }); 359 360 }); 361 362 $(window).load(function () { 363 $('#wis2-panel').addClass('close-block'); 364 365 $('#wis2-panel.close-block .wis2-icon-book.smallwindow').live('click', function(){ 366 $('#wis2-panel').removeClass('close-block'); 367 $('#wis2-panel').addClass('open-block'); 368 $('.wis2-el.wis2-input-group').fadeIn(700); 369 $('.wis2-el.wis2-button-hld').fadeIn(700); 370 $('.wis2-el.wis2-promocode-hld').fadeIn(700); 371 }); 372 373 $('#wis2-panel.open-block .wis2-icon-book.smallwindow').live('click', function(){ 374 $('#wis2-panel').removeClass('open-block'); 375 $('#wis2-panel').addClass('close-block'); 376 $('.wis2-el.wis2-input-group').fadeOut(400); 377 $('.wis2-el.wis2-button-hld').fadeOut(400); 378 $('.wis2-el.wis2-promocode-hld').fadeOut(400); 379 }); 380 381 }); 382 383 jQuery(window).bind("load resize",function(){ 384 if (jQuery(window).width() < 551) { 385 jQuery('.wis2-icon-book').appendTo(".wis2-panel"); 386 jQuery('.wis2-icon-book').insertBefore(".wis2-panel .wis2-title"); 387 jQuery('.wis2-icon-book').addClass('smallwindow'); 388 } else { 389 jQuery('.wis2-icon-book').insertBefore(".wis2-panel .wis2-title span"); 390 jQuery('.wis2-icon-book').removeClass('smallwindow'); 391 } 392 }); 393 394 /* --------------------------------------------- 395 header scroll --> 396 --------------------------------------------- */ 397 398 399 400 401 $(window).scroll(function() { 402 var scroll = $(window).scrollTop(); 403 404 if (scroll >= 60) { 405 $(".header").removeClass("clearHeader").addClass("darkHeader"); 406 } else { 407 $(".header").removeClass("darkHeader").addClass("clearHeader"); 408 } 409 }); 410 411 412 413 /* --------------------------------------------- 414 pricing-box --> 415 --------------------------------------------- */ 416 417 $(window).load(function () { 418 $('.pricing-box').hover(function(){ 419 $('.pricing-box-content', this).addClass('hover'); 420 }, 421 function(){ 422 $('.pricing-box-content.hover', this).removeClass('hover'); 423 }); 424 }); 425 426 /* --------------------------------------------- 427 menu --> 428 --------------------------------------------- */ 429 430 431 432 433 jQuery(window).bind("load resize",function(){ 434 if (jQuery(window).width() < 951) { 435 var windowHeight = jQuery(window).height() - 50; 436 jQuery('#defaultmenu').appendTo("#mobile-menu"); 437 jQuery('#our-places').attr('id', 'old-our-places'); 438 jQuery('#our-rooms').attr('id', 'old-our-rooms'); 439 jQuery('#menu-main-menu').css('min-height', windowHeight); 440 } 441 else { 442 jQuery('#defaultmenu').appendTo(".navbar"); 443 jQuery('#old-our-places').attr('id', 'our-places'); 444 jQuery('#old-our-rooms').attr('id', 'our-rooms'); 445 jQuery('#menu-main-menu').removeAttr('style'); 446 } 447 }); 448 449 /* --------------------------------------------- 450 WINDOWS HEIGHT JS --> 451 --------------------------------------------- */ 452 $(".js-height-full").height($(window).height()); 453 $(".js-height-parent").each(function () { 454 $(this).height($(this).parent().first().height()); 455 });
456 457 /* ============================================== 458 Loader Effect 459 =============================================== */ 460 461 $(window).load(function () { 462 $("#preloader").delay(500).fadeOut(); 463 $(".preloader").delay(600).fadeOut("slow"); 464 }); 465 466 /* ============================================== 467 // Back to Top 468 =============================================== */ 469 470 jQuery(window).scroll(function () { 471 if (jQuery(this).scrollTop() > 100) { 472 jQuery('.dmtop').css({bottom: "11px"}); 473 } else { 474 jQuery('.dmtop').css({bottom: "-100px"}); 475 } 476 }); 477 jQuery('.dmtop').click(function () { 478 jQuery('html, body').animate({scrollTop: '0px'}, 800); 479 return false; 480 }); 481 482 /* ============================================== 483 Magnific popup 484 =============================================== */ 485 486 487 jQuery('.grid-media-popup').magnificPopup({ 488 type: 'inline', 489 autoHeight : true, 490 callbacks: { 491 open: function() { 492 493 if(jQuery(this.content).find('.crum-owl-slider').length){ 494 jQuery(this.content).find('.crum-owl-slider').owlCarousel({ 495 loop: true, 496 margin: 0, 497 navText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"], 498 nav: true, 499 dots: false, 500 items: 1 501 }); 502 } 503 504 if(jQuery(this.content).find('.grid-video-popup').length) { 505 506 var iframeHeight = jQuery(".grid-video-popup iframe").height(); 507 var iframeWidth = jQuery(".grid-video-popup iframe").width(); 508 509 jQuery(".grid-video-popup iframe").css({ 510 "margin-top": -iframeHeight / 2, 511 "margin-left": -iframeWidth / 2 512 }); 513 514 var embedHeight = jQuery(".grid-video-popup embed").height(); 515 var embedWidth = jQuery(".grid-video-popup embed").width(); 516 517 jQuery(".grid-video-popup embed").css({ 518 "margin-top": -embedHeight / 2, 519 "margin-left": -embedWidth / 2 520 }); 521 522 var videoHeight = jQuery(".grid-video-popup .wp-video").height(); 523 var videoWidth = jQuery(".grid-video-popup .wp-video").width(); 524 525 jQuery(".grid-video-popup .wp-video").css({ 526 "margin-top": -videoHeight / 2, 527 "margin-left": -videoWidth / 2 528 }); 529 530 } 531 } 532 } 533 }); 534 535 536 jQuery('a.zoom-link').magnificPopup({ 537 type: 'image', 538 removalDelay: 500, //delay removal by X to allow out-animation 539 callbacks: { 540 beforeOpen: function () { 541 // just a hack that adds mfp-anim class to markup 542 this.st.image.markup = this.st.image.markup.replace('mfp-figure', 'mfp-figure mfp-with-anim'); 543 this.st.mainClass = 'mfp-zoom-in'; 544 } 545 }, 546 closeOnContentClick: true, 547 midClick: true // allow opening popup on middle mouse click. Always set it to true if you don't provide alternative source. 548 }); 549 550 jQuery('.image-gallery').magnificPopup({ 551 delegate: 'a', 552 type: 'image', 553 tLoading: 'Loading image #%curr%...', 554 gallery: { 555 enabled: true, 556 navigateByImgClick: true, 557 preload: [0, 1] // Will preload 0 - before current, and 1 after the current image 558 }, 559 image: { 560 verticalFit: true, 561 tError: '<a href="%url%">The image #%curr%</a> could not be loaded.', 562 titleSrc: function (item) { 563 return item.el.attr('alt'); 564 } 565 }, 566 closeOnContentClick: true, 567 closeBtnInside: false, 568 mainClass: 'mfp-with-zoom mfp-img-mobile', 569 570 zoom: { 571 enabled: true 572 } 573 });
574 575}); 576 577jQuery(document).ready(function () { 578 579 jQuery('.media_element').each(function(){ 580 var quantityItems = jQuery(this).find('.Buttons.StyleSc > span').length; 581 jQuery(this).addClass('items-'+quantityItems); 582 }); 583 584 jQuery('.aio-icon-component').each(function(){ 585 586 var iconHeight = jQuery(this).find('.icn-container i').height(); 587 jQuery(this).find('.icn-container i').css({"margin-top": - (iconHeight/2)-22, "margin-bottom" : 20 }); 588 589 var iconRhombicHeight = jQuery(this).find('.icn-container .rhombic i').height(); 590 jQuery(this).find('.icn-container .rhombic').css({ "margin-top" : -iconRhombicHeight/2 - 22 }); 591 jQuery(this).find('.icn-container .rhombic i').css({"margin-top" : 0, "margin-bottom" : 35 }); 592 593 }); 594 595}); 596
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.